Dear Michael,
I have tracked the problem with my Dirichlet boundary conditions to the distribute_local_to_global method, which does not seem to be usable if the system_matrix already contains data before assembly begins.
The basic algorithm that lays behind the distribute_local_to_global function is Gaussian elimination of the matrix columns that are constrained. An inhomogeneously constrained DoF i sets the ith component in the solution vector to a given value. If we now want to eliminate the entries in the matrix column, we have to do exactly the same operations to the vector. Consequently, when constructing the system matrix in two steps, the algorithm requires you to take care of right hand side vector already when you assemble the first matrix. A fix that might work: Use an additional vector constant_rhs. While creating the constant part of the matrix, provide a dummy local vector that only contains zeros to the distribute_local_to_global function and create the constant rhs. In the second step (at each time step, say), you first need to copy that vector to your system_rhs. With this code, you should be able to use distribute_local_to_global all the way through (at least if the inhomogeneity does not change with time). If your first step involves several matrices, just create several right hand sides and add them the same way as you do with the matrices. Can you try if that helps? Best, Martin _______________________________________________ dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii
