ffc.tensor package¶
Submodules¶
ffc.tensor.costestimation module¶
ffc.tensor.geometrytensor module¶
ffc.tensor.monomialextraction module¶
Extraction of monomial representations of UFL forms.
-
class
ffc.tensor.monomialextraction.
Monomial
(arg=None)[source]¶ Bases:
object
This class represents a product of monomial factors.
-
exception
ffc.tensor.monomialextraction.
MonomialException
(*args, **kwargs)[source]¶ Bases:
Exception
Exception raised when monomial extraction fails.
-
class
ffc.tensor.monomialextraction.
MonomialFactor
(arg=None)[source]¶ Bases:
object
This class represents a monomial factor, that is, a derivative of a scalar component of a basis function.
-
class
ffc.tensor.monomialextraction.
MonomialForm
[source]¶ Bases:
object
This class represents a monomial form, that is, a sum of integrals, each represented as a MonomialSum.
-
class
ffc.tensor.monomialextraction.
MonomialSum
(arg=None)[source]¶ Bases:
object
This class represents a sum of monomials.
-
class
ffc.tensor.monomialextraction.
MonomialTransformer
(function_replace_map=None)[source]¶ Bases:
ufl.algorithms.transformer.ReuseTransformer
This class defines the transformation rules for extraction of a monomial form represented as a MonomialSum from a UFL integral.
-
ffc.tensor.monomialextraction.
extract_monomial_form
(integrands, function_replace_map)[source]¶ Extract monomial representation of form (if possible). When successful, the form is represented as a sum of products of scalar components of basis functions or derivatives of basis functions. If unsuccessful, MonomialException is raised.
ffc.tensor.monomialintegration module¶
This module implements efficient integration of monomial forms.
ffc.tensor.monomialtransformation module¶
Transformation of monomial representations of UFL forms.
-
class
ffc.tensor.monomialtransformation.
MonomialArgument
(element, index, components, derivatives, restriction)[source]¶ Bases:
object
This class represents a monomial argument, that is, a derivative of a scalar component of a basis function on the reference element.
-
class
ffc.tensor.monomialtransformation.
MonomialCoefficient
(index, number)[source]¶ Bases:
object
This class represents a coefficient in a monomial.
-
class
ffc.tensor.monomialtransformation.
MonomialDeterminant
(power=None, restriction=None)[source]¶ Bases:
object
This class representes a determinant factor in a monomial.
-
class
ffc.tensor.monomialtransformation.
MonomialIndex
(index=None, index_type=None, index_range=None, index_id=None)[source]¶ Bases:
object
This class represents a monomial index. Each index has a type, a range and a unique id. Valid index types are listed below.
-
EXTERNAL
= 'external'¶
-
FIXED
= 'fixed'¶
-
INTERNAL
= 'internal'¶
-
PRIMARY
= 'primary'¶
-
SECONDARY
= 'secondary'¶
-
-
class
ffc.tensor.monomialtransformation.
MonomialTransform
(index0, index1, transform_type, restriction, offset)[source]¶ Bases:
object
This class represents a transform (mapping derivative) in a form.
-
J
= 'J'¶
-
JINV
= 'JINV'¶
-
ffc.tensor.multiindex module¶
-
class
ffc.tensor.multiindex.
MultiIndex
(dims)[source]¶ Bases:
object
A MultiIndex represents a list of indices and holds the following data:
rank - rank of multiindex dims - a list of dimensions indices - a list of all possible multiindex values
ffc.tensor.referencetensor module¶
ffc.tensor.tensorgenerator module¶
Code generator for tensor representation
ffc.tensor.tensoroptimization module¶
ffc.tensor.tensorreordering module¶
Reordering of entries in reference tensor for interior facets.
ffc.tensor.tensorrepresentation module¶
This module implements the representation of a multilinear form as a sum of tensor contractions.
The following possible optimizations are currently not implemented but might be (re-)implemented in a future version of FFC
- Factorization of common reference tensors