Block object class.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(cell_object), | public, | allocatable | :: | cell(:,:,:) | Cell. |
||
type(error_object), | public | :: | error | Errors handler. |
|||
type(face_object), | public, | allocatable | :: | face_i(:,:,:) | Faces along I direction. |
||
type(face_object), | public, | allocatable | :: | face_j(:,:,:) | Faces along I direction. |
||
type(face_object), | public, | allocatable | :: | face_k(:,:,:) | Faces along I direction. |
||
type(node_object), | public, | allocatable | :: | node(:,:,:) | Cell. |
||
type(block_signature_object), | public | :: | signature | Signature, namely id, level, dimensions, etc… |
Overload =
.
Operator =
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_object), | intent(inout) | :: | lhs | Left hand side. |
||
type(block_object), | intent(in) | :: | rhs | Right hand side. |
Operator =
.
Operator =
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_object), | intent(inout) | :: | lhs | Left hand side. |
||
type(block_object), | intent(in) | :: | rhs | Right hand side. |
Return the number of cells.
Return the number of cells.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_object), | intent(in) | :: | self | Block. |
||
logical, | intent(in), | optional | :: | with_ghosts | Take into account ghost cells. |
Number of cells.
Compute block extents.
Compute block extents.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_object), | intent(inout) | :: | self | Block. |
Compute block faces metrics.
Compute block faces metrics.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_object), | intent(inout) | :: | self | Block. |
Compute block metrics.
Compute block metrics.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_object), | intent(inout) | :: | self | Block. |
Compute space operator.
Compute space operator.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_object), | intent(in) | :: | self | Block. |
Compute block volumes.
Compute block volumes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_object), | intent(inout) | :: | self | Block. |
Correct block metrics.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_object), | intent(inout) | :: | self | Correct the metrics. |
Create a Cartesian block with linearly spaced nodes.
Create a Cartesian block with linearly spaced nodes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_object), | intent(inout) | :: | self | Block. |
||
type(vector), | intent(in), | optional | :: | emin | Coordinates of minimum abscissa of the block. |
|
type(vector), | intent(in), | optional | :: | emax | Coordinates of maximum abscissa of the block. |
Destroy block.
Destroy block.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_object), | intent(inout) | :: | self | Block. |
Initialize block.
Initialize block.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_object), | intent(inout) | :: | self | Block. |
||
type(block_signature_object), | intent(in), | optional | :: | signature | Signature, namely id, level, dimensions, etc… |
|
integer(kind=I8P), | intent(in), | optional | :: | id | Unique (Morton) identification code. |
|
integer(kind=I4P), | intent(in), | optional | :: | level | Grid refinement level. |
|
integer(kind=I4P), | intent(in), | optional | :: | gc(1:) | Number of ghost cells along each frame. |
|
integer(kind=I4P), | intent(in), | optional | :: | ni | Number of cells in I direction. |
|
integer(kind=I4P), | intent(in), | optional | :: | nj | Number of cells in J direction. |
|
integer(kind=I4P), | intent(in), | optional | :: | nk | Number of cells in K direction. |
|
type(vector), | intent(in), | optional | :: | emin | Coordinates of minimum abscissa of the block. |
|
type(vector), | intent(in), | optional | :: | emax | Coordinates of maximum abscissa of the block. |
|
logical, | intent(in), | optional | :: | is_cartesian | Flag for checking if the block is Cartesian. |
|
logical, | intent(in), | optional | :: | is_null_x | Nullify X direction (2D yz, 1D y or z domain). |
|
logical, | intent(in), | optional | :: | is_null_y | Nullify Y direction (2D xy, 1D x or y domain). |
|
logical, | intent(in), | optional | :: | is_null_z | Nullify Z direction (2D xy, 1D x or y domain). |
Interpolate cell-centered variable at nodes.
Interpolate cell-centered variable at nodes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_object), | intent(in) | :: | self | Block. |
||
real(kind=R8P), | intent(in) | :: | var_cell(1-self%signature%gc(1):,1-self%signature%gc(3):,1-self%signature%gc(5):) | Cell-centered variable. |
||
real(kind=R8P), | intent(out) | :: | var_node(0-self%signature%gc(1):,0-self%signature%gc(3):,0-self%signature%gc(5):) | Node-centered variable. |
Load nodes from file.
Load nodes from file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_object), | intent(inout) | :: | self | Block. |
||
integer(kind=I4P), | intent(in) | :: | file_unit | File unit. |
||
integer(kind=I4P), | intent(in) | :: | pos | Position to start the loading. |
Compute cell centers coordinates from cell nodes.
Compute cell centers coordinates from cell nodes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_object), | intent(in) | :: | self | Block. |
Cell centers coordinates.
Return the number of nodes.
Return the number of nodes.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_object), | intent(in) | :: | self | Block. |
||
logical, | intent(in), | optional | :: | with_ghosts | Take into account ghost cells. |
Number of cells.
Nullify normals for 2D or 1D domains.
Nullify normals for 2D or 1D domains.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_object), | intent(inout) | :: | self | Block. |
Save gird file.
Save grid file file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_object), | intent(inout) | :: | self | Block. |
||
character(len=*), | intent(in) | :: | file_name | File name. |
||
logical, | intent(in), | optional | :: | ascii | Ascii/binary output. |
|
logical, | intent(in), | optional | :: | metrics | Save also metrics data. |
|
logical, | intent(in), | optional | :: | tecplot | Tecplot output format sentinel. |
|
logical, | intent(in), | optional | :: | vtk | VTK output format sentinel. |
Save grid file in Tecplot format.
Save grid file in Tecplot format.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_object), | intent(inout) | :: | self | Block. |
||
character(len=*), | intent(in) | :: | file_name | Output file name. |
||
logical, | intent(in), | optional | :: | ascii | Ascii/binary output. |
|
logical, | intent(in), | optional | :: | metrics | Save also metrics data. |
Save grid file in VTK format.
Save mesh data into VTK file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_object), | intent(inout) | :: | self | Block. |
||
character(len=*), | intent(in) | :: | file_name | Output file name. |
||
logical, | intent(in), | optional | :: | ascii | Ascii/binary output. |
|
logical, | intent(in), | optional | :: | metrics | Save also metrics data. |
Save nodes into file.
Save nodes into file.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(block_object), | intent(inout) | :: | self | Block. |
||
integer(kind=I4P), | intent(in) | :: | file_unit | File unit. |
||
integer(kind=I4P), | intent(in) | :: | pos | Position to start the loading. |
type :: block_object
!< Block object class.
type(error_object) :: error !< Errors handler.
type(block_signature_object) :: signature !< Signature, namely id, level, dimensions, etc...
type(cell_object), allocatable :: cell(:,:,:) !< Cell.
type(face_object), allocatable :: face_i(:,:,:) !< Faces along I direction.
type(face_object), allocatable :: face_j(:,:,:) !< Faces along I direction.
type(face_object), allocatable :: face_k(:,:,:) !< Faces along I direction.
type(node_object), allocatable :: node(:,:,:) !< Cell.
contains
! public methods
procedure, pass(self) :: cells_number !< Return the number of cells.
procedure, pass(self) :: compute_space_operator !< Compute space operator.
procedure, pass(self) :: create_linspace !< Create a Cartesian block with linearly spaced nodes.
procedure, pass(self) :: destroy !< Destroy block.
procedure, pass(self) :: interpolate_at_nodes !< Interpolate cell-centered variable at nodes.
procedure, pass(self) :: initialize !< Initialize block.
procedure, pass(self) :: load_nodes_from_file !< Load nodes from file.
procedure, pass(self) :: nodes_number !< Return the number of nodes.
procedure, pass(self) :: save_file_grid !< Save gird file.
procedure, pass(self) :: save_nodes_into_file !< Save nodes into file.
! operators
generic :: assignment(=) => block_assign_block !< Overload `=`.
! private methods
procedure, pass(lhs), private :: block_assign_block !< Operator `=`.
procedure, pass(self), private :: compute_extents !< Compute block extents.
procedure, pass(self), private :: compute_faces_metrics !< Compute block faces metrics.
procedure, pass(self), private :: compute_metrics !< Compute block metrics.
procedure, pass(self), private :: compute_volumes !< Compute block volumes.
procedure, pass(self), private :: correct_metrics !< Correct block metrics.
procedure, pass(self), private :: node_to_center !< Compute cell centers coordinates from cell nodes.
procedure, pass(self), private :: nullify_normals !< Nullify normals for 2D or 1D domains.
procedure, pass(self), private :: save_file_grid_tec !< Save grid file in Tecplot format.
procedure, pass(self), private :: save_file_grid_vtk !< Save grid file in VTK format.
endtype block_object