use the infrastructural code using its new locations

This commit is contained in:
Andreas Lauser 2015-04-28 11:58:21 +02:00
parent d80fed167f
commit 216508ef13
55 changed files with 274 additions and 78 deletions

View File

@ -34,7 +34,7 @@
#include "problems/co2injectionflash.hh"
#include "problems/co2injectionproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionFlashEcfvProblem, INHERITS_FROM(FlashModel, Co2InjectionBaseProblem));
SET_TAG_PROP(Co2InjectionFlashEcfvProblem, SpatialDiscretizationSplice, EcfvDiscretization);
@ -58,7 +58,7 @@ SET_TAG_PROP(Co2InjectionFlashEcfvProblem, LinearSolverSplice, ParallelIterative
SET_SCALAR_PROP(Co2InjectionFlashEcfvProblem, NewtonRawTolerance, 1e-5);
#endif
} // namespace Properties
} // namespace Opm
} // namespace Ewoms
int main(int argc, char **argv)
{

View File

@ -31,7 +31,7 @@
#include "problems/co2injectionflash.hh"
#include "problems/co2injectionproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionFlashNiEcfvProblem, INHERITS_FROM(FlashModel, Co2InjectionBaseProblem));
SET_TAG_PROP(Co2InjectionFlashNiEcfvProblem, SpatialDiscretizationSplice, EcfvDiscretization);

View File

@ -31,7 +31,7 @@
#include "problems/co2injectionflash.hh"
#include "problems/co2injectionproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionFlashNiVcfvProblem, INHERITS_FROM(FlashModel, Co2InjectionBaseProblem));
SET_TAG_PROP(Co2InjectionFlashNiVcfvProblem, SpatialDiscretizationSplice, VcfvDiscretization);

View File

@ -34,7 +34,7 @@
#include "problems/co2injectionflash.hh"
#include "problems/co2injectionproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionFlashVcfvProblem, INHERITS_FROM(FlashModel, Co2InjectionBaseProblem));
SET_TAG_PROP(Co2InjectionFlashVcfvProblem, SpatialDiscretizationSplice, VcfvDiscretization);
@ -58,7 +58,7 @@ SET_TAG_PROP(Co2InjectionFlashVcfvProblem, LinearSolverSplice, ParallelIterative
SET_SCALAR_PROP(Co2InjectionFlashVcfvProblem, NewtonRawTolerance, 1e-5);
#endif
} // namespace Properties
} // namespace Opm
} // namespace Ewoms
int main(int argc, char **argv)
{

View File

@ -30,7 +30,7 @@
#include <ewoms/models/immiscible/immisciblemodel.hh>
#include <ewoms/disc/ecfv/ecfvdiscretization.hh>
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionImmiscibleEcfvProblem,
INHERITS_FROM(ImmiscibleModel,

View File

@ -29,7 +29,7 @@
#include <ewoms/disc/ecfv/ecfvdiscretization.hh>
#include "problems/co2injectionproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionImmiscibleNiEcfvProblem, INHERITS_FROM(ImmiscibleModel,
Co2InjectionBaseProblem));

View File

@ -29,7 +29,7 @@
#include <ewoms/disc/vcfv/vcfvdiscretization.hh>
#include "problems/co2injectionproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionImmiscibleNiVcfvProblem, INHERITS_FROM(ImmiscibleModel,
Co2InjectionBaseProblem));

View File

@ -30,7 +30,7 @@
#include <ewoms/models/immiscible/immisciblemodel.hh>
#include <ewoms/disc/vcfv/vcfvdiscretization.hh>
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionImmiscibleVcfvProblem, INHERITS_FROM(ImmiscibleModel,
Co2InjectionBaseProblem));

View File

@ -29,7 +29,7 @@
#include <ewoms/disc/ecfv/ecfvdiscretization.hh>
#include "problems/co2injectionproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionNcpEcfvProblem, INHERITS_FROM(NcpModel, Co2InjectionBaseProblem));
SET_TAG_PROP(Co2InjectionNcpEcfvProblem, SpatialDiscretizationSplice, EcfvDiscretization);

View File

@ -29,7 +29,7 @@
#include <ewoms/disc/ecfv/ecfvdiscretization.hh>
#include "problems/co2injectionproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionNcpNiEcfvProblem, INHERITS_FROM(NcpModel, Co2InjectionBaseProblem));
SET_TAG_PROP(Co2InjectionNcpNiEcfvProblem, SpatialDiscretizationSplice, EcfvDiscretization);

View File

@ -29,7 +29,7 @@
#include <ewoms/disc/vcfv/vcfvdiscretization.hh>
#include "problems/co2injectionproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionNcpNiVcfvProblem, INHERITS_FROM(NcpModel, Co2InjectionBaseProblem));
SET_TAG_PROP(Co2InjectionNcpNiVcfvProblem, SpatialDiscretizationSplice, VcfvDiscretization);

View File

@ -30,7 +30,7 @@
#include "problems/co2injectionproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionNcpVcfvProblem, INHERITS_FROM(NcpModel, Co2InjectionBaseProblem));
SET_TAG_PROP(Co2InjectionNcpVcfvProblem, SpatialDiscretizationSplice, VcfvDiscretization);

View File

@ -29,7 +29,7 @@
#include <ewoms/disc/ecfv/ecfvdiscretization.hh>
#include "problems/co2injectionproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionPvsEcfvProblem, INHERITS_FROM(PvsModel, Co2InjectionBaseProblem));
SET_TAG_PROP(Co2InjectionPvsEcfvProblem, SpatialDiscretizationSplice, EcfvDiscretization);

View File

@ -29,7 +29,7 @@
#include <ewoms/disc/ecfv/ecfvdiscretization.hh>
#include "problems/co2injectionproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionPvsNiEcfvProblem, INHERITS_FROM(PvsModel, Co2InjectionBaseProblem));
SET_TAG_PROP(Co2InjectionPvsNiEcfvProblem, SpatialDiscretizationSplice, EcfvDiscretization);

View File

@ -29,7 +29,7 @@
#include <ewoms/disc/vcfv/vcfvdiscretization.hh>
#include "problems/co2injectionproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionPvsNiVcfvProblem, INHERITS_FROM(PvsModel, Co2InjectionBaseProblem));
SET_TAG_PROP(Co2InjectionPvsNiVcfvProblem, SpatialDiscretizationSplice, VcfvDiscretization);

View File

@ -30,7 +30,7 @@
#include "problems/co2injectionproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionPvsVcfvProblem, INHERITS_FROM(PvsModel, Co2InjectionBaseProblem));
SET_TAG_PROP(Co2InjectionPvsVcfvProblem, SpatialDiscretizationSplice, VcfvDiscretization);

View File

@ -27,7 +27,7 @@
#include <ewoms/models/pvs/pvsmodel.hh>
#include "problems/cuvetteproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(CuvetteProblem, INHERITS_FROM(PvsModel, CuvetteBaseProblem));
}}

View File

@ -27,7 +27,7 @@
#include <ewoms/models/flash/flashmodel.hh>
#include "problems/diffusionproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(DiffusionProblem, INHERITS_FROM(FlashModel, DiffusionBaseProblem));
}}

View File

@ -27,7 +27,7 @@
#include <ewoms/models/ncp/ncpmodel.hh>
#include "problems/diffusionproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(DiffusionProblem, INHERITS_FROM(NcpModel, DiffusionBaseProblem));
}}

View File

@ -27,7 +27,7 @@
#include <ewoms/models/pvs/pvsmodel.hh>
#include "problems/diffusionproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(DiffusionProblem, INHERITS_FROM(PvsModel, DiffusionBaseProblem));
}}

View File

@ -27,7 +27,7 @@
#include <ewoms/models/immiscible/immisciblemodel.hh>
#include "problems/groundwaterproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(GroundWaterProblem, INHERITS_FROM(ImmiscibleSinglePhaseModel, GroundWaterBaseProblem));
}}

View File

@ -27,7 +27,7 @@
#include <ewoms/models/pvs/pvsmodel.hh>
#include "problems/infiltrationproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(InfiltrationProblem, INHERITS_FROM(PvsModel, InfiltrationBaseProblem));
}}

View File

@ -28,7 +28,7 @@
#include <ewoms/models/immiscible/immisciblemodel.hh>
#include "problems/obstacleproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(ObstacleProblem, INHERITS_FROM(ImmiscibleModel, ObstacleBaseProblem));
}

View File

@ -28,7 +28,7 @@
#include "problems/obstacleproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(ObstacleProblem, INHERITS_FROM(NcpModel, ObstacleBaseProblem));
}

View File

@ -29,7 +29,7 @@
#include <ewoms/models/pvs/pvsmodel.hh>
#include "problems/obstacleproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(ObstacleProblem, INHERITS_FROM(PvsModel, ObstacleBaseProblem));

View File

@ -27,7 +27,7 @@
#include <ewoms/models/pvs/pvsmodel.hh>
#include "problems/outflowproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(OutflowProblem, INHERITS_FROM(PvsModel, OutflowBaseProblem));

View File

@ -38,7 +38,7 @@
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
#include <opm/material/heatconduction/Somerton.hpp>
#include <opm/material/binarycoefficients/Brine_CO2.hpp>
#include <opm/material/UniformTabulated2DFunction.hpp>
#include <opm/material/common/UniformTabulated2DFunction.hpp>
#include <dune/grid/yaspgrid.hh>
#include <dune/grid/io/file/dgfparser/dgfyasp.hh>
@ -60,7 +60,7 @@ namespace Co2Injection {
}
} // namespace Ewoms
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(Co2InjectionBaseProblem);
@ -165,7 +165,7 @@ SET_SCALAR_PROP(Co2InjectionBaseProblem, InitialTimeStepSize, 250);
// The default DGF file to load
SET_STRING_PROP(Co2InjectionBaseProblem, GridFile, "data/co2injection.dgf");
} // namespace Properties
} // namespace Opm
} // namespace Ewoms
namespace Ewoms {
/*!

View File

@ -50,7 +50,7 @@ template <class TypeTag>
class CuvetteProblem;
}
namespace Opm {
namespace Ewoms {
namespace Properties {
// create a new type tag for the cuvette steam injection problem
@ -111,7 +111,7 @@ SET_SCALAR_PROP(CuvetteBaseProblem, InitialTimeStepSize, 1);
// The default DGF file to load
SET_STRING_PROP(CuvetteBaseProblem, GridFile, "./data/cuvette_11x4.dgf");
} // namespace Properties
} // namespace Opm
} // namespace Ewoms
namespace Ewoms {
/*!

View File

@ -47,7 +47,7 @@ template <class TypeTag>
class DiffusionProblem;
}
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(DiffusionBaseProblem);
@ -112,7 +112,7 @@ SET_SCALAR_PROP(DiffusionBaseProblem, EndTime, 1e6);
// The default for the initial time step size of the simulation
SET_SCALAR_PROP(DiffusionBaseProblem, InitialTimeStepSize, 1000);
}
} // namespace Opm, Properties
} // namespace Ewoms, Properties
namespace Ewoms {
/*!

View File

@ -25,7 +25,7 @@
#include <ewoms/parallel/mpihelper.hh>
#include <ewoms/io/basegridmanager.hh>
#include <opm/core/utility/PropertySystem.hpp>
#include <ewoms/common/propertysystem.hh>
#include <ewoms/common/parametersystem.hh>
#if HAVE_DUNE_ALUGRID
@ -52,7 +52,7 @@ template <class TypeTag>
class FingerProblem;
} // namespace Ewoms
namespace Opm {
namespace Ewoms {
namespace Properties {
// declare the properties required by the for the finger grid manager
NEW_TYPE_TAG(FingerGridManager);
@ -73,7 +73,7 @@ NEW_PROP_TAG(GridGlobalRefinements);
SET_TYPE_PROP(FingerGridManager, Grid, Dune::ALUGrid<FINGER_DIM, FINGER_DIM, Dune::cube, Dune::nonconforming>);
SET_TYPE_PROP(FingerGridManager, GridManager, Ewoms::FingerGridManager<TypeTag>);
}} // namespace Opm, Properties
}} // namespace Ewoms, Properties
namespace Ewoms {
/*!

View File

@ -51,7 +51,7 @@ template <class TypeTag>
class FingerProblem;
}
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(FingerBaseProblem, INHERITS_FROM(FingerGridManager));
@ -123,7 +123,7 @@ SET_SCALAR_PROP(FingerBaseProblem, EndTime, 215);
// The default for the initial time step size of the simulation
SET_SCALAR_PROP(FingerBaseProblem, InitialTimeStepSize, 10);
}} // namespace Opm, Properties
}} // namespace Ewoms, Properties
namespace Ewoms {
/*!

View File

@ -61,7 +61,7 @@ template <class TypeTag>
class FractureProblem;
}
namespace Opm {
namespace Ewoms {
namespace Properties {
// Create a type tag for the problem
NEW_TYPE_TAG(FractureProblem, INHERITS_FROM(DiscreteFractureModel));
@ -150,7 +150,7 @@ SET_SCALAR_PROP(FractureProblem, EndTime, 3e3);
// Set the default value for the initial time step size
SET_SCALAR_PROP(FractureProblem, InitialTimeStepSize, 100);
} // namespace Properties
} // namespace Opm
} // namespace Ewoms
namespace Ewoms {
/*!

View File

@ -46,7 +46,7 @@ template <class TypeTag>
class GroundWaterProblem;
}
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(GroundWaterBaseProblem);
@ -102,7 +102,7 @@ SET_SCALAR_PROP(GroundWaterBaseProblem, InitialTimeStepSize, 1);
// The default DGF file to load
SET_STRING_PROP(GroundWaterBaseProblem, GridFile, "./data/groundwater_2d.dgf");
} // namespace Properties
} // namespace Opm
} // namespace Ewoms
namespace Ewoms {
/*!

View File

@ -47,7 +47,7 @@ template <class TypeTag>
class InfiltrationProblem;
}
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(InfiltrationBaseProblem);
@ -111,7 +111,7 @@ SET_SCALAR_PROP(InfiltrationBaseProblem, InitialTimeStepSize, 60);
SET_STRING_PROP(InfiltrationBaseProblem, GridFile,
"./data/infiltration_50x3.dgf");
} // namespace Properties
} // namespace Opm
} // namespace Ewoms
namespace Ewoms {
/*!

View File

@ -25,7 +25,7 @@
#include <ewoms/parallel/mpihelper.hh>
#include <ewoms/io/basegridmanager.hh>
#include <opm/core/utility/PropertySystem.hpp>
#include <ewoms/common/propertysystem.hh>
#include <ewoms/common/parametersystem.hh>
#include <dune/grid/yaspgrid.hh>
@ -43,7 +43,7 @@ template <class TypeTag>
class LensGridManager;
} // namespace Ewoms
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(LensGridManager);
@ -64,7 +64,7 @@ NEW_PROP_TAG(GridGlobalRefinements);
// set the Grid and GridManager properties
SET_TYPE_PROP(LensGridManager, Grid, Dune::YaspGrid<2>);
SET_TYPE_PROP(LensGridManager, GridManager, Ewoms::LensGridManager<TypeTag>);
}} // namespace Opm, Properties
}} // namespace Ewoms, Properties
namespace Ewoms {
/*!

View File

@ -50,7 +50,7 @@ template <class TypeTag>
class LensProblem;
}
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(LensBaseProblem, INHERITS_FROM(LensGridManager));
@ -140,7 +140,7 @@ SET_SCALAR_PROP(LensBaseProblem, InitialTimeStepSize, 250);
// By default, include the intrinsic permeability tensor to the VTK output files
SET_BOOL_PROP(LensBaseProblem, VtkWriteIntrinsicPermeabilities, true);
}} // namespace Opm, Properties
}} // namespace Ewoms, Properties
namespace Ewoms {
/*!

View File

@ -46,7 +46,7 @@ template <class TypeTag>
class NavierStokesTestProblem;
}
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(NavierStokesTestProblem, INHERITS_FROM(NavierStokesModel));

View File

@ -51,7 +51,7 @@ template <class TypeTag>
class ObstacleProblem;
}
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(ObstacleBaseProblem);
@ -107,7 +107,7 @@ SET_SCALAR_PROP(ObstacleBaseProblem, InitialTimeStepSize, 250);
// The default DGF file to load
SET_STRING_PROP(ObstacleBaseProblem, GridFile, "./data/obstacle_24x16.dgf");
} // namespace Properties
} // namespace Opm
} // namespace Ewoms
namespace Ewoms {
/*!

View File

@ -40,7 +40,7 @@ template <class TypeTag>
class OutflowProblem;
}
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(OutflowBaseProblem);
@ -76,7 +76,7 @@ SET_SCALAR_PROP(OutflowBaseProblem, InitialTimeStepSize, 1);
// The default DGF file to load
SET_STRING_PROP(OutflowBaseProblem, GridFile, "./data/outflow.dgf");
} // namespace Properties
} // namespace Opm
} // namespace Ewoms
namespace Ewoms {
/*!

View File

@ -52,7 +52,7 @@ template <class TypeTag>
class PowerInjectionProblem;
}
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(PowerInjectionBaseProblem);
@ -131,7 +131,7 @@ SET_SCALAR_PROP(PowerInjectionBaseProblem, EndTime, 100);
// The default for the initial time step size of the simulation
SET_SCALAR_PROP(PowerInjectionBaseProblem, InitialTimeStepSize, 1e-3);
} // namespace Properties
} // namespace Opm
} // namespace Ewoms
namespace Ewoms {
/*!

View File

@ -50,7 +50,7 @@ template <class TypeTag>
class ReservoirProblem;
}
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(ReservoirBaseProblem);

View File

@ -45,7 +45,7 @@ template <class TypeTag>
class RichardsLensProblem;
}
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(RichardsLensProblem, Richards);
@ -118,7 +118,7 @@ SET_SCALAR_PROP(RichardsLensProblem, InitialTimeStepSize, 100);
// The default DGF file to load
SET_STRING_PROP(RichardsLensProblem, GridFile, "./data/richardslens_24x16.dgf");
}} // namespace Opm, Properties
}} // namespace Ewoms, Properties
namespace Ewoms {
/*!

View File

@ -37,7 +37,7 @@ template <class TypeTag>
class Stokes2cTestProblem;
}
namespace Opm {
namespace Ewoms {
//////////
// Specify the properties for the stokes2c problem
//////////
@ -73,7 +73,7 @@ SET_SCALAR_PROP(Stokes2cTestProblem, InitialTimeStepSize, 0.1);
// Default grid file to load
SET_STRING_PROP(Stokes2cTestProblem, GridFile, "data/test_stokes2c.dgf");
} // namespace Properties
} // namespace Opm
} // namespace Ewoms
namespace Ewoms {
/*!

View File

@ -38,7 +38,7 @@ template <class TypeTag>
class StokesNiTestProblem;
}
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(StokesNiTestProblem, INHERITS_FROM(StokesModel));
@ -77,7 +77,7 @@ SET_SCALAR_PROP(StokesNiTestProblem, NewtonRawTolerance, 1e-4);
// Default grid file to load
SET_STRING_PROP(StokesNiTestProblem, GridFile, "data/test_stokes2cni.dgf");
} // namespace Properties
} // namespace Opm
} // namespace Ewoms
namespace Ewoms {
/*!

View File

@ -41,7 +41,7 @@ template <class TypeTag>
class StokesTestProblem;
}
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(StokesTestProblem, INHERITS_FROM(StokesModel));
@ -77,7 +77,7 @@ SET_SCALAR_PROP(StokesTestProblem, InitialTimeStepSize, 10.0);
// Default grid file to load
SET_STRING_PROP(StokesTestProblem, GridFile, "data/test_stokes.dgf");
} // namespace Properties
} // namespace Opm
} // namespace Ewoms
namespace Ewoms {
/*!

View File

@ -51,7 +51,7 @@ template <class TypeTag>
class WaterAirProblem;
}
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(WaterAirBaseProblem);
@ -119,7 +119,7 @@ SET_SCALAR_PROP(WaterAirBaseProblem, InitialTimeStepSize, 250);
// The default DGF file to load
SET_STRING_PROP(WaterAirBaseProblem, GridFile, "./data/waterair.dgf");
} // namespace Properties
} // namespace Opm
} // namespace Ewoms
namespace Ewoms {
/*!

View File

@ -55,7 +55,7 @@ template <class TypeTag>
class Tutorial1Problem;
}
namespace Opm {
namespace Ewoms {
namespace Properties {
// Create a new type tag for the problem
NEW_TYPE_TAG(Tutorial1Problem, INHERITS_FROM(ImmiscibleTwoPhaseModel)); /*@\label{tutorial1:create-type-tag}@*/
@ -125,7 +125,7 @@ SET_INT_PROP(Tutorial1Problem, CellsX, 100);
SET_INT_PROP(Tutorial1Problem, CellsY, 1);
SET_INT_PROP(Tutorial1Problem, CellsZ, 1); /*@\label{tutorial1:default-params-end}@*/
} // namespace Properties
} // namespace Opm
} // namespace Ewoms
namespace Ewoms {
//! Tutorial problem using the "immiscible" model.

View File

@ -27,7 +27,7 @@
#include <ewoms/models/pvs/pvsmodel.hh>
#include "problems/waterairproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(WaterAirProblem, INHERITS_FROM(PvsModel, WaterAirBaseProblem));

View File

@ -27,7 +27,7 @@
#include <ewoms/models/immiscible/immisciblemodel.hh>
#include "problems/fingerproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(FingerProblem, INHERITS_FROM(ImmiscibleTwoPhaseModel, FingerBaseProblem));
}}

View File

@ -29,7 +29,7 @@
#include <ewoms/disc/ecfv/ecfvdiscretization.hh>
#include "problems/lensproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(LensProblemEcfv, INHERITS_FROM(ImmiscibleTwoPhaseModel, LensBaseProblem));
SET_TAG_PROP(LensProblemEcfv, SpatialDiscretizationSplice, EcfvDiscretization);

View File

@ -28,7 +28,7 @@
#include <ewoms/models/immiscible/immisciblemodel.hh>
#include "problems/lensproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(LensProblem, INHERITS_FROM(ImmiscibleTwoPhaseModel, LensBaseProblem));
}

View File

@ -0,0 +1,196 @@
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* Copyright (C) 2010-2012 by Andreas Lauser *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file
*
* \brief This file tests the properties system.
*
* We define a few type tags and property tags, then we attach values
* to (TypeTag, PropertyTag) tuples and finally we use them in the
* main function and print some diagnostic messages.
*/
#include "config.h"
#include <ewoms/common/propertysystem.hh>
#include <iostream>
namespace Ewoms {
namespace Properties {
///////////////////
// Define some hierarchy of type tags:
//
// Vehicle -- CompactCar -- Sedan -_
// \ \.
// \ +- Pickup ---_
// \ / \.
// +-- Truck ---------------^ \.
// \ \.
// +- Tank ----------------------------------+- HummerH1
///////////////////
NEW_TYPE_TAG(Vehicle);
NEW_TYPE_TAG(CompactCar, INHERITS_FROM(Vehicle));
NEW_TYPE_TAG(Truck, INHERITS_FROM(Vehicle));
NEW_TYPE_TAG(Tank, INHERITS_FROM(Vehicle));
NEW_TYPE_TAG(Sedan, INHERITS_FROM(CompactCar));
NEW_TYPE_TAG(Pickup, INHERITS_FROM(Sedan, Truck));
NEW_TYPE_TAG(HummerH1, INHERITS_FROM(Sedan, Pickup, Tank));
///////////////////
// Define the property tags:
// TopSpeed, NumSeats, CanonCaliber, GasUsage, AutomaticTransmission, Payload
///////////////////
NEW_PROP_TAG(TopSpeed); // [km/h]
NEW_PROP_TAG(NumSeats); // []
NEW_PROP_TAG(CanonCaliber); // [mm]
NEW_PROP_TAG(GasUsage); // [l/100km]
NEW_PROP_TAG(AutomaticTransmission); // true/false
NEW_PROP_TAG(Payload); // [t]
///////////////////
// Make the AutomaticTransmission default to false
SET_BOOL_PROP(Vehicle, AutomaticTransmission, false);
///////////////////
// Define some values for the properties on the type tags:
//
// (CompactCar, TopSpeed) = GasUsage*35
// (CompactCar, NumSeats) = 5
// (CompactCar, GasUsage) = 4
//
// (Truck, TopSpeed) = 100
// (Truck, NumSeats) = 2
// (Truck, GasUsage) = 12
// (Truck, Payload) = 35
//
// (Tank, TopSpeed) = 60
// (Tank, GasUsage) = 65
// (Tank, CanonCaliber) = 120
//
// (Sedan, GasUsage) = 7
// (Sedan, AutomaticTransmission) = true
//
// (Pickup, TopSpeed) = 120
// (Pickup, Payload) = 5
//
// (HummmerH1, TopSpeed) = (Pickup, TopSpeed)
///////////////////
SET_INT_PROP(CompactCar, TopSpeed, GET_PROP_VALUE(TypeTag, GasUsage) * 30);
SET_INT_PROP(CompactCar, NumSeats, 5);
SET_INT_PROP(CompactCar, GasUsage, 4);
SET_INT_PROP(Truck, TopSpeed, 100);
SET_INT_PROP(Truck, NumSeats, 2);
SET_INT_PROP(Truck, GasUsage, 12);
SET_INT_PROP(Truck, Payload, 35);
SET_INT_PROP(Tank, TopSpeed, 60);
SET_INT_PROP(Tank, GasUsage, 65);
SET_INT_PROP(Tank, CanonCaliber, 120);
SET_INT_PROP(Sedan, GasUsage, 7);
SET_BOOL_PROP(Sedan, AutomaticTransmission, true);
SET_INT_PROP(Pickup, TopSpeed, 120);
SET_INT_PROP(Pickup, Payload, 5);
SET_INT_PROP(HummerH1, TopSpeed, GET_PROP_VALUE(TTAG(Pickup), TopSpeed));
///////////////////
// Unmount the canon from the Hummer
UNSET_PROP(HummerH1, CanonCaliber);
} // namespace Properties
} // namespace Ewoms
int main()
{
// print all properties for all type tags
std::cout << "---------------------------------------\n";
std::cout << "-- Property values\n";
std::cout << "---------------------------------------\n";
std::cout << "---------- Values for CompactCar ----------\n";
std::cout << "(CompactCar, TopSpeed) = " << GET_PROP_VALUE(TTAG(CompactCar), TopSpeed) << "\n";
std::cout << "(CompactCar, NumSeats) = " << GET_PROP_VALUE(TTAG(CompactCar), NumSeats) << "\n";
std::cout << "(CompactCar, GasUsage) = " << GET_PROP_VALUE(TTAG(CompactCar), GasUsage) << "\n";
std::cout << "(CompactCar, AutomaticTransmission) = " << GET_PROP_VALUE(TTAG(CompactCar), AutomaticTransmission) << "\n";
std::cout << "---------- Values for Truck ----------\n";
std::cout << "(Truck, TopSpeed) = " << GET_PROP_VALUE(TTAG(Truck), TopSpeed) << "\n";
std::cout << "(Truck, NumSeats) = " << GET_PROP_VALUE(TTAG(Truck), NumSeats) << "\n";
std::cout << "(Truck, GasUsage) = " << GET_PROP_VALUE(TTAG(Truck), GasUsage) << "\n";
std::cout << "(Truck, Payload) = " << GET_PROP_VALUE(TTAG(Truck), Payload) << "\n";
std::cout << "(Truck, AutomaticTransmission) = " << GET_PROP_VALUE(TTAG(Truck), AutomaticTransmission) << "\n";
std::cout << "---------- Values for Tank ----------\n";
std::cout << "(Tank, TopSpeed) = " << GET_PROP_VALUE(TTAG(Tank), TopSpeed) << "\n";
std::cout << "(Tank, GasUsage) = " << GET_PROP_VALUE(TTAG(Tank), GasUsage) << "\n";
std::cout << "(Tank, AutomaticTransmission) = " << GET_PROP_VALUE(TTAG(Tank), AutomaticTransmission) << "\n";
std::cout << "(Tank, CanonCaliber) = " << GET_PROP_VALUE(TTAG(Tank), CanonCaliber) << "\n";
std::cout << "---------- Values for Sedan ----------\n";
std::cout << "(Sedan, TopSpeed) = " << GET_PROP_VALUE(TTAG(Sedan), TopSpeed) << "\n";
std::cout << "(Sedan, NumSeats) = " << GET_PROP_VALUE(TTAG(Sedan), NumSeats) << "\n";
std::cout << "(Sedan, GasUsage) = " << GET_PROP_VALUE(TTAG(Sedan), GasUsage) << "\n";
std::cout << "(Sedan, AutomaticTransmission) = " << GET_PROP_VALUE(TTAG(Sedan), AutomaticTransmission) << "\n";
std::cout << "---------- Values for Pickup ----------\n";
std::cout << "(Pickup, TopSpeed) = " << GET_PROP_VALUE(TTAG(Pickup), TopSpeed) << "\n";
std::cout << "(Pickup, NumSeats) = " << GET_PROP_VALUE(TTAG(Pickup), NumSeats) << "\n";
std::cout << "(Pickup, GasUsage) = " << GET_PROP_VALUE(TTAG(Pickup), GasUsage) << "\n";
std::cout << "(Pickup, Payload) = " << GET_PROP_VALUE(TTAG(Pickup), Payload) << "\n";
std::cout << "(Pickup, AutomaticTransmission) = " << GET_PROP_VALUE(TTAG(Pickup), AutomaticTransmission) << "\n";
std::cout << "---------- Values for HummerH1 ----------\n";
std::cout << "(HummerH1, TopSpeed) = " << GET_PROP_VALUE(TTAG(HummerH1), TopSpeed) << "\n";
std::cout << "(HummerH1, NumSeats) = " << GET_PROP_VALUE(TTAG(HummerH1), NumSeats) << "\n";
std::cout << "(HummerH1, GasUsage) = " << GET_PROP_VALUE(TTAG(HummerH1), GasUsage) << "\n";
std::cout << "(HummerH1, Payload) = " << GET_PROP_VALUE(TTAG(HummerH1), Payload) << "\n";
std::cout << "(HummerH1, AutomaticTransmission) = " << GET_PROP_VALUE(TTAG(HummerH1), AutomaticTransmission) << "\n";
// CanonCaliber is explcitly unset for the Hummer -> this would not compile:
// std::cout << "(HummerH1, CanonCaliber) = " << GET_PROP_VALUE(TTAG(HummerH1), CanonCaliber) << "\n";
std::cout << "\n";
std::cout << "---------------------------------------\n";
std::cout << "-- Diagnostic messages\n";
std::cout << "---------------------------------------\n";
std::cout << "---- All properties for Sedan ---\n";
Ewoms::Properties::printValues<TTAG(Sedan)>();
std::cout << "---- Message for (HummerH1, CanonCaliber) ---\n"
<< PROP_DIAGNOSTIC(TTAG(HummerH1), CanonCaliber);
std::cout << "---- Message for (HummerH1, GasUsage) ---\n"
<< PROP_DIAGNOSTIC(TTAG(HummerH1), GasUsage);
std::cout << "---- Message for (HummerH1, AutomaticTransmission) ---\n"
<< PROP_DIAGNOSTIC(TTAG(HummerH1), AutomaticTransmission);
return 0;
}

View File

@ -27,7 +27,7 @@
#include <ewoms/models/immiscible/immisciblemodel.hh>
#include "problems/powerinjectionproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(PowerInjectionProblem,
INHERITS_FROM(ImmiscibleTwoPhaseModel,

View File

@ -27,7 +27,7 @@
#include <ewoms/models/immiscible/immisciblemodel.hh>
#include "problems/powerinjectionproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(PowerInjectionProblem,
INHERITS_FROM(ImmiscibleTwoPhaseModel,

View File

@ -27,7 +27,7 @@
#include <ewoms/models/blackoil/blackoilmodel.hh>
#include "problems/reservoirproblem.hh"
namespace Opm {
namespace Ewoms {
namespace Properties {
NEW_TYPE_TAG(ReservoirProblem, INHERITS_FROM(BlackOilModel, ReservoirBaseProblem));
}