Merge lp:~amcg-stokes/fluidity/fluidity-nearnullspace into lp:fluidity

Proposed by Stephan Kramer
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
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_near_null_space under the vector linear solve/ options. Under it the same options are available as for the vector version of remove_null_space/ allowing you to specify any subset of the 6 modes.
* 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

To post a comment you must log in.
4036. By Stephan Kramer

Merge in trunk.

Revision history for this message
James Robert Percival (j-percival) wrote :

Additional logic looks fine to me and improved functionality will be very useful. Approve.

review: Approve
4037. By Rhodri Davies

Merge trunk changes into branch before merging branch into trunk.

Preview Diff

Empty