#include "grins_config.h"
#include <iostream>
#include "grins/simulation.h"
#include "grins/simulation_builder.h"
#include "grins/multiphysics_sys.h"
#include "libmesh/exact_solution.h"
Go to the source code of this file.
|
| 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 &) |
| |
| int | main (int argc, char *argv[]) |
| |
| libMesh::Gradient exact_derivative |
( |
const libMesh::Point & |
p, |
|
|
const libMesh::Parameters & |
, |
|
|
const std::string & |
, |
|
|
const std::string & |
|
|
) |
| |
| libMesh::Number exact_solution |
( |
const libMesh::Point & |
p, |
|
|
const libMesh::Parameters & |
, |
|
|
const std::string & |
, |
|
|
const std::string & |
|
|
) |
| |
| int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 55 of file test_ns_couette_flow_2d_x.C.
References exact_derivative(), exact_solution(), and GRINS::Simulation::run().
58 #ifdef GRINS_USE_GRVY_TIMERS
59 GRVY::GRVY_Timer_Class grvy_timer;
60 grvy_timer.Init(
"GRINS Timer");
67 std::cerr <<
"Error: Must specify libMesh input file." << std::endl;
72 std::string libMesh_input_filename = argv[1];
75 GetPot libMesh_inputfile( libMesh_input_filename );
77 #ifdef GRINS_USE_GRVY_TIMERS
78 grvy_timer.BeginTimer(
"Initialize Solver");
82 libMesh::LibMeshInit libmesh_init(argc, argv);
88 libmesh_init.comm() );
90 #ifdef GRINS_USE_GRVY_TIMERS
91 grvy_timer.EndTimer(
"Initialize Solver");
94 grins.attach_grvy_timer( &grvy_timer );
99 #ifdef GRINS_USE_GRVY_TIMERS
100 grvy_timer.Finalize();
103 std::tr1::shared_ptr<libMesh::EquationSystems> es = grins.get_equation_system();
106 libMesh::ExactSolution exact_sol(*es);
112 exact_sol.compute_error(
"GRINS",
"u");
114 double l2error = exact_sol.l2_error(
"GRINS",
"u");
115 double h1error = exact_sol.h1_error(
"GRINS",
"u");
119 if( l2error > 1.0e-10 || h1error > 1.0e-10 )
123 std::cout <<
"Tolerance exceeded for Couette flow test." << std::endl
124 <<
"l2 error = " << l2error << std::endl
125 <<
"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 &)