Hi, there!
I have a question concerning the use of the function apply_boundary_values():
MatrixTools::apply_boundary_values(boundary_values,
system_matrix,
solution,
system_rhs);
Iteration is used to find a numerical solution. We know that
system_matrix is independent of the iterate and remains unchanged during the iteration
system_rhs depends on the iterate so it changes during the iteration
Below is the pseudo-code of the program.
initialize iterate u;
assemble system_matrix; //Just once
assemble system_rhs; //1st time
call apply_boundary_values(); //Apply bdry 1st time
while ( not converged ) {
solve FEM to get new iterate u;
assemble system_rhs; // repeated
call apply_boundary_values(); // repeated
}
My question is: will the repeated call to function apply_boundary_values() inside the loop
alter the system_matrix that is meant to be constant (independent of iterate u)?
If the answer is no, then the above code will be fine, I guess.
If the answer is yes, I guess I'll need to assemble system_matrix inside the loop repeatedly
even though it is independent of the iterate u.
Thanks for any assistance.