pygeon.grids.md_grid module
Module for the MixedDimensionalGrid class.
- class pygeon.grids.md_grid.MixedDimensionalGrid[source]
Bases:
MixedDimensionalGridRepresents a mixed-dimensional grid.
This class extends the functionality of the pp.MixedDimensionalGrid class. It provides methods for initializing the grid, computing geometry, and tagging mesh entities.
- compute_geometry()[source]
Compute geometric entities and tags for the subdomains and interfaces.
This method iterates over the subdomains and interfaces of the grid and computes their geometric entities and tags. It calls the compute_geometry method of each subdomain and interface, passing the necessary parameters. Finally, it tags the leaf nodes of the grid.
- Parameters:
None
- Returns:
None
- num_subdomain_faces(cond=None)[source]
Compute the total number of faces of the mixed-dimensional grid.
A function can be passed to filter subdomains and/or interfaces.
- Parameters:
cond – Callable, predicate with a grid as input.
- Returns:
The total number of faces of the mixed-dimensional grid.
- Return type:
- num_subdomain_ridges(cond=None)[source]
Compute the total number of ridges in the mixed-dimensional grid.
A function can be passed to filter subdomains and/or interfaces.
- Parameters:
cond – Callable. A predicate function that takes a grid as input.
- Returns:
The total number of ridges in the mixed-dimensional grid.
- Return type:
- num_subdomain_peaks(cond=None)[source]
Compute the total number of peaks in the mixed-dimensional grid.
A function can be passed to filter subdomains and/or interfaces.
- Parameters:
cond – Callable. A predicate function that takes a grid as input.
- Returns:
The total number of peaks in the mixed-dimensional grid.
- Return type:
- tag_leafs()[source]
Tag the mesh entities that correspond to a mesh entity of a lower-dimensional grid in a grid bucket. TODO: Use these tags to generate mixed-dimensional inner products.
- Parameters:
None
- Returns:
None