Meshing#
- class Mesh(mesh=None, volume_markers=None, surface_markers=None, type='cartesian')[source]#
Bases:
objectMesh class
- Parameters:
mesh (fenics.Mesh, optional) – the mesh. Defaults to None.
volume_markers (fenics.MeshFunction, optional) – markers of the mesh cells. Defaults to None.
surface_markers (fenics.MeshFunction, optional) – markers of the mesh facets. Defaults to None.
type (str, optional) – “cartesian”, “cylindrical” or “spherical”. Defaults to “cartesian”.
- Variables:
mesh (fenics.Mesh) – the mesh
volume_markers (fenics.MeshFunction) – markers of the mesh cells
surface_markers (fenics.MeshFunction) – markers of the mesh facets
dx (fenics.Measure)
ds (fenics.Measure)
- class Mesh1D(**kwargs)[source]#
Bases:
Mesh1D Mesh
- Variables:
size (float) – the size of the 1D mesh
start (float) – the starting point of the 1D mesh
- define_markers(materials)[source]#
Iterates through the mesh and mark them based on their position in the domain
- Parameters:
materials (materials {festim.Materials} -- contains the)
- define_surface_markers()[source]#
Creates the surface markers
- Returns:
- the meshfunction containing the surface
markers
- Return type:
fenics.MeshFunction
- define_volume_markers(materials)[source]#
Creates the volume markers
- Parameters:
materials (festim.Materials) – the materials
- Returns:
- the meshfunction containing the volume
markers
- Return type:
fenics.MeshFunction
- class MeshFromVertices(vertices, **kwargs)[source]#
Bases:
Mesh1DDescription of MeshFromVertices
- Parameters:
vertices (list) – the mesh vertices
- Variables:
vertices (list) – the mesh vertices
size (type) – the size of the 1D mesh
- class MeshFromXDMF(volume_file, boundary_file, **kwargs)[source]#
Bases:
MeshMesh read from XDMF files
- Parameters:
volume_file (str) – path to the volume file
boundary_file (str) – path the boundary file
- Variables:
volume_file (str) – name of the volume file
boundary_file (str) – name of the boundary file
mesh (fenics.Mesh) – the mesh