On 9/25/20 4:15 PM, Xuefeng Li wrote:
For step-26, because system_rhs depends on time and time_step, we need to
assemble system_rhs in the loop. We therefore
need to call apply_boundary_values() inside the loop. Here is my question. *If
system_matrix were independent of time and time_step*
*(such as in the case of uniform time_step), **do we still need to assemble
system_matrix inside the loop? *
Yes. The problem is that apply_b_v() modifies the system matrix during its
operation, but it needs the original matrix to do its operations. That means
that once you've run apply_b_v(), you can't run it again because the original
matrix is no longer available.
Whether you get the original matrix through assembly (expensive) or by saving
the unmodified state from before you called apply_b_v() the first time around
(cheap) does not matter.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: bange...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/9c6bcfa8-fd80-daca-b99d-77474a3163f3%40colostate.edu.