On 3/17/20 8:34 AM, Ahmad Shahba wrote:
>
> *_My question:_*
> Is this behavior expected? Or am I doing something wrong or perhaps my
> understanding of this subject is flawed?
>
> I prepared a small code to demonstrate this behavior. Thanks in advance for
> your help and sorry for this long description of the problem.
The AffineConstraints class needs to know about constraints on all *locally
relevant* DoFs, not just the locally owned ones. So I would suspect (without
having tried) that when you do
dealii::AffineConstraints<double> constraints(locallyRelevantIndices);
if (idProcess == 0) {
constraints.add_lines(std::set<unsigned>({0, 1, 2, 3}));
constraints.add_entry(0, 4, 1.0);
constraints.add_entry(1, 5, 1.0);
} else {
constraints.add_lines(std::set<unsigned>({4, 6, 7}));
constraints.set_inhomogeneity(4, 0.05);
}
That this is not enough -- you need to also add the constraints for the other
unknowns among the locally relevant ones.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/