... | ... | @@ -52,9 +52,9 @@ Block transformation |
|
|
|
|
|
Interaction with uniform grid
|
|
|
-----------------------------
|
|
|
* createUniformGrid(dim, direction, pos, reflevel, quans, bbox) - Creates a uniform grid (class CUniformGrid) covering the AMR grid, with coordinates aligned with it, restricted with given arguments. Args: dim - dimension (1, 2 or 3); direction - normal to the plane (for 2d) or direction vector (for 1d); pos - position of the plane (2d, one coordinate) or the line segment (1d, two coma-separated coordines); reflevel - refinement level determining size of UG cells; quans - quantities to be stored in the UG, encapsulated in the CQList object; bbox - bounding box, npa(dir,LO/HI).
|
|
|
* createUniformGrid(self, dim, axord, pos, reflevel, quans, bbox) - Creates a uniform grid (class CUniformGrid) covering the AMR grid, with coordinates aligned with it, restricted with given arguments. Args: dim - dimension (1, 2 or 3); axord - ordering of axes (npa(3)); pos - 3-element list defining the position of the cutting object in the grid (None means this dimension has only 1 element in the AMR grid, "RANGE" means that it is copied, a number defines the position of a cut); reflevel - refinement level determining size of UG cells; quans - quantities to be stored in the UG, encapsulated in the CQList object; bbox - bounding box, npa(dir,LO/HI).
|
|
|
* insRanges(axis, bounds, ncells) - Determines sets of indices in a block (bIdx) and in an axis (aIdx) for the situation when a block (defined with bounds and ncells) is inserted into a uniform grid (defined with axis). Args: axis - axis of a uniform grid; bounds - min & max of an inserted block along the given axis; ncells - number of cells of a block in a given direction. Ret: tuple of two npa - bIdx and aIdx.
|
|
|
* Fills the uniform grid (CUniformGrid) with the block data. At first it determines which blocks and quantities will be needed depending on the AMR and uniform grid's bboxes and whether it should integrate in the other (two) directions or just make a cut. Then, it reads all necessary blocks from file, makes cuts or integrals, transforms them to the same rlevel as the uniform grid, and inserts them into it. Args: UG is the CUniformGrid object; integr is logical determining whether to integrate (True) or to make cut (False); qn is list of quantity names to be read and processed; UGQSlice sets range of indeces in the uniform grid where the quantities will be inserted; and wn is the name an eventual weighting quantity (integrals can be weighted). Ret: None.
|
|
|
* fillUG(self, UG, integr, qn, UGQSlice, wn = None) - Fills the uniform grid (CUniformGrid) with the block data. At first it determines which blocks and quantities will be needed depending on the AMR and uniform grid's bboxes and whether it should integrate in the other (two) directions or just make a cut. Then, it reads all necessary blocks from file, makes cuts or integrals, transforms them to the same rlevel as the uniform grid, and inserts them into it. Args: UG is the CUniformGrid object; integr is logical determining whether to integrate (True) or to make cut (False); qn is list of quantity names to be read and processed; UGQSlice sets range of indeces in the uniform grid where the quantities will be inserted; and wn is the name an eventual weighting quantity (integrals can be weighted). Ret: None.
|
|
|
* ugAxis(direction, reflevel, bounds) - Creates an np array with grid cells coords along certain direction (0,1,2 = x, y, z), at a certain refinement level and restricted with bounds npa(2) - min, max).
|
|
|
|
|
|
|