55 | | All AstroBEAR modules have at least one thing in common: initializing the problem domain. Within our code, the problem domain's data is held in {{{InfoDef}}} structures, which is why so many module subroutines take an {{{InfoDef}}} structure as a parameter. |
56 | | |
57 | | 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)}}}. The {{{aux}}} array holds face-centered data, and is only used in MHD problems. If you are running a strictly hydrodynamic problem or a hydrodynamic + elliptic problem, then you will not need {{{aux}}}. |
| 55 | All AstroBEAR modules have at least one thing in common: initializing the problem domain. Within our code, the problem domain's data is held in {{{InfoDef}}} structures, which is why so many module subroutines take an {{{InfoDef}}} structure as a parameter. To make use of the {{{InfoDef}}} structure, the following statement is required at the beginning of {{{problem.f90}}}: |
| 56 | {{{ |
| 57 | USE DataDeclarations |
| 58 | }}} |
| 59 | |
| 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 | {{{ |
| 62 | Info%q(x,y,z,3) = 2 |
| 63 | |
| 64 | Info%q(x,y,z,ivy) = 2 |
| 65 | }}} |
| 66 | They both put the value 2 into the place in {{{q}}} that is reserved for the y-component of momentum. Note that in order to use these character indices, the following statement is required at the beginning of {{{problem.f90}}}: |
| 67 | |
| 68 | {{{ |
| 69 | USE GlobalDeclarations |
| 70 | }}} |
| 71 | |
| 72 | The {{{aux}}} array holds face-centered data, and is only used in MHD problems. If you are running a strictly hydrodynamic problem or a hydrodynamic + elliptic problem, then you will not need {{{aux}}}. |