41 std::cerr <<
"Error: Must specify libMesh input file, regression file, and regression tolerance." << std::endl;
57 libMesh::ExactSolution exact_sol(*es);
59 libMesh::EquationSystems es_ref( es->get_mesh() );
62 std::string solution_file = std::string(argv[2]);
63 es_ref.read( solution_file );
65 exact_sol.attach_reference_solution( &es_ref );
67 const GetPot & inputfile = grins.get_input_file();
68 std::string system_name = inputfile(
"screen-options/system_name",
"GRINS" );
71 exact_sol.compute_error(system_name,
"u");
72 exact_sol.compute_error(system_name,
"v");
74 exact_sol.compute_error(system_name,
"p");
76 double u_l2error = exact_sol.l2_error(system_name,
"u");
77 double u_h1error = exact_sol.h1_error(system_name,
"u");
79 double v_l2error = exact_sol.l2_error(system_name,
"v");
80 double v_h1error = exact_sol.h1_error(system_name,
"v");
82 double p_l2error = exact_sol.l2_error(system_name,
"p");
83 double p_h1error = exact_sol.h1_error(system_name,
"p");
89 double tol = atof(argv[3]);
91 if( u_l2error > tol || u_h1error > tol ||
92 v_l2error > tol || v_h1error > tol ||
93 p_l2error > tol || p_h1error > tol )
97 std::cout <<
"Tolerance exceeded for thermally driven flow test." << std::endl
98 <<
"tolerance = " << tol << std::endl
99 <<
"u l2 error = " << u_l2error << std::endl
100 <<
"u h1 error = " << u_h1error << std::endl
101 <<
"v l2 error = " << v_l2error << std::endl
102 <<
"v h1 error = " << v_h1error << std::endl
103 <<
"p l2 error = " << p_l2error << std::endl
104 <<
"p h1 error = " << p_h1error << std::endl;
SharedPtr< libMesh::EquationSystems > get_equation_system()
Class to encapsulate initializing and running GRINS Simulation.