ddx 0.6.0
Libary for domain-decomposition methods for polarizable continuum models
ddx_multipolar_solutes Module Reference

Routines to build rhs (phi and psi) More...

Functions/Subroutines

subroutine multipole_electrostatics (params, constants, workspace, multipoles, mmax, electrostatics, ddx_error)
 Given a multipolar distribution, compute the required electrostatic properties for the chosen model. More...
 
subroutine multipole_electrostatics_2 (params, constants, workspace, multipoles, mmax, phi_cav, e_cav, g_cav, ddx_error)
 Given a multipolar distribution, compute the potential, its gradient and its hessian at the target points this is done with or without FMMs depending on the relevant flag The multipoles must be centered on the ddx spheres. More...
 
subroutine build_g_dense (multipoles, cm, mmax, nm, phi_cav, ccav, ncav, e_cav, g_cav, ddx_error)
 Given a multipolar distribution, compute the potential, its gradient and its hessian at the target points using a N^2 code. As this routine does not use the FMM machinery it is more flexible and accepts arbitrary sources and targets. More...
 
subroutine multipole_electrostatics_1 (params, constants, workspace, multipoles, mmax, phi_cav, e_cav, ddx_error)
 Given a multipolar distribution, compute the potential and its gradient at the target points this is done with or without FMMs depending on the relevant flag The multipoles must be centered on the ddx spheres. More...
 
subroutine build_e_dense (multipoles, cm, mmax, nm, phi_cav, ccav, ncav, e_cav, ddx_error)
 Given a multipolar distribution, compute the potential and its gradient at the target points using a N^2 code. As this routine does not use the FMM machinery it is more flexible and accepts arbitrary sources and targets. More...
 
subroutine multipole_electrostatics_0 (params, constants, workspace, multipoles, mmax, phi_cav, ddx_error)
 Given a multipolar distribution, compute the potential at the target points this is done with or without FMMs depending on the relevant flag The multipoles must be centered on the ddx spheres. More...
 
subroutine build_phi_dense (multipoles, cm, mmax, nm, phi_cav, ccav, ncav, ddx_error)
 Given a multipolar distribution, compute the potential at the target points using a N^2 code. As this routine does not use the FMM machinery it is more flexible and accepts arbitrary sources and targets. More...
 
subroutine build_e_fmm (params, constants, workspace, multipoles, mmax, phi_cav, e_cav, ddx_error)
 Given a multipolar distribution, compute the potential and its gradient at the target points using FMMs. More...
 
subroutine build_g_fmm (params, constants, workspace, multipoles, mmax, phi_cav, e_cav, g_cav, ddx_error)
 Given a multipolar distribution, compute the potential, the field and the field gradient at the target points using FMMs. More...
 
subroutine build_phi_fmm (params, constants, workspace, multipoles, mmax, phi_cav)
 Given a multipolar distribution, compute the potential at the target points using FMMs. More...
 
subroutine multipole_psi (params, multipoles, mmax, psi)
 Given a multipolar distribution, assemble the RHS psi. The multipoles must be centered on the ddx spheres. More...
 
subroutine load_m (params, constants, workspace, multipoles, mmax)
 Given a multipolar distribution, load it into workspace % tmp_sph and workspace % tmp_node_m to be used by the FMM. More...
 
subroutine do_fmm (params, constants, workspace)
 Given a multipolar distribution loaded in the workspace perform the M2M, M2L, L2L and L2P steps. More...
 
subroutine grad_m2m (multipoles, mmax, nm, tmp_m_grad, ddx_error)
 Given a multipolar distribution compute the action of dP on it, this is required in the computation of the forces. More...
 
subroutine grad_phi_for_charges (params, constants, workspace, state, charges, forces, ddx_error)
 Given a charge distribution centered on the spheres, compute the contributions to the forces stemming from its electrostatic interactions. More...
 
subroutine grad_phi (params, constants, workspace, state, mmax, multipoles, forces, ddx_error)
 Given a multipolar distribution in real spherical harmonics and centered on the spheres, compute the contributions to the forces stemming from its electrostatic interactions. More...
 
subroutine build_adj_phi (params, constants, workspace, charges, mmax, adj_phi, ddx_error)
 Given a distribution of point charges at the cavity points, compute the potential and its higher order derivatives up to pmax at the center of the spheres. This is done with or without the FMMs depending on the given flag. This is used in the computation of the forces. More...
 
subroutine build_adj_phi_dense (qcav, ccav, ncav, cm, mmax, nm, adj_phi, ddx_error)
 Given a distribution of point charges at the cavity points, compute the potential and its higher order derivatives up to pmax at the center of the spheres. This is done using two loops and required in the computation of the forces. More...
 
subroutine build_adj_phi_fmm (params, constants, workspace, charges, mmax, adj_phi, ddx_error)
 Given a distribution of point charges at the cavity points, compute the potential and its higher order derivatives up to pmax at the center of the spheres. This is done with FMMs and required in the computation of the forces. More...
 
subroutine grad_e_for_charges (params, constants, workspace, state, charges, force, ddx_error)
 Given a charge distribution centered on the spheres, compute the contributions to the forces stemming from its electrostatic interactions. More...
 
subroutine grad_e (params, constants, workspace, state, mmax, multipoles, force, ddx_error)
 Given a multipolar distribution in real spherical harmonics and centered on the spheres, compute the contributions to the forces stemming from its electrostatic interactions in case of ddLPB F RHS. More...
 
subroutine multipole_force_terms (params, constants, workspace, state, mmax, multipoles, forces, ddx_error)
 Given a multipolar distribution in real spherical harmonics and centered on the spheres, compute the contributions to the forces stemming from its electrostatic interactions. More...
 

Detailed Description

Routines to build rhs (phi and psi)

Function/Subroutine Documentation

◆ multipole_electrostatics_2()

subroutine ddx_multipolar_solutes::multipole_electrostatics_2 ( type(ddx_params_type), intent(in)  params,
type(ddx_constants_type), intent(in)  constants,
type(ddx_workspace_type), intent(inout)  workspace,
real(dp), dimension((mmax + 1)**2, params % nsph), intent(in)  multipoles,
integer, intent(in)  mmax,
real(dp), dimension(constants % ncav), intent(out)  phi_cav,
real(dp), dimension(3, constants % ncav), intent(out)  e_cav,
real(dp), dimension(3, 3, constants % ncav), intent(out)  g_cav,
type(ddx_error_type), intent(inout)  ddx_error 
)

Given a multipolar distribution, compute the potential, its gradient and its hessian at the target points this is done with or without FMMs depending on the relevant flag The multipoles must be centered on the ddx spheres.

Parameters
[in]paramsddx parameters
[in]constantsddx constants
[in,out]workspaceddx workspace
[in]multipolesmultipoles as real spherical harmonics, size ((mmax+1)**2, nsph)
[in]mmaxmaximum angular momentum of the multipoles
[out]phi_cavelectric potential at the target points, size (ncav)
[out]e_cavelectric field at the target points, size (3, ncav)
[out]g_cavelectric field gradient at the target points, size (3, 3, ncav)
[in,out]ddx_errorddX error

Definition at line 80 of file ddx_multipolar_solutes.f90.

◆ build_g_dense()

subroutine ddx_multipolar_solutes::build_g_dense ( real(dp), dimension((mmax + 1)**2, nm), intent(in)  multipoles,
real(dp), dimension(3, nm), intent(in)  cm,
integer, intent(in)  mmax,
integer, intent(in)  nm,
real(dp), dimension(ncav), intent(out)  phi_cav,
real(dp), dimension(3, ncav), intent(in)  ccav,
integer, intent(in)  ncav,
real(dp), dimension(3, ncav), intent(out)  e_cav,
real(dp), dimension(3, 3, ncav), intent(out)  g_cav,
type(ddx_error_type), intent(inout)  ddx_error 
)

Given a multipolar distribution, compute the potential, its gradient and its hessian at the target points using a N^2 code. As this routine does not use the FMM machinery it is more flexible and accepts arbitrary sources and targets.

Parameters
[in]multipolesmultipoles as real spherical harmonics, size ((mmax+1)**2,nm)
[in]cmcenters of the multipolar distributions, size (3,nm)
[in]mmaxmaximum angular momentum of the multipoles
[in]nmnumber of multipoles
[out]phi_cavelectric potential at the target points, size (ncav)
[out]e_cavelectric field at the target points, size (3, ncav)
[out]g_cavelectric field at the target points, size (3, 3, ncav)
[in]ccavcoordinates of the target points, size (3,ncav)
[in]ncavnumber of target points
[out]error_flag0 if everything went fine
[out]error_messageadditional information in case of an error
[in,out]ddx_errorddX error

Definition at line 121 of file ddx_multipolar_solutes.f90.

◆ multipole_electrostatics_1()

subroutine ddx_multipolar_solutes::multipole_electrostatics_1 ( type(ddx_params_type), intent(in)  params,
type(ddx_constants_type), intent(in)  constants,
type(ddx_workspace_type), intent(inout)  workspace,
real(dp), dimension((mmax + 1)**2, params % nsph), intent(in)  multipoles,
integer, intent(in)  mmax,
real(dp), dimension(constants % ncav), intent(out)  phi_cav,
real(dp), dimension(3, constants % ncav), intent(out)  e_cav,
type(ddx_error_type), intent(inout)  ddx_error 
)

Given a multipolar distribution, compute the potential and its gradient at the target points this is done with or without FMMs depending on the relevant flag The multipoles must be centered on the ddx spheres.

Parameters
[in]paramsddx parameters
[in]constantsddx constants
[in,out]workspaceddx workspace
[in]multipolesmultipoles as real spherical harmonics, size ((mmax+1)**2, nsph)
[in]mmaxmaximum angular momentum of the multipoles
[out]phi_cavelectric potential at the target points, size (ncav)
[out]e_cavelectric field at the target points, size (3, ncav)
[in,out]ddx_errorddX error

Definition at line 237 of file ddx_multipolar_solutes.f90.

◆ build_e_dense()

subroutine ddx_multipolar_solutes::build_e_dense ( real(dp), dimension((mmax + 1)**2, nm), intent(in)  multipoles,
real(dp), dimension(3, nm), intent(in)  cm,
integer, intent(in)  mmax,
integer, intent(in)  nm,
real(dp), dimension(ncav), intent(out)  phi_cav,
real(dp), dimension(3, ncav), intent(in)  ccav,
integer, intent(in)  ncav,
real(dp), dimension(3, ncav), intent(out)  e_cav,
type(ddx_error_type), intent(inout)  ddx_error 
)

Given a multipolar distribution, compute the potential and its gradient at the target points using a N^2 code. As this routine does not use the FMM machinery it is more flexible and accepts arbitrary sources and targets.

Parameters
[in]multipolesmultipoles as real spherical harmonics, size ((mmax+1)**2,nm)
[in]cmcenters of the multipolar distributions, size (3,nm)
[in]mmaxmaximum angular momentum of the multipoles
[in]nmnumber of multipoles
[out]phi_cavelectric potential at the target points, size (ncav)
[out]e_cavelectric field at the target points, size (3, ncav)
[in]ccavcoordinates of the target points, size (3,ncav)
[in]ncavnumber of target points
[in,out]ddx_errorddX error

Definition at line 272 of file ddx_multipolar_solutes.f90.

◆ multipole_electrostatics_0()

subroutine ddx_multipolar_solutes::multipole_electrostatics_0 ( type(ddx_params_type), intent(in)  params,
type(ddx_constants_type), intent(in)  constants,
type(ddx_workspace_type), intent(inout)  workspace,
real(dp), dimension((mmax + 1)**2, params % nsph), intent(in)  multipoles,
integer, intent(in)  mmax,
real(dp), dimension(constants % ncav), intent(out)  phi_cav,
type(ddx_error_type), intent(inout)  ddx_error 
)

Given a multipolar distribution, compute the potential at the target points this is done with or without FMMs depending on the relevant flag The multipoles must be centered on the ddx spheres.

Parameters
[in]paramsddx parameters
[in]constantsddx constants
[in,out]workspaceddx workspace
[in]multipolesmultipoles as real spherical harmonics, size ((mmax+1)**2, nsph)
[in]mmaxmaximum angular momentum of the multipoles
[out]phi_cavelectric potential at the target points, size (ncav)
[in,out]ddx_errorddX error

Definition at line 348 of file ddx_multipolar_solutes.f90.

◆ build_phi_dense()

subroutine ddx_multipolar_solutes::build_phi_dense ( real(dp), dimension((mmax + 1)**2, nm), intent(in)  multipoles,
real(dp), dimension(3, nm), intent(in)  cm,
integer, intent(in)  mmax,
integer, intent(in)  nm,
real(dp), dimension(ncav), intent(out)  phi_cav,
real(dp), dimension(3, ncav), intent(in)  ccav,
integer, intent(in)  ncav,
type(ddx_error_type), intent(inout)  ddx_error 
)

Given a multipolar distribution, compute the potential at the target points using a N^2 code. As this routine does not use the FMM machinery it is more flexible and accepts arbitrary sources and targets.

Parameters
[in]multipolesmultipoles as real spherical harmonics, size ((mmax+1)**2,nm)
[in]cmcenters of the multipolar distributions, size (3,nm)
[in]mmaxmaximum angular momentum of the multipoles
[in]nmnumber of multipoles
[out]phi_cavelectric potential at the target points, size (ncav)
[in]ccavcoordinates of the target points, size (3,ncav)
[in]ncavnumber of target points
[in,out]ddx_errorddX error

Definition at line 381 of file ddx_multipolar_solutes.f90.

◆ build_e_fmm()

subroutine ddx_multipolar_solutes::build_e_fmm ( type(ddx_params_type), intent(in)  params,
type(ddx_constants_type), intent(in)  constants,
type(ddx_workspace_type), intent(inout)  workspace,
real(dp), dimension((mmax + 1)**2, params % nsph), intent(in)  multipoles,
integer, intent(in)  mmax,
real(dp), dimension(constants % ncav), intent(out)  phi_cav,
real(dp), dimension(3, constants % ncav), intent(out)  e_cav,
type(ddx_error_type), intent(inout)  ddx_error 
)

Given a multipolar distribution, compute the potential and its gradient at the target points using FMMs.

Parameters
[in]paramsddx parameters
[in]constantsddx constants
[in,out]workspaceddx workspace
[in]multipolesmultipoles as real spherical harmonics, size ((mmax+1)**2,nsph)
[in]mmaxmaximum angular momentum of the multipoles
[out]phi_cavelectric potential at the target points, size (ncav)
[out]e_cavelectric field at the target points, size(3, ncav)
[in,out]ddx_errorddX error

Definition at line 434 of file ddx_multipolar_solutes.f90.

◆ build_g_fmm()

subroutine ddx_multipolar_solutes::build_g_fmm ( type(ddx_params_type), intent(in)  params,
type(ddx_constants_type), intent(in)  constants,
type(ddx_workspace_type), intent(inout)  workspace,
real(dp), dimension((mmax + 1)**2, params % nsph), intent(in)  multipoles,
integer, intent(in)  mmax,
real(dp), dimension(constants % ncav), intent(out)  phi_cav,
real(dp), dimension(3, constants % ncav), intent(out)  e_cav,
real(dp), dimension(3, 3, constants % ncav), intent(out)  g_cav,
type(ddx_error_type), intent(inout)  ddx_error 
)

Given a multipolar distribution, compute the potential, the field and the field gradient at the target points using FMMs.

Parameters
[in]paramsddx parameters
[in]constantsddx constants
[in,out]workspaceddx workspace
[in]multipolesmultipoles as real spherical harmonics, size ((mmax+1)**2,nsph)
[in]mmaxmaximum angular momentum of the multipoles
[out]phi_cavelectric potential at the target points, size (ncav)
[out]e_cavelectric field at the target points, size(3, ncav)
[out]g_cavelectric field gradient at the target points, size(3, 3, ncav)
[in,out]ddx_errorddX error

Definition at line 551 of file ddx_multipolar_solutes.f90.

◆ build_phi_fmm()

subroutine ddx_multipolar_solutes::build_phi_fmm ( type(ddx_params_type), intent(in)  params,
type(ddx_constants_type), intent(in)  constants,
type(ddx_workspace_type), intent(inout)  workspace,
real(dp), dimension((mmax + 1)**2, params % nsph), intent(in)  multipoles,
integer, intent(in)  mmax,
real(dp), dimension(constants % ncav), intent(out)  phi_cav 
)

Given a multipolar distribution, compute the potential at the target points using FMMs.

Parameters
[in]paramsddx parameters
[in]constantsddx constants
[in,out]workspaceddx workspace
[in]multipolesmultipoles as real spherical harmonics, size ((mmax+1)**2,nsph)
[in]mmaxmaximum angular momentum of the multipoles
[out]phi_cavelectric potential at the target points, size (ncav)

Definition at line 787 of file ddx_multipolar_solutes.f90.

◆ load_m()

subroutine ddx_multipolar_solutes::load_m ( type(ddx_params_type), intent(in)  params,
type(ddx_constants_type), intent(in)  constants,
type(ddx_workspace_type), intent(inout)  workspace,
real(dp), dimension((mmax + 1)**2, params % nsph), intent(in)  multipoles,
integer, intent(in)  mmax 
)

Given a multipolar distribution, load it into workspace % tmp_sph and workspace % tmp_node_m to be used by the FMM.

Parameters
[in]paramsddx parameters
[in]constantsddx constants
[in,out]workspaceddx workspace
[in]multipolesmultipoles as real spherical harmonics, size ((mmax+1)**2,nsph)
[in]mmaxmaximum angular momentum of the multipoles

Definition at line 868 of file ddx_multipolar_solutes.f90.

◆ do_fmm()

subroutine ddx_multipolar_solutes::do_fmm ( type(ddx_params_type), intent(in)  params,
type(ddx_constants_type), intent(in)  constants,
type(ddx_workspace_type), intent(inout)  workspace 
)

Given a multipolar distribution loaded in the workspace perform the M2M, M2L, L2L and L2P steps.

Parameters
[in]paramsddx parameters
[in]constantsddx constants
[in,out]workspaceddx workspace
[in,out]ddx_errorddX error

Definition at line 905 of file ddx_multipolar_solutes.f90.

◆ grad_m2m()

subroutine ddx_multipolar_solutes::grad_m2m ( real(dp), dimension((mmax + 1)**2, nm), intent(in)  multipoles,
integer, intent(in)  mmax,
integer, intent(in)  nm,
real(dp), dimension((mmax + 2)**2, 3, nm), intent(out)  tmp_m_grad,
type(ddx_error_type), intent(inout)  ddx_error 
)

Given a multipolar distribution compute the action of dP on it, this is required in the computation of the forces.

Parameters
[in]multipolesmultipoles as real spherical harmonics, size ((mmax+1)**2, nsph)
[in]mmaxmaximum angular momentum of the multipolar distribution
[in]nmnumber of multipoles
[out]tmp_m_gradgradient of the M2M operator, size ((mmax + 1)**2, 3, nm)
[in,out]ddx_errorddX error

Definition at line 928 of file ddx_multipolar_solutes.f90.

◆ grad_phi_for_charges()

subroutine ddx_multipolar_solutes::grad_phi_for_charges ( type(ddx_params_type), intent(in)  params,
type(ddx_constants_type), intent(in)  constants,
type(ddx_workspace_type), intent(inout)  workspace,
type(ddx_state_type), intent(inout)  state,
real(dp), dimension(params % nsph), intent(in)  charges,
real(dp), dimension(3, params % nsph), intent(inout)  forces,
type(ddx_error_type), intent(inout)  ddx_error 
)

Given a charge distribution centered on the spheres, compute the contributions to the forces stemming from its electrostatic interactions.

Parameters
[in]paramsddx parameters
[in]constantsddx constants
[in,out]workspaceddx workspace
[in]chargescharges, size (nsph)
[in,out]forcesforces array, size (3, nsph)
[in,out]ddx_errorddX error

Definition at line 1003 of file ddx_multipolar_solutes.f90.

◆ grad_phi()

subroutine ddx_multipolar_solutes::grad_phi ( type(ddx_params_type), intent(in)  params,
type(ddx_constants_type), intent(in)  constants,
type(ddx_workspace_type), intent(inout)  workspace,
type(ddx_state_type), intent(inout)  state,
integer, intent(in)  mmax,
real(dp), dimension((mmax + 1)**2, params % nsph), intent(in)  multipoles,
real(dp), dimension(3, params % nsph), intent(inout)  forces,
type(ddx_error_type), intent(inout)  ddx_error 
)

Given a multipolar distribution in real spherical harmonics and centered on the spheres, compute the contributions to the forces stemming from its electrostatic interactions.

Parameters
[in]paramsddx parameters
[in]constantsddx constants
[in,out]workspaceddx workspace
[in,out]stateddx state
[in]mmaxmaximum angular momentum of the multipolar distribution
[in]multipolesmultipoles as real spherical harmonics, size ((mmax+1)**2, nsph)
[in,out]forcesforces array, size (3, nsph)
[in,out]ddx_errorddX error

Definition at line 1047 of file ddx_multipolar_solutes.f90.

◆ build_adj_phi()

subroutine ddx_multipolar_solutes::build_adj_phi ( type(ddx_params_type), intent(in)  params,
type(ddx_constants_type), intent(in)  constants,
type(ddx_workspace_type), intent(inout)  workspace,
real(dp), dimension(constants % ncav), intent(in)  charges,
integer, intent(in)  mmax,
real(dp), dimension((mmax + 1)**2, params % nsph), intent(out)  adj_phi,
type(ddx_error_type), intent(inout)  ddx_error 
)

Given a distribution of point charges at the cavity points, compute the potential and its higher order derivatives up to pmax at the center of the spheres. This is done with or without the FMMs depending on the given flag. This is used in the computation of the forces.

Parameters
[in]paramsddx parameters
[in]constantsddx constants
[in,out]workspaceddx workspace
[in]chargescharges (zeta) at cavity points, size(ncav)
[in]mmaxmaximum angular momentum of the target multipoles
[out]adj_phielectrostatic properties up to order mmax at the target multipoles, size ((mmax+1)**2, nsph)
[in,out]ddx_errorddX error

Definition at line 1125 of file ddx_multipolar_solutes.f90.

◆ build_adj_phi_dense()

subroutine ddx_multipolar_solutes::build_adj_phi_dense ( real(dp), dimension(ncav), intent(in)  qcav,
real(dp), dimension(3, ncav), intent(in)  ccav,
integer, intent(in)  ncav,
real(dp), dimension(3, nm), intent(in)  cm,
integer, intent(in)  mmax,
integer, intent(in)  nm,
real(dp), dimension((mmax + 1)**2, nm), intent(out)  adj_phi,
type(ddx_error_type), intent(inout)  ddx_error 
)

Given a distribution of point charges at the cavity points, compute the potential and its higher order derivatives up to pmax at the center of the spheres. This is done using two loops and required in the computation of the forces.

Parameters
[in]qcavcharges, size(ncav)
[in]ccavcoordinates of the charges, size(3,ncav)
[in]ncavnumber of charges
[in]cmcoordinates of the multipoles, size(3,nm)
[in]mmaxmaximum angular momentum of the multipoles
[in]nmnumber of multipoles
[out]adj_phiadjoint potential, size((mmax+1)**2,nm)
[in,out]ddx_errorddX error

Definition at line 1157 of file ddx_multipolar_solutes.f90.

◆ build_adj_phi_fmm()

subroutine ddx_multipolar_solutes::build_adj_phi_fmm ( type(ddx_params_type), intent(in)  params,
type(ddx_constants_type), intent(in)  constants,
type(ddx_workspace_type), intent(inout)  workspace,
real(dp), dimension(constants % ncav), intent(in)  charges,
integer, intent(in)  mmax,
real(dp), dimension((mmax + 1)**2, params % nsph), intent(out)  adj_phi,
type(ddx_error_type), intent(inout)  ddx_error 
)

Given a distribution of point charges at the cavity points, compute the potential and its higher order derivatives up to pmax at the center of the spheres. This is done with FMMs and required in the computation of the forces.

Parameters
[in]paramsddx parameters
[in]constantsddx constants
[in,out]workspaceddx workspace
[in]chargescharges (zeta) at cavity points, size(ncav)
[in]mmaxmaximum angular momentum of the target multipoles
[out]adj_phielectrostatic properties up to order mmax at the target multipoles, size ((mmax+1)**2, nsph)
[in,out]ddx_errorddX error

Definition at line 1208 of file ddx_multipolar_solutes.f90.

◆ grad_e_for_charges()

subroutine ddx_multipolar_solutes::grad_e_for_charges ( type(ddx_params_type), intent(in)  params,
type(ddx_constants_type), intent(in)  constants,
type(ddx_workspace_type), intent(inout)  workspace,
type(ddx_state_type), intent(inout)  state,
real(dp), dimension(params % nsph), intent(in)  charges,
real(dp), dimension(3, params % nsph), intent(inout)  force,
type(ddx_error_type), intent(inout)  ddx_error 
)

Given a charge distribution centered on the spheres, compute the contributions to the forces stemming from its electrostatic interactions.

Parameters
[in]paramsddx parameters
[in]constantsddx constants
[in,out]workspaceddx workspace
[in,out]stateddx state
[in]chargescharges, size (nsph)
[in,out]forcesforces array, size (3, nsph)
[in,out]ddx_errorddX error

Definition at line 1317 of file ddx_multipolar_solutes.f90.

◆ grad_e()

subroutine ddx_multipolar_solutes::grad_e ( type(ddx_params_type), intent(in)  params,
type(ddx_constants_type), intent(in)  constants,
type(ddx_workspace_type), intent(inout)  workspace,
type(ddx_state_type), intent(inout)  state,
integer, intent(in)  mmax,
real(dp), dimension((mmax+1)**2, params % nsph), intent(in)  multipoles,
real(dp), dimension(3, params % nsph), intent(inout)  force,
type(ddx_error_type), intent(inout)  ddx_error 
)

Given a multipolar distribution in real spherical harmonics and centered on the spheres, compute the contributions to the forces stemming from its electrostatic interactions in case of ddLPB F RHS.

Parameters
[in]paramsddx parameters
[in]constantsddx constants
[in,out]workspaceddx workspace
[in,out]stateddx state
[in]mmaxmaximum angular momentum of the multipolar distribution
[in]multipolesmultipoles as real spherical harmonics, size ((mmax+1)**2, nsph)
[in,out]forcesforces array, size (3, nsph)
[in,out]ddx_errorddX error

Definition at line 1360 of file ddx_multipolar_solutes.f90.