Octopus
submesh_oct_m Module Reference

Data Types

interface  submesh_add_to_mesh
 
type  submesh_t
 A submesh is a type of mesh, used for the projectors in the pseudopotentials It contains points on a regular mesh confined to a sphere of a given radius. More...
 
interface  submesh_to_mesh_dotp
 

Functions/Subroutines

recursive real(real64) function f_n (dims)
 
subroutine, public submesh_init (this, space, mesh, latt, center, rc)
 
subroutine submesh_get_vol_pp (this)
 Gather the per-point volume elements of the sphere from the mesh. More...
 
subroutine submesh_reorder_points (this, space, xtmp, rtmp)
 
subroutine, public submesh_merge (this, space, mesh, sm1, sm2, shift)
 
subroutine, public submesh_shift_center (this, space, newcenter)
 
subroutine, public submesh_broadcast (this, space, mesh, center, radius, root, mpi_grp)
 
logical function, public submesh_compatible (this, radius, center, dx)
 
subroutine, public submesh_end (this)
 
logical function, public submesh_overlap (sm1, sm2, space)
 
subroutine, public submesh_build_global (this, space)
 
subroutine, public submesh_end_global (this)
 
subroutine zzsubmesh_add_to_mesh (this, sphi, phi, factor)
 
complex(real64) function zzsubmesh_to_mesh_dotp (this, sphi, phi, reduce)
 
subroutine, public submesh_get_cube_dim (sm, space, db)
 finds the dimension of a box containing the submesh More...
 
subroutine, public submesh_init_cube_map (sm, space)
 
subroutine, public submesh_end_cube_map (sm)
 
subroutine, public dzsubmesh_batch_add (this, ss, mm)
 The following function takes a batch of functions defined in submesh (ss) and adds one of them to each of the mesh functions in other batch (mm). Each one is multiplied by a factor given by the array factor. In this version of the routine, the submesh batch is real and the mesh batch is complex. More...
 
real(real64) function, public dsm_integrate (mesh, sm, ff, reduce)
 
real(real64) function, public dsm_integrate_frommesh (mesh, sm, ff, reduce)
 
subroutine ddsubmesh_add_to_mesh (this, sphi, phi, factor)
 
subroutine, public dsubmesh_copy_from_mesh (this, phi, sphi, conjugate)
 
real(real64) function, public dsm_nrm2 (sm, ff, reduce)
 this function returns the the norm of a vector More...
 
real(real64) function, public dsubmesh_dotp (this, f1, f2, reduce)
 dot product of two functions defined on the submesh More...
 
real(real64) function ddsubmesh_to_mesh_dotp (this, sphi, phi, reduce)
 
subroutine, public dsubmesh_batch_add_matrix (this, factor, ss, mm)
 The following functions takes a batch of functions defined in submesh (ss) and adds all of them to each of the mesh functions in other batch (mm). Each one is multiplied by a factor given by the array 'factor'. More...
 
subroutine, public dsubmesh_batch_add (this, ss, mm)
 The following function takes a batch of functions defined in submesh (ss) and adds one of them to each of the mesh functions in other batch (mm). Each one is multiplied by a factor given by the array factor. More...
 
subroutine, public dsubmesh_batch_dotp_matrix (this, mm, ss, dot, reduce)
 
complex(real64) function, public zsm_integrate (mesh, sm, ff, reduce)
 
complex(real64) function, public zsm_integrate_frommesh (mesh, sm, ff, reduce)
 
subroutine zdsubmesh_add_to_mesh (this, sphi, phi, factor)
 
subroutine, public zsubmesh_copy_from_mesh (this, phi, sphi, conjugate)
 
real(real64) function, public zsm_nrm2 (sm, ff, reduce)
 this function returns the the norm of a vector More...
 
complex(real64) function, public zsubmesh_dotp (this, f1, f2, reduce)
 dot product of two functions defined on the submesh More...
 
complex(real64) function zdsubmesh_to_mesh_dotp (this, sphi, phi, reduce)
 
subroutine, public zsubmesh_batch_add_matrix (this, factor, ss, mm)
 The following functions takes a batch of functions defined in submesh (ss) and adds all of them to each of the mesh functions in other batch (mm). Each one is multiplied by a factor given by the array 'factor'. More...
 
subroutine, public zsubmesh_batch_add (this, ss, mm)
 The following function takes a batch of functions defined in submesh (ss) and adds one of them to each of the mesh functions in other batch (mm). Each one is multiplied by a factor given by the array factor. More...
 
subroutine, public zsubmesh_batch_dotp_matrix (this, mm, ss, dot, reduce)
 

Function/Subroutine Documentation

◆ f_n()

recursive real(real64) function submesh_oct_m::f_n ( integer  dims)
private

Definition at line 215 of file submesh.F90.

◆ submesh_init()

subroutine, public submesh_oct_m::submesh_init ( type(submesh_t), intent(inout)  this,
class(space_t), intent(in)  space,
class(mesh_t), intent(in), target  mesh,
type(lattice_vectors_t), intent(in)  latt,
real(real64), dimension(1:space%dim), intent(in)  center,
real(real64), intent(in)  rc 
)

Definition at line 229 of file submesh.F90.

◆ submesh_get_vol_pp()

subroutine submesh_oct_m::submesh_get_vol_pp ( type(submesh_t), intent(inout)  this)
private

Gather the per-point volume elements of the sphere from the mesh.

The submesh arrays are in submesh order, so the weights have to be taken at the mesh point each sphere point maps to.

Definition at line 393 of file submesh.F90.

◆ submesh_reorder_points()

subroutine submesh_oct_m::submesh_reorder_points ( type(submesh_t), intent(inout)  this,
class(space_t), intent(in)  space,
real(real64), dimension(:, :), intent(in), contiguous  xtmp,
real(real64), dimension(:), intent(in), contiguous  rtmp 
)
private

Definition at line 412 of file submesh.F90.

◆ submesh_merge()

subroutine, public submesh_oct_m::submesh_merge ( type(submesh_t), intent(inout)  this,
class(space_t), intent(in)  space,
class(mesh_t), intent(in), target  mesh,
type(submesh_t), intent(in)  sm1,
type(submesh_t), intent(in)  sm2,
real(real64), dimension(:), intent(in), optional  shift 
)
Parameters
[in,out]thisvalgrind objects to intent(out) due to the initializations above
[in]shiftIf present, shifts the center of sm2

Definition at line 538 of file submesh.F90.

◆ submesh_shift_center()

subroutine, public submesh_oct_m::submesh_shift_center ( type(submesh_t), intent(inout)  this,
class(space_t), intent(in)  space,
real(real64), dimension(:), intent(in)  newcenter 
)

Definition at line 606 of file submesh.F90.

◆ submesh_broadcast()

subroutine, public submesh_oct_m::submesh_broadcast ( type(submesh_t), intent(inout)  this,
class(space_t), intent(in)  space,
type(mesh_t), intent(in), target  mesh,
real(real64), dimension(1:space%dim), intent(in)  center,
real(real64), intent(in)  radius,
integer, intent(in)  root,
type(mpi_grp_t), intent(in)  mpi_grp 
)

Definition at line 633 of file submesh.F90.

◆ submesh_compatible()

logical function, public submesh_oct_m::submesh_compatible ( type(submesh_t), intent(in)  this,
real(real64), intent(in)  radius,
real(real64), dimension(:), intent(in)  center,
real(real64), intent(in)  dx 
)

At the moment the center check doesnt matter because everywhere submeshes are recycled at the moment, between uses, the position doesnt change

Definition at line 695 of file submesh.F90.

◆ submesh_end()

subroutine, public submesh_oct_m::submesh_end ( type(submesh_t), intent(inout)  this)

Definition at line 713 of file submesh.F90.

◆ submesh_overlap()

logical function, public submesh_oct_m::submesh_overlap ( type(submesh_t), intent(in)  sm1,
type(submesh_t), intent(in)  sm2,
class(space_t), intent(in)  space 
)

Definition at line 739 of file submesh.F90.

◆ submesh_build_global()

subroutine, public submesh_oct_m::submesh_build_global ( type(submesh_t), intent(inout)  this,
class(space_t), intent(in)  space 
)

Definition at line 782 of file submesh.F90.

◆ submesh_end_global()

subroutine, public submesh_oct_m::submesh_end_global ( type(submesh_t), intent(inout)  this)

Definition at line 833 of file submesh.F90.

◆ zzsubmesh_add_to_mesh()

subroutine submesh_oct_m::zzsubmesh_add_to_mesh ( type(submesh_t), intent(in)  this,
complex(real64), dimension(:), intent(in), contiguous  sphi,
complex(real64), dimension(:), intent(inout), contiguous  phi,
complex(real64), intent(in), optional  factor 
)
private

Definition at line 848 of file submesh.F90.

◆ zzsubmesh_to_mesh_dotp()

complex(real64) function submesh_oct_m::zzsubmesh_to_mesh_dotp ( type(submesh_t), intent(in)  this,
complex(real64), dimension(:), intent(in), contiguous  sphi,
complex(real64), dimension(:), intent(in), contiguous  phi,
logical, intent(in), optional  reduce 
)
private

Definition at line 891 of file submesh.F90.

◆ submesh_get_cube_dim()

subroutine, public submesh_oct_m::submesh_get_cube_dim ( type(submesh_t), intent(in), target  sm,
class(space_t), intent(in)  space,
integer, dimension(1:space%dim), intent(out)  db 
)

finds the dimension of a box containing the submesh

Definition at line 934 of file submesh.F90.

◆ submesh_init_cube_map()

subroutine, public submesh_oct_m::submesh_init_cube_map ( type(submesh_t), intent(inout), target  sm,
class(space_t), intent(in)  space 
)

Definition at line 969 of file submesh.F90.

◆ submesh_end_cube_map()

subroutine, public submesh_oct_m::submesh_end_cube_map ( type(submesh_t), intent(inout)  sm)

Definition at line 1008 of file submesh.F90.

◆ dzsubmesh_batch_add()

subroutine, public submesh_oct_m::dzsubmesh_batch_add ( type(submesh_t), intent(in)  this,
class(batch_t), intent(in)  ss,
class(batch_t), intent(inout)  mm 
)

The following function takes a batch of functions defined in submesh (ss) and adds one of them to each of the mesh functions in other batch (mm). Each one is multiplied by a factor given by the array factor. In this version of the routine, the submesh batch is real and the mesh batch is complex.

Definition at line 1024 of file submesh.F90.

◆ dsm_integrate()

real(real64) function, public submesh_oct_m::dsm_integrate ( class(mesh_t), intent(in)  mesh,
type(submesh_t), intent(in)  sm,
real(real64), dimension(:), intent(in), optional, contiguous  ff,
logical, intent(in), optional  reduce 
)

Definition at line 1128 of file submesh.F90.

◆ dsm_integrate_frommesh()

real(real64) function, public submesh_oct_m::dsm_integrate_frommesh ( type(mesh_t), intent(in)  mesh,
type(submesh_t), intent(in)  sm,
real(real64), dimension(:), intent(in), optional, contiguous  ff,
logical, intent(in), optional  reduce 
)

Definition at line 1173 of file submesh.F90.

◆ ddsubmesh_add_to_mesh()

subroutine submesh_oct_m::ddsubmesh_add_to_mesh ( type(submesh_t), intent(in)  this,
real(real64), dimension(:), intent(in), contiguous  sphi,
real(real64), dimension(:), intent(inout), contiguous  phi,
real(real64), intent(in), optional  factor 
)
private

Definition at line 1218 of file submesh.F90.

◆ dsubmesh_copy_from_mesh()

subroutine, public submesh_oct_m::dsubmesh_copy_from_mesh ( type(submesh_t), intent(in)  this,
real(real64), dimension(:), intent(in), contiguous  phi,
real(real64), dimension(:), intent(out), contiguous  sphi,
logical, intent(in), optional  conjugate 
)

Definition at line 1266 of file submesh.F90.

◆ dsm_nrm2()

real(real64) function, public submesh_oct_m::dsm_nrm2 ( type(submesh_t), intent(in)  sm,
real(real64), dimension(:), intent(in), contiguous  ff,
logical, intent(in), optional  reduce 
)

this function returns the the norm of a vector

Definition at line 1296 of file submesh.F90.

◆ dsubmesh_dotp()

real(real64) function, public submesh_oct_m::dsubmesh_dotp ( type(submesh_t), intent(in)  this,
real(real64), dimension(:), intent(in)  f1,
real(real64), dimension(:), intent(in)  f2,
logical, intent(in), optional  reduce 
)

dot product of two functions defined on the submesh

Both arrays are in submesh order, so the per-point volume elements are the ones gathered on the sphere. dmf_dotp with np= cannot be used in that case, as it would index meshvol_pp by the submesh index instead of the mesh index.

Definition at line 1336 of file submesh.F90.

◆ ddsubmesh_to_mesh_dotp()

real(real64) function submesh_oct_m::ddsubmesh_to_mesh_dotp ( type(submesh_t), intent(in)  this,
real(real64), dimension(:), intent(in), contiguous  sphi,
real(real64), dimension(:), intent(in), contiguous  phi,
logical, intent(in), optional  reduce 
)
private

Definition at line 1380 of file submesh.F90.

◆ dsubmesh_batch_add_matrix()

subroutine, public submesh_oct_m::dsubmesh_batch_add_matrix ( type(submesh_t), intent(in)  this,
real(real64), dimension(:, :), intent(in)  factor,
class(batch_t), intent(in)  ss,
class(batch_t), intent(inout)  mm 
)

The following functions takes a batch of functions defined in submesh (ss) and adds all of them to each of the mesh functions in other batch (mm). Each one is multiplied by a factor given by the array 'factor'.

Definition at line 1425 of file submesh.F90.

◆ dsubmesh_batch_add()

subroutine, public submesh_oct_m::dsubmesh_batch_add ( type(submesh_t), intent(in)  this,
class(batch_t), intent(in)  ss,
class(batch_t), intent(inout)  mm 
)

The following function takes a batch of functions defined in submesh (ss) and adds one of them to each of the mesh functions in other batch (mm). Each one is multiplied by a factor given by the array factor.

Definition at line 1518 of file submesh.F90.

◆ dsubmesh_batch_dotp_matrix()

subroutine, public submesh_oct_m::dsubmesh_batch_dotp_matrix ( type(submesh_t), intent(in)  this,
class(batch_t), intent(in)  mm,
class(batch_t), intent(in)  ss,
real(real64), dimension(:, :), intent(inout), contiguous  dot,
logical, intent(in), optional  reduce 
)

Definition at line 1570 of file submesh.F90.

◆ zsm_integrate()

complex(real64) function, public submesh_oct_m::zsm_integrate ( class(mesh_t), intent(in)  mesh,
type(submesh_t), intent(in)  sm,
complex(real64), dimension(:), intent(in), optional, contiguous  ff,
logical, intent(in), optional  reduce 
)

Definition at line 1729 of file submesh.F90.

◆ zsm_integrate_frommesh()

complex(real64) function, public submesh_oct_m::zsm_integrate_frommesh ( type(mesh_t), intent(in)  mesh,
type(submesh_t), intent(in)  sm,
complex(real64), dimension(:), intent(in), optional, contiguous  ff,
logical, intent(in), optional  reduce 
)

Definition at line 1774 of file submesh.F90.

◆ zdsubmesh_add_to_mesh()

subroutine submesh_oct_m::zdsubmesh_add_to_mesh ( type(submesh_t), intent(in)  this,
real(real64), dimension(:), intent(in), contiguous  sphi,
complex(real64), dimension(:), intent(inout), contiguous  phi,
complex(real64), intent(in), optional  factor 
)
private

Definition at line 1819 of file submesh.F90.

◆ zsubmesh_copy_from_mesh()

subroutine, public submesh_oct_m::zsubmesh_copy_from_mesh ( type(submesh_t), intent(in)  this,
complex(real64), dimension(:), intent(in), contiguous  phi,
complex(real64), dimension(:), intent(out), contiguous  sphi,
logical, intent(in), optional  conjugate 
)

Definition at line 1867 of file submesh.F90.

◆ zsm_nrm2()

real(real64) function, public submesh_oct_m::zsm_nrm2 ( type(submesh_t), intent(in)  sm,
complex(real64), dimension(:), intent(in), contiguous  ff,
logical, intent(in), optional  reduce 
)

this function returns the the norm of a vector

Definition at line 1897 of file submesh.F90.

◆ zsubmesh_dotp()

complex(real64) function, public submesh_oct_m::zsubmesh_dotp ( type(submesh_t), intent(in)  this,
complex(real64), dimension(:), intent(in)  f1,
complex(real64), dimension(:), intent(in)  f2,
logical, intent(in), optional  reduce 
)

dot product of two functions defined on the submesh

Both arrays are in submesh order, so the per-point volume elements are the ones gathered on the sphere. zmf_dotp with np= cannot be used in that case, as it would index meshvol_pp by the submesh index instead of the mesh index.

Definition at line 1937 of file submesh.F90.

◆ zdsubmesh_to_mesh_dotp()

complex(real64) function submesh_oct_m::zdsubmesh_to_mesh_dotp ( type(submesh_t), intent(in)  this,
real(real64), dimension(:), intent(in), contiguous  sphi,
complex(real64), dimension(:), intent(in), contiguous  phi,
logical, intent(in), optional  reduce 
)
private

Definition at line 1981 of file submesh.F90.

◆ zsubmesh_batch_add_matrix()

subroutine, public submesh_oct_m::zsubmesh_batch_add_matrix ( type(submesh_t), intent(in)  this,
complex(real64), dimension(:, :), intent(in)  factor,
class(batch_t), intent(in)  ss,
class(batch_t), intent(inout)  mm 
)

The following functions takes a batch of functions defined in submesh (ss) and adds all of them to each of the mesh functions in other batch (mm). Each one is multiplied by a factor given by the array 'factor'.

Definition at line 2026 of file submesh.F90.

◆ zsubmesh_batch_add()

subroutine, public submesh_oct_m::zsubmesh_batch_add ( type(submesh_t), intent(in)  this,
class(batch_t), intent(in)  ss,
class(batch_t), intent(inout)  mm 
)

The following function takes a batch of functions defined in submesh (ss) and adds one of them to each of the mesh functions in other batch (mm). Each one is multiplied by a factor given by the array factor.

Definition at line 2119 of file submesh.F90.

◆ zsubmesh_batch_dotp_matrix()

subroutine, public submesh_oct_m::zsubmesh_batch_dotp_matrix ( type(submesh_t), intent(in)  this,
class(batch_t), intent(in)  mm,
class(batch_t), intent(in)  ss,
complex(real64), dimension(:, :), intent(inout), contiguous  dot,
logical, intent(in), optional  reduce 
)

Definition at line 2171 of file submesh.F90.