sfepy.discrete.fem.domain module

Computational domain, consisting of the mesh and regions.

class sfepy.discrete.fem.domain.FEDomain(name, mesh, verbose=False, **kwargs)[source]

Domain is divided into groups, whose purpose is to have homogeneous data shapes.

clear_surface_groups()[source]

Remove surface group data.

create_surface_group(region)[source]

Create a new surface group corresponding to region if it does not exist yet.

Notes

Surface groups define surface facet connectivity that is needed for sfepy.discrete.fem.mappings.FEMapping.

fix_element_orientation(geom_els=None, force_check=False)[source]

Ensure element vertices ordering giving positive cell volumes.

get_conn(ret_gel=False, tdim=None, cells=None)[source]

Get the cell-vertex connectivity and, if ret_gel is True, also the corresponding reference geometry element. If tdim is not None get the connectivity of the cells with topological dimension tdim.

get_diameter()[source]

Return the diameter of the domain.

Notes

The diameter corresponds to the Friedrichs constant.

get_element_diameters(cells, volume, mode, square=True)[source]
get_mesh_bounding_box()[source]

Return the bounding box of the underlying mesh.

Returns:
bboxndarray (2, dim)

The bounding box with min. values in the first row and max. values in the second row.

get_mesh_coors(actual=False)[source]

Return the coordinates of the underlying mesh vertices.

refine()[source]

Uniformly refine the domain mesh.

Returns:
domainFEDomain instance

The new domain with the refined mesh.

Notes

Works only for meshes with single element type! Does not preserve node groups!