Commit bc066897 authored by Thomas Fetzer's avatar Thomas Fetzer
Browse files

Merge branch 'feature/use-tensorgrid-in-tests' into 'master'

[navierstokes] Change test to tensor grid

Get rid of external grid managers
Use coarser mesh (65x65 instead of 85x85)

See merge request !66
parents 48a9a326 211a745a
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -23,16 +23,7 @@ ...@@ -23,16 +23,7 @@
#ifndef DUMUX_TEST_FREEFLOW_NAVIERSTOKESTESTPROBLEM_HH #ifndef DUMUX_TEST_FREEFLOW_NAVIERSTOKESTESTPROBLEM_HH
#define DUMUX_TEST_FREEFLOW_NAVIERSTOKESTESTPROBLEM_HH #define DUMUX_TEST_FREEFLOW_NAVIERSTOKESTESTPROBLEM_HH
#if HAVE_DUNE_ALUGRID #include <dune/grid/io/file/dgfparser/dgfyasp.hh>
#include <dune/alugrid/grid.hh>
#elif HAVE_UG
#include <dune/grid/io/file/dgfparser/dgfug.hh>
#else
#warning UG or ALUGrid necessary for this test.
#endif
#include <dune/grid/yaspgrid.hh>
#include <dune/grid/io/file/dgfparser.hh>
#include <dumux/material/components/constant.hh> #include <dumux/material/components/constant.hh>
#include <dumux/material/fluidsystems/gasphase.hh> #include <dumux/material/fluidsystems/gasphase.hh>
...@@ -50,13 +41,8 @@ namespace Dumux ...@@ -50,13 +41,8 @@ namespace Dumux
NEW_TYPE_TAG(NavierStokesTestProblem, INHERITS_FROM(BoxStokes)); NEW_TYPE_TAG(NavierStokesTestProblem, INHERITS_FROM(BoxStokes));
// Set the grid type // Set the grid type
#if HAVE_DUNE_ALUGRID SET_TYPE_PROP(NavierStokesTestProblem, Grid,
SET_TYPE_PROP(NavierStokesTestProblem, Grid, Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming>); Dune::YaspGrid<2, Dune::TensorProductCoordinates<typename GET_PROP_TYPE(TypeTag, Scalar), 2> >);
#elif HAVE_UG
SET_TYPE_PROP(NavierStokesTestProblem, Grid, Dune::UGGrid<2>);
#else
SET_TYPE_PROP(NavierStokesTestProblem, Grid, Dune::YaspGrid<2>);
#endif
// Set the problem property // Set the problem property
SET_TYPE_PROP(NavierStokesTestProblem, Problem, Dumux::NavierStokesTestProblem<TypeTag>); SET_TYPE_PROP(NavierStokesTestProblem, Problem, Dumux::NavierStokesTestProblem<TypeTag>);
...@@ -68,9 +54,6 @@ namespace Dumux ...@@ -68,9 +54,6 @@ namespace Dumux
SET_TYPE_PROP(NavierStokesTestProblem, Fluid, SET_TYPE_PROP(NavierStokesTestProblem, Fluid,
Dumux::GasPhase<typename GET_PROP_TYPE(TypeTag, Scalar), Dumux::GasPhase<typename GET_PROP_TYPE(TypeTag, Scalar),
Dumux::Constant<TypeTag, typename GET_PROP_TYPE(TypeTag, Scalar)> >); Dumux::Constant<TypeTag, typename GET_PROP_TYPE(TypeTag, Scalar)> >);
// Scalar is set to type double
SET_TYPE_PROP(BoxStokes, Scalar, double);
} }
/*! /*!
......
...@@ -51,12 +51,12 @@ void usage(const char *progName, const std::string &errorMsg) ...@@ -51,12 +51,12 @@ void usage(const char *progName, const std::string &errorMsg)
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
#if HAVE_SUPERLU && (HAVE_DUNE_ALUGRID || HAVE_UG) #if HAVE_SUPERLU
typedef TTAG(NavierStokesTestProblem) ProblemTypeTag; typedef TTAG(NavierStokesTestProblem) ProblemTypeTag;
return Dumux::start<ProblemTypeTag>(argc, argv, usage); return Dumux::start<ProblemTypeTag>(argc, argv, usage);
#else #else
#warning "You need to have SuperLU and dune-ALUGrid or UG to run this test." #warning "You need to have SuperLU to run this test."
std::cerr << "You need to have SuperLU and dune-ALUGrid or UG to run this test." << std::endl; std::cerr << "You need to have SuperLU to run this test." << std::endl;
return 77; return 77;
#endif #endif
} }
...@@ -4,7 +4,12 @@ MaxTimeStepSize = 10.0 # [s] ...@@ -4,7 +4,12 @@ MaxTimeStepSize = 10.0 # [s]
TEnd = 30.0 # [s] TEnd = 30.0 # [s]
[Grid] [Grid]
File = ./grids/test_navierstokes.dgf Cells0 = 25 15 25
Cells1 = 25 15 25
Grading0 = 1.06 1.0 -1.06
Grading1 = 1.06 1.0 -1.06
Positions0 = 0.0 0.3 0.7 1.0
Positions1 = 0.0 0.3 0.7 1.0
[Problem] [Problem]
EnableGravity = 0 # Disable gravity EnableGravity = 0 # Disable gravity
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment