refactoring: extend the TimeManager to become the Simulator

this also comes with moving responsibilities around and some smaller
cleanups for the grid creation. (although grid creation could be
possibly done by the simulator now, the GridCreator concept has not
been abandoned, yet...)
This commit is contained in:
Andreas Lauser
2014-04-14 20:32:30 +02:00
parent 8cdde5de31
commit a76b64bc56
22 changed files with 127 additions and 258 deletions

View File

@@ -162,24 +162,18 @@ class ObstacleProblem : public GET_PROP_TYPE(TypeTag, BaseProblem)
N2Idx = FluidSystem::N2Idx
};
typedef Dune::FieldVector<typename GridView::Grid::ctype, dimWorld> GlobalPosition;
typedef Dune::FieldVector<typename GridView::ctype, dimWorld> GlobalPosition;
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, Simulator) Simulator;
typedef typename GET_PROP_TYPE(TypeTag, Model) Model;
public:
/*!
* \copydoc Doxygen::defaultProblemConstructor
*/
ObstacleProblem(TimeManager &timeManager)
#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 3)
: ParentType(timeManager,
GET_PROP_TYPE(TypeTag, GridCreator)::grid().leafGridView())
#else
: ParentType(timeManager,
GET_PROP_TYPE(TypeTag, GridCreator)::grid().leafView())
#endif
ObstacleProblem(Simulator &simulator)
: ParentType(simulator)
{
eps_ = 1e-6;
temperature_ = 273.15 + 25; // -> 25°C