Collection: Trinagular surface¶
Predefined class for boundary integral equation in 3-dimensional space. Stores triangulation as well as normals. Uses inertial bisection of collocation points to build cluster tree.
-
class
h2tools.collections.triangular_surface.
TriangularSurface
(vertex, triangle, collocation=None, area=None, normal=None)¶ Triangulization of surface, defined by triangles and normals.
Surface is assumed to be in 3-dimensional space. Uses inertial bisection of collocation points to build cluster tree.
Parameters: vertex : 2-dimensional array
Coordinates of vertices. Shape is (3, vertex_count), where vertex_count is a total number of vertices.
triangle : 1-dimensioanl array
triangle[3*i:3*i+3] correspond to indexes of vertices of i-th triangle.
collocation : 2-dimensional array, optional
Coordinates of collocation points. Shape is (3, count), where count is a total number of triangles.
area : 1-dimensional array, optional
area of each triangle.
normal : 2-dimensional array, optional
normal of each triangle. Shape is the same as collocation.
-
check_far
(self_aux, other_aux)¶ Checks if two bounding boxes are far or close.
If maximum diagonal of bounding boxes is larger, than distance between centers of bounding boxes, then bounding boxes are assumed to be far and function returns True.
Parameters: self_aux, other_aux : numpy.ndarray of shape (2, ndim)
Each bounding box contains minimum values of corresponding coordinates in [0,:] and maximum values of corresponding coordinates in [1,:].
Returns: boolean
True if bounding boxes are far, False otherwise.
-
compute_aux
(index)¶ Computes bounding box of cluster, corresponding to index.
-
divide
(index)¶ Divides cluster, corresponding to indexes index.
Clusters is divided by inertial bisection procedure, applied to collocation points of discrete elements.
-
static
from_dat
(f)¶ Reads triangular surface from .dat files (in special format).
-
-
h2tools.collections.triangular_surface.
integral_inverse_r3
(data1, list1, data2, list2)¶ Returns pairwise integrals of r^{-3} over corresponding areas.
Each integral is calculated from collocation point of triangles of data1 over areas of triangles of data2.
Parameters: data1 : TringularSurface
Surface grid.
list1 : 1-dimensional array
Indexes of triangles from data1.
data2 : TriangularSurface
Surface grid.
list2 : 1-dimensional array
Indexes of triangles from data2.