sfepy.discrete.common.mappings module¶
Reference-physical domain mappings.
- class sfepy.discrete.common.mappings.Mapping(**kwargs)[source]¶
Base class for mappings.
- static from_args(region, kind='v')[source]¶
Create mapping from reference to physical entities in a given region, given the integration kind (‘v’ or ‘s’).
This mapping can be used to compute the physical quadrature points.
- Parameters:
- regionRegion instance
The region defining the entities.
- kind‘v’ or ‘s’
The kind of the entities: ‘v’ - cells, ‘s’ - facets.
- Returns:
- mappingFEMapping or IGMapping instance
The requested mapping.
- class sfepy.discrete.common.mappings.PhysicalQPs(num=0)[source]¶
Physical quadrature points in a region.
- class sfepy.discrete.common.mappings.PyCMapping(bf, det, volume, bfg, normal, dim)[source]¶
Class for storing mapping data. Primary data in numpy arrays. Data for C functions translated to FMFields and embedded in CMapping.
- sfepy.discrete.common.mappings.get_jacobian(field, integral, region=None, integration='volume')[source]¶
Get the jacobian of reference mapping corresponding to field.
- Parameters:
- fieldField instance
The field defining the reference mapping.
- integralIntegral instance
The integral defining quadrature points.
- regionRegion instance, optional
If given, use the given region instead of field region.
- integrationone of (‘volume’, ‘surface’, ‘surface_extra’)
The integration type.
- Returns:
- jacarray
The jacobian merged for all element groups.
See also
Notes
Assumes the same element geometry in all element groups of the field!
- sfepy.discrete.common.mappings.get_mapping_data(name, field, integral, region=None, integration='volume')[source]¶
General helper function for accessing reference mapping data.
Get data attribute name from reference mapping corresponding to field in region in quadrature points of the given integral and integration type.
- Parameters:
- namestr
The reference mapping attribute name.
- fieldField instance
The field defining the reference mapping.
- integralIntegral instance
The integral defining quadrature points.
- regionRegion instance, optional
If given, use the given region instead of field region.
- integrationone of (‘volume’, ‘surface’, ‘surface_extra’)
The integration type.
- Returns:
- dataarray
The required data merged for all element groups.
Notes
Assumes the same element geometry in all element groups of the field!
- sfepy.discrete.common.mappings.get_normals(field, integral, region)[source]¶
Get the normals of element faces in region.
- Parameters:
- fieldField instance
The field defining the reference mapping.
- integralIntegral instance
The integral defining quadrature points.
- regionRegion instance
The given of the element faces.
- Returns:
- normalsarray
The normals merged for all element groups.
See also
Notes
Assumes the same element geometry in all element groups of the field!