double integration class: for 3d integration of f(x,y,z)
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
procedure(func_3d), | public, | pointer | :: | fxyz | => | null() | function |
type(integration_class_1d), | public | :: | iz | for the dz integration |
|||
type(integration_class_1d), | public | :: | iy | for the dy integration |
|||
type(integration_class_1d), | public | :: | ix | for the dx integration |
to set up the class
Initialize the 3D integration class. Must be called before integration is performed.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integration_class_3d), | intent(inout) | :: | me | |||
procedure(func_3d) | :: | fxyz | 3d function: f(x,y,z) |
|||
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) | :: | 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 |
||
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 |
to integrate the function fxyz
Perform the 3D integration.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(integration_class_3d), | intent(inout) | :: | me | |||
real(kind=wp), | intent(out) | :: | ans | |||
integer, | intent(out) | :: | ierr | |||
real(kind=wp), | intent(out) | :: | err |
type,extends(integration_class),public :: integration_class_3d
!! double integration class: for 3d integration of `f(x,y,z)`
private
procedure(func_3d),pointer :: fxyz => null() !! function `f(x,y,z)` to be integrated
type(integration_class_1d) :: iz !! for the dz integration
type(integration_class_1d) :: iy !! for the dy integration
type(integration_class_1d) :: ix !! for the dx integration
contains
private
procedure,public :: initialize => initialize_integration_class_3d !! to set up the class
procedure,public :: integrate => integrate_3d !! to integrate the function `fxyz`
end type integration_class_3d