Initializes most variables in the Grid structure. More...
Go to the source code of this file.
Functions | |
int | checkOverlap (SideS *pC1, SideS *pC2, SideS *pC3) |
Checks for overlap of cubes, and returns overlap coords. | |
int | checkOverlapTouch (SideS *pC1, SideS *pC2, SideS *pC3) |
Same as above, but checks for overlap and/or touch. | |
void | init_grid (MeshS *pM) |
Initializes most variables in the Grid structure. |
Initializes most variables in the Grid structure.
PURPOSE: Initializes most variables in the Grid structure. Allocates memory for 3D arrays of Cons, interface B, etc. With SMR, finds all overlaps between child and parent Grids, and initializes data needed for restriction flux-correction, and prolongation steps.
CONTAINS PUBLIC FUNCTIONS:
PRIVATE FUNCTION PROTOTYPES:
Definition in file init_grid.c.
Checks for overlap of cubes, and returns overlap coords.
Checks if two cubes are overlapping.
Arguments are Side structures, containing indices of the 6 sides of cube
Definition at line 1186 of file init_grid.c.
References SideS::ijkl, and SideS::ijkr.
Referenced by init_grid().
Same as above, but checks for overlap and/or touch.
Checks if two cubes are overlapping or touching.
Arguments are Side structures, containing indices of the 6 sides of cube
Definition at line 1222 of file init_grid.c.
References SideS::ijkl, and SideS::ijkr.
void init_grid | ( | MeshS * | pM | ) |
Initializes most variables in the Grid structure.
PURPOSE: Initializes most variables in the Grid structure. Allocates memory for 3D arrays of Cons, interface B, etc. With SMR, finds all overlaps between child and parent Grids, and initializes data needed for restriction flux-correction, and prolongation steps.
Definition at line 50 of file init_grid.c.
References ath_error(), GridS::B1i, GridS::B2i, GridS::B3i, calloc_1d_array(), calloc_2d_array(), calloc_3d_array(), GridS::CGrid, checkOverlap(), dim, GridsDataS::Disp, DomainS::Disp, GridS::Disp, MeshS::Domain, MeshS::DomainsPerLevel, GridOvrlpS::DomN, DomainS::dx, GridS::dx1, GridS::dx2, GridS::dx3, GridS::eta_AD, GridS::eta_Hall, GridS::eta_Ohm, free_1d_array(), free_3d_array(), DomainS::GData, get_myGridIndex(), DomainS::Grid, GridOvrlpS::ID, GridsDataS::ID_Comm_Children, GridsDataS::ID_Comm_Domain, GridsDataS::ID_Comm_Parent, GridsDataS::ID_Comm_world, GridS::ie, GridOvrlpS::ijke, SideS::ijkl, SideS::ijkr, GridOvrlpS::ijks, GridS::is, GridS::je, GridS::js, GridS::ke, GridS::ks, GridS::lx1_id, GridS::lx2_id, GridS::lx3_id, GridS::MaxX, DomainS::MinX, GridS::MinX, GridOvrlpS::myEMF1, GridOvrlpS::myEMF2, GridOvrlpS::myEMF3, GridOvrlpS::myFlx, myID_Comm_world, n, GridS::NCGrid, DomainS::NGrid, MeshS::NLevels, GridS::NmyCGrid, GridS::NmyPGrid, GridS::NPGrid, GridOvrlpS::nWordsP, GridOvrlpS::nWordsRC, DomainS::Nx, GridsDataS::Nx, GridS::Nx, MeshS::Nx, GridS::PGrid, GridS::Phi, GridS::Phi_old, GridS::r, GridS::ri, GridS::rx1_id, GridS::rx2_id, GridS::rx3_id, MeshS::time, GridS::time, GridS::U, GridS::x1MassFlux, GridS::x2MassFlux, and GridS::x3MassFlux.
Referenced by main().