... | ... | @@ -5,29 +5,29 @@ Basic grid properties |
|
|
|
|
|
Basic grid properties are set once by the readPFMetadat function. They are essential, each grid must provide them, all other grid metadata can be calculated from them. They can be accessed using functions (named as them) marked by the python "@property" decorator.
|
|
|
|
|
|
* bb - Bounding boxes of all blocks. 3dims: block, direction, LO/HI.
|
|
|
* blkshape - Shape of blocks (same for all of them) - number of grid cells in all directions. (3-element array)
|
|
|
* nblocks - Number of blocks. (single integer number)
|
|
|
* nodetype - Returns nodetypes of all blocks (1 = leaf block). 1dim: block.
|
|
|
* rlevel - Refinement levels for all blocks. 1dim: block
|
|
|
* vnames - List of field variables names available in the grid datafile. Python list of (preferentially 4 character) strings.
|
|
|
* bb - Bounding boxes of all blocks. Ret: npa(block, direction, LO/HI).
|
|
|
* blkshape - Shape of blocks (same for all of them) - number of grid cells in all directions. Ret: npa(dir).
|
|
|
* nblocks - Number of blocks. Ret: integer.
|
|
|
* nodetype - Returns nodetypes of all blocks (1 = leaf block). Ret: npa(block).
|
|
|
* rlevel - Refinement levels for all blocks. Ret: npa(block).
|
|
|
* vnames - List of field variables names available in the grid datafile. Ret: python list of (preferentially 4 character) strings.
|
|
|
|
|
|
Derived grid properties
|
|
|
-----------------------
|
|
|
|
|
|
Properties of the grid that can be derived from the above basic grid properties. They are calculated only once, at the first call of the function. They are marked by the "@cached_property" decorator.
|
|
|
|
|
|
* bcCoords - Coordinates of block centres. 2dim: block, direction.
|
|
|
* bs - Sizes of all blocks in all directions. 2dim: block, direction.
|
|
|
* CD - Computational domain (calculated from bb of all blocks). 3dim: block, direction, LO/HI.
|
|
|
* cs - Cell sizes of all blocks. 2dim: block, direction.
|
|
|
* minbs - Size of the smallest block. 1dim: direction.
|
|
|
* mincs - Size of the smallest grid cell. 1dim: direction.
|
|
|
* bc - Coordinates of block centres. Ret: npa(block, dir).
|
|
|
* bs - Sizes of all blocks in all directions. Ret: npa(block, dir).
|
|
|
* CD - Computational domain (calculated from bb of all blocks). Ret: npa(block, dir, LO/HI).
|
|
|
* cs - Cell sizes of all blocks. Ret: npa(block, dir).
|
|
|
* minbs - Size of the smallest block. Ret: npa(dir).
|
|
|
* mincs - Size of the smallest grid cell. Ret: npa(dir).
|
|
|
|
|
|
Calculating various values from metadata
|
|
|
----------------------------------------
|
|
|
|
|
|
* blockCellCoords(b, direction) - Calculates coordinates for all cells of a blocks along a given direction. Args: b is block number, direction is XAXIS, YAXIS or ZAXIS. 1dim: cell.
|
|
|
* blkCellCoords(b, direction) - Calculates coordinates for all cells of a blocks along a given direction. Args: b is block number, direction is XAXIS, YAXIS or ZAXIS. Ret: npa(cell).
|
|
|
* blocksIntersectingBox(box) - Returns list of blocks intersecting with a given box. box is 3x2 (dim, LO/HI) numpy array.
|
|
|
* csrl - Size of a cell at given refinement level. 1dim: direction.
|
|
|
* getDict - Returns dictionary various grid properties assigned actual values. 'xmin', 'xmax', 'xcen', 'ymin', ...
|
... | ... | @@ -47,9 +47,9 @@ Block transformation |
|
|
|
|
|
Interaction with uniform grid
|
|
|
-----------------------------
|
|
|
* createUniformGrid(self, dim, direction, pos, reflevel, quans, bbox):
|
|
|
* GetAxis(self, direction, reflevel, bounds):
|
|
|
* GetInsertRanges(self, axis, bounds, ncells):
|
|
|
* plane(self, plane):
|
|
|
* createUniformGrid(dim, direction, pos, reflevel, quans, bbox)
|
|
|
* insRanges(axis, bounds, ncells)
|
|
|
* fillPlane(plane)
|
|
|
* ugAxis(direction, reflevel, bounds)
|
|
|
|
|
|
|