A block object
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(axis_obj), | public | :: | axis(3) |
Axes in x1, x2, and x3 directions |
|||
type(axis_obj), | public | :: | axis_partition(3) |
Axes of the main partition, (spacing equal to 1 sub-block) |
|||
real(kind=wp), | public | :: | dx(3) |
Minimum mesh spacing in each direction |
|||
real(kind=wp), | public, | pointer, contiguous | :: | dxm(:) | => | null() |
Convenience pointer to x-cell spacings |
real(kind=wp), | public, | pointer, contiguous | :: | dym(:) | => | null() |
Convenience pointer to y-cell spacings |
real(kind=wp), | public, | pointer, contiguous | :: | dzm(:) | => | null() |
Convenience pointer to z-cell spacings |
type(MPI_Datatype), | public | :: | gc_slab_i(3) | = | MPI_DATATYPE_NULL |
MPI derived type for integer gc |
|
type(MPI_Datatype), | public | :: | gc_slab_r(3) | = | MPI_DATATYPE_NULL |
MPI derived type for wp real gc |
|
integer, | public | :: | hi(3) |
Array upper bound |
|||
logical, | public | :: | is_partitioned | = | .false. |
Flag for parallel partitioning |
|
integer, | public | :: | lo(3) |
Array lower bound |
|||
integer, | public | :: | ngc | = | 2 |
Number of ghostcells |
|
type(parallel_obj), | public, | pointer | :: | parallel | => | null() |
Associated parallel structure |
logical, | public | :: | periods(3) | = | .false. |
Periodicity in each direction |
|
real(kind=wp), | public | :: | pmax(3) |
Min and max locations across all blocks |
|||
real(kind=wp), | public | :: | pmin(3) |
Min and max locations across all blocks |
|||
real(kind=wp), | public, | pointer, contiguous | :: | x(:) | => | null() |
Convenience pointer to x-nodal points |
real(kind=wp), | public | :: | xhi(3) |
Coordinate of the top right corner |
|||
real(kind=wp), | public | :: | xlo(3) |
Coordinate of the bottom left corner |
|||
real(kind=wp), | public, | pointer, contiguous | :: | xm(:) | => | null() |
Convenience pointer to x-mid points |
real(kind=wp), | public | :: | xmax |
Min and max locations across all blocks |
|||
real(kind=wp), | public | :: | xmin |
Min and max locations across all blocks |
|||
real(kind=wp), | public, | pointer, contiguous | :: | y(:) | => | null() |
Convenience pointer to y-nodal points |
real(kind=wp), | public, | pointer, contiguous | :: | ym(:) | => | null() |
Convenience pointer to y-mid points |
real(kind=wp), | public | :: | ymax |
Min and max locations across all blocks |
|||
real(kind=wp), | public | :: | ymin |
Min and max locations across all blocks |
|||
real(kind=wp), | public, | pointer, contiguous | :: | z(:) | => | null() |
Convenience pointer to z-nodal points |
real(kind=wp), | public, | pointer, contiguous | :: | zm(:) | => | null() |
Convenience pointer to z-mid points |
real(kind=wp), | public | :: | zmax |
Min and max locations across all blocks |
|||
real(kind=wp), | public | :: | zmin |
Min and max locations across all blocks |
Defines a 1D axis xm(lo) xm(hi) | | |-----|-----|------|------| | <-dxm-> | x(lo) x(hi+1)
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=wp), | public, | pointer, contiguous | :: | dxm(:) | => | null() |
Cell spacings |
integer, | public | :: | hi |
Higher bound |
|||
integer, | public | :: | lo |
Lower bound |
|||
integer, | public | :: | ngc |
Number of ghostcells |
|||
real(kind=wp), | public, | pointer, contiguous | :: | x(:) | => | null() |
Nodal points |
real(kind=wp), | public, | pointer, contiguous | :: | xm(:) | => | null() |
Mid points |
procedure, public :: Finalize => axis_obj_Final | |
procedure, public :: Initialize => axis_obj_Init |
Return block ID and rank of the block where the point is located using a binary search alogirthm. Note that this function assumes that the point is within the domain, i.e., (pmin <= p <= pmax) and that any treatment for periodicity has been previously applied.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_obj), | intent(in) | :: | this |
A block object |
||
real(kind=wp), | intent(in) | :: | p(3) |
Position to locate |
MPI rank
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(axis_obj), | intent(inout) | :: | this |
A axis object |
Initialize axis
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(axis_obj), | intent(inout) | :: | this |
A axis object |
||
integer, | intent(in) | :: | lo |
Array lower bound |
||
integer, | intent(in) | :: | hi |
Array higher bound |
||
integer, | intent(in) | :: | ngc |
Number of ghost cells |
Finalize the block object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_obj), | intent(inout) | :: | this |
A block object |
Print to stdout information about this block
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_obj), | intent(in) | :: | this |
A block object |
Initialize block object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_obj), | intent(inout) | :: | this |
A block object |
||
integer, | intent(in) | :: | ngc |
Number of ghostcells |
||
type(parallel_obj), | intent(in), | target | :: | parallel |
parallel structure from main program |
[DEPRECATED] Initialize block object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_obj), | intent(inout) | :: | this |
A block object |
||
real(kind=wp), | intent(in) | :: | xlo(3) |
Coordinates of the bottom left corner |
||
real(kind=wp), | intent(in) | :: | xhi(3) |
Coordinates of the top right corner |
||
integer, | intent(in) | :: | lo(3) |
Array lower bound |
||
integer, | intent(in) | :: | hi(3) |
Array upper bound |
||
integer, | intent(in) | :: | ngc |
Number of ghostcells |
||
type(parallel_obj), | intent(in), | target | :: | parallel |
parallel structure from main program |
Partition a parent block into sub-blocks based on a given decomposition Nb(3) for parallel simulations. This will also define the partition axes, and update local bounds/extents, and global bounds/extents.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_obj), | intent(inout) | :: | this |
A block object |
||
integer, | intent(in) | :: | Nb(3) |
Number of blocks in each direction |
Read block data using HDF5
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_obj), | intent(inout) | :: | this |
A block object |
||
character(len=*), | intent(in) | :: | name |
Name of file to write |
Associate the convenience pointers
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_obj), | intent(inout) | :: | this |
A block object |
Set block periodicity in each direction
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_obj), | intent(inout) | :: | this |
A block object |
||
logical, | intent(in) | :: | periods(3) |
Periodicity |
Define MPI derived type for communicating ghostcells
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_obj), | intent(inout) | :: | this |
A block object |
Initialize a uniform grid on this block
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_obj), | intent(inout) | :: | this |
A block object |
||
real(kind=wp), | intent(in) | :: | xlo(3) |
Coordinates of the bottom left corner |
||
real(kind=wp), | intent(in) | :: | xhi(3) |
Coordinates of the top right corner |
||
integer, | intent(in) | :: | lo(3) |
Array lower bound |
||
integer, | intent(in) | :: | hi(3) |
Array upper bound |
Computes the bounds of the sub-block form the bounds of the parent block. Each sub-block gets about the same number of grid points in each direction.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | coord(3) |
Coordinates of MPI rank on MPI grid |
||
integer, | intent(in) | :: | Nb(3) |
Number of blocks in each direction |
||
integer, | intent(in) | :: | minlo(3) |
Global lo bounds |
||
integer, | intent(in) | :: | maxhi(3) |
Global hi bounds |
||
integer, | intent(out) | :: | sublo(3) |
lo bounds of sub-block |
||
integer, | intent(out) | :: | subhi(3) |
hi bounds of sub-block |
Updates the dimensional extents of the block
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_obj), | intent(inout) | :: | this |
A block object |
Updates the ghostcell values of local grid owned by the current MPI rank. Note that each MPI rank stores only its portion of the grid, thus needs to have proper ghostcell values.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_obj), | intent(inout) | :: | this |
A block object |
[DEPRECATED] Updates the ghostcell values of local grid owned by the current MPI rank. Note that each MPI rank stores only its portion of the grid, thus needs to have proper ghostcell values. Although SetupUniformGrid fills the ghostcells of x/y/z, it does it assuming fixed grid spacing, which may not be the correct if a non-uniform grid is used.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_obj), | intent(inout) | :: | this |
A block object |
||
real(kind=wp), | intent(inout) | :: | axis(:) | |||
integer, | intent(in) | :: | idir |
Update mid points
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_obj), | intent(inout) | :: | this |
A block object |
Update grid spacing arrays
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_obj), | intent(inout) | :: | this |
A block object |
Write block data using HDF5
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_obj), | intent(in) | :: | this |
A block object |
||
character(len=*), | intent(in) | :: | name |
Name of file to write |