5 | | A final important data structure defined in {{{/athena/src/athena.h}}} is used |
| 5 | Another important data structure defined in {{{/athena/src/athena.h}}} is {{{DomainS}}} |
| 6 | {{{ |
| 7 | typedef struct Domain_s{ |
| 8 | Real RootMinX[3]; /* min(x) in each dir on root Domain [0,1,2]=[x1,x2,x3] */ |
| 9 | Real RootMaxX[3]; /* max(x) in each dir on root Domain [0,1,2]=[x1,x2,x3] */ |
| 10 | Real MinX[3]; /* min(x) in each dir on this Domain [0,1,2]=[x1,x2,x3] */ |
| 11 | Real MaxX[3]; /* max(x) in each dir on this Domain [0,1,2]=[x1,x2,x3] */ |
| 12 | Real dx[3]; /* cell size in this Domain [0,1,2]=[x1,x2,x3] */ |
| 13 | int Nx[3]; /* # of zones in each dir in this Domain [0,1,2]=[x1,x2,x3] */ |
| 14 | int NGrid[3]; /* # of Grids in each dir in this Domain [0,1,2]=[x1,x2,x3] */ |
| 15 | int Disp[3]; /* i,j,k displacements of Domain from origin [0,1,2]=[i,j,k] */ |
| 16 | int Level,DomNumber; /* level and ID number of this Domain */ |
| 17 | int InputBlock; /* # of <domain> block in input file for this Domain */ |
| 18 | GridS *Grid; /* pointer to Grid in this Dom updated on this processor */ |
| 19 | |
| 20 | GridsDataS ***GData; /* size,location, & processor IDs of Grids in this Dom */ |
| 21 | |
| 22 | VGFun_t ix1_BCFun, ox1_BCFun; /* ix1/ox1 BC function pointers for this Dom */ |
| 23 | VGFun_t ix2_BCFun, ox2_BCFun; /* ix1/ox1 BC function pointers for this Dom */ |
| 24 | VGFun_t ix3_BCFun, ox3_BCFun; /* ix1/ox1 BC function pointers for this Dom */ |
| 25 | |
| 26 | #ifdef MPI_PARALLEL |
| 27 | MPI_Comm Comm_Domain; /* MPI communicator between Grids on this Dom */ |
| 28 | MPI_Group Group_Domain; /* MPI group for Domain communicator */ |
| 29 | #ifdef STATIC_MESH_REFINEMENT |
| 30 | MPI_Comm Comm_Parent; /* MPI communicator to Grids in parent Domain */ |
| 31 | MPI_Comm Comm_Children; /* MPI communicator to Grids in child Domains */ |
| 32 | MPI_Group Group_Children; /* MPI group for Children communicator */ |
| 33 | #endif /* STATIC_MESH_REFINEMENT */ |
| 34 | #endif /* MPI_PARALLEL */ |
| 35 | }DomainS; |
| 36 | }}} |
| 37 | This structure stores the edges of the Domain in the (x1,x2,x3) coordinate system, |
| 38 | the integer displacement of the Domain from the origin of the root Domain, and information about |
| 39 | needed for SMR and parallelization with MPI. |