Commit 68a3c82c authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

Remove uses of SGrid in tests and the InterfaceMeshCreator.

This is done to avoid deprecation warnings when using Dumux with the
Dune master, and to be safe when SGrid will actually be removed later.

Reviewed by gruenich.



git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@13460 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent bb754b9e
......@@ -26,7 +26,7 @@
#define DUMUX_INTERFACEMESHCREATOR_HH
#include <dune/grid/common/gridfactory.hh>
#include <dune/grid/io/file/dgfparser/dgfs.hh>
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
namespace Dumux
{
......@@ -50,7 +50,7 @@ public:
static Grid* create(const std::string& dgfName, const Dune::FieldVector<int, dim>& numElements,
const Scalar interfaceY, const Scalar gradingFactor, const bool refineTop = false)
{
typedef Dune::SGrid<dim,dim> HelperGrid;
typedef Dune::YaspGrid<dim> HelperGrid;
Dune::GridPtr<HelperGrid> helperGridPtr(dgfName);
HelperGrid& helperGrid = *helperGridPtr;
typedef typename HelperGrid::LeafGridView HelperGridView;
......
......@@ -29,7 +29,6 @@
#endif
#include <dune/grid/yaspgrid.hh>
#include <dune/grid/sgrid.hh>
#include <dumux/io/cubegridcreator.hh>
#include <dumux/material/fluidsystems/liquidphase.hh>
......@@ -61,7 +60,6 @@ SET_TYPE_PROP(TestProblemOneP, GridCreator, CubeGridCreator<TypeTag>);
SET_PROP(TestProblemOneP, Grid)
{
typedef Dune::YaspGrid<2> type;
// typedef Dune::SGrid<2, 2> type;
};
// Set the wetting phase
......
......@@ -24,12 +24,7 @@
#ifndef DUMUX_TEST_2P_PROBLEM_HH
#define DUMUX_TEST_2P_PROBLEM_HH
#if HAVE_UG
#include <dune/grid/uggrid.hh>
#endif
#include <dune/grid/yaspgrid.hh>
#include <dune/grid/sgrid.hh>
#include <dumux/material/components/unit.hh>
......@@ -60,8 +55,7 @@ SET_TYPE_PROP(FVVelocity2PTestProblem, Problem, Dumux::TestDiffusionProblem<Type
// Set the grid type
SET_PROP(FVVelocity2PTestProblem, Grid)
{
// typedef Dune::YaspGrid<2> type;
typedef Dune::SGrid<2, 2> type;
typedef Dune::YaspGrid<2> type;
};
// Set the wetting phase
......@@ -95,8 +89,7 @@ SET_TYPE_PROP(FVMPFAOVelocity2PTestProblem, Problem, Dumux::TestDiffusionProblem
// Set the grid type
SET_PROP(FVMPFAOVelocity2PTestProblem, Grid)
{
// typedef Dune::YaspGrid<2> type;
typedef Dune::SGrid<2, 2> type;
typedef Dune::YaspGrid<2> type;
};
// Set the wetting phase
......@@ -127,8 +120,7 @@ SET_TYPE_PROP(MimeticPressure2PTestProblem, Problem, Dumux::TestDiffusionProblem
// Set the grid type
SET_PROP(MimeticPressure2PTestProblem, Grid)
{
// typedef Dune::YaspGrid<2> type;
typedef Dune::SGrid<2, 2> type;
typedef Dune::YaspGrid<2> type;
};
// Set the wetting phase
......
......@@ -24,12 +24,7 @@
#ifndef DUMUX_TEST_2P2C_PROBLEM_HH
#define DUMUX_TEST_2P2C_PROBLEM_HH
#if HAVE_UG
#include <dune/grid/uggrid.hh>
#endif
#include <dune/grid/yaspgrid.hh>
#include <dune/grid/sgrid.hh>
#include <dumux/io/cubegridcreator.hh>
#include <dumux/decoupled/2p2c/2p2cproblem.hh>
......@@ -59,8 +54,7 @@ SET_TYPE_PROP(TestDecTwoPTwoCProblem, GridCreator, CubeGridCreator<TypeTag>);
// Set the grid type
SET_PROP(TestDecTwoPTwoCProblem, Grid)
{
typedef Dune::YaspGrid<3> type;
// typedef Dune::SGrid<3, 3> type;
typedef Dune::YaspGrid<3> type;
};
// Set the problem property
......
......@@ -90,16 +90,16 @@ int main(int argc, char** argv)
////////////////////////////////////////////////////////////
// create the grid
////////////////////////////////////////////////////////////
Dune::FieldVector<int,dim> N(10);
Dune::FieldVector<double ,dim> L(0);
Dune::FieldVector<double,dim> H(10);
Grid grid(N,L,H);
Dune::array<int,dim> N;
std::fill(N.begin(), N.end(), 10);
Dune::FieldVector<double,dim> H(10.0);
Grid grid(H, N);
////////////////////////////////////////////////////////////
// instantiate and run the concrete problem
////////////////////////////////////////////////////////////
TimeManager timeManager;
Problem problem(timeManager, grid.leafGridView(), L, H);
Problem problem(timeManager, grid.leafGridView(), H);
// initialize the simulation
timeManager.init(problem, startTime, firstDt, tEnd, restart);
......
......@@ -24,12 +24,7 @@
#ifndef DUMUX_TEST_2P2C_PROBLEM_HH
#define DUMUX_TEST_2P2C_PROBLEM_HH
#if HAVE_UG
#include <dune/grid/uggrid.hh>
#endif
#include <dune/grid/yaspgrid.hh>
#include <dune/grid/sgrid.hh>
#include <dumux/decoupled/2p2c/2p2cproblem.hh>
#include <dumux/decoupled/2p2c/fvpressure2p2cmultiphysics.hh>
......@@ -58,8 +53,7 @@ SET_TYPE_PROP(TestMultTwoPTwoCProblem, CellData, Dumux::CellData2P2Cmultiphysics
// Set the grid type
SET_PROP(TestMultTwoPTwoCProblem, Grid)
{
// typedef Dune::YaspGrid<2> type;
typedef Dune::SGrid<3, 3> type;
typedef Dune::YaspGrid<3> type;
};
// Set the problem property
......@@ -157,8 +151,8 @@ typedef typename GridView::Intersection Intersection;
typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition;
public:
TestMultTwoPTwoCProblem(TimeManager &timeManager, const GridView &gridView, const GlobalPosition lowerLeft = 0, const GlobalPosition upperRight = 0) :
ParentType(timeManager, gridView), lowerLeft_(lowerLeft), upperRight_(upperRight), eps_(1e-6), depthBOR_(1000.0)
TestMultTwoPTwoCProblem(TimeManager &timeManager, const GridView &gridView, const GlobalPosition upperRight = 0) :
ParentType(timeManager, gridView), lowerLeft_(0), upperRight_(upperRight), eps_(1e-6), depthBOR_(1000.0)
{
// Specifies how many time-steps are done before output will be written.
// this->setOutputInterval(20);
......
......@@ -23,10 +23,6 @@
#ifndef DUMUX_STOKESTESTPROBLEM_HH
#define DUMUX_STOKESTESTPROBLEM_HH
#if HAVE_UG
#include <dune/grid/io/file/dgfparser/dgfug.hh>
#endif
#include <dune/grid/io/file/dgfparser/dgfs.hh>
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
#include <dumux/material/fluidsystems/h2on2fluidsystem.hh>
......@@ -48,7 +44,7 @@ namespace Properties
NEW_TYPE_TAG(StokesTestProblem, INHERITS_FROM(BoxStokes));
// Set the grid type
SET_TYPE_PROP(StokesTestProblem, Grid, Dune::SGrid<2, 2>);
SET_TYPE_PROP(StokesTestProblem, Grid, Dune::YaspGrid<2>);
// Set the problem property
SET_TYPE_PROP(StokesTestProblem, Problem, Dumux::StokesTestProblem<TypeTag>);
......
......@@ -23,10 +23,6 @@
#ifndef DUMUX_STOKES2CTESTPROBLEM_HH
#define DUMUX_STOKES2CTESTPROBLEM_HH
#if HAVE_UG
#include <dune/grid/io/file/dgfparser/dgfug.hh>
#endif
#include <dune/grid/io/file/dgfparser/dgfs.hh>
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
#include <dumux/material/fluidsystems/h2oairfluidsystem.hh>
......@@ -47,7 +43,7 @@ namespace Properties
NEW_TYPE_TAG(Stokes2cTestProblem, INHERITS_FROM(BoxStokesnc));
// Set the grid type
SET_TYPE_PROP(Stokes2cTestProblem, Grid, Dune::SGrid<2,2>);
SET_TYPE_PROP(Stokes2cTestProblem, Grid, Dune::YaspGrid<2>);
// Set the problem property
SET_TYPE_PROP(Stokes2cTestProblem, Problem, Dumux::Stokes2cTestProblem<TypeTag>);
......
......@@ -23,7 +23,7 @@
#ifndef DUMUX_STOKES2CNITESTPROBLEM_HH
#define DUMUX_STOKES2CNITESTPROBLEM_HH
#include <dune/grid/io/file/dgfparser/dgfs.hh>
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
#if HAVE_PARDISO
#include <dumux/linear/pardisobackend.hh>
......@@ -47,7 +47,7 @@ namespace Properties
NEW_TYPE_TAG(Stokes2cniTestProblem, INHERITS_FROM(BoxStokesncni));
// Set the grid type
SET_TYPE_PROP(Stokes2cniTestProblem, Grid, Dune::SGrid<2,2>);
SET_TYPE_PROP(Stokes2cniTestProblem, Grid, Dune::YaspGrid<2>);
// Set the problem property
SET_TYPE_PROP(Stokes2cniTestProblem, Problem, Stokes2cniTestProblem<TypeTag>);
......
......@@ -30,7 +30,6 @@
#endif
#include<iostream>
#include <dune/grid/io/file/dgfparser/dgfs.hh>
#include <dumux/geomechanics/el1p2c/el1p2cmodel.hh>
#include <dumux/implicit/common/implicitporousmediaproblem.hh>
......
......@@ -25,7 +25,7 @@
#define DUMUX_EL2P_TESTPROBLEM_HH
#include <dune/common/version.hh>
#include <dune/grid/io/file/dgfparser/dgfs.hh>
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
#include <dune/pdelab/finiteelementmap/qkfem.hh>
#include <dumux/material/fluidsystems/brineco2fluidsystem.hh>
......@@ -57,7 +57,7 @@ NEW_PROP_TAG(InitialPressSat); //!< The initial pressure and saturation function
// Set the grid type
SET_PROP(El2P_TestProblem, Grid) {
typedef Dune::SGrid<3,3> type;
typedef Dune::YaspGrid<3> type;
};
SET_PROP(El2P_TestProblem, PressureFEM)
......
......@@ -33,7 +33,6 @@
#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>
#include <dune/grid/io/file/gmshreader.hh>
......@@ -68,7 +67,6 @@ public:
// Set the grid type
SET_PROP(OnePTestProblem, Grid)
{
//typedef Dune::SGrid<2, 2> type;
typedef Dune::YaspGrid<2> type;
//typedef Dune::UGGrid<2> type;
//typedef Dune::ALUGrid<2, 2, Dune::simplex, Dune::conforming> type;
......@@ -116,9 +114,9 @@ SET_BOOL_PROP(OnePTestProblem, ProblemEnableGravity, true);
* <tt>./test_cc1p -parameterFile test_cc1p.input</tt>
*
* The same parameter file can be also used for 3d simulation but you need to change line
* <tt>typedef Dune::SGrid<2,2> type;</tt> to
* <tt>typedef Dune::SGrid<3,3> type;</tt> in the problem file
* and use <tt>1p_3d.dgf</tt> in the parameter file.
* <tt>typedef Dune::YaspGrid<2> type;</tt> to
* <tt>typedef Dune::YaspGrid<3> type;</tt> in the problem file
* and use <tt>test_1p_3d.dgf</tt> in the parameter file.
*/
template <class TypeTag>
class OnePTestProblem : public ImplicitPorousMediaProblem<TypeTag>
......
......@@ -29,7 +29,6 @@
#include <dune/grid/io/file/dgfparser/dgfug.hh>
#endif
#include <math.h>
#include <dune/grid/io/file/dgfparser/dgfs.hh>
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
#include <dumux/implicit/1p2c/1p2cmodel.hh>
......@@ -66,7 +65,6 @@ SET_PROP(OnePTwoCConductionProblem, Grid)
typedef Dune::UGGrid<2> type;
#else
// typedef Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming> type;
// typedef Dune::SGrid<2, 2> type;
typedef Dune::YaspGrid<2> type;
#endif
};
......
......@@ -29,7 +29,6 @@
#include <dune/grid/io/file/dgfparser/dgfug.hh>
#endif
#include <math.h>
#include <dune/grid/io/file/dgfparser/dgfs.hh>
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
#include <dumux/implicit/1p2c/1p2cmodel.hh>
......@@ -66,7 +65,6 @@ SET_PROP(OnePTwoCConvectionProblem, Grid)
typedef Dune::UGGrid<2> type;
#else
// typedef Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming> type;
// typedef Dune::SGrid<2, 2> type;
typedef Dune::YaspGrid<2> type;
#endif
};
......
......@@ -28,7 +28,6 @@
#if HAVE_UG
#include <dune/grid/io/file/dgfparser/dgfug.hh>
#endif
#include <dune/grid/io/file/dgfparser/dgfs.hh>
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
#include <dumux/implicit/1p2c/1p2cmodel.hh>
......@@ -64,7 +63,6 @@ SET_PROP(OnePTwoCOutflowProblem, Grid)
typedef Dune::UGGrid<2> type;
#else
// typedef Dune::ALUGrid<2, 2, Dune::cube, Dune::nonconforming> type;
// typedef Dune::SGrid<2, 2> type;
typedef Dune::YaspGrid<2> type;
#endif
};
......
......@@ -31,7 +31,6 @@
#endif
#include <dune/grid/yaspgrid.hh>
#include <dune/grid/sgrid.hh>
#include <dumux/material/components/simpleh2o.hh>
#include <dumux/material/components/dnapl.hh>
......
......@@ -24,7 +24,7 @@
#ifndef DUMUX_INJECTION_PROBLEM_HH
#define DUMUX_INJECTION_PROBLEM_HH
#include <dune/grid/io/file/dgfparser/dgfs.hh>
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
#include <dumux/implicit/2p2c/2p2cmodel.hh>
#include <dumux/implicit/common/implicitporousmediaproblem.hh>
......@@ -47,7 +47,7 @@ NEW_TYPE_TAG(InjectionCCProblem, INHERITS_FROM(CCModel, InjectionProblem));
// Set the grid type
SET_PROP(InjectionProblem, Grid)
{
typedef Dune::SGrid<2,2> type;
typedef Dune::YaspGrid<2> type;
};
// Set the problem property
......
......@@ -26,7 +26,6 @@
#define DUMUX_WATER_AIR_PROBLEM_HH
#include <dune/grid/io/file/dgfparser/dgfug.hh>
#include <dune/grid/io/file/dgfparser/dgfs.hh>
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
#include <dumux/material/fluidsystems/h2on2fluidsystem.hh>
......
......@@ -30,7 +30,6 @@
#if HAVE_UG
#include <dune/grid/io/file/dgfparser/dgfug.hh>
#endif
#include <dune/grid/io/file/dgfparser/dgfs.hh>
#include <dumux/io/simplexgridcreator.hh>
#include <dumux/io/cubegridcreator.hh>
......
......@@ -25,10 +25,7 @@
#ifndef DUMUX_INFILTRATION_THREEP_PROBLEM_HH
#define DUMUX_INFILTRATION_THREEP_PROBLEM_HH
#include <dune/grid/io/file/dgfparser/dgfug.hh>
#include <dune/grid/io/file/dgfparser/dgfs.hh>
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
#include <dune/grid/io/file/dgfparser/dgfs.hh>
#include <dumux/implicit/3p/3pmodel.hh>
#include <dumux/implicit/common/implicitporousmediaproblem.hh>
......@@ -49,7 +46,7 @@ NEW_TYPE_TAG(InfiltrationThreePBoxProblem, INHERITS_FROM(BoxModel, InfiltrationT
NEW_TYPE_TAG(InfiltrationThreePCCProblem, INHERITS_FROM(CCModel, InfiltrationThreePProblem));
// Set the grid type
SET_TYPE_PROP(InfiltrationThreePProblem, Grid, Dune::SGrid<2,2>);
SET_TYPE_PROP(InfiltrationThreePProblem, Grid, Dune::YaspGrid<2>);
// Set the problem property
SET_TYPE_PROP(InfiltrationThreePProblem, Problem, Dumux::InfiltrationThreePProblem<TypeTag>);
......
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