porepy.fracs.line_fracture module
Contains classes representing fractures of 1D, i.e. manifolds of dimension 1 embedded in 2D.
- class LineFracture(points, index=None, sort_points=True)[source]
Bases:
Fracture
A class representing linear fracture in 2D.
- compute_centroid()[source]
Method for computing the centroid of the fracture.
- Returns
Array containing the 2D coordinates of the centroid.
- Return type
- compute_normal()[source]
Method computing normal vectors of the fracture
Returns
- numpy.ndarray(2 x 1)
Normal vector of the fracture.
- Return type
- local_coordinates()[source]
Method for computing the 1d vertex coordinates in a local system.
The first coordinate is set at x=0, the second at x=self.length().
Returns
- numpy.ndarray(1 x 2)
The coordinates of the two vertices in the single local dimension.
- Return type
- sort_points()[source]
Sort the vertices.
For fractures defined by a two-vertex line segment, sorting is trivial. Returns ——- numpy.ndarray(dtype=int)
The indices corresponding to the sorting.
- Return type
- center: np.ndarray
Centroid of the fracture (shape=(nd, )).
- index: Optional[int]
Index of fracture.
Intended use in
FractureNetwork2d
andFractureNetwork3d
. Exact use is not clear (several fractures can be given same index), use with care.
- normal: np.ndarray
Normal vector (shape=(nd, )).
- orig_pts: np.ndarray
Original fracture vertices (shape=(nd, num_points)).
The original points are kept in case the fracture geometry is modified.
- pts: np.ndarray
Fracture vertices (shape=(nd, num_points)), stored in the implemented order.
Note that the
points
passed to init will mutate.