mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
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:
@@ -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(); }
|
||||
|
||||
//! \}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user