volumential.geometry#

Geometry construction for volume FMM evaluations.

This module owns the bounding-box and box-FMM geometry factories that turn a box mesh into the tree, traversal and quadrature data a volume FMM run needs. BoundingBoxFactory decides the root box; BoxFMMGeometryFactory drives the mesh generator and tree builders and hands back an immutable BoxFMMGeometryData container.

class volumential.geometry.BoundingBoxFactory(dim: int, center: ndarray | None = None, radius: float | None = None, dtype: dtype | type = <class 'float'>)[source]#

Bases: object

Produces the root bounding box of a box FMM geometry.

The box is either fully prescribed by center and radius, or adapted to a mesh at call time. Calling the factory materializes lbounds and ubounds, which downstream code reads directly.

property materialized: bool#

Returns true if the bounding box is readily determined, i.e., the __call__() method has been called.

class volumential.geometry.BoxFMMGeometryFactory(cl_ctx, dim: int, order: int, nlevels: int, bbox_getter: BoundingBoxFactory, quadrature_formula=None, expand_to_hold_mesh=None, mesh_padding_factor: float = 0.05)[source]#

Bases: object

Builds the geometry information needed for performing volume FMM. The objects of this class is designed to be “interactive”, i.e., be manipulated repeatedly and on demand, produce a series of desired BoxFMMGeometryData objects.

cl_context#
A :class:`pyopencl.Context` object.
quadrature_formula#
The quadrature formula, a :class:`modepy.quadrature.Quadrature` object.
order#
The quadrature order.
nlevels#
The number of (initial) levels.
bbox_getter#
A :class:`volumential.geometry.BoundingBoxFactory` object.
engine#
Box mesh generator that implements the
:class:`volumential.meshgen.MeshGenBase` interface.
reinit(order: int | None = None, nlevels: int | None = None, quadrature_formula=None, expand_to_hold_mesh=None, mesh_padding_factor: float | None = None) → None[source]#

Resets the engine to its initial state, and optionally also changes some parameters.

property n_cells: int#

Upper bound on the number of cells the engine iterates over.

property n_active_cells: int#

Number of leaf cells currently carrying quadrature nodes.

property n_q_points_per_cell: int#

Number of quadrature nodes per cell.

class volumential.geometry.BoxFMMGeometryData(cl_context, q_points, q_weights, tree, trav)[source]#

Bases: FMMLibRotationData

A container class for geometric data associated with volume FMM evaluations. The objects of this class are treated as immutable.

nodes#
weights#
tree#
traversal#