## Documentation for module d3_poly

Routines to efficently handle dense polynomial in 3 variables up to a given degree. Multiplication, partial evalution, affine transform (change of reference system), differentiation are efficiently implemented. some functions accept or return several polynomial together, these have to have all the same size, and are stored one after the other in an unique 1d array. This gives them an easy handling and even seem to be faster than the transposed layout.

source: d3_poly.F

#### public Subroutines/Functions:

max grad for a polynom of the given size
initialization of the cache, is called by functions in this module that use cached values
SUBROUTINE
poly_affine_t3 (p, m, b, pres, npoly)
returns in the polynomials pRes the affine transformation x -> m*x+b of p
SUBROUTINE
poly_affine_t3t (p, m, b, pres, npoly)
returns in the polynomials pRes the transpose of the affine transformation x -> m*x+b of p
subroutine that converts from the cp2k poly format to the d3 poly format
subroutine that converts from the d3 poly format to the cp2k poly format
low level routine of poly_p_uneval2 without checks
low level routine of poly_padd_uneval3 without checks
low level routine of poly_p_eval2 without checks
low level routine of poly_p_eval3 without checks
size of a polynomial in x up to the given degree
size of a polynomial in x,y up to the given degree
size of a polynomial in x,y,z up to the given degree

#### Parameters:

max grad for a polynom of the given size

 Return Value :: INTEGER
##### Arguments:
 INTEGER, INTENT(in) :: n ...

#### SUBROUTINEinit_d3_poly_module()^

initialization of the cache, is called by functions in this module that use cached values

#### SUBROUTINEpoly_affine_t3(p, m, b, pres, npoly)^

returns in the polynomials pRes the affine transformation x -> m*x+b of p

##### Arguments:
 REAL(dp), INTENT(in) :: p(:) ... REAL(dp), INTENT(in) :: m(3,3) ... REAL(dp), INTENT(in) :: b(3) ... REAL(dp), INTENT(out) :: pres(:) ... INTEGER, INTENT(in), OPTIONAL :: npoly ...

#### SUBROUTINEpoly_affine_t3t(p, m, b, pres, npoly)^

returns in the polynomials pRes the transpose of the affine transformation x -> m*x+b of p

##### Arguments:
 REAL(dp), INTENT(in) :: p(:) ... REAL(dp), INTENT(in) :: m(3,3) ... REAL(dp), INTENT(in) :: b(3) ... REAL(dp), INTENT(out) :: pres(:) ... INTEGER, INTENT(in), OPTIONAL :: npoly ...

subroutine that converts from the cp2k poly format to the d3 poly format

##### Arguments:
 REAL(dp), INTENT(in) :: poly_cp2k(:) ... INTEGER, INTENT(in) :: grad ... REAL(dp), INTENT(out) :: poly_d3(:) ...

subroutine that converts from the d3 poly format to the cp2k poly format

##### Arguments:
 REAL(dp), INTENT(out) :: poly_cp2k(:) ... INTEGER, INTENT(in) :: grad ... REAL(dp), INTENT(in) :: poly_d3(:) ...

low level routine of poly_p_uneval2 without checks

##### Arguments:
 REAL(dp), INTENT(inout) :: p(*) ... INTEGER, INTENT(in) :: size_p ... REAL(dp), INTENT(in) :: x ... REAL(dp), INTENT(in) :: pres(*) ... INTEGER, INTENT(in) :: size_pres ... INTEGER, INTENT(in) :: npoly ... INTEGER :: grad ... REAL(dp) :: xi(*) ...

low level routine of poly_padd_uneval3 without checks

##### Arguments:
 REAL(dp), INTENT(inout) :: p(*) ... INTEGER, INTENT(in) :: size_p ... REAL(dp), INTENT(in) :: x ... REAL(dp), INTENT(in) :: pres(*) ... INTEGER, INTENT(in) :: size_pres ... INTEGER, INTENT(in) :: npoly ... INTEGER, INTENT(in) :: grad ... REAL(dp), INTENT(inout) :: xi(*) ...

#### SUBROUTINEpoly_p_eval2b(p, size_p, x, pres, size_pres, npoly, grad, xi)^

low level routine of poly_p_eval2 without checks

##### Arguments:
 REAL(dp), INTENT(in) :: p(*) ... INTEGER, INTENT(in) :: size_p ... REAL(dp), INTENT(in) :: x ... REAL(dp), INTENT(inout) :: pres(*) ... INTEGER, INTENT(in) :: size_pres ... INTEGER, INTENT(in) :: npoly ... INTEGER :: grad ... REAL(dp) :: xi(*) ...

#### SUBROUTINEpoly_p_eval3b(p, size_p, x, pres, size_pres, npoly, grad, xi)^

low level routine of poly_p_eval3 without checks

##### Arguments:
 REAL(dp), INTENT(in) :: p(*) ... INTEGER, INTENT(in) :: size_p ... REAL(dp), INTENT(in) :: x ... REAL(dp), INTENT(inout) :: pres(*) ... INTEGER, INTENT(in) :: size_pres ... INTEGER, INTENT(in) :: npoly ... INTEGER, INTENT(in) :: grad ... REAL(dp), INTENT(inout) :: xi(*) ...

size of a polynomial in x up to the given degree

 Return Value :: INTEGER
##### Arguments:

size of a polynomial in x,y up to the given degree

 Return Value :: INTEGER