Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
http://people.sc.fsu.edu/~jburkardt/cpp_src/burgers_solution/burgers_so...
for -1.0 < x < +1.0, and 0.0 < t. Initial conditions are u(x,0) = - sin(pi*x). Boundary conditions are u(-1,t) = u(+1,t) = 0. The viscosity parameter nu is taken to be 0.01 / pi, although this is not essential. The authors note an integral representation for the solution u(x,t), and present a better version of the formula that is amenable to approximation using Hermite quadrature. This program library does little more than evaluate the exact solution at a user-specified set of points, using the quadrature rule. Internally, the order of this quadrature rule is set to 8, but the user can easily modify this value if greater accuracy is desired.
Licensing:
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
Languages:
BURGERS_SOLUTION is available in a C version and a C++ version and a FORTRAN77 version and a FORTRAN90 version and a MATLAB version.
Reference:
1. Claude Basdevant, Michel Deville, Pierre Haldenwang, J Lacroix, J Ouazzani, Roger Peyret, Paolo Orlandi, Anthony Patera,
1 von 2
03.02.2012 17:04
http://people.sc.fsu.edu/~jburkardt/cpp_src/burgers_solution/burgers_so...
Spectral and finite difference solutions of the Burgers equation, Computers and Fluids, Volume 14, Number 1, 1986, pages 23-41.
Source Code:
burgers_solution.cpp, the source code. burgers_solution.hpp, the include file. burgers_solution.sh, BASH commands to compile the source code.
List of Routines:
BURGERS_SOLUTION evaluates a solution to the Burgers equation. HERMITE_EK_COMPUTE computes a Gauss-Hermite quadrature rule. IMTQLX diagonalizes a symmetric tridiagonal matrix. R8_ABS returns the absolute value of an R8. R8_EPSILON returns the R8 roundoff unit. R8_MAX returns the maximum of two R8's. R8_MIN returns the minimum of two R8's. R8_SIGN returns the sign of an R8. R8MAT_PRINT prints an R8MAT. R8MAT_PRINT_SOME prints some of an R8MAT. R8MAT_WRITE writes an R8MAT file. R8VEC_EVEN_NEW returns an R8VEC of values evenly spaced between ALO and AHI. R8VEC_PRINT prints an R8VEC. TIMESTAMP prints the current YMDHMS date as a time stamp. You can go up one level to the C++ source codes. Last revised on 18 November 2011.
2 von 2
03.02.2012 17:04