|
|
Class CBlockGrid handles grid organised into a 3D AMR octal tree (forrest) of blocks (tree nodes). The whole grid covers a cuboid computational domain. Blocks consist of grid cells and all blocks have the same shape (number of cells along the three coordinates). Blocks have assigned refinement levels, its value 1 corresponds to the root block (or blocks) and higher values denote more and more refined blocks. Each grid cell includes several quantities (float64 numbers).
|
|
|
|
|
|
The grid can be read from hdf files (written by Flash) or ascii files (in prep). The file must include certain basic properties that can be read by function readPFMetadata. The remaining data (content of blocks) can be read by parts (by individual blocks and quantities) by function readBlocks.
|
|
|
|
|
|
The CBlockGrid class includes functions that allow to trasform blocks to a given refinement level, calculate their slices and integrals in a given direction and insert block data into a uniform grid (class [CUniformGrid](CUniformGrid)): cuboid, plane or line segment, aligned with the axes of the grid.
|
|
|
|
|
|
Basic grid properties
|
|
|
---------------------
|
... | ... | @@ -49,7 +53,7 @@ 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 CQuans 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.
|
|
|
* fillPlane(plane)
|
|
|
* fillPlane(plane) -
|
|
|
* 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).
|
|
|
|
|
|
|