porepy.fracs.tools module
Technical tools used in treatment of fractures.
This can be thought of as a module for backend utility functions, as opposed to the frontend functions found in utils.
- determine_mesh_size(pts, pts_on_boundary=None, lines=None, **kwargs)[source]
Set the preferred mesh size for geometrical points as specified by gmsh. :param pts: The points which will be passed to Gmsh. Array size
2 x n_pts.
- Parameters
pts_on_boundary (
logical array
) – Indicates which (True) of the pts are constitute the domain boundary (corners). Only relevant if mesh_size_bound is defined as a kw (see below).lines (
integer array
) – Definition and tags of the boundary and fracture lines. Size 4 x n_points, two first are pointers to pts and two last are line tags.
The mesh size is determined through the three parameters (all passed as kwargs):
- mesh_size_frac: Ideal mesh size. Will be added to all points that are
sufficiently far away from other points.
- mesh_size_min: Minimal mesh size; we will make no attempts to enforce
even smaller mesh sizes upon Gmsh.
mesh_size_bound: Boundary mesh size. Will be added to the points
defining the boundary. If included, pts_on_boundary is mandatory.
See the gmsh manual for further details.
- obtain_interdim_mappings(lg, fn, n_per_face)[source]
Find mappings between faces in higher dimension and cells in the lower dimension
- Parameters
lg (
pp.Grid
) – Lower dimensional grid.fn (
pp.Grid
) – Higher dimensional face-node relation.n_per_face (
int
) – Number of nodes per face in the higher-dimensional grid.
- Returns
- Index of faces in the higher-dimensional grid that correspond
to a cell in the lower-dimensional grid.
np.array: Index of the corresponding cells in the lower-dimensional grid.
- Return type
np.array