Commit c8af2be3 authored by Christoph Grueninger's avatar Christoph Grueninger
Browse files

[ALUGrid] Initial support for dune-alugrid.

The adaptivity is borken, see FS#237.
(reviewed by bernd)


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@13344 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 4ed20bb2
......@@ -30,6 +30,9 @@
#include <dune/common/parallel/mpihelper.hh>
#include <dune/grid/io/file/dgfparser.hh>
#ifdef HAVE_DUNE_ALUGRID
#include <dune/alugrid/dgf.hh>
#endif // HAVE_DUNE_ALUGRID
#include "propertysystem.hh"
#include "parameters.hh"
......
......@@ -34,6 +34,8 @@
#if HAVE_ALUGRID
#include <dune/grid/alugrid/2d/alugrid.hh>
#include <dune/grid/alugrid/3d/alugrid.hh>
#elif HAVE_DUNE_ALUGRID
#include <dune/alugrid/grid.hh>
#endif
#if HAVE_UG
#include <dune/grid/uggrid.hh>
......@@ -79,7 +81,7 @@ struct GridImp<Dune::SGrid<dim, dim>, dim>
static const int imp = GridTypes::sGrid;
};
#if HAVE_ALUGRID
#if HAVE_ALUGRID || HAVE_DUNE_ALUGRID
template<int dim>
struct GridImp<Dune::ALUGrid<dim, dim, Dune::cube, Dune::nonconforming>, dim>
{
......
......@@ -28,6 +28,8 @@
#if HAVE_ALUGRID
#include <dune/grid/alugrid/2d/alugrid.hh>
#include <dune/grid/alugrid/3d/alugrid.hh>
#elif HAVE_DUNE_ALUGRID
#include <dune/alugrid/grid.hh>
#endif
#if HAVE_UG
#include <dune/grid/uggrid.hh>
......@@ -62,7 +64,7 @@ struct GridRestartCheck<Dune::SGrid<dim, dim>, dim>
static const bool allowRestart = false;
};
#if HAVE_ALUGRID
#if HAVE_ALUGRID || HAVE_DUNE_ALUGRID
template<int dim>
struct GridRestartCheck<Dune::ALUGrid<dim, dim, Dune::cube, Dune::nonconforming>, dim>
{
......
......@@ -6,4 +6,4 @@ Module: dumux
Version: 2.6-svn
Maintainer: dumux@listserv.uni-stuttgart.de
Depends: dune-grid (>= 2.3) dune-localfunctions (>= 2.3) dune-istl (>= 2.3)
Suggests: dune-pdelab (>=2.0) dune-multidomain
Suggests: dune-alugrid dune-pdelab (>=2.0) dune-multidomain
......@@ -25,7 +25,7 @@
#include "config.h"
#include <iostream>
#if HAVE_ALUGRID || HAVE_UG
#if HAVE_ALUGRID || HAVE_DUNE_ALUGRID || HAVE_UG
#include <dune/common/exceptions.hh>
#include <dune/common/parallel/mpihelper.hh>
......@@ -233,4 +233,4 @@ int main()
std::cerr << "You need to have ALUGrid or UG installed to run this test\n";
return 77;
}
#endif // HAVE_ALUGRID | HAVE_UG
#endif // HAVE_ALUGRID || HAVE_DUNE_ALUGRID || HAVE_UG
......@@ -22,9 +22,13 @@
#ifndef DUMUX_TEST_DIFFUSION_3D_PROBLEM_HH
#define DUMUX_TEST_DIFFUSION_3D_PROBLEM_HH
#if HAVE_ALUGRID || HAVE_UG
#if HAVE_ALUGRID || HAVE_DUNE_ALUGRID || HAVE_UG
#if HAVE_ALUGRID
#include <dune/grid/alugrid/3d/alugrid.hh>
#elif HAVE_DUNE_ALUGRID
#include <dune/alugrid/grid.hh>
#endif
#include <dune/grid/uggrid.hh>
#include <dumux/material/components/unit.hh>
......@@ -53,7 +57,7 @@ namespace Properties
NEW_TYPE_TAG(DiffusionTestProblem, INHERITS_FROM(DecoupledTwoP, TestDiffusionSpatialParams3d));
// Set the grid type
#if HAVE_ALUGRID
#if HAVE_ALUGRID || HAVE_DUNE_ALUGRID
SET_TYPE_PROP(DiffusionTestProblem, Grid, Dune::ALUGrid<3, 3, Dune::cube, Dune::nonconforming>);
#else
SET_TYPE_PROP(DiffusionTestProblem, Grid, Dune::UGGrid<3>);
......@@ -272,6 +276,6 @@ private:
};
} //end namespace
#endif // HAVE_ALUGRID | HAVE_UGGRID
#endif // HAVE_ALUGRID || HAVE_DUNE_ALUGRID || HAVE_UGGRID
#endif
......@@ -23,7 +23,7 @@
#include "config.h"
#if HAVE_ALUGRID
#if HAVE_ALUGRID || HAVE_DUNE_ALUGRID
#include "test_3d2pproblem.hh"
#include <dumux/common/start.hh>
......
......@@ -25,23 +25,24 @@
#define DUMUX_TEST_3D2P_PROBLEM_HH
#if HAVE_ALUGRID
#include <dune/grid/alugrid/3d/alugrid.hh>
#elif HAVE_DUNE_ALUGRID
#include <dune/alugrid/grid.hh>
#endif
#include <dumux/io/cubegridcreator.hh>
#include <dumux/material/fluidsystems/liquidphase.hh>
#include <dumux/material/fluidsystems/gasphase.hh>
#include <dumux/material/components/simpleh2o.hh>
#include <dumux/decoupled/2p/impes/impesproblem2p.hh>
#include <dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressureproperties2p.hh>
#include <dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressureproperties2padaptive.hh>
#include <dumux/decoupled/2p/diffusion/fv/fvpressureproperties2p.hh>
#include <dumux/decoupled/2p/diffusion/fv/fvpressureproperties2padaptive.hh>
#include <dumux/decoupled/2p/diffusion/mimetic/mimeticpressureproperties2p.hh>
#include <dumux/decoupled/2p/diffusion/mimetic/mimeticpressureproperties2padaptive.hh>
#include <dumux/decoupled/2p/impes/impesproblem2p.hh>
#include <dumux/decoupled/2p/transport/fv/fvtransportproperties2p.hh>
#include "test_3d2pspatialparams.hh"
......@@ -424,5 +425,3 @@ GlobalPosition outflowEdge_;
} //end namespace
#endif
#endif
......@@ -24,7 +24,7 @@
*/
#include "config.h"
#if HAVE_ALUGRID
#if HAVE_ALUGRID || HAVE_DUNE_ALUGRID
#include "test_impesadaptiveproblem.hh"
#include <dumux/common/start.hh>
......
......@@ -25,8 +25,11 @@
#define DUMUX_TEST_IMPES_ADAPTIVE_PROBLEM_HH
#if HAVE_ALUGRID
#include <dune/grid/alugrid/2d/alugrid.hh>
#elif HAVE_DUNE_ALUGRID
#include <dune/alugrid/grid.hh>
#endif
#include <dumux/io/cubegridcreator.hh>
#include <dumux/material/fluidsystems/liquidphase.hh>
......@@ -268,6 +271,4 @@ private:
};
} //end namespace
#endif
#endif
#endif // DUMUX_TEST_IMPES_ADAPTIVE_PROBLEM_HH
......@@ -23,7 +23,7 @@
#include "config.h"
#if HAVE_ALUGRID
#if HAVE_ALUGRID || HAVE_DUNE_ALUGRID
#include "test_mpfa2pproblem.hh"
#include <dumux/common/start.hh>
......
......@@ -25,8 +25,10 @@
#define DUMUX_TEST_MPFA2P_PROBLEM_HH
#if HAVE_ALUGRID
#include <dune/grid/alugrid/2d/alugrid.hh>
#elif HAVE_DUNE_ALUGRID
#include <dune/alugrid/grid.hh>
#endif
#include <dumux/io/cubegridcreator.hh>
......@@ -500,6 +502,4 @@ McWhorterAnalytic<TypeTag> analyticSolution_;
};
} //end namespace
#endif
#endif
#endif // DUMUX_TEST_MPFA2P_PROBLEM_HH
......@@ -55,7 +55,7 @@ void usage(const char *progName, const std::string &errorMsg)
// The main function using the standard start procedure
int main(int argc, char** argv)
{
#if HAVE_ALUGRID
#if HAVE_ALUGRID || HAVE_DUNE_ALUGRID
typedef TTAG(Adaptive2p2c2d) TypeTag;
return Dumux::start<TypeTag>(argc, argv, usage);
#else
......
......@@ -24,8 +24,11 @@
#ifndef DUMUX_TEST_ADAPTIVE2D_2P2C_PROBLEM_HH
#define DUMUX_TEST_ADAPTIVE2D_2P2C_PROBLEM_HH
#if HAVE_ALUGRID
#include <dune/grid/alugrid.hh>
// #include <dune/grid/uggrid.hh>
#elif HAVE_DUNE_ALUGRID
#include <dune/alugrid/grid.hh>
#endif
#include <dumux/io/cubegridcreator.hh>
......@@ -34,7 +37,6 @@
#include <dumux/decoupled/2p2c/2p2cproblem.hh>
#include <dumux/decoupled/2p/impes/gridadaptionindicator2p.hh>
#include <dumux/material/fluidmatrixinteractions/2p/linearmaterial.hh>
#include <dumux/material/fluidsystems/h2oairfluidsystem.hh>
#include <dumux/material/fluidsystems/h2on2fluidsystem.hh>
......@@ -53,7 +55,7 @@ NEW_TYPE_TAG(Adaptive2p2c2d, INHERITS_FROM(DecoupledTwoPTwoCAdaptive,Test2P2CSpa
// Set the grid type
SET_PROP(Adaptive2p2c2d, Grid)
{
#if HAVE_ALUGRID
#if HAVE_ALUGRID || HAVE_DUNE_ALUGRID
typedef Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming> type;
// #elseif HAVE_UG
// typedef Dune::UGGrid<2> type; //would need a DGF file to specify closure
......
......@@ -23,7 +23,7 @@
*/
#include "config.h"
#if HAVE_ALUGRID
#if HAVE_ALUGRID || HAVE_DUNE_ALUGRID || HAVE_DUNE_ALUGRID
#include "test_adaptive2p2c3dproblem.hh"
#include <dumux/common/start.hh>
......@@ -72,4 +72,4 @@ int main()
std::cerr << "You need to have ALUGrid installed to run this test\n";
return 77;
}
#endif // HAVE_ALUGRID
#endif // HAVE_ALUGRID || HAVE_DUNE_ALUGRID || HAVE_DUNE_ALUGRID
......@@ -24,22 +24,18 @@
#ifndef DUMUX_TEST_ADAPTIVE3D_2P2C_PROBLEM_HH
#define DUMUX_TEST_ADAPTIVE3D_2P2C_PROBLEM_HH
#if HAVE_UG
#include <dune/grid/uggrid.hh>
#endif
#if HAVE_ALUGRID
#include <dune/grid/alugrid.hh>
#include <dumux/io/cubegridcreator.hh>
#elif HAVE_DUNE_ALUGRID
#include <dune/alugrid/grid.hh>
#endif
#include <dumux/common/math.hh>
#include <dumux/decoupled/2p2c/2p2cadaptiveproperties.hh>
#include <dumux/decoupled/2p2c/2p2cproblem.hh>
#include <dumux/decoupled/2p/impes/gridadaptionindicator2p.hh>
#include <dumux/io/cubegridcreator.hh>
#include <dumux/material/fluidmatrixinteractions/2p/linearmaterial.hh>
#include <dumux/material/fluidsystems/h2oairfluidsystem.hh>
#include "test_dec2p2c_spatialparams.hh"
......@@ -58,7 +54,6 @@ NEW_TYPE_TAG(Adaptive2p2c3d, INHERITS_FROM(DecoupledTwoPTwoCAdaptive,Test2P2CSpa
SET_PROP(Adaptive2p2c3d, Grid)
{
typedef Dune::ALUGrid<3, 3, Dune::cube, Dune::nonconforming> type;
// typedef Dune::UGGrid<3> type; //would need a DGF file to specify closure
};
// set the GridCreator property
SET_TYPE_PROP(Adaptive2p2c3d, GridCreator, CubeGridCreator<TypeTag>);
......@@ -346,6 +341,4 @@ Scalar injectionrate_;
};
} //end namespace
#endif
#endif // HAVE_ALUGRID
#endif // DUMUX_TEST_ADAPTIVE3D_2P2C_PROBLEM_HH
......@@ -25,6 +25,8 @@
#if HAVE_ALUGRID
#include <dune/grid/alugrid/2d/alugrid.hh>
#elif HAVE_DUNE_ALUGRID
#include <dune/alugrid/grid.hh>
#elif HAVE_UG
#include <dune/grid/io/file/dgfparser/dgfug.hh>
#else
......@@ -55,7 +57,7 @@ namespace Dumux
NEW_TYPE_TAG(NavierStokesTestProblem, INHERITS_FROM(BoxStokes));
// Set the grid type
#if HAVE_ALUGRID
#if HAVE_ALUGRID || 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>);
......
......@@ -51,7 +51,7 @@ void usage(const char *progName, const std::string &errorMsg)
int main(int argc, char** argv)
{
#if HAVE_SUPERLU && (HAVE_ALUGRID || HAVE_UG)
#if HAVE_SUPERLU && (HAVE_ALUGRID || HAVE_DUNE_ALUGRID || HAVE_UG)
typedef TTAG(NavierStokesTestProblem) ProblemTypeTag;
return Dumux::start<ProblemTypeTag>(argc, argv, usage);
#else
......
......@@ -30,6 +30,8 @@
#endif
#if HAVE_ALUGRID
#include <dune/grid/io/file/dgfparser/dgfalu.hh>
#elif HAVE_DUNE_ALUGRID
#include <dune/alugrid/grid.hh>
#endif
#include <dune/grid/io/file/dgfparser/dgfs.hh>
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
......
......@@ -26,6 +26,8 @@
#if HAVE_ALUGRID
#include <dune/grid/alugrid/2d/alugrid.hh>
#elif HAVE_DUNE_ALUGRID
#include <dune/alugrid/grid.hh>
#else
#warning ALUGrid is necessary for this test.
#endif
......@@ -60,7 +62,7 @@ NEW_TYPE_TAG(HeterogeneousCCProblem, INHERITS_FROM(CCModel, HeterogeneousProblem
//SET_PROP(HeterogeneousProblem, Grid)
//{
// //typedef Dune::UGGrid<2> type;
//#if HAVE_ALUGRID
//#if HAVE_ALUGRID || HAVE_DUNE_ALUGRID
// typedef Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming> type;
//#else
//#warning If you want to run this problem, install and use ALUGrid.
......@@ -68,7 +70,7 @@ NEW_TYPE_TAG(HeterogeneousCCProblem, INHERITS_FROM(CCModel, HeterogeneousProblem
//};
// Set the grid type
#if HAVE_ALUGRID
#if HAVE_ALUGRID || HAVE_DUNE_ALUGRID
SET_TYPE_PROP(HeterogeneousProblem, Grid, Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming>);
#else
SET_TYPE_PROP(HeterogeneousProblem, Grid, Dune::YaspGrid<2>);
......
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