1 | | See [wiki:"SelfGravityDevel"]. |
| 1 | ==== Self-Gravity ==== |
| 2 | |
| 3 | AstroBEAR uses the [https://computation.llnl.gov/casc/hypre/software.html hypre] library to solve the self-gravity equations. To use self-gravity: |
| 4 | |
| 5 | 1. Look for the {{{HYPREFLAG}}} variable in {{{Makefile.inc}}} and make sure that it is set to {{{1}}}. |
| 6 | 2. Set the {{{lSelfGravity}}} flag in your {{{physics.data}}} file and set it to {{{T}}}. |
| 7 | |
| 8 | Hypre will automatically initialize the potential field using the density. The only caveat is that the initial density cannot be uniform. When the density is uniform, hypre produces a [http://mathworld.wolfram.com/SingularMatrix.html singular matrix] that it can't solve. Fortunately, a small density perturbation takes care of this problem without substantially affecting the dynamics of the domain. AstroBEAR comes with a Perturbation object type that can be used for this. |
| 9 | |
| 10 | For more information see [wiki:"SelfGravityDevel"]. |