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.SurfaceMapping.

fix_element_orientation()[source]

Ensure element vertices ordering giving positive cell volumes.

get_conn(ret_gel=False)[source]

Get the cell-vertex connectivity and, if ret_gel is True, also the corresponding reference geometry element.

get_diameter()[source]

Return the diameter of the domain.

Notes

The diameter corresponds to the Friedrichs constant.

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

Return the bounding box of the underlying mesh.

Returns:
bbox : ndarray (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:
domain : FEDomain instance

The new domain with the refined mesh.

Notes

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