Skip to content

Tidy and clarify implementation of Dirichlet boundary condition in GlobalLinSys

Issue/feature addressed

This MR has the purpose of clarifying the implementation of the Dirichlet boundary condition in GlobalLinSys

We are basically solving

A * x = b 
A * (xprev + xdirichlet + deltax) = b
A * deltax = b - A * (xprev + xdirichlet) = rhs
x = (xprev + xdirichlet) + deltax

This MR propose some variable name and comment changes to clarify the implementation. Also, it uniformizes the implementation across

  • library/MultiRegions/GlobalLinSysDirectFull.cpp
  • library/MultiRegions/GlobalLinSysIterativeFull.cpp
  • library/MultiRegions/GlobalLinSysPETScFull.cpp
  • library/MultiRegions/GlobalLinSysXxtFull.cpp

Remark: Due to a previous misinterpretation, the following is currently implemented in the redesign project

A * (xdirichlet + deltax) = b 
A * deltax = b - A * xdirichlet = rhs
x = xdirichlet + deltax

Proposed solution



Suggested reviewers

Please suggest any people who would be appropriate to review your code.


Please add any other information that could be useful for reviewers.


  • Functions and classes, or changes to them, are documented.
  • [ ] User guide/documentation is updated.
  • Changelog is updated.
  • [ ] Suitable tests added for new functionality.
  • Contributed code is correctly formatted. (See the contributing guidelines).
  • [ ] License added to any new files.
  • No extraneous files have been added (e.g. compiler output or test data files).
Edited by Jacques Xing

Merge request reports