mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
change namespace from Dune to Dumux and fix a few compilation issues
I tried to catch most stuff, but occationally Dune:: prefix is required for stuff which is provided by DUNE and sometimes the Dune:: prefix needs to be changed to Dumux:: for stuff which is part of DuMuX
This commit is contained in:
committed by
Andreas Lauser
parent
4b43eb4d1b
commit
84efa910ae
@@ -52,31 +52,31 @@ int main(int argc, char** argv)
|
||||
|
||||
|
||||
// define fluid and solid properties and constitutive relationships
|
||||
Dune::Water wettingfluid; /*@\label{tutorial-decoupled:water}@*/
|
||||
Dune::LowViscosityOil nonwettingfluid; /*@\label{tutorial-decoupled:oil}@*/
|
||||
Dune::TutorialSoil<Grid, Scalar> soil; /*@\label{tutorial-decoupled:soil}@*/
|
||||
Dune::TwoPhaseRelations<Grid, Scalar> materialLaw(soil, wettingfluid, nonwettingfluid);/*@\label{tutorial-decoupled:twophaserelations}@*/
|
||||
Dumux::Water wettingfluid; /*@\label{tutorial-decoupled:water}@*/
|
||||
Dumux::LowViscosityOil nonwettingfluid; /*@\label{tutorial-decoupled:oil}@*/
|
||||
Dumux::TutorialSoil<Grid, Scalar> soil; /*@\label{tutorial-decoupled:soil}@*/
|
||||
Dumux::TwoPhaseRelations<Grid, Scalar> materialLaw(soil, wettingfluid, nonwettingfluid);/*@\label{tutorial-decoupled:twophaserelations}@*/
|
||||
|
||||
// create object containing the variables
|
||||
typedef Dune::VariableClass<GridView, Scalar> VariableClass;
|
||||
typedef Dumux::VariableClass<GridView, Scalar> VariableClass;
|
||||
VariableClass variables(gridView);
|
||||
|
||||
//choose kind of two-phase model. Default: pw, Sw, vtotal
|
||||
struct Dune::DefineModel modelDef;
|
||||
struct Dumux::DefineModel modelDef;
|
||||
// modelDef.pressureType = modelDef.pressureW;
|
||||
// modelDef.saturationType = modelDef.saturationW;
|
||||
// modelDef.velocityType = modelDef.velocityTotal;
|
||||
|
||||
// create object including the problem definition
|
||||
typedef Dune::TutorialProblemDecoupled<GridView, Scalar, VariableClass> Problem;
|
||||
typedef Dumux::TutorialProblemDecoupled<GridView, Scalar, VariableClass> Problem;
|
||||
Problem problem(variables, wettingfluid, nonwettingfluid, soil, materialLaw,L, H); /*@\label{tutorial-decoupled:problem}@*/
|
||||
|
||||
// create object including the discretisation of the pressure equation
|
||||
typedef Dune::FVVelocity2P<GridView, Scalar, VariableClass, Problem> Diffusion;
|
||||
typedef Dumux::FVVelocity2P<GridView, Scalar, VariableClass, Problem> Diffusion;
|
||||
Diffusion diffusion(gridView, problem, modelDef); /*@\label{tutorial-decoupled:diffusion}@*/
|
||||
|
||||
// create object including the space discretisation of the saturation equation
|
||||
typedef Dune::FVSaturation2P<GridView, Scalar, VariableClass, Problem> Transport;
|
||||
typedef Dumux::FVSaturation2P<GridView, Scalar, VariableClass, Problem> Transport;
|
||||
Transport transport(gridView, problem, modelDef); /*@\label{tutorial-decoupled:transport}@*/
|
||||
|
||||
// some parameters used in the IMPES-object
|
||||
@@ -96,7 +96,7 @@ int main(int argc, char** argv)
|
||||
double cFLFactor = 0.9; // security factor for the Courant-Friedrichs-Lewy-Criterion
|
||||
|
||||
// create TimeLoop-object
|
||||
Dune::TimeLoop<GridView, IMPES> timeloop(gridView, tStart, tEnd, fileName, modulo, cFLFactor); /*@\label{tutorial-decoupled:timeloop}@*/
|
||||
Dumux::TimeLoop<GridView, IMPES> timeloop(gridView, tStart, tEnd, fileName, modulo, cFLFactor); /*@\label{tutorial-decoupled:timeloop}@*/
|
||||
|
||||
Dune::Timer timer;
|
||||
timer.reset();
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
* *
|
||||
* This program is distributed WITHOUT ANY WARRANTY. *
|
||||
*****************************************************************************/
|
||||
#ifndef DUNE_TUTORIALPROBLEM_COUPLED_HH
|
||||
#define DUNE_TUTORIALPROBLEM_COUPLED_HH
|
||||
#ifndef DUMUX_TUTORIALPROBLEM_COUPLED_HH
|
||||
#define DUMUX_TUTORIALPROBLEM_COUPLED_HH
|
||||
|
||||
// fluid properties
|
||||
#include <dumux/material/fluids/water.hh>
|
||||
@@ -31,7 +31,7 @@
|
||||
// the soil to be used
|
||||
#include "tutorialsoil_coupled.hh"
|
||||
|
||||
namespace Dune
|
||||
namespace Dumux
|
||||
{
|
||||
|
||||
// forward declaration of the problem class
|
||||
@@ -46,7 +46,7 @@ NEW_TYPE_TAG(TutorialProblemCoupled, INHERITS_FROM(BoxTwoP)); /*@\label{tutorial
|
||||
// Set the "Problem" property
|
||||
SET_PROP(TutorialProblemCoupled, Problem) /*@\label{tutorial-coupled:set-problem}@*/
|
||||
{
|
||||
typedef Dune::TutorialProblemCoupled<TTAG(TutorialProblemCoupled)> type;
|
||||
typedef Dumux::TutorialProblemCoupled<TTAG(TutorialProblemCoupled)> type;
|
||||
};
|
||||
|
||||
// Set the grid
|
||||
@@ -70,8 +70,8 @@ SET_PROP(TutorialProblemCoupled, Grid) /*@\label{tutorial-coupled:set-grid}@*/
|
||||
};
|
||||
|
||||
// Set the wetting and non-wetting phases
|
||||
SET_TYPE_PROP(TutorialProblemCoupled, WettingPhase, Dune::Water); /*@\label{tutorial-coupled:set-wetting}@*/
|
||||
SET_TYPE_PROP(TutorialProblemCoupled, NonwettingPhase, Dune::LowViscosityOil);/*@\label{tutorial-coupled:set-nonwetting}@*/
|
||||
SET_TYPE_PROP(TutorialProblemCoupled, WettingPhase, Dumux::Water); /*@\label{tutorial-coupled:set-wetting}@*/
|
||||
SET_TYPE_PROP(TutorialProblemCoupled, NonwettingPhase, Dumux::LowViscosityOil);/*@\label{tutorial-coupled:set-nonwetting}@*/
|
||||
|
||||
// Set the soil properties
|
||||
SET_PROP(TutorialProblemCoupled, Soil) /*@\label{tutorial-coupled:set-soil}@*/
|
||||
@@ -81,7 +81,7 @@ private:
|
||||
typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar;
|
||||
|
||||
public:
|
||||
typedef Dune::TutorialSoil<Grid, Scalar> type;
|
||||
typedef Dumux::TutorialSoil<Grid, Scalar> type;
|
||||
};
|
||||
|
||||
// Disable gravity
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include "dumux/fractionalflow/fractionalflowproblem.hh"
|
||||
|
||||
namespace Dune
|
||||
namespace Dumux
|
||||
{
|
||||
|
||||
/** \todo Please doc me! */
|
||||
@@ -38,7 +38,7 @@ template<class GridView, class Scalar, class VariableClass> class TutorialProble
|
||||
public:
|
||||
TutorialProblemDecoupled(VariableClass& variables, Fluid& wettingphase, Fluid& nonwettingphase, Matrix2p<Grid, Scalar>& soil,
|
||||
TwoPhaseRelations<Grid, Scalar>& materialLaw = *(new TwoPhaseRelations<Grid,Scalar>),
|
||||
const FieldVector<Scalar,dim> Left = 0, const FieldVector<Scalar,dim> Right = 0)
|
||||
const Dune::FieldVector<Scalar,dim> Left = 0, const Dune::FieldVector<Scalar,dim> Right = 0)
|
||||
: FractionalFlowProblem<GridView, Scalar, VariableClass>(variables, wettingphase, nonwettingphase, soil, materialLaw),
|
||||
Left_(Left[0]), Right_(Right[0]), eps_(1e-8)
|
||||
{}
|
||||
@@ -72,10 +72,10 @@ public:
|
||||
{
|
||||
if (globalPos[0]> (Right_ - eps_) || globalPos[0] < eps_)
|
||||
{
|
||||
return Dune::BoundaryConditions::dirichlet;
|
||||
return Dumux::BoundaryConditions::dirichlet;
|
||||
}
|
||||
// all other boundaries
|
||||
return Dune::BoundaryConditions::neumann;
|
||||
return Dumux::BoundaryConditions::neumann;
|
||||
}
|
||||
|
||||
// function returning the Dirichlet boundary condition for the solution
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
// function returning the initial saturation
|
||||
// depending on the position within the domain
|
||||
Scalar initSat (const GlobalPosition& globalPos, const Element& e, /*@\label{tutorial-decoupled:initsat}@*/
|
||||
const FieldVector<Scalar,dim>& xi) const
|
||||
const Dune::FieldVector<Scalar,dim>& xi) const
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user