ProblemInstatBase.cpp 638 Bytes
Newer Older
Praetorius, Simon's avatar
Praetorius, Simon committed
1
#include <config.h>
2

3
4
5
6
#include "ProblemInstatBase.hpp"

#include "AdaptInfo.hpp"
#include "AdaptStationary.hpp"
7
#include "ProblemStatBase.hpp"
8
9
#include "StandardProblemIteration.hpp"

10
11
12
13
namespace AMDiS {

void ProblemInstatBase::setTime(AdaptInfo& adaptInfo)
{
Praetorius, Simon's avatar
Praetorius, Simon committed
14
15
  time_ = adaptInfo.time();
  tau_ = adaptInfo.timestep();
16
  invTau_ = 1.0 / tau_;
17
18
19
20
}


void ProblemInstatBase::solveInitialProblem(AdaptInfo& adaptInfo)
21
{
22
23
24
25
26
  if (initialProblem_) {
    StandardProblemIteration iteration(*initialProblem_);
    AdaptStationary initialAdapt(name_ + "->initial->adapt", iteration, adaptInfo);
    initialAdapt.adapt();
  }
27
}
28
29

} // end namespace AMDiS