44 std::cerr <<
"Error: Must specify libMesh input file." << std::endl;
49 std::string libMesh_input_filename = argv[1];
52 GetPot libMesh_inputfile( libMesh_input_filename );
55 libMesh::LibMeshInit libmesh_init(argc, argv);
58 libmesh_example_requires
59 (libMesh::default_solver_package() != libMesh::LASPACK_SOLVERS,
66 libmesh_init.comm() );
69 std::string restart_file = libMesh_inputfile(
"restart-options/restart_file",
"none" );
71 if( restart_file ==
"none" )
74 std::string system_name = libMesh_inputfile(
"screen-options/system_name",
"GRINS" );
75 std::tr1::shared_ptr<libMesh::EquationSystems> es = grins.get_equation_system();
76 const libMesh::System& system = es->get_system(system_name);
78 libMesh::Parameters ¶ms = es->parameters;
79 libMesh::Real T_init = libMesh_inputfile(
"Physics/LowMachNavierStokes/T0", 0.0);
80 libMesh::Real p0_init = libMesh_inputfile(
"Physics/LowMachNavierStokes/p0", 0.0);
82 libMesh::Real& dummy_T = params.set<libMesh::Real>(
"T_init");
85 libMesh::Real& dummy_p0 = params.set<libMesh::Real>(
"p0_init");
93 libMesh::Real qoi = grins.get_qoi_value(0);
102 const libMesh::Real exact_qoi = 4.8654229502012685;
104 const libMesh::Real tol = 1.0e-9;
108 libMesh::Real rel_error = std::fabs( (qoi-exact_qoi)/exact_qoi );
110 if( rel_error > tol )
116 std::cerr << std::setprecision(16)
118 <<
"Error: QoI value mismatch." << std::endl
119 <<
"Computed qoi = " << qoi << std::endl
120 <<
"Exact qoi = " << exact_qoi << std::endl
121 <<
"Relative error = " << rel_error << std::endl;
libMesh::Real initial_values(const libMesh::Point &p, const libMesh::Parameters ¶ms, const std::string &system_name, const std::string &unknown_name)