Commit 81d8d089 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

some modifications in the couplingProblemStat

parent 11917c17
...@@ -40,11 +40,12 @@ namespace AMDiS { ...@@ -40,11 +40,12 @@ namespace AMDiS {
* This class defines a coupled stationary problem definition in sequential * This class defines a coupled stationary problem definition in sequential
* computations. * computations.
*/ */
class CouplingProblemStat template<typename ProblemStatType>
class CouplingProblemStatImpl
{ {
public: public:
/// Constructor /// Constructor
CouplingProblemStat(std::string name_) CouplingProblemStatImpl(std::string name_)
: name(name_), : name(name_),
nComponents(0), nComponents(0),
nMeshes(0), nMeshes(0),
...@@ -53,10 +54,10 @@ namespace AMDiS { ...@@ -53,10 +54,10 @@ namespace AMDiS {
{} {}
/// Destructor /// Destructor
virtual ~CouplingProblemStat() {} virtual ~CouplingProblemStatImpl() {}
/// add problem by number /// add problem by number
virtual void addProblem(ProblemStat* prob) virtual void addProblem(ProblemStatType* prob)
{ {
problems.push_back(prob); problems.push_back(prob);
nComponents += prob->getNumComponents(); nComponents += prob->getNumComponents();
...@@ -64,7 +65,7 @@ namespace AMDiS { ...@@ -64,7 +65,7 @@ namespace AMDiS {
/// Initialisation of the problem. /// Initialisation of the problem.
virtual void initialize(Flag initFlag, virtual void initialize(Flag initFlag,
CouplingProblemStat *adoptProblem = NULL, CouplingProblemStatImpl<ProblemStatType> *adoptProblem = NULL,
Flag adoptFlag = INIT_NOTHING) Flag adoptFlag = INIT_NOTHING)
{ {
...@@ -211,7 +212,7 @@ namespace AMDiS { ...@@ -211,7 +212,7 @@ namespace AMDiS {
* Returns the problem with the given number. If only one problem * Returns the problem with the given number. If only one problem
* is managed by this master problem, the number hasn't to be given. * is managed by this master problem, the number hasn't to be given.
*/ */
virtual ProblemStat *getProblem(int number = 0) virtual ProblemStatType *getProblem(int number = 0)
{ {
return problems[number]; return problems[number];
} }
...@@ -281,8 +282,11 @@ namespace AMDiS { ...@@ -281,8 +282,11 @@ namespace AMDiS {
*/ */
CoarseningManager *coarseningManager; CoarseningManager *coarseningManager;
vector<ProblemStat*> problems; vector<ProblemStatType*> problems;
}; };
typedef CouplingProblemStatImpl<ProblemStat> CouplingProblemStat;
} }
#endif #endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment