SfePy NTC

Previous topic

sfepy.discrete.common.region module

Next topic

sfepy.discrete.fem.extmods._fmfield module

This Page

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 nodes ordering giving positive element volume.

The groups with elements of lower dimension than the space dimension are skipped.

get_cell_offsets()[source]
get_diameter()[source]

Return the diameter of the domain.

Notes

The diameter corresponds to the Friedrichs constant.

get_element_diameters(ig, cells, vg, mode, square=True)[source]
get_evaluate_cache(cache=None, share_geometry=False)[source]

Get the evaluate cache for Variable.evaluate_at().

Parameters:

cache : Struct instance, optional

Optionally, use the provided instance to store the cache data.

share_geometry : bool

Set to True to indicate that all the probes will work on the same domain. Certain data are then computed only for the first probe and cached.

Returns:

cache : Struct instance

The evaluate cache.

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.

iter_groups(igs=None)[source]
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!

setup_groups()[source]