DUNE PDELab (git)

idefault.hh
1// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=8 sw=4 sts=4:
3#ifndef DUNE_PDELAB_LOCALOPERATOR_IDEFAULT_HH
4#define DUNE_PDELAB_LOCALOPERATOR_IDEFAULT_HH
5
6namespace Dune
7{
8 namespace PDELab
9 {
13
15
88 template<class R = double>
90 {
91 public:
92 typedef R RealType;
93
95
104 void setTime (R t_)
105 {
106 t = t_;
107 }
108
110
113 R getTime () const
114 {
115 return t;
116 }
117
119
134 void preStep (RealType time, RealType dt, int stages)
135 {
136 }
137
139
145 void postStep ()
146 {
147 }
148
150
164 void preStage (RealType time, int r)
165 {
166 stage = r;
167 }
168
170
173 int getStage () const
174 {
175 return stage;
176 }
177
179 void postStage ()
180 {
181 }
182
184
194 RealType suggestTimestep (RealType dt) const
195 {
196 return dt;
197 }
198
199 private:
200 int stage;
201 R t;
202 };
204 }
205}
206
207#endif // DUNE_PDELAB_LOCALOPERATOR_IDEFAULT_HH
Default class for additional methods in instationary local operators.
Definition: idefault.hh:90
void postStage()
to be called once at the end of each stage
Definition: idefault.hh:179
void preStage(RealType time, int r)
to be called once before each stage
Definition: idefault.hh:164
int getStage() const
get current stage
Definition: idefault.hh:173
void preStep(RealType time, RealType dt, int stages)
to be called once before each time step
Definition: idefault.hh:134
R getTime() const
get current time
Definition: idefault.hh:113
void postStep()
to be called once at the end of each time step
Definition: idefault.hh:145
RealType suggestTimestep(RealType dt) const
to be called after stage 1
Definition: idefault.hh:194
void setTime(R t_)
set time for subsequent evaluation
Definition: idefault.hh:104
Dune namespace.
Definition: alignedallocator.hh:13
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 23, 23:29, 2024)