initialize_integration_class_4d Subroutine

private subroutine initialize_integration_class_4d(me, fxyzq, xl, xu, yl, yu, zl, zu, ql, qu, tolx, toly, tolz, tolq, methodx, methody, methodz, methodq)

Initialize the 4D integration class. Must be called before integration is performed.

Arguments

TypeIntentOptionalAttributesName
class(integration_class_4d), intent(inout) :: me
procedure(func_4d) :: fxyzq

4d function: f(x,y,z,q)

real(kind=wp), intent(in) :: xl

x integration lower bound

real(kind=wp), intent(in) :: xu

x integration upper bound

real(kind=wp), intent(in) :: yl

y integration lower bound

real(kind=wp), intent(in) :: yu

y integration upper bound

real(kind=wp), intent(in) :: zl

z integration lower bound

real(kind=wp), intent(in) :: zu

z integration upper bound

real(kind=wp), intent(in) :: ql

q integration lower bound

real(kind=wp), intent(in) :: qu

q integration upper bound

real(kind=wp), intent(in) :: tolx

error tolerance for dx integration

real(kind=wp), intent(in) :: toly

error tolerance for dy integration

real(kind=wp), intent(in) :: tolz

error tolerance for dz integration

real(kind=wp), intent(in) :: tolq

error tolerance for dq integration

integer, intent(in) :: methodx

quadrature method to use for x

integer, intent(in) :: methody

quadrature method to use for y

integer, intent(in) :: methodz

quadrature method to use for z

integer, intent(in) :: methodq

quadrature method to use for q


Contents


Source Code

    subroutine initialize_integration_class_4d(me,fxyzq,&
                                               xl,xu,yl,yu,zl,zu,ql,qu,&
                                               tolx,toly,tolz,tolq,&
                                               methodx,methody,methodz,methodq)

    implicit none

    class(integration_class_4d),intent(inout) :: me
    procedure(func_4d)     :: fxyzq    !! 4d function: f(x,y,z,q)
    real(wp),intent(in)    :: xl       !! x integration lower bound
    real(wp),intent(in)    :: xu       !! x integration upper bound
    real(wp),intent(in)    :: yl       !! y integration lower bound
    real(wp),intent(in)    :: yu       !! y integration upper bound
    real(wp),intent(in)    :: zl       !! z integration lower bound
    real(wp),intent(in)    :: zu       !! z integration upper bound
    real(wp),intent(in)    :: ql       !! q integration lower bound
    real(wp),intent(in)    :: qu       !! q integration upper bound
    real(wp),intent(in)    :: tolx     !! error tolerance for dx integration
    real(wp),intent(in)    :: toly     !! error tolerance for dy integration
    real(wp),intent(in)    :: tolz     !! error tolerance for dz integration
    real(wp),intent(in)    :: tolq     !! error tolerance for dq integration
    integer,intent(in)     :: methodx  !! quadrature method to use for x
    integer,intent(in)     :: methody  !! quadrature method to use for y
    integer,intent(in)     :: methodz  !! quadrature method to use for z
    integer,intent(in)     :: methodq  !! quadrature method to use for q

    procedure(func_1d),pointer :: dummy => null() !! these will be set in [[integrate_3d]]

    me%fxyzq => fxyzq  !the user-defined f(x,y,z,q) function to integrate

    ! individual integrators:
    call me%ix%initialize(dummy,xl,xu,tolx,methodx)
    call me%iy%initialize(dummy,yl,yu,toly,methody)
    call me%iz%initialize(dummy,zl,zu,tolz,methodz)
    call me%iq%initialize(dummy,ql,qu,tolq,methodq)

    end subroutine initialize_integration_class_4d