Octopus
species_pot_oct_m Module Reference

Functions/Subroutines

subroutine, public species_atom_density (species, namespace, space, latt, pos, mesh, spin_channels, rho)
 
subroutine, public species_atom_density_np (species, namespace, pos, mesh, spin_channels, rho)
 
subroutine, public species_atom_density_derivative_np (species, namespace, pos, mesh, spin_channels, drho)
 
subroutine, public species_atom_density_grad (species, namespace, space, latt, pos, mesh, spin_channels, drho)
 
subroutine, public species_get_long_range_density (species, namespace, space, latt, pos, mesh, rho, sphere_inout, nlr_x)
 
subroutine func (xin, ff, jacobian)
 
subroutine, public species_get_nlcc (species, space, latt, pos, mesh, rho_core, accumulate)
 
subroutine, public species_get_nlcc_grad (species, space, latt, pos, mesh, rho_core_grad_x)
 Returns the (r-R_I)-weighted analytic gradient of the NLCC core density. More...
 
subroutine getrho (dim, xin)
 
subroutine, public species_get_local (species, namespace, space, latt, pos, mesh, vl)
 used when the density is not available, or otherwise the Poisson eqn would be used instead More...
 

Variables

type(mesh_t), pointer mesh_p
 
real(real64), dimension(:), allocatable rho_p
 
real(real64), dimension(:, :), allocatable grho_p
 
real(real64) alpha2_p
 
real(real64), dimension(:), pointer pos_p
 

Function/Subroutine Documentation

◆ species_atom_density()

subroutine, public species_pot_oct_m::species_atom_density ( class(species_t), intent(in), target  species,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
type(lattice_vectors_t), intent(in)  latt,
real(real64), dimension(1:space%dim), intent(in)  pos,
type(mesh_t), intent(in)  mesh,
integer, intent(in)  spin_channels,
real(real64), dimension(:, :), intent(inout)  rho 
)
Parameters
[in,out]rho(meshnp, spin_channels)

Definition at line 172 of file species_pot.F90.

◆ species_atom_density_np()

subroutine, public species_pot_oct_m::species_atom_density_np ( class(species_t), intent(in), target  species,
type(namespace_t), intent(in)  namespace,
real(real64), dimension(:), intent(in)  pos,
type(mesh_t), intent(in)  mesh,
integer, intent(in)  spin_channels,
real(real64), dimension(:, :), intent(inout)  rho 
)
Parameters
[in,out]rho(meshnp, spin_channels)

Definition at line 443 of file species_pot.F90.

◆ species_atom_density_derivative_np()

subroutine, public species_pot_oct_m::species_atom_density_derivative_np ( class(species_t), intent(in), target  species,
type(namespace_t), intent(in)  namespace,
real(real64), dimension(:), intent(in)  pos,
type(mesh_t), intent(in)  mesh,
integer, intent(in)  spin_channels,
real(real64), dimension(:, :), intent(inout)  drho 
)
Parameters
[in,out]drho(meshnp, spin_channels)

Definition at line 521 of file species_pot.F90.

◆ species_atom_density_grad()

subroutine, public species_pot_oct_m::species_atom_density_grad ( class(species_t), intent(in), target  species,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
type(lattice_vectors_t), intent(in)  latt,
real(real64), dimension(1:space%dim), intent(in)  pos,
type(mesh_t), intent(in)  mesh,
integer, intent(in)  spin_channels,
real(real64), dimension(:, :, :), intent(inout)  drho 
)
Parameters
[in,out]drho(meshnp, spin_channels, dim)

Definition at line 573 of file species_pot.F90.

◆ species_get_long_range_density()

subroutine, public species_pot_oct_m::species_get_long_range_density ( class(species_t), intent(in), target  species,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
type(lattice_vectors_t), intent(in)  latt,
real(real64), dimension(1:space%dim), intent(in), target  pos,
class(mesh_t), intent(in), target  mesh,
real(real64), dimension(:), intent(out)  rho,
type(submesh_t), intent(inout), optional, target  sphere_inout,
real(real64), dimension(:,:), intent(inout), optional  nlr_x 
)
Parameters
[in,out]nlr_xrho(ip)*(xx(ip)-R_I)

Definition at line 643 of file species_pot.F90.

◆ func()

subroutine species_pot_oct_m::func ( real(real64), dimension(:), intent(in)  xin,
real(real64), dimension(:), intent(out)  ff,
real(real64), dimension(:,:), intent(out)  jacobian 
)
private

Definition at line 882 of file species_pot.F90.

◆ species_get_nlcc()

subroutine, public species_pot_oct_m::species_get_nlcc ( class(species_t), intent(in), target  species,
class(space_t), intent(in)  space,
type(lattice_vectors_t), intent(in)  latt,
real(real64), dimension(1:space%dim), intent(in)  pos,
class(mesh_t), intent(in)  mesh,
real(real64), dimension(:), intent(inout)  rho_core,
logical, intent(in), optional  accumulate 
)

Definition at line 921 of file species_pot.F90.

◆ species_get_nlcc_grad()

subroutine, public species_pot_oct_m::species_get_nlcc_grad ( class(species_t), intent(in), target  species,
class(space_t), intent(in)  space,
type(lattice_vectors_t), intent(in)  latt,
real(real64), dimension(1:space%dim), intent(in)  pos,
class(mesh_t), intent(in)  mesh,
real(real64), dimension(:,:,:), intent(inout)  rho_core_grad_x 
)

Returns the (r-R_I)-weighted analytic gradient of the NLCC core density.

Computes, on the mesh, the tensor

\[ T_{\alpha\beta}(r) = \sum_{\rm images} \frac{\rho`_{\rm core}(|r-R^{\rm img}|)}{|r-R^{\rm img}|} (r-R^{\rm img})_\alpha (r-R^{\rm img})_\beta = \sum_{\rm images} [\partial_\alpha \rho_{\rm core}^{\rm img}(r)] (r-R^{\rm img})_\beta\,, \]

using the analytic radial derivative of the core density (spline core_der).

Parameters
[in,out]rho_core_grad_x(np, dim, dim)

Definition at line 975 of file species_pot.F90.

◆ getrho()

subroutine species_pot_oct_m::getrho ( integer, intent(in)  dim,
real(real64), dimension(1:dim), intent(in)  xin 
)
private

Definition at line 1034 of file species_pot.F90.

◆ species_get_local()

subroutine, public species_pot_oct_m::species_get_local ( class(species_t), intent(in), target  species,
type(namespace_t), intent(in)  namespace,
class(space_t), intent(in)  space,
type(lattice_vectors_t), intent(in)  latt,
real(real64), dimension(1:space%dim), intent(in)  pos,
type(mesh_t), intent(in)  mesh,
real(real64), dimension(:), intent(out)  vl 
)

used when the density is not available, or otherwise the Poisson eqn would be used instead

Definition at line 1076 of file species_pot.F90.

Variable Documentation

◆ mesh_p

type(mesh_t), pointer species_pot_oct_m::mesh_p
private

Definition at line 162 of file species_pot.F90.

◆ rho_p

real(real64), dimension(:), allocatable species_pot_oct_m::rho_p
private

Definition at line 163 of file species_pot.F90.

◆ grho_p

real(real64), dimension(:, :), allocatable species_pot_oct_m::grho_p
private

Definition at line 164 of file species_pot.F90.

◆ alpha2_p

real(real64) species_pot_oct_m::alpha2_p
private

Definition at line 165 of file species_pot.F90.

◆ pos_p

real(real64), dimension(:), pointer species_pot_oct_m::pos_p
private

Definition at line 166 of file species_pot.F90.