Skip to content

Commit 6c756ab

Browse files
committed
imex: Fix inclusion of FAS corrections in residuals.
Signed-off-by: Matthew Emmett <[email protected]>
1 parent 1ffb657 commit 6c756ab

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

include/pfasst/encap/imex_sweeper.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,11 @@ namespace pfasst
208208
dst[m]->saxpy(-1.0, this->state[m]);
209209
}
210210
if (this->fas_corrections.size() > 0) {
211-
size_t m0 = this->quadrature->left_is_node() ? 1 : 0;
212-
for (size_t m = m0; m < this->quadrature->get_num_nodes(); m++) {
213-
dst[m]->saxpy(1.0, this->fas_corrections[m-m0]);
211+
// XXX: build a matrix and use mat_apply to do this
212+
for (size_t m = 0; m < this->quadrature->get_num_nodes(); m++) {
213+
for (size_t n = 0; n <= m; n++) {
214+
dst[m]->saxpy(1.0, this->fas_corrections[n]);
215+
}
214216
}
215217
}
216218
dst[0]->mat_apply(dst, dt, this->quadrature->get_q_mat(), this->fs_expl, false);

0 commit comments

Comments
 (0)