We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d95c67d commit e609ab9Copy full SHA for e609ab9
include/pfasst/sdc.hpp
@@ -12,16 +12,22 @@ namespace pfasst {
12
template<typename time>
13
class SDC : public Controller<time> {
14
public:
15
- void run() {
16
- ISweeper& swp = *this->get_level(0);
+
+ void run()
17
+ {
18
+ auto* sweeper = this->get_level(0);
19
20
for (int nstep=0; nstep<this->nsteps; nstep++) {
21
time t = nstep * this->dt;
- swp.predict(t, this->dt);
- for (int niter=0; niter<this->niters; niter++)
- swp.sweep(t, this->dt);
22
- swp.advance();
23
+ sweeper->predict(t, this->dt, nstep==0);
24
+ for (int niter=1; niter<this->niters; niter++)
25
+ sweeper->sweep(t, this->dt);
26
27
+ sweeper->advance();
28
}
29
30
31
};
32
33
0 commit comments