Skip to content

Commit 6cf30c0

Browse files
committed
encap: Fix recv/reevaluate for PFASST.
Signed-off-by: Matthew Emmett <[email protected]>
1 parent 9d74c04 commit 6cf30c0

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

include/pfasst/encap/encap_sweeper.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ namespace pfasst
118118
virtual void spread() override
119119
{
120120
for (size_t m = 1; m < this->quadrature->get_num_nodes(); m++) {
121-
// this->get_state(m)->copy(this->start_state);
122121
this->state[m]->copy(this->state[0]);
123122
}
124123
}
@@ -274,6 +273,9 @@ namespace pfasst
274273
virtual void recv(ICommunicator* comm, int tag, bool blocking) override
275274
{
276275
this->start_state->recv(comm, tag, blocking);
276+
if (this->quadrature->left_is_node()) {
277+
this->state[0]->copy(this->start_state);
278+
}
277279
}
278280

279281
virtual void broadcast(ICommunicator* comm) override

include/pfasst/encap/imex_sweeper.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,10 @@ namespace pfasst
168168
time dt = this->get_controller()->get_time_step();
169169
if (initial_only) {
170170
if (this->quadrature->left_is_node()) {
171-
this->f_expl_eval(this->fs_expl[0], this->start_state, t0);
172-
this->f_impl_eval(this->fs_impl[0], this->start_state, t0);
173-
171+
this->f_expl_eval(this->fs_expl[0], this->state[0], t0);
172+
this->f_impl_eval(this->fs_impl[0], this->state[0], t0);
174173
} else {
175-
174+
throw NotImplementedYet("reevaluate");
176175
}
177176
} else {
178177
for (size_t m = 0; m < this->quadrature->get_num_nodes(); m++) {

0 commit comments

Comments
 (0)