Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
......@@ -23,16 +23,7 @@
#ifndef DUMUX_TEST_FREEFLOW_NAVIERSTOKESTESTPROBLEM_HH
#define DUMUX_TEST_FREEFLOW_NAVIERSTOKESTESTPROBLEM_HH
#if HAVE_DUNE_ALUGRID
#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 <dune/grid/io/file/dgfparser/dgfyasp.hh>
#include <dumux/material/components/constant.hh>
#include <dumux/material/fluidsystems/gasphase.hh>
......@@ -50,13 +41,8 @@ namespace Dumux
NEW_TYPE_TAG(NavierStokesTestProblem, INHERITS_FROM(BoxStokes));
// Set the grid type
#if HAVE_DUNE_ALUGRID
SET_TYPE_PROP(NavierStokesTestProblem, Grid, Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming>);
#elif HAVE_UG
SET_TYPE_PROP(NavierStokesTestProblem, Grid, Dune::UGGrid<2>);
#else
SET_TYPE_PROP(NavierStokesTestProblem, Grid, Dune::YaspGrid<2>);
#endif
SET_TYPE_PROP(NavierStokesTestProblem, Grid,
Dune::YaspGrid<2, Dune::TensorProductCoordinates<typename GET_PROP_TYPE(TypeTag, Scalar), 2> >);
// Set the problem property
SET_TYPE_PROP(NavierStokesTestProblem, Problem, Dumux::NavierStokesTestProblem<TypeTag>);
......@@ -68,9 +54,6 @@ namespace Dumux
SET_TYPE_PROP(NavierStokesTestProblem, Fluid,
Dumux::GasPhase<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)
int main(int argc, char** argv)
{
#if HAVE_SUPERLU && (HAVE_DUNE_ALUGRID || HAVE_UG)
#if HAVE_SUPERLU
typedef TTAG(NavierStokesTestProblem) ProblemTypeTag;
return Dumux::start<ProblemTypeTag>(argc, argv, usage);
#else
#warning "You need to have SuperLU and dune-ALUGrid or UG to run this test."
std::cerr << "You need to have SuperLU and dune-ALUGrid or UG to run this test." << std::endl;
#warning "You need to have SuperLU to run this test."
std::cerr << "You need to have SuperLU to run this test." << std::endl;
return 77;
#endif
}
......@@ -4,7 +4,12 @@ MaxTimeStepSize = 10.0 # [s]
TEnd = 30.0 # [s]
[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]
EnableGravity = 0 # Disable gravity
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment