Important attributes of continuous (order > 0) Field and SurfaceField instances:
where conn is the mesh vertex connectivity, econn is the region-local field connectivity.
Base class for finite element fields.
Notes
Create a mesh from the field region, optionally including the field extra nodes.
Convert the DOFs corresponding to the field to a dictionary of output data usable by Mesh.write().
| Parameters: | dofs : array, shape (n_nod, n_component)
var_name : str
dof_names : tuple of str
key : str, optional
extend : bool
fill_value : float or complex
linearization : Struct or None
|
|---|---|
| Returns: | out : dict
|
Extend DOFs to the whole domain using the fill_value, or the smallest value in dofs if fill_value is None.
Create a Field subclass instance corresponding to a given space.
| Parameters: | name : str
dtype : numpy.dtype
shape : int/tuple/str
region : Region
approx_order : int/str
space : str
poly_space_base : str
|
|---|
Notes
Assumes one cell type for the whole region!
Create a Field subclass instance based on the configuration.
Get coordinates of the field nodes.
| Parameters: | nods : array, optional
|
|---|
Return indices of DOFs that belong to the given region.
Return indices of DOFs that belong to the given region and group.
For given region, integral and integration type, get a reference mapping, i.e. jacobians, element volumes and base function derivatives for Volume-type geometries, and jacobians, normals and base function derivatives for Surface-type geometries corresponding to the field approximation.
The mappings are cached in the field instance in mappings attribute. The mappings can be saved to mappings0 using Field.save_mappings. The saved mapping can be retrieved by passing get_saved=True. If the required (saved) mapping is not in cache, a new one is created.
| Returns: | geo : VolumeGeometry or SurfaceGeometry instance
mapping : VolumeMapping or SurfaceMapping instance
key : tuple
|
|---|
Get the true approximation order depending on the reference element geometry.
For example, for P1 (linear) approximation the true order is 1, while for Q1 (bilinear) approximation in 2D the true order is 2.
Interpolate DOFs into quadrature points.
The quadrature order is given by the field approximation order.
| Parameters: | dofs : array
|
|---|---|
| Returns: | data_qp : array
integral : Integral
|
Linearize the solution for post-processing.
| Parameters: | dofs : array, shape (n_nod, n_component)
min_level : int
max_level : int
eps : float
|
|---|---|
| Returns: | mesh : Mesh instance
vdofs : array
levels : array of ints
|
Finite element field base class over surface (element dimension is one less than space dimension).
Average data given in quadrature points in region elements into region vertices.
Finite element field base class over volume elements (element dimension equals space dimension).
Average data given in quadrature points in region elements into region vertices.
Given element a node connectivity, create the dof connectivity.
Create output mesh and data for the expression using the adaptive linearizer.
| Parameters: | expression : str
name : str
primary_field_name : str
fields : dict
materials : Materials instance
variables : Variables instance
functions : Functions instance, optional
mode : one of ‘eval’, ‘el_avg’, ‘qp’
term_mode : str
extra_args : dict, optional
verbose : bool
kwargs : dict, optional
min_level : int
max_level : int
eps : float
|
|---|---|
| Returns: | out : dict
|
Get the function for evaluating an expression given a list of elements, and reference element coordinates.
Parse the uniform approximation order value (str or int).