Octopus
|
This module defines the meshes, which are used in Octopus. More...
This module defines the meshes, which are used in Octopus.
Data Types | |
type | mesh_line_t |
This data type defines a line, and a regular grid defined on this line (or rather, on a portion of this line). NB: only works for 2D grids. More... | |
type | mesh_plane_t |
define a grid on a plane. More... | |
type | mesh_t |
Describes mesh distribution to nodes. More... | |
Functions/Subroutines | |
subroutine | mesh_init (this) |
subroutine, public | mesh_double_box (space, mesh, alpha, db) |
finds the dimension of a box doubled in the non-periodic dimensions More... | |
subroutine, public | mesh_write_info (this, iunit, namespace) |
pure subroutine, public | mesh_r (mesh, ip, rr, origin, coords) |
return the distance to the origin for a given grid point More... | |
subroutine | mesh_r_global (mesh, ipg, rr, origin, coords) |
return the distance to the origin for a given grid point More... | |
integer function, public | mesh_nearest_point (mesh, pos, dmin, rankmin) |
Returns the index of the point which is nearest to a given vector position pos. More... | |
subroutine, public | mesh_discretize_values_to_mesh (mesh, values) |
Assign a set of values to their nearest discrete points on the mesh. More... | |
real(real64) function, public | mesh_gcutoff (mesh) |
mesh_gcutoff returns the "natural" band limitation of the grid mesh, in terms of the maximum G vector. For a cubic regular grid, it is M_PI/spacing. More... | |
subroutine, public | mesh_write_fingerprint (mesh, dir, filename, mpi_grp, namespace, ierr) |
subroutine, public | mesh_read_fingerprint (mesh, dir, filename, mpi_grp, namespace, read_np_part, read_np, bits, type, offset, nn, ierr) |
This function reads the fingerprint of a mesh written in filename. If the meshes are equal (same fingerprint) return values are 0, otherwise it returns the size of the mesh stored. fingerprint cannot be read, it returns ierr /= 0. More... | |
subroutine, public | mesh_check_dump_compatibility (mesh, dir, filename, namespace, mpi_grp, grid_changed, grid_reordered, map, ierr) |
recursive subroutine, public | mesh_end (this) |
integer(int64) function, public | mesh_periodic_point (mesh, space, ip) |
This function returns the point inside the grid corresponding to a boundary point when PBCs are used. In case the point does not have a correspondence (i.e. other BCs are used in that direction), the same point is returned. Note that this function returns a global point number when parallelization in domains is used. More... | |
integer(int64) function, public | mesh_periodic_point_global (mesh, space, ipg_in) |
real(real64) pure function, public | mesh_global_memory (mesh) |
real(real64) pure function, public | mesh_local_memory (mesh) |
real(real64) function, dimension(1:mesh%box%dim), public | mesh_x_global (mesh, ipg) |
logical pure function, public | mesh_compact_boundaries (mesh) |
subroutine, public | mesh_check_symmetries (mesh, symm, periodic_dim) |
integer(int64) function, public | mesh_global_index_from_coords (mesh, ix) |
This function returns the true global index of the point for a given vector of integer coordinates. More... | |
subroutine, public | mesh_global_index_to_coords (mesh, ipg, ix) |
Given a global point index, this function returns the set of integer coordinates of the point. More... | |
integer function, public | mesh_local_index_from_coords (mesh, ix) |
This function returns the local index of the point for a given vector of integer coordinates. More... | |
subroutine, public | mesh_local_index_to_coords (mesh, ip, ix) |
Given a local point index, this function returns the set of integer coordinates of the point. More... | |
integer(int64) function, public | mesh_local2global (mesh, ip) |
This function returns the global mesh index for a given local index. More... | |
integer function, public | mesh_global2local (mesh, ipg) |
This function returns the local mesh index for a given global index. More... | |
subroutine, public | mesh_minmaxloc (mesh, min_or_max, rank_min_or_max, op) |
Given a local min/max this returns the global min/max and the rank where this is located. More... | |
subroutine | dmesh_allreduce_0 (mesh, aa) |
subroutine | dmesh_allreduce_1 (mesh, aa, dim) |
subroutine | dmesh_allreduce_2 (mesh, aa, dim) |
subroutine | dmesh_allreduce_3 (mesh, aa, dim) |
subroutine | dmesh_allreduce_4 (mesh, aa) |
subroutine | dmesh_allreduce_5 (mesh, aa) |
subroutine | zmesh_allreduce_0 (mesh, aa) |
subroutine | zmesh_allreduce_1 (mesh, aa, dim) |
subroutine | zmesh_allreduce_2 (mesh, aa, dim) |
subroutine | zmesh_allreduce_3 (mesh, aa, dim) |
subroutine | zmesh_allreduce_4 (mesh, aa) |
subroutine | zmesh_allreduce_5 (mesh, aa) |
subroutine | imesh_allreduce_0 (mesh, aa) |
subroutine | imesh_allreduce_1 (mesh, aa, dim) |
subroutine | imesh_allreduce_2 (mesh, aa, dim) |
subroutine | imesh_allreduce_3 (mesh, aa, dim) |
subroutine | imesh_allreduce_4 (mesh, aa) |
subroutine | imesh_allreduce_5 (mesh, aa) |
subroutine | lmesh_allreduce_0 (mesh, aa) |
subroutine | lmesh_allreduce_1 (mesh, aa, dim) |
subroutine | lmesh_allreduce_2 (mesh, aa, dim) |
subroutine | lmesh_allreduce_3 (mesh, aa, dim) |
subroutine | lmesh_allreduce_4 (mesh, aa) |
subroutine | lmesh_allreduce_5 (mesh, aa) |
|
private |
subroutine, public mesh_oct_m::mesh_write_info | ( | class(mesh_t), intent(in) | this, |
integer, intent(in), optional | iunit, | ||
type(namespace_t), intent(in), optional | namespace | ||
) |
pure subroutine, public mesh_oct_m::mesh_r | ( | class(mesh_t), intent(in) | mesh, |
integer, intent(in) | ip, | ||
real(real64), intent(out) | rr, | ||
real(real64), dimension(:), intent(in), optional | origin, | ||
real(real64), dimension(:), intent(out), optional | coords | ||
) |
return the distance to the origin for a given grid point
[in] | ip | point index |
[out] | rr | distance with respect to the origin as given by the next parameter |
[in] | origin | origin(sbdim), default (0,0,0) |
[out] | coords | coords(sbdim), optional output of shifted coordinates |
|
private |
return the distance to the origin for a given grid point
[in] | ipg | global point index |
[out] | rr | distance with respect to the origin as given by the next parameter |
[in] | origin | origin(sbdim), default (0,0,0) |
[out] | coords | coords(sbdim), optional output of shifted coordinates |
integer function, public mesh_oct_m::mesh_nearest_point | ( | class(mesh_t), intent(in) | mesh, |
real(real64), dimension(:), intent(in) | pos, | ||
real(real64), intent(out) | dmin, | ||
integer, intent(out) | rankmin | ||
) |
Returns the index of the point which is nearest to a given vector position pos.
Returns the index of the point, ind
. This index is domain-specific, and is only meaningful rankmin
.
[in] | pos | Position vector |
[out] | dmin | Distance between pos and this nearest mesh point |
[out] | rankmin | Rank of the processor that holds the point |
subroutine, public mesh_oct_m::mesh_discretize_values_to_mesh | ( | class(mesh_t), intent(in) | mesh, |
real(real64), dimension(:, :), intent(inout) | values | ||
) |
real(real64) function, public mesh_oct_m::mesh_gcutoff | ( | class(mesh_t), intent(in) | mesh | ) |
subroutine, public mesh_oct_m::mesh_write_fingerprint | ( | type(mesh_t), intent(in) | mesh, |
character(len=*), intent(in) | dir, | ||
character(len=*), intent(in) | filename, | ||
type(mpi_grp_t), intent(in) | mpi_grp, | ||
type(namespace_t), intent(in) | namespace, | ||
integer, intent(out) | ierr | ||
) |
subroutine, public mesh_oct_m::mesh_read_fingerprint | ( | type(mesh_t), intent(in) | mesh, |
character(len=*), intent(in) | dir, | ||
character(len=*), intent(in) | filename, | ||
type(mpi_grp_t), intent(in) | mpi_grp, | ||
type(namespace_t), intent(in) | namespace, | ||
integer(int64), intent(out) | read_np_part, | ||
integer(int64), intent(out) | read_np, | ||
integer, intent(out) | bits, | ||
integer, intent(out) | type, | ||
integer, dimension(1:mesh%idx%dim), intent(out) | offset, | ||
integer, dimension(1:mesh%idx%dim), intent(out) | nn, | ||
integer, intent(out) | ierr | ||
) |
subroutine, public mesh_oct_m::mesh_check_dump_compatibility | ( | type(mesh_t), intent(in) | mesh, |
character(len=*), intent(in) | dir, | ||
character(len=*), intent(in) | filename, | ||
type(namespace_t), intent(in) | namespace, | ||
type(mpi_grp_t), intent(in) | mpi_grp, | ||
logical, intent(out) | grid_changed, | ||
logical, intent(out) | grid_reordered, | ||
integer(int64), dimension(:), intent(out), allocatable | map, | ||
integer, intent(out) | ierr | ||
) |
recursive subroutine, public mesh_oct_m::mesh_end | ( | class(mesh_t), intent(inout) | this | ) |
integer(int64) function, public mesh_oct_m::mesh_periodic_point | ( | class(mesh_t), intent(in) | mesh, |
class(space_t), intent(in) | space, | ||
integer, intent(in) | ip | ||
) |
This function returns the point inside the grid corresponding to a boundary point when PBCs are used. In case the point does not have a correspondence (i.e. other BCs are used in that direction), the same point is returned. Note that this function returns a global point number when parallelization in domains is used.
[in] | ip | local point for which periodic copy is searched |
real(real64) pure function, public mesh_oct_m::mesh_global_memory | ( | class(mesh_t), intent(in) | mesh | ) |
real(real64) pure function, public mesh_oct_m::mesh_local_memory | ( | class(mesh_t), intent(in) | mesh | ) |
real(real64) function, dimension(1:mesh%box%dim), public mesh_oct_m::mesh_x_global | ( | class(mesh_t), intent(in) | mesh, |
integer(int64), intent(in) | ipg | ||
) |
logical pure function, public mesh_oct_m::mesh_compact_boundaries | ( | type(mesh_t), intent(in) | mesh | ) |
subroutine, public mesh_oct_m::mesh_check_symmetries | ( | class(mesh_t), intent(in) | mesh, |
type(symmetries_t), intent(in) | symm, | ||
integer, intent(in) | periodic_dim | ||
) |
integer(int64) function, public mesh_oct_m::mesh_global_index_from_coords | ( | class(mesh_t), intent(in) | mesh, |
integer, dimension(:), intent(in) | ix | ||
) |
subroutine, public mesh_oct_m::mesh_global_index_to_coords | ( | type(mesh_t), intent(in) | mesh, |
integer(int64), intent(in) | ipg, | ||
integer, dimension(:), intent(out) | ix | ||
) |
integer function, public mesh_oct_m::mesh_local_index_from_coords | ( | type(mesh_t), intent(in) | mesh, |
integer, dimension(:), intent(in) | ix | ||
) |
subroutine, public mesh_oct_m::mesh_local_index_to_coords | ( | type(mesh_t), intent(in) | mesh, |
integer, intent(in) | ip, | ||
integer, dimension(:), intent(out) | ix | ||
) |
integer(int64) function, public mesh_oct_m::mesh_local2global | ( | type(mesh_t), intent(in) | mesh, |
integer, intent(in) | ip | ||
) |
integer function, public mesh_oct_m::mesh_global2local | ( | type(mesh_t), intent(in) | mesh, |
integer(int64), intent(in) | ipg | ||
) |
subroutine, public mesh_oct_m::mesh_minmaxloc | ( | type(mesh_t), intent(in) | mesh, |
real(real64), intent(inout) | min_or_max, | ||
integer, intent(out) | rank_min_or_max, | ||
type(mpi_op), intent(in) | op | ||
) |
Given a local min/max this returns the global min/max and the rank where this is located.
[in,out] | min_or_max | On entry, the local value, on exit the global value |
[out] | rank_min_or_max | On exit, the rank where the min/max is located |
[in] | op | MPI_MINLOC or MPI_MAXLOC |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |