two_dimensional

DGFEM

class reyna.geometry.two_dimensional.DGFEM.DGFEMGeometry(poly_mesh: PolyMesh, **kwargs)

Bases: object

This is a geometry function which provides all the additional mesh information that a DGFEM method requires to run; normal vectors, subtriagulations etc.

mesh

The underlying computational domain.

Type:

PolyMesh

n_nodes

The number of vertices in the mesh.

Type:

int

n_elements

The number of elements in the mesh.

Type:

int

nodes

The vertices of the mesh. This is a variable used for ease later.

Type:

np.ndarray

elem_bounding_boxes

The cartesian bounding boxes of the elements.

Type:

Optional[list]

boundary_edges

The indecies of the boundary edges to all edges.

Type:

Optional[np.ndarray]

boundary_edges_to_element

The conversion from the boundary edges to the elements.

Type:

Optional[np.ndarray]

interior_edges

The indecies of the interior edges to all edges.

Type:

Optional[np.ndarray]

interior_edges_to_element

The conversion from the interior edges to the elements.

Type:

Optional[np.ndarray]

boundary_normals

The normals to the corresponding boundary edges.

Type:

Optional[np.ndarray]

interior_normals

The normals to the corresponding interior edges.

Type:

Optional[np.ndarray]

subtriangulation

The subtriagulations of the computational domain.

Type:

Optional[np.ndarray]

n_triangles

The number of triangles in the subtriangulation of the computational domain.

Type:

Optional[int]

triangle_to_polygon

The conversion from triangles to polygons.

Type:

Optional[np.ndarray]

h

The maximal cell diameter.

Type:

Optional[float]

h_s

The array of cell diameters (.h being the maximum of this array).

Type:

Optional[np.ndarray]

areas

The array of cell areas.

Type:

Optional[np.ndarray]

Notes

  • We do note here that this only works for convex elements. This is a guarentee given the PolyMesh object, but user-defined meshes may not work as required and may require further computation.

save_geometry(filepath: str, save_mesh: bool = False)

Thie function allows saving of the geometry in a .pkl file.

Parameters:
  • filepath (str) – The filepath which the data is to be saved.

  • save_mesh (bool) – Whether the mesh object should also be saved if not saved already.

agglomeration