mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-06 22:43:01 -06:00
lens problem: make it easily switchable between ALUGrid and YaspGrid
"easily" is a relative measure and means "easy in the C++ code". it works by setting the LENS_USE_ALUGRID define in lensproblem.hh.
This commit is contained in:
parent
88346ec1ed
commit
6b2bf9a100
@ -32,11 +32,6 @@
|
||||
#include <dune/grid/yaspgrid.hh>
|
||||
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
|
||||
|
||||
#if HAVE_DUNE_ALUGRID
|
||||
#include <dune/alugrid/grid.hh>
|
||||
#include <dune/alugrid/dgf.hh>
|
||||
#endif
|
||||
|
||||
#include <dune/common/fvector.hh>
|
||||
#include <dune/common/version.hh>
|
||||
|
||||
@ -69,7 +64,6 @@ NEW_PROP_TAG(GridGlobalRefinements);
|
||||
|
||||
// set the Grid and GridManager properties
|
||||
SET_TYPE_PROP(LensGridManager, Grid, Dune::YaspGrid<2>);
|
||||
//SET_TYPE_PROP(LensGridManager, Grid, Dune::ALUGrid< 2, 2, Dune::cube, Dune::nonconforming > );
|
||||
|
||||
SET_TYPE_PROP(LensGridManager, GridManager, Ewoms::LensGridManager<TypeTag>);
|
||||
} // namespace Properties
|
||||
|
@ -39,6 +39,12 @@
|
||||
#include <opm/material/components/SimpleH2O.hpp>
|
||||
#include <opm/material/components/Dnapl.hpp>
|
||||
|
||||
//#define LENS_USE_ALUGRID 1
|
||||
#if LENS_USE_ALUGRID
|
||||
#include <dune/alugrid/grid.hh>
|
||||
#include <dune/alugrid/dgf.hh>
|
||||
#endif
|
||||
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/common/fvector.hh>
|
||||
#include <dune/common/fmatrix.hh>
|
||||
@ -52,7 +58,11 @@ template <class TypeTag>
|
||||
class LensProblem;
|
||||
|
||||
namespace Properties {
|
||||
#if LENS_USE_ALUGRID
|
||||
NEW_TYPE_TAG(LensBaseProblem);
|
||||
#else
|
||||
NEW_TYPE_TAG(LensBaseProblem, INHERITS_FROM(LensGridManager));
|
||||
#endif
|
||||
|
||||
// declare the properties specific for the lens problem
|
||||
NEW_PROP_TAG(LensLowerLeftX);
|
||||
@ -85,6 +95,10 @@ public:
|
||||
typedef Opm::LiquidPhase<Scalar, Opm::DNAPL<Scalar> > type;
|
||||
};
|
||||
|
||||
#if LENS_USE_ALUGRID
|
||||
SET_TYPE_PROP(LensBaseProblem, Grid, Dune::ALUGrid< 2, 2, Dune::cube, Dune::nonconforming > );
|
||||
#endif
|
||||
|
||||
// Set the material Law
|
||||
SET_PROP(LensBaseProblem, MaterialLaw)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user