Skip to content

Commit e609ab9

Browse files
committed
sdc: Fix arguments of predict.
Signed-off-by: Matthew Emmett <[email protected]>
1 parent d95c67d commit e609ab9

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

include/pfasst/sdc.hpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,22 @@ namespace pfasst {
1212
template<typename time>
1313
class SDC : public Controller<time> {
1414
public:
15-
void run() {
16-
ISweeper& swp = *this->get_level(0);
15+
16+
void run()
17+
{
18+
auto* sweeper = this->get_level(0);
19+
1720
for (int nstep=0; nstep<this->nsteps; nstep++) {
1821
time t = nstep * this->dt;
19-
swp.predict(t, this->dt);
20-
for (int niter=0; niter<this->niters; niter++)
21-
swp.sweep(t, this->dt);
22-
swp.advance();
22+
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();
2328
}
2429
}
30+
2531
};
2632

2733
}

0 commit comments

Comments
 (0)