problems: make the name() methods static

this allows to retrieve the name of the problem before it is
instantiated. this is required to be able to print the "Initializing
problem" message at the correct point (i.e., before instantiating the
problem).
This commit is contained in:
Andreas Lauser 2014-03-07 11:34:55 +01:00
parent a9ad8f1cba
commit 55bb38118c
21 changed files with 76 additions and 93 deletions

View File

@ -212,11 +212,11 @@ class Co2InjectionProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
typedef typename GET_PROP_TYPE(TypeTag,
BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
typedef typename GET_PROP_TYPE(TypeTag, HeatConductionLaw) HeatConductionLaw;
typedef typename HeatConductionLaw::Params HeatConductionLawParams;
@ -249,7 +249,6 @@ public:
maxDepth_ = EWOMS_GET_PARAM(TypeTag, Scalar, MaxDepth);
temperature_ = EWOMS_GET_PARAM(TypeTag, Scalar, Temperature);
name_ = EWOMS_GET_PARAM(TypeTag, std::string, SimulationName);
// initialize the tables of the fluid system
// FluidSystem::init();
@ -334,13 +333,14 @@ public:
/*!
* \copydoc VcfvProblem::name
*/
std::string name() const
static std::string name()
{
std::ostringstream oss;
oss << name_ << "_" << this->model().name();
oss << EWOMS_GET_PARAM(TypeTag, std::string, SimulationName)
<< "_" << Model::name();
if (GET_PROP_VALUE(TypeTag, EnableEnergy))
oss << "_ni";
oss << "_" << this->model().discretizationName();
oss << "_" << Model::discretizationName();
return oss.str();
}
@ -617,8 +617,6 @@ private:
int nTemperature_;
int nPressure_;
std::string name_;
Scalar pressureLow_, pressureHigh_;
Scalar temperatureLow_, temperatureHigh_;
};

View File

@ -162,9 +162,9 @@ class CuvetteProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
HeatConductionLawParams;
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
typedef typename GET_PROP_TYPE(TypeTag,
BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
// copy some indices for convenience
@ -288,11 +288,8 @@ public:
/*!
* \copydoc VcfvProblem::name
*/
const char *name() const
{
static std::string tmp = std::string("cuvette_") + this->model().name();
return tmp.c_str();
}
static std::string name()
{ return std::string("cuvette_") + Model::name(); }
//! \}

View File

@ -133,6 +133,7 @@ class DiffusionProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
enum {
// number of phases
@ -152,8 +153,7 @@ class DiffusionProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
};
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
typedef typename GET_PROP_TYPE(TypeTag,
BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
@ -195,12 +195,8 @@ public:
/*!
* \copydoc VcfvProblem::name
*/
const std::string name() const
{
std::ostringstream oss;
oss << "diffusion_" << this->model().name();
return oss.str();
}
static std::string name()
{ return std::string("diffusion_") + Model::name(); }
//! \}

View File

@ -174,6 +174,7 @@ class FingerProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
typedef typename GET_PROP_TYPE(TypeTag, Constraints) Constraints;
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
enum {
// number of phases
@ -192,11 +193,9 @@ class FingerProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
typedef typename GET_PROP_TYPE(TypeTag, ElementContext) ElementContext;
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
typedef typename GET_PROP_TYPE(TypeTag,
BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP(TypeTag, MaterialLaw)::ParkerLenhard ParkerLenhard;
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
@ -233,8 +232,8 @@ public:
/*!
* \copydoc VcfvProblem::name
*/
std::string name() const
{ return std::string("finger_") + this->model().name(); }
static std::string name()
{ return std::string("finger_") + Model::name(); }
/*!
* \copydoc FvBaseMultiPhaseProblem::registerParameters

View File

@ -169,15 +169,14 @@ class FractureProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
typedef typename GET_PROP_TYPE(TypeTag, Constraints) Constraints;
typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector;
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag,
BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
typedef typename GET_PROP_TYPE(TypeTag, HeatConductionLawParams)
HeatConductionLawParams;
typedef typename GET_PROP_TYPE(TypeTag, HeatConductionLawParams) HeatConductionLawParams;
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
enum {
// phase indices
@ -273,10 +272,10 @@ public:
/*!
* \copydoc VcfvProblem::name
*/
std::string name() const
static std::string name()
{
std::ostringstream oss;
oss << "fracture_" << this->model().name();
oss << "fracture_" << Model::name();
return oss.str();
}

View File

@ -138,9 +138,9 @@ class GroundWaterProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
typedef typename GET_PROP_TYPE(TypeTag,
BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
typedef typename GridView::ctype CoordScalar;
typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition;
@ -229,10 +229,10 @@ public:
/*!
* \copydoc VcfvProblem::name
*/
std::string name() const
static std::string name()
{
std::ostringstream oss;
oss << "groundwater_" << this->model().name();
oss << "groundwater_" << Model::name();
return oss.str();
}

View File

@ -152,10 +152,10 @@ class InfiltrationProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
typedef typename GET_PROP_TYPE(TypeTag,
BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
// copy some indices for convenience
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
@ -248,10 +248,10 @@ public:
/*!
* \copydoc VcfvProblem::name
*/
const std::string name() const
static std::string name()
{
std::ostringstream oss;
oss << "infiltration_" << this->model().name();
oss << "infiltration_" << Model::name();
return oss.str();
}

View File

@ -196,6 +196,7 @@ class LensProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
typedef typename GET_PROP_TYPE(TypeTag, NonwettingPhase) NonwettingPhase;
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
enum {
// number of phases
@ -214,8 +215,7 @@ class LensProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
};
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
typedef typename GET_PROP_TYPE(TypeTag,
BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
@ -359,10 +359,10 @@ public:
/*!
* \copydoc VcfvProblem::name
*/
std::string name() const
static std::string name()
{
std::ostringstream oss;
oss << "lens_" << this->model().name();
oss << "lens_" << Model::name();
return oss.str();
}

View File

@ -106,8 +106,7 @@ class NavierStokesTestProblem : public StokesProblem<TypeTag>
typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
typedef typename GET_PROP_TYPE(TypeTag,
BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, Constraints) Constraints;
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
@ -147,7 +146,7 @@ public:
/*!
* \copydoc VcfvProblem::name
*/
const char *name() const
static std::string name()
{ return "navierstokes"; }
/*!

View File

@ -142,11 +142,9 @@ class ObstacleProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag,
BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
@ -168,6 +166,7 @@ class ObstacleProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
typedef Dune::FieldVector<Scalar, numPhases> PhaseVector;
typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> DimMatrix;
typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
public:
/*!
@ -273,11 +272,11 @@ public:
/*!
* \copydoc VcfvProblem::name
*/
const std::string name() const
static std::string name()
{
std::ostringstream oss;
oss << "obstacle"
<< "_" << this->model().name();
<< "_" << Model::name();
return oss.str();
}

View File

@ -104,11 +104,11 @@ class OutflowProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
typedef typename GET_PROP_TYPE(TypeTag,
BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
// copy some indices for convenience
enum {
@ -159,7 +159,7 @@ public:
/*!
* \copydoc VcfvProblem::name
*/
const char *name() const
static std::string name()
{ return "outflow"; }
/*!

View File

@ -156,7 +156,10 @@ class PowerInjectionProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
typedef typename GET_PROP_TYPE(TypeTag, WettingPhase) WettingPhase;
typedef typename GET_PROP_TYPE(TypeTag, NonwettingPhase) NonwettingPhase;
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
enum {
// number of phases
@ -173,10 +176,6 @@ class PowerInjectionProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
dimWorld = GridView::dimensionworld
};
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
typedef typename GET_PROP_TYPE(TypeTag,
BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
@ -222,7 +221,7 @@ public:
/*!
* \copydoc VcfvProblem::name
*/
std::string name() const
static std::string name()
{
std::ostringstream oss;
oss << "powerinjection_";

View File

@ -155,14 +155,13 @@ class ReservoirProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
typedef typename GET_PROP_TYPE(TypeTag,
BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, Constraints) Constraints;
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
typedef typename GET_PROP_TYPE(TypeTag,
BlackOilFluidState) BlackOilFluidState;
typedef typename GET_PROP_TYPE(TypeTag, BlackOilFluidState) BlackOilFluidState;
typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
typedef typename GridView::ctype CoordScalar;
typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition;
@ -186,7 +185,6 @@ public:
temperature_ = EWOMS_GET_PARAM(TypeTag, Scalar, Temperature);
maxDepth_ = EWOMS_GET_PARAM(TypeTag, Scalar, MaxDepth);
name_ = EWOMS_GET_PARAM(TypeTag, std::string, SimulationName);
FluidSystem::initBegin();
std::vector<std::pair<Scalar, Scalar> > Bg
@ -354,8 +352,8 @@ public:
/*!
* \copydoc VcfvProblem::name
*/
const std::string name() const
{ return name_; }
static std::string name()
{ return EWOMS_GET_PARAM(TypeTag, std::string, SimulationName); }
/*!
* \copydoc FvBaseMultiPhaseProblem::temperature
@ -588,8 +586,6 @@ private:
Scalar temperature_;
Scalar maxDepth_;
Scalar eps_;
std::string name_;
};
} // namespace Ewoms

View File

@ -146,12 +146,12 @@ class RichardsLensProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView;
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
typedef typename GET_PROP_TYPE(TypeTag,
BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
enum {
@ -228,7 +228,7 @@ public:
/*!
* \copydoc VcfvProblem::name
*/
const char *name() const
static std::string name()
{ return "lens_richards"; }
/*!

View File

@ -94,12 +94,12 @@ class Stokes2cTestProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
typedef typename GET_PROP_TYPE(TypeTag,
BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, Constraints) Constraints;
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
enum { dimWorld = GridView::dimensionworld };
enum { numComponents = FluidSystem::numComponents };
@ -144,7 +144,7 @@ public:
/*!
* \copydoc VcfvProblem::name
*/
const char *name() const
static std::string name()
{ return "stokes2ctest"; }
/*!

View File

@ -100,10 +100,10 @@ class StokesNiTestProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
typedef typename GET_PROP_TYPE(TypeTag, FluidSystem) FluidSystem;
typedef typename GET_PROP_TYPE(TypeTag, Constraints) Constraints;
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
typedef typename GET_PROP_TYPE(TypeTag,
BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
enum { // Number of equations and grid dimension
numEq = GET_PROP_VALUE(TypeTag, NumEq),
@ -156,7 +156,7 @@ public:
/*!
* \copydoc VcfvProblem::name
*/
const char *name() const
static std::string name()
{ return "stokestest_ni"; }
//! \}

View File

@ -100,12 +100,12 @@ class StokesTestProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices;
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
typedef typename GET_PROP_TYPE(TypeTag,
BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, Fluid) Fluid;
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef typename GET_PROP_TYPE(TypeTag, Constraints) Constraints;
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
enum {
// Number of equations and grid dimension
@ -146,7 +146,7 @@ public:
/*!
* \copydoc VcfvProblem::name
*/
const char *name() const
static std::string name()
{ return "stokestest"; }
/*!

View File

@ -185,15 +185,16 @@ class WaterAirProblem
dimWorld = GridView::dimensionworld
};
static const bool enableEnergy = GET_PROP_VALUE(TypeTag, EnableEnergy);
typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector;
typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector;
typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, Constraints) Constraints;
typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager;
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw;
typedef typename GET_PROP_TYPE(TypeTag, MaterialLawParams) MaterialLawParams;
typedef typename GET_PROP_TYPE(TypeTag, HeatConductionLaw) HeatConductionLaw;
typedef typename GET_PROP_TYPE(TypeTag, HeatConductionLawParams) HeatConductionLawParams;
@ -257,10 +258,10 @@ public:
/*!
* \copydoc VcfvProblem::name
*/
std::string name() const
static std::string name()
{
std::ostringstream oss;
oss << "waterair_" << this->model().name();
oss << "waterair_" << Model::name();
if (GET_PROP_VALUE(TypeTag, EnableEnergy))
oss << "_ni";

View File

@ -192,8 +192,8 @@ public:
}
//! Specifies the problem name. This is used for files generated by the simulation.
const char *name() const
{ return "tutorial_coupled"; }
static std::string name()
{ return "tutorial1"; }
//! Returns the temperature at a given position.
template <class Context>

View File

@ -12,7 +12,7 @@ usage() {
echo "Usage:"
echo
echo "runTest.sh TEST_TYPE TEST_BINARY [TEST_ARGS]"
echo "where TEST_TYPE can either be --plain or --simulation=\$NUM_CORES (is '$TEST_TYPE')."
echo "where TEST_TYPE can either be --plain, --simulation or --parallel-simulation=\$NUM_CORES (is '$TEST_TYPE')."
};
validateResults() {
@ -90,7 +90,7 @@ case "$TEST_TYPE" in
echo "######################"
echo "RND: '$RND'"
SIM_NAME=$(grep "Initializing problem" "test-$RND.log" | sed "s/.*\"\(.*\)\".*/\1/" | head -n1)
SIM_NAME=$(grep "Initializing the problem" "test-$RND.log" | sed "s/.*\"\(.*\)\".*/\1/" | head -n1)
NUM_TIMESTEPS=$(grep "Writing result" "test-$RND.log" | wc -l)
TEST_RESULT=$(printf "%s-%05i" "$SIM_NAME" "$NUM_TIMESTEPS")
TEST_RESULT=$(ls "$TEST_RESULT".*)
@ -119,8 +119,8 @@ case "$TEST_TYPE" in
exit 1
fi
grep "Initializing problem" "test-$RND.log"
SIM_NAME=$(grep "Initializing problem" "test-$RND.log" | sed "s/.*\"\(.*\)\".*/\1/" | head -n1)
grep "Initializing the problem" "test-$RND.log"
SIM_NAME=$(grep "Initializing the problem" "test-$RND.log" | sed "s/.*\"\(.*\)\".*/\1/" | head -n1)
NUM_TIMESTEPS=$(grep "Writing result" "test-$RND.log" | wc -l)
rm "test-$RND.log"