Skip to content

Datastructures

datastructures

fimjax.util.datastructures.Mesh

dataclass for holding everything that belongs to the mesh. Note that this only supports keyword arguments due to Chex. Use it like: mesh = Mesh(points=points, elements=elements)

N: Number of elements in a mesh (i.e. triangles) d_e: Number of points in an element M: Number of points in a mesh d: Dimension of the underlying space

Attributes:

Name Type Description
points np.ndarray

[M, d] array of points

elements np.ndarray

[N, d_e] array of indices into points that correspond to elements in a mesh

points_triangle np.ndarray

[N, d_e, d] like elements, but with the points instead of indices

__init__

__init__(points: np.ndarray, elements: np.ndarray)

Constructor.

Parameters:

Name Type Description Default
points np.ndarray

[M, d] array of points

required
elements np.ndarray

[N] array of

required

fimjax.util.datastructures.InitialValues

Initial values for an Eikonal PDE.

Attributes:

Name Type Description
locations np.ndarray

[X] array of indices into a mesh that point to the initial value locations

values np.ndarray

[X] array of values of the initial values

fimjax.util.datastructures.FIMSolution

Holds the information on a FIMSolution.

Attributes:

Name Type Description
solution np.ndarray

solution

iterations int

number of iterations

has_converged bool

flag if the solution has converged

has_converged_after int

number of iterations needed for convergence