Skip to content

Commit 8fa7999

Browse files
committed
imex: Add FAS corrections to residual.
Signed-off-by: Matthew Emmett <[email protected]>
1 parent d7fe9ac commit 8fa7999

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

include/pfasst/encap/imex_sweeper.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,12 @@ namespace pfasst
206206
for (size_t m = 0; m < this->quadrature->get_num_nodes(); m++) {
207207
dst[m]->copy(this->start_state);
208208
dst[m]->saxpy(-1.0, this->state[m]);
209-
// XXX: add tau corrections
209+
}
210+
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]);
214+
}
210215
}
211216
dst[0]->mat_apply(dst, dt, this->quadrature->get_q_mat(), this->fs_expl, false);
212217
dst[0]->mat_apply(dst, dt, this->quadrature->get_q_mat(), this->fs_impl, false);

0 commit comments

Comments
 (0)