Merge lp:~amcg-stokes/fluidity/fluidity-nearnullspace into lp:fluidity
Status: | Merged |
---|---|
Merged at revision: | 4182 |
Proposed branch: | lp:~amcg-stokes/fluidity/fluidity-nearnullspace |
Merge into: | lp:fluidity |
Diff against target: | 0 lines |
To merge this branch: | bzr merge lp:~amcg-stokes/fluidity/fluidity-nearnullspace |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
James Robert Percival | Approve | ||
Review via email: mp+149531@code.launchpad.net |
Description of the change
This branch adds the option to declare "near null spaces" that are useful for multigrid methods used on Stokes solves.
Stress form viscosity as a linear operator on velocity in an infinite 3d domain has 6 zero modes (3 constant modes and 3 rotational modes, akin to rigid body movements). With boundary conditions in a finite domain most of these are typically fixed but the modes are still present as small eigenvalue (low energy modes) that are responsible for communicating the boundary conditions across the entire domain. In multigrid methods it is important that these modes are correctly represented on the coarser grids in particular for big viscosity contrast problems where otherwise the interior solution may struggle to feel the boundary condition across weaker parts of the domain. The "pcgamg" preconditioner (available in petsc >= 3.3) allows you to specify such modes as a near nullspace.
Changes in this branch:
* add an option multigrid_
* in a clean up of the code that sets up nullspaces, for the scalar version of remove_null_space/ the option to remove different modes, which defaulted to all_components has been taken out, as it doesn't make sense for scalar solves. This means that all flmls in the current trunk, which will have the thus far required all_components/ under remove_null_space/ will have that option removed when opening up in diamond. Either version of an flml should however work with the trunk before and after merge. (REMINDER: need to update longtests after merge)
* as the functionality to specify a near null space is only available in petsc 3.3, a new "petsc33" tag has been added to be used by testharness to only run the tests with the new option when configured and build with petsc>=3.3
Additional logic looks fine to me and improved functionality will be very useful. Approve.