.. _physics-computationalDomainVolumeIntegrator: Computational Domain Volume Integrators ======================================= Class providing numerical volume integrators over computational domains, computing the integral of a scalar function over the spatial domain. This is used e.g.\ to compute total emission or absorption from all cells, or to normalize radiative transfer solutions. Implementations provide the total domain volume and perform multi-dimensional quadrature using the domain's coordinate system (Cartesian, spherical, etc.). **Default implementation:** ``computationalDomainVolumeIntegratorCartesian3D`` Methods ------- ``volume`` → ``double precision`` Returns the total volume of the integration region defined by the domain boundaries, used for normalizing volume-averaged quantities in the radiative transfer calculation. ``integrate`` → ``double precision`` Numerically integrate a scalar function over the full extent of the computational domain using the appropriate coordinate system (Cartesian, cylindrical, or spherical), returning the total integral value. * ``procedure(computationalDomainVolumeIntegrand) :: integrand`` .. _physics-computationalDomainVolumeIntegratorCartesian3D: ``computationalDomainVolumeIntegratorCartesian3D`` -------------------------------------------------- Computes volume integrals over three-dimensional Cartesian grid cells, with the spatial extent of the domain defined by ``[xBoundaries]``, ``[yBoundaries]``, and ``[zBoundaries]``. Each cell volume is the product of its axis-aligned extents, enabling accurate integration of physical quantities over the full Cartesian domain. **(Default implementation)** **Parameters** * ``[xBoundaries]`` (real; default ``[-1.0d0,+1.0d0]``) — A two-element array :math:`[x_\mathrm{min}, x_\mathrm{max}]` specifying the extent of the 3D Cartesian integration domain along the :math:`x`-axis. * ``[yBoundaries]`` (real; default ``[-1.0d0,+1.0d0]``) — A two-element array :math:`[y_\mathrm{min}, y_\mathrm{max}]` specifying the extent of the 3D Cartesian integration domain along the :math:`y`-axis. * ``[zBoundaries]`` (real; default ``[-1.0d0,+1.0d0]``) — A two-element array :math:`[z_\mathrm{min}, z_\mathrm{max}]` specifying the extent of the 3D Cartesian integration domain along the :math:`z`-axis. .. _physics-computationalDomainVolumeIntegratorCylindrical: ``computationalDomainVolumeIntegratorCylindrical`` -------------------------------------------------- Computes volume integrals over cylindrical grid cells, accounting for the annular geometry of each cell. The radial and vertical extents of the domain are specified by ``[rBoundaries]`` and ``[zBoundaries]``, with cell volumes computed from the cylindrical shell geometry. **Methods** * ``sampleNode`` **Parameters** * ``[rBoundaries]`` (real; default ``[0.0d0,1.0d0]``) — A two-element array :math:`[r_\mathrm{min}, r_\mathrm{max}]` specifying the radial extent of the cylindrical integration domain. * ``[zBoundaries]`` (real; default ``[-1.0d0,+1.0d0]``) — A two-element array :math:`[z_\mathrm{min}, z_\mathrm{max}]` specifying the vertical extent of the cylindrical integration domain along the symmetry axis. .. _physics-computationalDomainVolumeIntegratorSpherical: ``computationalDomainVolumeIntegratorSpherical`` ------------------------------------------------ Computes volume integrals over spherical shell cells, with the radial boundaries of the domain specified by ``[boundaries]``. Cell volumes are computed from the difference of the enclosed spherical volumes at the inner and outer radial boundaries of each shell. **Methods** * ``next`` — Move to the next cell in the domain. **Parameters** * ``[boundaries]`` (real; default ``[0.0d0,1.0d0]``) — A two-element array :math:`[r_\mathrm{min}, r_\mathrm{max}]` specifying the radial extent of the spherically symmetric integration domain.