Octopus
mixing_preconditioner_oct_m Module Reference

Functions/Subroutines

subroutine, public dkerker_preconditioner (der, q_0, delta_f, f_out)
 Kerker preconditioner for the mixing operator in real space. More...
 
subroutine dpreconditioner_op (x, lx, userdata)
 
subroutine, public zkerker_preconditioner (der, q_0, delta_f, f_out)
 Kerker preconditioner for the mixing operator in real space. More...
 
subroutine zpreconditioner_op (x, lx, userdata)
 

Function/Subroutine Documentation

◆ dkerker_preconditioner()

subroutine, public mixing_preconditioner_oct_m::dkerker_preconditioner ( type(derivatives_t), intent(in), target  der,
real(real64), intent(in)  q_0,
real(real64), dimension(:), intent(in), contiguous  delta_f,
real(real64), dimension(:), intent(out), contiguous  f_out 
)

Kerker preconditioner for the mixing operator in real space.

Computes the preconditioned residual:

\[ f_{out} = (\Delta - q_0^2)^{-1} \Delta \delta f \]

by multiplying through by \((\Delta - q_0^2)\) and solving the linear system:

\[ (\Delta - q_0^2) f_{out} = \Delta \delta f \]

for \(f_{out}\). The implementation follows [Shiihara et. al. 2008 Modelling Simul. Mater. Sci. Eng. 16 035004] (https://iopscience.iop.org/article/10.1088/0965-0393/16/3/035004/), however unlike the paper, we do not include the mixing coefficient in the preconditioned residual.

If the starting density does not already integrate to the fully correct total charge, an additional charge correction treatment is necessary:

\[ f_{out} = f_{out} + \frac{a}{V} \int_{V} \delta f d\mathbr{r} \]

See Winkelmann et. al. for more details.

Parameters
[in]derDerivatives
[in]q_0Kerker parameter
[in]delta_fResidual
[out]f_outPreconditioned Residual

Definition at line 205 of file mixing_preconditioner.F90.

◆ dpreconditioner_op()

subroutine mixing_preconditioner_oct_m::dpreconditioner_op ( real(real64), dimension(:), intent(in), contiguous  x,
real(real64), dimension(:), intent(out), contiguous  lx,
type(c_ptr), dimension(:), intent(in)  userdata 
)
private
Parameters
[in]xCurrent guess for preconditioned residual
[out]lxThe LHS product of CG: Ax, or (\Delta - q_0^2) f_out

Definition at line 272 of file mixing_preconditioner.F90.

◆ zkerker_preconditioner()

subroutine, public mixing_preconditioner_oct_m::zkerker_preconditioner ( type(derivatives_t), intent(in), target  der,
real(real64), intent(in)  q_0,
complex(real64), dimension(:), intent(in), contiguous  delta_f,
complex(real64), dimension(:), intent(out), contiguous  f_out 
)

Kerker preconditioner for the mixing operator in real space.

Computes the preconditioned residual:

\[ f_{out} = (\Delta - q_0^2)^{-1} \Delta \delta f \]

by multiplying through by \((\Delta - q_0^2)\) and solving the linear system:

\[ (\Delta - q_0^2) f_{out} = \Delta \delta f \]

for \(f_{out}\). The implementation follows [Shiihara et. al. 2008 Modelling Simul. Mater. Sci. Eng. 16 035004] (https://iopscience.iop.org/article/10.1088/0965-0393/16/3/035004/), however unlike the paper, we do not include the mixing coefficient in the preconditioned residual.

If the starting density does not already integrate to the fully correct total charge, an additional charge correction treatment is necessary:

\[ f_{out} = f_{out} + \frac{a}{V} \int_{V} \delta f d\mathbr{r} \]

See Winkelmann et. al. for more details.

Parameters
[in]derDerivatives
[in]q_0Kerker parameter
[in]delta_fResidual
[out]f_outPreconditioned Residual

Definition at line 389 of file mixing_preconditioner.F90.

◆ zpreconditioner_op()

subroutine mixing_preconditioner_oct_m::zpreconditioner_op ( complex(real64), dimension(:), intent(in), contiguous  x,
complex(real64), dimension(:), intent(out), contiguous  lx,
type(c_ptr), dimension(:), intent(in)  userdata 
)
private
Parameters
[in]xCurrent guess for preconditioned residual
[out]lxThe LHS product of CG: Ax, or (\Delta - q_0^2) f_out

Definition at line 456 of file mixing_preconditioner.F90.