• Bernd Flemisch's avatar
    [cell-centered implicit] fix a bug in the handling of mixed boundary · a78975bb
    Bernd Flemisch authored
    Mixed boundary conditions here means that a part of the
    equations/primary variables gets Dirichlet conditions, while the rest
    gets Neumann conditions.
    While in the cell-centered method pure Dirichlet conditions for all
    equations are handled by calculating the resulting fluxes and adding
    them to the cell residual, such a flux cannot be (easily?) calculated
    for an equation that gets a Dirichlet condition as part of mixed
    conditions. Therefore, such a Dirichlet condition is implemented in a
    strong way by _replacing_ the corresponding cell residual.
    It is important that this replacement is done at the very end of the
    residual calculation. However, for corner cells this has not been
    guaranteed so far. Therefore, fluxed resulting from the other boundary
    parts of a corner cell could have been added to the replaced residual,
    obviously leading to a wrong boundary condition treatment.
    This patch resolves the issue by guaranteeing that the residual
    replacement is done at the end of the residual calculation.
    Brought to attention and reviewed by Thomas. Thanks.
    git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@13823 2fb0f335-1f38-0410-981e-8018bf24f1b0