cashocs.geometry.boundary_distance#
Compute the distance to the boundary.
Functions

Computes (an approximation of) the distance to the boundary. 
 cashocs.geometry.boundary_distance.compute_boundary_distance(mesh, boundaries=None, boundary_idcs=None, tol=0.1, max_iter=10)[source]#
Computes (an approximation of) the distance to the boundary.
The function iteratively solves the Eikonal equation to compute the distance to the boundary.
The user can specify which boundaries are considered for the distance computation by specifying the parameters boundaries and boundary_idcs. Default is to consider all boundaries.
 Parameters:
mesh (fenics.Mesh) – The dolfin mesh object, representing the computational domain
boundaries (fenics.MeshFunction  None) – A meshfunction for the boundaries, which is needed in case specific boundaries are targeted for the distance computation (while others are ignored), default is None (all boundaries are used).
boundary_idcs (List[int  str]  None) – A list of indices which indicate, which parts of the boundaries should be used for the distance computation, default is None (all boundaries are used).
tol (float) – A tolerance for the iterative solution of the eikonal equation. Default is 1e1.
max_iter (int) – Number of iterations for the iterative solution of the eikonal equation. Default is 10.
 Returns:
A fenics function representing an approximation of the distance to the boundary.
 Return type:
fenics.Function