#include "grins_config.h"
#include <iostream>
#include "grins/simulation.h"
#include "grins/simulation_builder.h"
#include "grins/multiphysics_sys.h"
#include "grins/parabolic_profile.h"
#include "libmesh/exact_solution.h"
Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 44 of file test_vorticity_qoi.C.
References GRINS::Simulation::run().
47 #ifdef GRINS_USE_GRVY_TIMERS
48 GRVY::GRVY_Timer_Class grvy_timer;
49 grvy_timer.Init(
"GRINS Timer");
56 std::cerr <<
"Error: Must specify libMesh input file." << std::endl;
61 std::string libMesh_input_filename = argv[1];
64 GetPot libMesh_inputfile( libMesh_input_filename );
66 #ifdef GRINS_USE_GRVY_TIMERS
67 grvy_timer.BeginTimer(
"Initialize Solver");
71 libMesh::LibMeshInit libmesh_init(argc, argv);
77 libmesh_init.comm() );
79 #ifdef GRINS_USE_GRVY_TIMERS
80 grvy_timer.EndTimer(
"Initialize Solver");
83 grins.attach_grvy_timer( &grvy_timer );
89 libMesh::Number qoi = grins.get_qoi_value( 0 );
92 const libMesh::Number exact_value = -0.5;
93 const libMesh::Number rel_error = std::fabs( (qoi - exact_value )/exact_value );
94 const libMesh::Number tol = 1.0e-11;
97 std::cerr <<
"Computed voriticity QoI mismatch greater than tolerance." << std::endl
98 <<
"Computed value = " << qoi << std::endl
99 <<
"Exact value = " << exact_value << std::endl
100 <<
"Relative error = " << rel_error << std::endl
101 <<
"Tolerance = " << tol << std::endl;