A fast and precise DFT wavelet code

# convolut_simple_per_k.f90 File Reference

Simple routine of convolutions. More...

Go to the source code of this file.

## Functions/Subroutines

subroutine convolut_kinetic_per_c_k (n1, n2, n3, hgrid, x, y, c_in, k1, k2, k3)
Applies the modified kinetic energy operator onto x to get y. Works for periodic BC. Modified kinetic energy operator: A=-1/2 exp(Ikr) Delta exp(-Ikr)+C where k=(k1,k2,k3); r=(x,y,z) We apply the Galerkin matrix of this operator in the scaling function basis phi(x/h1-i1)phi(y/h2-i2)phi(z/h3-i3) The only difference from the case k=0 is the first derivative operator 2I( kx d/dx + ...+ kz d/dz) for which we need the 1-dimensional Galerkin matrix that is stored in the arrays fil(2,:,1)..fil(2,:,3) multiplied by the factor scale1. The second derivative operator is stored in the arrays fil(1,:,1)..fil(1,..3) in the usual way. The whole array fil actually stores the full complex Galerkin matrix of the operator A.
subroutine convolut_kinetic_per_T_k (n1, n2, n3, hgrid, x, y, ener, k1, k2, k3)
Applies the modified kinetic energy operator onto x to get y. Computes the kinetic energy too. Works for periodic BC. Modified kinetic energy operator: A=-1/2 exp(Ikr) Delta exp(-Ikr) where k=(k1,k2,k3); r=(x,y,z).

## Detailed Description

Simple routine of convolutions.

Definition in file convolut_simple_per_k.f90.

## Function Documentation

 subroutine convolut_kinetic_per_c_k ( integer,intent(in) n1, integer,intent(in) n2, integer,intent(in) n3, real(gp),dimension(3),intent(in) hgrid, real(wp),dimension(2,0:n1,0:n2,0:n3),intent(in) x, real(wp),dimension(2,0:n1,0:n2,0:n3),intent(out) y, real(gp),intent(in) c_in, real(gp),intent(in) k1, real(gp),intent(in) k2, real(gp),intent(in) k3 )

Applies the modified kinetic energy operator onto x to get y. Works for periodic BC. Modified kinetic energy operator: A=-1/2 exp(Ikr) Delta exp(-Ikr)+C where k=(k1,k2,k3); r=(x,y,z) We apply the Galerkin matrix of this operator in the scaling function basis phi(x/h1-i1)phi(y/h2-i2)phi(z/h3-i3) The only difference from the case k=0 is the first derivative operator 2I( kx d/dx + ...+ kz d/dz) for which we need the 1-dimensional Galerkin matrix that is stored in the arrays fil(2,:,1)..fil(2,:,3) multiplied by the factor scale1. The second derivative operator is stored in the arrays fil(1,:,1)..fil(1,..3) in the usual way. The whole array fil actually stores the full complex Galerkin matrix of the operator A.

One can check (I did that) that the Galerkin matrix (almost) annihilates the array that is the wavelet projection of the plane wave exp(Ikx), if the plane wave is periodic in the simulation box. The annihilation accuracy improves with decreasing grid constant h, as expected, but the numerical noise spoils the convergence after some point.

Definition at line 35 of file convolut_simple_per_k.f90.

Referenced by apply_hp_per_k(), and conv_check().

Here is the caller graph for this function:

 subroutine convolut_kinetic_per_T_k ( integer,intent(in) n1, integer,intent(in) n2, integer,intent(in) n3, real(gp),dimension(3),intent(in) hgrid, real(wp),dimension(2,0:n1,0:n2,0:n3),intent(in) x, real(wp),dimension(2,0:n1,0:n2,0:n3),intent(inout) y, real(wp),intent(out) ener, real(gp),intent(in) k1, real(gp),intent(in) k2, real(gp),intent(in) k3 )

Applies the modified kinetic energy operator onto x to get y. Computes the kinetic energy too. Works for periodic BC. Modified kinetic energy operator: A=-1/2 exp(Ikr) Delta exp(-Ikr) where k=(k1,k2,k3); r=(x,y,z).

Definition at line 437 of file convolut_simple_per_k.f90.

Referenced by isf_to_daub_kinetic().

Here is the caller graph for this function: