73 #ifdef GRINS_USE_GRVY_TIMERS
74 GRVY::GRVY_Timer_Class grvy_timer;
75 grvy_timer.Init(
"GRINS Timer");
82 std::cerr <<
"Error: Must specify libMesh input file." << std::endl;
87 std::string libMesh_input_filename = argv[1];
90 GetPot libMesh_inputfile( libMesh_input_filename );
92 #ifdef GRINS_USE_GRVY_TIMERS
93 grvy_timer.BeginTimer(
"Initialize Solver");
97 libMesh::LibMeshInit libmesh_init(argc, argv);
100 libmesh_example_requires
101 (libMesh::default_solver_package() != libMesh::LASPACK_SOLVERS,
112 libmesh_init.comm() );
114 #ifdef GRINS_USE_GRVY_TIMERS
115 grvy_timer.EndTimer(
"Initialize Solver");
118 grins.attach_grvy_timer( &grvy_timer );
125 std::tr1::shared_ptr<libMesh::EquationSystems> es = grins.get_equation_system();
128 libMesh::ExactSolution exact_sol(*es);
134 exact_sol.compute_error(
"GRINS",
"z_vel");
136 double l2error = exact_sol.l2_error(
"GRINS",
"z_vel");
137 double h1error = exact_sol.h1_error(
"GRINS",
"z_vel");
141 if( l2error > 2.0e-9 || h1error > 4.0e-7 )
145 std::cout <<
"Tolerance exceeded for velocity in Poiseuille test." << std::endl
146 <<
"l2 error = " << l2error << std::endl
147 <<
"h1 error = " << h1error << std::endl;
libMesh::Number exact_solution(const libMesh::Point &p, const libMesh::Parameters &, const std::string &, const std::string &)
libMesh::Gradient exact_derivative(const libMesh::Point &p, const libMesh::Parameters &, const std::string &, const std::string &)
void attach_bc_factory(std::tr1::shared_ptr< BoundaryConditionsFactory > bc_factory)