zoomy_core.mesh.fvm_mesh

zoomy_core.mesh.fvm_mesh#

FVMMesh: BaseMesh with cached cell/face geometry for finite-volume solvers.

Module Contents#

Classes#

FVMMesh

BaseMesh plus precomputed cell centers, volumes, inradii and face normals, volumes, centers.

API#

class zoomy_core.mesh.fvm_mesh.FVMMesh(**kwargs)#

Bases: zoomy_core.mesh.base_mesh.BaseMesh

BaseMesh plus precomputed cell centers, volumes, inradii and face normals, volumes, centers.

Initialization

Create the mesh from its topology arrays and normalise boundary faces so face_cells[0] is the inner cell.

cell_centers_computed() → numpy.ndarray#

Return the cached cell centers.

cell_volumes_computed() → numpy.ndarray#

Return the cached cell volumes.

cell_inradius_computed() → numpy.ndarray#

Return the cached cell inradii.

face_normals_computed() → numpy.ndarray#

Return the cached face normals.

face_volumes_computed() → numpy.ndarray#

Return the cached face areas.

face_centers_computed() → numpy.ndarray#

Return the cached face centers.

property cell_centers#

Cached cell centers.

property cell_volumes#

Cached cell volumes.

property cell_inradius#

Cached cell inradii.

property face_normals#

Cached face normals.

property face_volumes#

Cached face areas.

property face_centers#

Cached face centers.

classmethod from_base(base: zoomy_core.mesh.base_mesh.BaseMesh) → zoomy_core.mesh.fvm_mesh.FVMMesh#

Build an FVMMesh by computing the geometry of a BaseMesh (vectorised for supported cell types).

classmethod from_msh(filepath: str) → zoomy_core.mesh.fvm_mesh.FVMMesh#

Load a gmsh .msh file as an FVMMesh.

classmethod from_hdf5(filepath: str) → zoomy_core.mesh.fvm_mesh.FVMMesh#

Load an HDF5 mesh as an FVMMesh.

classmethod create_1d(domain: tuple, n_inner_cells: int) → zoomy_core.mesh.fvm_mesh.FVMMesh#

Structured 1D FVMMesh on domain with n_inner_cells cells.

classmethod create_2d(domain: tuple, nx: int, ny: int) → zoomy_core.mesh.fvm_mesh.FVMMesh#

Structured 2D FVMMesh on domain with nx x ny cells.

classmethod create_3d(domain: tuple, nx: int, ny: int, nz: int) → zoomy_core.mesh.fvm_mesh.FVMMesh#

Structured 3D FVMMesh on domain with nx x ny x nz cells.