cpp_exact, a C++ code which evaluates exact solutions to a few selected examples of ordinary differential equations (ODE) and partial differential equations (PDE).
These exact solutions can be used to test out the correctness of a solution algorithm.
The information on this web page is distributed under the MIT license.
cpp_exact is available in a C version and a C++ version and a Fortran77 version and a Fortran90 version and a MATLAB version and an Octave version and a Python version.
biharmonic_exact, a C++ code which evaluates exact solutions w(x,y) to the biharmonic equation del^2 w = 0 or wxxxx + 2 wxxyy + wyyyy = 0
burgers_exact, a C++ code which evaluates several exact solutions u(x,t) of the time-dependent 1D viscous Burgers equation.
continuity_exact, a C++ code which returns a 2D velocity vector field (u,v)(x,y) which is an exact solution of the partial differential equation (PDE) sometimes called the continuity equation of fluid mechanics, which has the form ux + vy = 0.
fisher_exact, a C++ code which returns an exact solution u(x,t) of the Kolmogorov Petrovsky Piskonov Fisher partial differential equation (PDE): ut=uxx+u*(1-u).
flame_exact, a C++ code which returns the exact solution y(t) of an ordinary differential equation (ODE) which models the growth of a ball of flame in a combustion process. The exact solution is defined in terms of the Lambert W function.
kdv_exact, a C++ code which evaluates an exact solution u(x,t) of the Korteweg-deVries (KdV) partial differential equation (PDE), representing the motion of a soliton. The equation has the form u' - 6 u ux + uxxx = 0.
laplace_radial_exact, a C++ code which evaluates exact solutions u(x,y) or u(x,y,z), with radial symmetry, to the Laplace partial differential equation (PDE): del^2 U = 0.
logistic_exact, a C++ code which evaluates an exact solution y(t) of the logistic equation, which models population growth in the face of a limited carrying capacity, an ordinary differential equation (ODE) of the y' = r * ( y - y^2 / k ).
minimal_surface_exact, a C++ code which evaluates exact solutions u(x,y) to the minimal surface equation: (1+Ux^2) Uyy - 2 Ux Uy Uxy + (1+Uy^2) Uxx = 0
navier_stokes_2d_exact, a C++ code which evaluates an exact solution to the incompressible time-dependent Navier-Stokes equations (NSE) over an arbitrary domain in 2D.
navier_stokes_3d_exact, a C++ code which evaluates an exact solution to the incompressible time-dependent Navier-Stokes equations (NSE) over an arbitrary domain in 3D.
porous_medium_exact, a C++ code which returns an exact solution u(x,t) of the porous medium equation (PME), related to the diffusion equation, and based on the Barenblatt solution. The partial differential equation (PDE) has the form dudt=Del^2(u^m). This system reduces to a diffusion equation if the exponent m is set to 1.
sine_gordon_exact, a C++ code which returns an exact solution of the Sine-Gordon equation, a partial differential equation (PDE) of the form uxy=sin(u).
standing_wave_exact, a C++ code which returns an exact standing wave solution of the wave equation in one space dimension and time, utt = c^2 uxx.
stokes_2d_exact, a C++ code which evaluates exact solutions to the incompressible steady Stokes equations over the unit square in 2D.
traveling_wave_exact, a C++ code which returns an exact traveling wave solution of the wave equation in one space dimension and time, utt = c^2 uxx.