On 3/5/20 9:24 AM, Magdalini Ntetsika wrote:
>
> but I don't seem to get the same *system_rhs *when
> *assemble_system=false* as when *assemble_system=true*. To be more
> specific, it seems that there is something wrong with how
> constraints.distribute_local_to_global(local_rhs, local_dof_indices,
> system_rhs) creates the system_rhs from local_rhs and
> local_dofs_indices. I don't change anything about constraints etc
> throughout the time steps since I set those things up at the very
> beginning and then I just run several times without updating anything.
> Any idea about what the problem could be?
Magdalini,
it's not in the function you point to, but in your understanding. In
order to compute the correct values of the right hand side when you have
non-zero constraints (e.g., when you have nonzer boundary values), the
function you call needs to have access to the matrix elements.
The issue is a bit complicated to understand, but you may want to look
up the video lectures on the topic of Dirichlet boundary conditions.
As for your case, take a look at step-26, which deals with exactly this
problem by building the matrix only once, but then using it for several
time steps.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/