| 60 | 60 | There are two major data arrays in {{{InfoDef}}}: the {{{q}}} array and the {{{aux}}} array. {{{q}}} holds the cell-centered data and is used by all AstroBEAR simulations. The {{{q}}} array takes the form {{{q(x,y,z,variable)}}} where {{{variable}}} is itself a 1D array that holds the physical quantities such as density, momentum, energy, etc. The order of the quantities in the {{{variable}}} array is {{{(rho, px, py, pz, E)}}}. An integer or a specific character can be used for {{{variable}}}. The characters that can be used are {{{irho, ivx, ivy, ivz, iE}}} respectively. So for example, the following two statements are equivalent: |
| 61 | 61 | {{{ |
| 215 | | {{{ |
| 216 | | ! DataDeclarations makes the InfoDef type available, GlobalDeclarations is required for grid information, |
| 217 | | ! and PhysicsDeclarations is useful for certain physical quantities like gamma. |
| 218 | | USE DataDeclarations |
| 219 | | USE GlobalDeclarations |
| 220 | | USE PhysicsDeclarations |
| 221 | | IMPLICIT NONE |
| 222 | | |
| 223 | | ! Initialize the module variables |
| 224 | | SUBROUTINE ProblemModuleInit(Info) |
| 225 | | END SUBROUTINE ProblemModuleInit |
| 226 | | |
| 227 | | ! Initialize the grid |
| 228 | | SUBROUTINE ProblemGridInit(Info) |
| 229 | | END SUBROUTINE ProblemGridInit |
| 230 | | |
| 231 | | ! Use for pre-processing (this is an example of leaving a routine as a stub) |
| 232 | | SUBROUTINE ProblemBeforeStep(Info) |
| 233 | | END SUBROUTINE ProblemBeforeStep |
| 234 | | |
| 235 | | ! Use for post-processing |
| 236 | | SUBROUTINE ProblemAfterStep(Info) |
| 237 | | END SUBROUTINE ProblemAfterStep |
| 238 | | |
| 239 | | ! Use for additional refinement |
| 240 | | SUBROUTINE ProblemSetErrFlag(Info) |
| 241 | | END SUBROUTINE ProblemSetErrFlag |
| 242 | | }}} |
| | 215 | [[Image()]] |