![]() |
Octopus
|
This module defines non-local operators. More...
This module defines non-local operators.
Data Types | |
| type | nl_operator_index_t |
| index type for non-local operators More... | |
| type | nl_operator_t |
| data type for non local operators More... | |
| interface | op_is_available |
Functions/Subroutines | |
| subroutine, public | nl_operator_global_init (namespace) |
| initialize global settings for non-local operators More... | |
| subroutine, public | nl_operator_global_end () |
| subroutine, public | nl_operator_init (op, label, symm) |
| initialize an instance of a non-local operator by setting the label More... | |
| subroutine, public | nl_operator_build (space, mesh, op, np, const_w, regenerate) |
| Creates the nonlocal operators for the stencils used for finite differences. More... | |
| subroutine, public | nl_operator_output_weights (this) |
| subroutine, public | nl_operator_end (op) |
| subroutine | nl_operator_clear_gpu_buffers (op) |
| integer pure function, public | nl_operator_get_index (op, is, ip) |
| subroutine, public | nl_operator_allocate_gpu_buffers (op) |
| subroutine, public | nl_operator_update_gpu_buffers (op) |
| integer pure function, public | nl_operator_np_zero_bc (op) |
| subroutine, public | nl_operator_remove_zero_weight_points (op, space, mesh) |
| Removes the zero-weight points for constant weight stencils. More... | |
| subroutine | group_by_pairs_sym (size, ldf, offsets, wre, ri, nri, npairs, wpair, pair_pos, pair_neg, wcenter) |
| Take a list of weights and offsets and build pairs of symmetric points with common weights. More... | |
| subroutine | group_by_pairs_antisym (size, ldf, offsets, wre, ri, nri, npairs, wpair, pair_pos, pair_neg) |
| Take a list of weights and offsets and build pairs of symmetric points with common weights. More... | |
| subroutine, public | nl_operator_build_symmetric_weights (op, max_size) |
| Builds (or rebuild) the necessary arrays for symmetric and antisymmetric stencils. More... | |
| subroutine | reallocate_array (ri, stencil_size, nri, old_size, new_size) |
| Reallocate an ri array. More... | |
| subroutine, public | dnl_operator_operate_batch (op, fi, fo, ghost_update, profile, points, factor, async) |
| subroutine, public | dnl_operator_operate (op, fi, fo, ghost_update, profile, points) |
| subroutine, public | dnl_operator_operate_diag (op, fo) |
| subroutine, public | znl_operator_operate_batch (op, fi, fo, ghost_update, profile, points, factor, async) |
| subroutine, public | znl_operator_operate (op, fi, fo, ghost_update, profile, points) |
| subroutine, public | znl_operator_operate_diag (op, fo) |
Variables | |
| integer, parameter, public | op_general = 1 |
| integer, parameter, public | op_symmetric = 2 |
| integer, parameter, public | op_antisymmetric = 3 |
| integer, parameter | op_fortran = 0 |
| integer, parameter | op_vec = 1 |
| integer, parameter | op_min = OP_FORTRAN |
| integer, parameter | op_max = OP_VEC |
| integer, parameter | op_invmap = 1 |
| integer, parameter | op_map = 2 |
| integer, parameter | op_nomap = 3 |
| integer, parameter, public | op_all = 3 |
| integer, parameter, public | op_inner = 1 |
| integer, parameter, public | op_outer = 2 |
| integer | dfunction_global = -1 |
| integer | zfunction_global = -1 |
| integer | function_accel |
| logical | use_symmetries = .false. |
| subroutine, public nl_operator_oct_m::nl_operator_global_init | ( | type(namespace_t), intent(in) | namespace | ) |
initialize global settings for non-local operators
Definition at line 280 of file nl_operator.F90.
| subroutine, public nl_operator_oct_m::nl_operator_global_end |
Definition at line 355 of file nl_operator.F90.
| subroutine, public nl_operator_oct_m::nl_operator_init | ( | type(nl_operator_t), intent(inout) | op, |
| character(len=*), intent(in) | label, | ||
| integer, intent(in), optional | symm | ||
| ) |
initialize an instance of a non-local operator by setting the label
Definition at line 365 of file nl_operator.F90.
| subroutine, public nl_operator_oct_m::nl_operator_build | ( | class(space_t), intent(in) | space, |
| type(mesh_t), intent(in), target | mesh, | ||
| type(nl_operator_t), intent(inout) | op, | ||
| integer, intent(in) | np, | ||
| logical, intent(in), optional | const_w, | ||
| logical, intent(in), optional | regenerate | ||
| ) |
Creates the nonlocal operators for the stencils used for finite differences.
This code loops over grid points and finds the stencil to be used by looking at the coordinates of the points in the stencils. All the consecutive points that are using the sames shifts in relative coordinates are considered to be within one stencil application. The number of them is opri The map oprimap contains the map (mesh index ip) -> stencil (between 1 to opnri) The inverse map oprimap_inv contains the start and end indices for a given stencil, such that oprimap_inv(ii):oprimap_inv(ii+1) is the list of points sharing the same stencil index With this, all points within oprimap_inv(ii):oprimap_inv(ii+1) have the same value in oprimap
| [in] | np | Number of (local) points. |
| [in] | const_w | are the weights constant (independent of the point) |
Definition at line 391 of file nl_operator.F90.
| subroutine, public nl_operator_oct_m::nl_operator_output_weights | ( | type(nl_operator_t), intent(inout) | this | ) |
Definition at line 679 of file nl_operator.F90.
| subroutine, public nl_operator_oct_m::nl_operator_end | ( | type(nl_operator_t), intent(inout) | op | ) |
Definition at line 710 of file nl_operator.F90.
|
private |
Definition at line 747 of file nl_operator.F90.
| integer pure function, public nl_operator_oct_m::nl_operator_get_index | ( | type(nl_operator_t), intent(in) | op, |
| integer, intent(in) | is, | ||
| integer, intent(in) | ip | ||
| ) |
Definition at line 793 of file nl_operator.F90.
| subroutine, public nl_operator_oct_m::nl_operator_allocate_gpu_buffers | ( | type(nl_operator_t), intent(inout) | op | ) |
Definition at line 803 of file nl_operator.F90.
| subroutine, public nl_operator_oct_m::nl_operator_update_gpu_buffers | ( | type(nl_operator_t), intent(inout) | op | ) |
Definition at line 824 of file nl_operator.F90.
| integer pure function, public nl_operator_oct_m::nl_operator_np_zero_bc | ( | type(nl_operator_t), intent(in) | op | ) |
Definition at line 864 of file nl_operator.F90.
| subroutine, public nl_operator_oct_m::nl_operator_remove_zero_weight_points | ( | type(nl_operator_t), intent(inout) | op, |
| type(space_t), intent(in) | space, | ||
| class(mesh_t), intent(in) | mesh | ||
| ) |
Removes the zero-weight points for constant weight stencils.
Definition at line 880 of file nl_operator.F90.
|
private |
Take a list of weights and offsets and build pairs of symmetric points with common weights.
Definition at line 921 of file nl_operator.F90.
|
private |
Take a list of weights and offsets and build pairs of symmetric points with common weights.
Definition at line 994 of file nl_operator.F90.
| subroutine, public nl_operator_oct_m::nl_operator_build_symmetric_weights | ( | type(nl_operator_t), intent(inout) | op, |
| integer, intent(in), optional | max_size | ||
| ) |
Builds (or rebuild) the necessary arrays for symmetric and antisymmetric stencils.
| [in] | max_size | For reallocation |
Definition at line 1060 of file nl_operator.F90.
|
private |
Reallocate an ri array.
Definition at line 1138 of file nl_operator.F90.
| subroutine, public nl_operator_oct_m::dnl_operator_operate_batch | ( | type(nl_operator_t), intent(inout), target | op, |
| type(batch_t), intent(inout), target | fi, | ||
| type(batch_t), intent(inout) | fo, | ||
| logical, intent(in), optional | ghost_update, | ||
| logical, intent(in), optional | profile, | ||
| integer, intent(in), optional | points, | ||
| real(real64), intent(in), optional | factor, | ||
| logical, intent(in), optional | async | ||
| ) |
| [in,out] | fo | this should be target, but old ifort 9.1 segfaults with it |
Symmetry of the stencil can be used to group points by pairs
Definition at line 1221 of file nl_operator.F90.
| subroutine, public nl_operator_oct_m::dnl_operator_operate | ( | type(nl_operator_t), intent(inout) | op, |
| real(real64), dimension(:), intent(inout), contiguous | fi, | ||
| real(real64), dimension(:), intent(out), target, contiguous | fo, | ||
| logical, intent(in), optional | ghost_update, | ||
| logical, intent(in), optional | profile, | ||
| integer, intent(in), optional | points | ||
| ) |
| [in,out] | fi | fi(opnp_part) |
Definition at line 1900 of file nl_operator.F90.
| subroutine, public nl_operator_oct_m::dnl_operator_operate_diag | ( | type(nl_operator_t), intent(in) | op, |
| real(real64), dimension(:), intent(out) | fo | ||
| ) |
Definition at line 1925 of file nl_operator.F90.
| subroutine, public nl_operator_oct_m::znl_operator_operate_batch | ( | type(nl_operator_t), intent(inout), target | op, |
| type(batch_t), intent(inout), target | fi, | ||
| type(batch_t), intent(inout) | fo, | ||
| logical, intent(in), optional | ghost_update, | ||
| logical, intent(in), optional | profile, | ||
| integer, intent(in), optional | points, | ||
| real(real64), intent(in), optional | factor, | ||
| logical, intent(in), optional | async | ||
| ) |
| [in,out] | fo | this should be target, but old ifort 9.1 segfaults with it |
Symmetry of the stencil can be used to group points by pairs
Definition at line 2017 of file nl_operator.F90.
| subroutine, public nl_operator_oct_m::znl_operator_operate | ( | type(nl_operator_t), intent(inout) | op, |
| complex(real64), dimension(:), intent(inout), contiguous | fi, | ||
| complex(real64), dimension(:), intent(out), target, contiguous | fo, | ||
| logical, intent(in), optional | ghost_update, | ||
| logical, intent(in), optional | profile, | ||
| integer, intent(in), optional | points | ||
| ) |
| [in,out] | fi | fi(opnp_part) |
Definition at line 2696 of file nl_operator.F90.
| subroutine, public nl_operator_oct_m::znl_operator_operate_diag | ( | type(nl_operator_t), intent(in) | op, |
| complex(real64), dimension(:), intent(out) | fo | ||
| ) |
Definition at line 2721 of file nl_operator.F90.
| integer, parameter, public nl_operator_oct_m::op_general = 1 |
Definition at line 181 of file nl_operator.F90.
| integer, parameter, public nl_operator_oct_m::op_symmetric = 2 |
Definition at line 181 of file nl_operator.F90.
| integer, parameter, public nl_operator_oct_m::op_antisymmetric = 3 |
Definition at line 181 of file nl_operator.F90.
|
private |
Definition at line 250 of file nl_operator.F90.
|
private |
Definition at line 250 of file nl_operator.F90.
|
private |
Definition at line 250 of file nl_operator.F90.
|
private |
Definition at line 250 of file nl_operator.F90.
|
private |
Definition at line 256 of file nl_operator.F90.
|
private |
Definition at line 256 of file nl_operator.F90.
|
private |
Definition at line 256 of file nl_operator.F90.
| integer, parameter, public nl_operator_oct_m::op_all = 3 |
Definition at line 261 of file nl_operator.F90.
| integer, parameter, public nl_operator_oct_m::op_inner = 1 |
Definition at line 261 of file nl_operator.F90.
| integer, parameter, public nl_operator_oct_m::op_outer = 2 |
Definition at line 261 of file nl_operator.F90.
|
private |
Definition at line 270 of file nl_operator.F90.
|
private |
Definition at line 271 of file nl_operator.F90.
|
private |
Definition at line 272 of file nl_operator.F90.
|
private |
Definition at line 273 of file nl_operator.F90.