#include "grins/gaussian_xy_profile.h"
#include "libmesh/point.h"
Go to the source code of this file.
Definition at line 32 of file gaussian_profiles.C.
35 const double mu = 1.5;
36 const double sigma = 2.1;
38 GRINS::GaussianXYProfile profile( a, mu, sigma, b );
43 libMesh::Point p( x, y );
45 const double value = profile( p, 0.0 );
47 const double r = std::sqrt( x*x + y*y);
48 const double exact_value = a*std::exp( -(r-mu)*(r-mu)/(2.0*sigma*sigma) ) - b;
50 const double error = std::fabs( value - exact_value);
51 const double tol = 1.0e-15;
57 std::cout <<
"Error: GaussianXYProfile tolerance exceeded." << std::endl
58 <<
"exact value = " << exact_value << std::endl
59 <<
"value = " << value << std::endl
60 <<
"error = " << error << std::endl
61 <<
"tolerance = " << tol << std::endl;