Initialize the 2D integration class. Must be called before integration is performed.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integration_class_2d), | intent(inout) | :: | me | |||
procedure(func_2d) | :: | fxy | 2d function: f(x,y) |
|||
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) | :: | tolx | error tolerance for dx integration |
||
real(kind=wp), | intent(in) | :: | toly | error tolerance for dy integration |
||
integer, | intent(in) | :: | methodx | quadrature method to use for x |
||
integer, | intent(in) | :: | methody | quadrature method to use for y |
subroutine initialize_integration_class_2d(me,fxy,&
xl,xu,yl,yu,&
tolx,toly,&
methodx,methody)
implicit none
class(integration_class_2d),intent(inout) :: me
procedure(func_2d) :: fxy !! 2d function: f(x,y)
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) :: tolx !! error tolerance for dx integration
real(wp),intent(in) :: toly !! error tolerance for dy integration
integer,intent(in) :: methodx !! quadrature method to use for x
integer,intent(in) :: methody !! quadrature method to use for y
procedure(func_1d),pointer :: dummy => null() !! these will be set in [[integrate_2d]]
me%fxy => fxy !the user-defined f(x,y) function to integrate
! individual integrators:
call me%ix%initialize(dummy,xl,xu,tolx,methodx)
call me%iy%initialize(dummy,yl,yu,toly,methody)
end subroutine initialize_integration_class_2d