Datatype for a mesh_2d
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=FP), | public | :: | spacing_c |
Grid spacing on the actual level (coarse) NOTE: This variable is set public only temporarily and must not be changed from outside of this module. In normal circumstances use the routine get_spacing_c. (It needs to be accessed directly in helmholtz_operators, to circumvent the known issue of OMP scaling with intel compiler) |
|||
| integer, | public | :: | n_points |
Number of total mesh points NOTE: This variable is set public only temporarily and must not be changed from outside of this module. In normal circumstances use the routine get_n_points. (It needs to be accessed directly in helmholtz_operators, to circumvent the known issue of OMP scaling with intel compiler) |
|||
| integer, | public, | allocatable, dimension(:,:,:) | :: | index_neighbor |
Index of neighbor points |
||
| integer, | public, | allocatable, dimension(:) | :: | inner_indices |
Indices of inner points |
||
| integer, | public, | allocatable, dimension(:) | :: | boundary_indices |
Indices of boundary points |
||
| integer, | public, | allocatable, dimension(:) | :: | ghost_indices |
Indices of ghost points |
||
| integer, | public, | allocatable, dimension(:) | :: | redblack_indices |
Index list of redblack points, eventually needed for red-black gauss seidel smoother First nred entries are indices of red points Following nblack entries are indices of black points Final nboundary+nghost entries are indices of boundary and ghost points |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
Sets phi value of mesh to a new value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(inout) | :: | self |
Instance of the type |
||
| real(kind=FP), | intent(in) | :: | new_phi |
New phi value |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
Returns mesh distance of level, spacing_c = spacing_f*lvst
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
||
| integer, | intent(in) | :: | ind |
Mesh index |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
||
| integer, | intent(in) | :: | ind |
Mesh index |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
||
| integer, | intent(in) | :: | ind |
Mesh index |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
||
| integer, | intent(in) | :: | ind |
Mesh index |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
Indicates if point is inner grid point
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
||
| integer, | intent(in) | :: | ind |
Mesh index |
Indicates if point is boundary point
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
||
| integer, | intent(in) | :: | ind |
Mesh index |
Indicates if point is ghost point
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
||
| integer, | intent(in) | :: | ind |
Mesh index |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
||
| integer, | intent(in) | :: | ind |
Mesh index |
Given Cartesian indizes (i,j) returns mesh index if no point could be found 0 is returned
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
||
| integer, | intent(in) | :: | i |
Horizontal Cartesian index |
||
| integer, | intent(in) | :: | j |
Vertical Cartesian index |
Builds a 2D array where shaped_cart_l(i,j) = l gives the index where cart_i(l) == i and cart_j(l) == j, or zero if no point is found. Used to accelerate cart_to_mesh_index
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(inout) | :: | self |
Deallocates the shaped_cart_l array to reduce the memory requirement for the grid
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(inout) | :: | self |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
||
| integer, | intent(in) | :: | ishift |
Shift in horizontal direction w.r.t. point ind |
||
| integer, | intent(in) | :: | jshift |
Shift in vertical direction w.r.t. point ind |
||
| integer, | intent(in) | :: | ind |
Mesh index |
Finds ns_stencil x ns_stencil indices of interpolation stencil around (xp, yp), if possible of order intorder
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
||
| real(kind=FP), | intent(in) | :: | xp |
x-coordinate of point |
||
| real(kind=FP), | intent(in) | :: | yp |
y-coordinate of point |
||
| integer, | intent(in) | :: | intorder |
Requested stencil order |
||
| integer, | intent(in) | :: | ns_max_nearest |
Size of area that is searched for nearest point |
||
| integer, | intent(out) | :: | ns_stencil |
Size of determined stencil |
||
| integer, | intent(out) | :: | intorder_actual |
Order of determined stencil |
||
| integer, | intent(out), | allocatable, dimension(:,:) | :: | ind_interpol_stencil |
Indices of determined stencil |
Finds ns x ns indices of points surrounding (xp, yp)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
||
| real(kind=FP), | intent(in) | :: | xp |
x-coordinate of point |
||
| real(kind=FP), | intent(in) | :: | yp |
y-coordinate of point |
||
| integer, | intent(in) | :: | ns |
Dimension of surrounding local grid |
||
| integer, | intent(out), | optional, | dimension(ns, ns) | :: | ind_sur |
Indices of surrounding grid points |
| integer, | intent(out), | optional | :: | ns_complete |
Dimension of surrounding local grid, that is complete (w/o missing points) |
|
| integer, | intent(out), | optional | :: | ind_nearest |
Index of nearest point on surrounding grid |
Returns the discrete normal vector to the boundary
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
||
| integer, | intent(in) | :: | ind |
Mesh index, must be index of a boundary point |
||
| integer, | intent(out) | :: | nbx |
x-component of discrete normal vector |
||
| integer, | intent(out) | :: | nby |
y-component of discrete normal vector |
Displays information for mesh
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
Writes the mesh to netcdf
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(inout) | :: | self |
Instance of the type |
||
| integer, | intent(in) | :: | fgid |
File or group id number of existing Netcdf4 file |
Reads mesh from netcdf
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(inout) | :: | self |
Instance of the type |
||
| integer, | intent(in) | :: | fgid |
File or group id number of existing Netcdf4 file |
Builds complete mesh
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(out) | :: | self |
Instance of the type |
||
| class(equilibrium_t), | intent(inout) | :: | equi |
Equilibrium |
||
| real(kind=FP), | intent(in) | :: | phi |
Toroidal angle |
||
| integer, | intent(in) | :: | lvl |
Coarseness level |
||
| real(kind=FP), | intent(inout) | :: | spacing_f |
Grid spacing on finest level |
||
| integer, | intent(in) | :: | size_neighbor |
Number of neighbor points determined in each direction |
||
| integer, | intent(in) | :: | size_ghost_layer |
Depth of ghost point layer |
||
| logical, | intent(in) | :: | extend_beyond_wall |
If true, mesh is extended beyond the wall |
||
| integer, | intent(in), | optional | :: | dbgout |
Debug output level |
Reorders mesh indices for cache optimisation
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(inout) | :: | self |
Instance of the type |
||
| integer, | intent(in) | :: | grid_reorder_block |
Size of basic unshuffled grid square |
||
| integer, | intent(in), | optional | :: | dbgout |
Debug output level |
MPI communication of mesh Sends mesh to rank-step and receives from rank+step
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in) | :: | self |
Instance of the type |
||
| integer, | intent(in) | :: | comm |
MPI communicator |
||
| integer, | intent(in) | :: | step |
Step size of MPI communication |
||
| type(mesh_cart_t), | intent(out) | :: | mesh_received |
Mesh received from rank+step |
Exposes mesh data through mesh_cart_data_t object
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mesh_cart_t), | intent(in), | target | :: | self |
Instance of the type |
|
| type(mesh_cart_data_t), | intent(out) | :: | data_object |
Destination mesh cart data object. Warning: the purpose of this method is to allow access to the data of the instance. |