ProblemTimeInterface.hpp 1010 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#pragma once

namespace AMDiS
{
  class AdaptInfo;

  /**
   * \ingroup Problem
   *
   * \brief
   * Interface for time dependent problems. Concrete problems must override
   * all pure virtual methods.
   */
  class ProblemTimeInterface
  {
  public:
17
    virtual ~ProblemTimeInterface() = default;
18
19

    /// Called at the beginning of the adaption loop before any other call
Praetorius, Simon's avatar
Praetorius, Simon committed
20
    virtual void initTimeInterface() { /* do nothing */ };
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

    /// Executes all needed operations when the simulation time changes.
    virtual void setTime(AdaptInfo& adaptInfo) = 0;

    /// Called at the beginning of each timestep
    virtual void initTimestep(AdaptInfo& adaptInfo) = 0;

    /// Called at the end of each timestep.
    virtual void closeTimestep(AdaptInfo& adaptInfo) = 0;

    /// Solves the initial problem.
    virtual void solveInitialProblem(AdaptInfo& adaptInfo) = 0;

    /// Transfer the initial problem.
    virtual void transferInitialSolution(AdaptInfo& adaptInfo) = 0;
  };

} // end namespace AMDiS