ufl package¶
Subpackages¶
- ufl.algorithms package
- Submodules
- ufl.algorithms.ad module
- ufl.algorithms.analysis module
- ufl.algorithms.apply_algebra_lowering module
LowerCompoundAlgebra
LowerCompoundAlgebra.cofactor()
LowerCompoundAlgebra.cross()
LowerCompoundAlgebra.curl()
LowerCompoundAlgebra.determinant()
LowerCompoundAlgebra.deviatoric()
LowerCompoundAlgebra.div()
LowerCompoundAlgebra.dot()
LowerCompoundAlgebra.inner()
LowerCompoundAlgebra.inverse()
LowerCompoundAlgebra.nabla_div()
LowerCompoundAlgebra.nabla_grad()
LowerCompoundAlgebra.outer()
LowerCompoundAlgebra.perp()
LowerCompoundAlgebra.skew()
LowerCompoundAlgebra.sym()
LowerCompoundAlgebra.trace()
LowerCompoundAlgebra.transposed()
LowerCompoundAlgebra.ufl_type()
apply_algebra_lowering()
- ufl.algorithms.apply_derivatives module
BaseFormOperatorDerivativeRecorder
BaseFormOperatorDerivativeRuleset
CoordinateDerivativeRuleDispatcher
CoordinateDerivativeRuleDispatcher.coefficient_derivative()
CoordinateDerivativeRuleDispatcher.coordinate_derivative()
CoordinateDerivativeRuleDispatcher.derivative()
CoordinateDerivativeRuleDispatcher.expr()
CoordinateDerivativeRuleDispatcher.grad()
CoordinateDerivativeRuleDispatcher.reference_grad()
CoordinateDerivativeRuleDispatcher.terminal()
CoordinateDerivativeRuleset
CoordinateDerivativeRuleset.argument()
CoordinateDerivativeRuleset.coefficient()
CoordinateDerivativeRuleset.geometric_quantity()
CoordinateDerivativeRuleset.grad()
CoordinateDerivativeRuleset.jacobian()
CoordinateDerivativeRuleset.reference_grad()
CoordinateDerivativeRuleset.reference_value()
CoordinateDerivativeRuleset.spatial_coordinate()
DerivativeRuleDispatcher
DerivativeRuleDispatcher.base_form_coordinate_derivative()
DerivativeRuleDispatcher.base_form_operator_derivative()
DerivativeRuleDispatcher.coefficient_derivative()
DerivativeRuleDispatcher.coordinate_derivative()
DerivativeRuleDispatcher.derivative()
DerivativeRuleDispatcher.grad()
DerivativeRuleDispatcher.indexed()
DerivativeRuleDispatcher.reference_grad()
DerivativeRuleDispatcher.terminal()
DerivativeRuleDispatcher.ufl_type()
DerivativeRuleDispatcher.variable_derivative()
GateauxDerivativeRuleset
GateauxDerivativeRuleset.argument()
GateauxDerivativeRuleset.base_form_operator()
GateauxDerivativeRuleset.cell_avg()
GateauxDerivativeRuleset.coargument()
GateauxDerivativeRuleset.coefficient()
GateauxDerivativeRuleset.cofunction()
GateauxDerivativeRuleset.coordinate_derivative()
GateauxDerivativeRuleset.facet_avg()
GateauxDerivativeRuleset.geometric_quantity()
GateauxDerivativeRuleset.grad()
GateauxDerivativeRuleset.matrix()
GateauxDerivativeRuleset.reference_grad()
GateauxDerivativeRuleset.reference_value()
GenericDerivativeRuleset
GenericDerivativeRuleset.abs()
GenericDerivativeRuleset.acos()
GenericDerivativeRuleset.asin()
GenericDerivativeRuleset.atan()
GenericDerivativeRuleset.atan2()
GenericDerivativeRuleset.bessel_i()
GenericDerivativeRuleset.bessel_j()
GenericDerivativeRuleset.bessel_k()
GenericDerivativeRuleset.bessel_y()
GenericDerivativeRuleset.binary_condition()
GenericDerivativeRuleset.cell_avg()
GenericDerivativeRuleset.component_tensor()
GenericDerivativeRuleset.conditional()
GenericDerivativeRuleset.conj()
GenericDerivativeRuleset.constant()
GenericDerivativeRuleset.constant_value()
GenericDerivativeRuleset.cos()
GenericDerivativeRuleset.cosh()
GenericDerivativeRuleset.derivative()
GenericDerivativeRuleset.division()
GenericDerivativeRuleset.erf()
GenericDerivativeRuleset.exp()
GenericDerivativeRuleset.expr()
GenericDerivativeRuleset.facet_avg()
GenericDerivativeRuleset.form_argument()
GenericDerivativeRuleset.geometric_quantity()
GenericDerivativeRuleset.grad()
GenericDerivativeRuleset.imag()
GenericDerivativeRuleset.independent_operator()
GenericDerivativeRuleset.independent_terminal()
GenericDerivativeRuleset.index_sum()
GenericDerivativeRuleset.indexed()
GenericDerivativeRuleset.label()
GenericDerivativeRuleset.list_tensor()
GenericDerivativeRuleset.ln()
GenericDerivativeRuleset.math_function()
GenericDerivativeRuleset.max_value()
GenericDerivativeRuleset.min_value()
GenericDerivativeRuleset.multi_index()
GenericDerivativeRuleset.non_differentiable_terminal()
GenericDerivativeRuleset.not_condition()
GenericDerivativeRuleset.override()
GenericDerivativeRuleset.power()
GenericDerivativeRuleset.product()
GenericDerivativeRuleset.real()
GenericDerivativeRuleset.restricted()
GenericDerivativeRuleset.sin()
GenericDerivativeRuleset.sinh()
GenericDerivativeRuleset.sqrt()
GenericDerivativeRuleset.sum()
GenericDerivativeRuleset.tan()
GenericDerivativeRuleset.tanh()
GenericDerivativeRuleset.unexpected()
GenericDerivativeRuleset.variable()
GradRuleset
GradRuleset.argument()
GradRuleset.base_form_operator()
GradRuleset.cell_avg()
GradRuleset.cell_coordinate()
GradRuleset.coefficient()
GradRuleset.facet_avg()
GradRuleset.geometric_quantity()
GradRuleset.grad()
GradRuleset.jacobian_inverse()
GradRuleset.reference_grad()
GradRuleset.reference_value()
GradRuleset.spatial_coordinate()
ReferenceGradRuleset
ReferenceGradRuleset.argument()
ReferenceGradRuleset.cell_avg()
ReferenceGradRuleset.cell_coordinate()
ReferenceGradRuleset.coefficient()
ReferenceGradRuleset.facet_avg()
ReferenceGradRuleset.geometric_quantity()
ReferenceGradRuleset.grad()
ReferenceGradRuleset.reference_grad()
ReferenceGradRuleset.reference_value()
ReferenceGradRuleset.spatial_coordinate()
VariableRuleset
apply_coordinate_derivatives()
apply_derivatives()
grad_to_reference_grad()
- ufl.algorithms.apply_function_pullbacks module
- ufl.algorithms.apply_geometry_lowering module
GeometryLoweringApplier
GeometryLoweringApplier.cell_coordinate()
GeometryLoweringApplier.cell_diameter()
GeometryLoweringApplier.cell_normal()
GeometryLoweringApplier.cell_volume()
GeometryLoweringApplier.circumradius()
GeometryLoweringApplier.expr()
GeometryLoweringApplier.facet_area()
GeometryLoweringApplier.facet_cell_coordinate()
GeometryLoweringApplier.facet_jacobian()
GeometryLoweringApplier.facet_jacobian_determinant()
GeometryLoweringApplier.facet_jacobian_inverse()
GeometryLoweringApplier.facet_normal()
GeometryLoweringApplier.jacobian()
GeometryLoweringApplier.jacobian_determinant()
GeometryLoweringApplier.jacobian_inverse()
GeometryLoweringApplier.max_cell_edge_length()
GeometryLoweringApplier.max_facet_edge_length()
GeometryLoweringApplier.min_cell_edge_length()
GeometryLoweringApplier.min_facet_edge_length()
GeometryLoweringApplier.spatial_coordinate()
GeometryLoweringApplier.terminal()
apply_geometry_lowering()
- ufl.algorithms.apply_integral_scaling module
- ufl.algorithms.apply_restrictions module
DefaultRestrictionApplier
DefaultRestrictionApplier.derivative()
DefaultRestrictionApplier.facet_area()
DefaultRestrictionApplier.facet_jacobian()
DefaultRestrictionApplier.facet_jacobian_determinant()
DefaultRestrictionApplier.facet_jacobian_inverse()
DefaultRestrictionApplier.facet_origin()
DefaultRestrictionApplier.max_facet_edge_length()
DefaultRestrictionApplier.min_facet_edge_length()
DefaultRestrictionApplier.operator()
DefaultRestrictionApplier.restricted()
DefaultRestrictionApplier.spatial_coordinate()
DefaultRestrictionApplier.terminal()
RestrictionPropagator
RestrictionPropagator.argument()
RestrictionPropagator.coefficient()
RestrictionPropagator.constant()
RestrictionPropagator.constant_value()
RestrictionPropagator.facet_coordinate()
RestrictionPropagator.facet_normal()
RestrictionPropagator.geometric_cell_quantity()
RestrictionPropagator.geometric_facet_quantity()
RestrictionPropagator.grad()
RestrictionPropagator.label()
RestrictionPropagator.multi_index()
RestrictionPropagator.operator()
RestrictionPropagator.quadrature_weight()
RestrictionPropagator.reference_cell_volume()
RestrictionPropagator.reference_facet_volume()
RestrictionPropagator.reference_value()
RestrictionPropagator.restricted()
RestrictionPropagator.terminal()
RestrictionPropagator.variable()
apply_default_restrictions()
apply_restrictions()
- ufl.algorithms.balancing module
- ufl.algorithms.change_to_reference module
- ufl.algorithms.check_arities module
ArityChecker
ArityChecker.argument()
ArityChecker.cell_avg()
ArityChecker.component_tensor()
ArityChecker.conditional()
ArityChecker.conj()
ArityChecker.division()
ArityChecker.dot()
ArityChecker.expr()
ArityChecker.facet_avg()
ArityChecker.grad()
ArityChecker.index_sum()
ArityChecker.indexed()
ArityChecker.inner()
ArityChecker.linear_indexed_type()
ArityChecker.linear_operator()
ArityChecker.list_tensor()
ArityChecker.negative_restricted()
ArityChecker.nonlinear_operator()
ArityChecker.outer()
ArityChecker.positive_restricted()
ArityChecker.product()
ArityChecker.reference_grad()
ArityChecker.reference_value()
ArityChecker.sum()
ArityChecker.terminal()
ArityChecker.variable()
ArityMismatch
check_form_arity()
check_integrand_arity()
- ufl.algorithms.check_restrictions module
- ufl.algorithms.checks module
- ufl.algorithms.comparison_checker module
CheckComparisons
CheckComparisons.abs()
CheckComparisons.compare()
CheckComparisons.expr()
CheckComparisons.ge()
CheckComparisons.gt()
CheckComparisons.imag()
CheckComparisons.indexed()
CheckComparisons.le()
CheckComparisons.lt()
CheckComparisons.max_value()
CheckComparisons.min_value()
CheckComparisons.power()
CheckComparisons.real()
CheckComparisons.sign()
CheckComparisons.sqrt()
CheckComparisons.terminal()
ComplexComparisonError
do_comparison_check()
- ufl.algorithms.compute_form_data module
- ufl.algorithms.coordinate_derivative_helpers module
- ufl.algorithms.domain_analysis module
- ufl.algorithms.estimate_degrees module
SumDegreeEstimator
SumDegreeEstimator.abs()
SumDegreeEstimator.argument()
SumDegreeEstimator.atan2()
SumDegreeEstimator.bessel_function()
SumDegreeEstimator.cell_avg()
SumDegreeEstimator.cell_coordinate()
SumDegreeEstimator.coefficient()
SumDegreeEstimator.cofactor()
SumDegreeEstimator.component_tensor()
SumDegreeEstimator.compound_derivative()
SumDegreeEstimator.compound_tensor_operator()
SumDegreeEstimator.condition()
SumDegreeEstimator.conditional()
SumDegreeEstimator.conj()
SumDegreeEstimator.constant()
SumDegreeEstimator.constant_value()
SumDegreeEstimator.coordinate_derivative()
SumDegreeEstimator.cross()
SumDegreeEstimator.curl()
SumDegreeEstimator.derivative()
SumDegreeEstimator.determinant()
SumDegreeEstimator.deviatoric()
SumDegreeEstimator.div()
SumDegreeEstimator.division()
SumDegreeEstimator.dot()
SumDegreeEstimator.expr()
SumDegreeEstimator.expr_list()
SumDegreeEstimator.expr_mapping()
SumDegreeEstimator.facet_avg()
SumDegreeEstimator.geometric_quantity()
SumDegreeEstimator.grad()
SumDegreeEstimator.imag()
SumDegreeEstimator.index_sum()
SumDegreeEstimator.indexed()
SumDegreeEstimator.inner()
SumDegreeEstimator.inverse()
SumDegreeEstimator.label()
SumDegreeEstimator.list_tensor()
SumDegreeEstimator.math_function()
SumDegreeEstimator.max_value()
SumDegreeEstimator.min_value()
SumDegreeEstimator.multi_index()
SumDegreeEstimator.nabla_div()
SumDegreeEstimator.nabla_grad()
SumDegreeEstimator.negative_restricted()
SumDegreeEstimator.outer()
SumDegreeEstimator.positive_restricted()
SumDegreeEstimator.power()
SumDegreeEstimator.product()
SumDegreeEstimator.real()
SumDegreeEstimator.reference_curl()
SumDegreeEstimator.reference_div()
SumDegreeEstimator.reference_grad()
SumDegreeEstimator.reference_value()
SumDegreeEstimator.skew()
SumDegreeEstimator.spatial_coordinate()
SumDegreeEstimator.sum()
SumDegreeEstimator.sym()
SumDegreeEstimator.trace()
SumDegreeEstimator.transposed()
SumDegreeEstimator.variable()
SumDegreeEstimator.variable_derivative()
estimate_total_polynomial_degree()
- ufl.algorithms.expand_indices module
IndexExpander
IndexExpander.component()
IndexExpander.component_tensor()
IndexExpander.conditional()
IndexExpander.division()
IndexExpander.form_argument()
IndexExpander.grad()
IndexExpander.index_sum()
IndexExpander.indexed()
IndexExpander.list_tensor()
IndexExpander.multi_index()
IndexExpander.scalar_value()
IndexExpander.terminal()
IndexExpander.zero()
expand_indices()
- ufl.algorithms.formdata module
- ufl.algorithms.formfiles module
- ufl.algorithms.formsplitter module
- ufl.algorithms.formtransformations module
PartExtracter
PartExtracter.argument()
PartExtracter.cell_avg()
PartExtracter.component_tensor()
PartExtracter.conj()
PartExtracter.division()
PartExtracter.dot()
PartExtracter.expr()
PartExtracter.facet_avg()
PartExtracter.grad()
PartExtracter.imag()
PartExtracter.index_sum()
PartExtracter.indexed()
PartExtracter.inner()
PartExtracter.linear_indexed_type()
PartExtracter.linear_operator()
PartExtracter.list_tensor()
PartExtracter.negative_restricted()
PartExtracter.outer()
PartExtracter.positive_restricted()
PartExtracter.product()
PartExtracter.real()
PartExtracter.sum()
PartExtracter.terminal()
PartExtracter.variable()
compute_energy_norm()
compute_form_action()
compute_form_adjoint()
compute_form_arities()
compute_form_functional()
compute_form_lhs()
compute_form_rhs()
compute_form_with_arity()
zero_expr()
- ufl.algorithms.map_integrands module
- ufl.algorithms.remove_complex_nodes module
- ufl.algorithms.renumbering module
- ufl.algorithms.replace module
- ufl.algorithms.replace_derivative_nodes module
- ufl.algorithms.signature module
- ufl.algorithms.strip_terminal_data module
- ufl.algorithms.transformer module
CopyTransformer
ReuseTransformer
Transformer
Transformer.always_reconstruct()
Transformer.print_visit_stack()
Transformer.reconstruct_variable()
Transformer.reuse()
Transformer.reuse_if_possible()
Transformer.reuse_if_untouched()
Transformer.reuse_variable()
Transformer.terminal()
Transformer.ufl_type()
Transformer.undefined()
Transformer.visit()
VariableStripper
apply_transformer()
is_post_handler()
strip_variables()
- ufl.algorithms.traversal module
- Module contents
FormSplitter
MultiFunction
ReuseTransformer
Transformer
Transformer.always_reconstruct()
Transformer.print_visit_stack()
Transformer.reconstruct_variable()
Transformer.reuse()
Transformer.reuse_if_possible()
Transformer.reuse_if_untouched()
Transformer.reuse_variable()
Transformer.terminal()
Transformer.ufl_type()
Transformer.undefined()
Transformer.visit()
apply_transformer()
change_to_reference_grad()
compute_energy_norm()
compute_form_action()
compute_form_adjoint()
compute_form_arities()
compute_form_data()
compute_form_functional()
compute_form_lhs()
compute_form_rhs()
compute_form_signature()
estimate_total_polynomial_degree()
expand_derivatives()
expand_indices()
extract_arguments()
extract_base_form_operators()
extract_coefficients()
extract_elements()
extract_sub_elements()
extract_type()
extract_unique_elements()
load_forms()
load_ufl_file()
post_traversal()
preprocess_form()
read_ufl_file()
replace()
replace_terminal_data()
sort_elements()
strip_terminal_data()
strip_variables()
tree_format()
validate_form()
- ufl.core package
- Submodules
- ufl.core.base_form_operator module
- ufl.core.compute_expr_hash module
- ufl.core.expr module
- ufl.core.external_operator module
- ufl.core.interpolate module
- ufl.core.multiindex module
- ufl.core.operator module
- ufl.core.terminal module
- ufl.core.ufl_id module
- ufl.core.ufl_type module
UFLObject
UFLType
attach_implementations_of_indexing_interface()
check_abstract_trait_consistency()
check_has_slots()
check_implements_required_methods()
check_implements_required_properties()
check_is_terminal_consistency()
check_type_traits_consistency()
determine_num_ops()
get_base_attr()
set_trait()
ufl_type()
update_global_expr_attributes()
update_ufl_type_attributes()
- Module contents
- ufl.corealg package
- ufl.formatting package
- Submodules
- ufl.formatting.ufl2unicode module
Expression2UnicodeHandler
Expression2UnicodeHandler.abs()
Expression2UnicodeHandler.and_condition()
Expression2UnicodeHandler.argument()
Expression2UnicodeHandler.atan2()
Expression2UnicodeHandler.base_form_operator()
Expression2UnicodeHandler.bessel_K()
Expression2UnicodeHandler.bessel_i()
Expression2UnicodeHandler.bessel_j()
Expression2UnicodeHandler.bessel_y()
Expression2UnicodeHandler.cell_avg()
Expression2UnicodeHandler.coefficient()
Expression2UnicodeHandler.coefficient_derivative()
Expression2UnicodeHandler.cofactor()
Expression2UnicodeHandler.component_tensor()
Expression2UnicodeHandler.conditional()
Expression2UnicodeHandler.conj()
Expression2UnicodeHandler.constant()
Expression2UnicodeHandler.cross()
Expression2UnicodeHandler.curl()
Expression2UnicodeHandler.determinant()
Expression2UnicodeHandler.deviatoric()
Expression2UnicodeHandler.div()
Expression2UnicodeHandler.division()
Expression2UnicodeHandler.dot()
Expression2UnicodeHandler.eq()
Expression2UnicodeHandler.exp()
Expression2UnicodeHandler.expr()
Expression2UnicodeHandler.expr_list()
Expression2UnicodeHandler.expr_mapping()
Expression2UnicodeHandler.facet_avg()
Expression2UnicodeHandler.facet_normal()
Expression2UnicodeHandler.ge()
Expression2UnicodeHandler.grad()
Expression2UnicodeHandler.gt()
Expression2UnicodeHandler.identity()
Expression2UnicodeHandler.imag()
Expression2UnicodeHandler.index_sum()
Expression2UnicodeHandler.indexed()
Expression2UnicodeHandler.inner()
Expression2UnicodeHandler.inverse()
Expression2UnicodeHandler.label()
Expression2UnicodeHandler.le()
Expression2UnicodeHandler.list_tensor()
Expression2UnicodeHandler.lt()
Expression2UnicodeHandler.math_function()
Expression2UnicodeHandler.max_value()
Expression2UnicodeHandler.min_value()
Expression2UnicodeHandler.multi_index()
Expression2UnicodeHandler.nabla_div()
Expression2UnicodeHandler.nabla_grad()
Expression2UnicodeHandler.ne()
Expression2UnicodeHandler.negative_restricted()
Expression2UnicodeHandler.not_condition()
Expression2UnicodeHandler.or_condition()
Expression2UnicodeHandler.outer()
Expression2UnicodeHandler.permutation_symbol()
Expression2UnicodeHandler.positive_restricted()
Expression2UnicodeHandler.power()
Expression2UnicodeHandler.product()
Expression2UnicodeHandler.real()
Expression2UnicodeHandler.scalar_value()
Expression2UnicodeHandler.skew()
Expression2UnicodeHandler.spatial_coordinate()
Expression2UnicodeHandler.sqrt()
Expression2UnicodeHandler.sum()
Expression2UnicodeHandler.sym()
Expression2UnicodeHandler.trace()
Expression2UnicodeHandler.transposed()
Expression2UnicodeHandler.variable()
Expression2UnicodeHandler.variable_derivative()
Expression2UnicodeHandler.zero()
PrecedenceRules
PrecedenceRules.add()
PrecedenceRules.and_condition()
PrecedenceRules.bessel_function()
PrecedenceRules.call()
PrecedenceRules.cell_avg()
PrecedenceRules.cofactor()
PrecedenceRules.component_tensor()
PrecedenceRules.conditional()
PrecedenceRules.cross()
PrecedenceRules.derivative()
PrecedenceRules.deviatoric()
PrecedenceRules.division()
PrecedenceRules.dot()
PrecedenceRules.eq()
PrecedenceRules.facet_avg()
PrecedenceRules.ge()
PrecedenceRules.gt()
PrecedenceRules.highest()
PrecedenceRules.index_sum()
PrecedenceRules.indexed()
PrecedenceRules.inner()
PrecedenceRules.le()
PrecedenceRules.list_tensor()
PrecedenceRules.lowest()
PrecedenceRules.lt()
PrecedenceRules.math_function()
PrecedenceRules.mathop()
PrecedenceRules.max_value()
PrecedenceRules.min_value()
PrecedenceRules.ne()
PrecedenceRules.not_condition()
PrecedenceRules.operator()
PrecedenceRules.or_condition()
PrecedenceRules.outer()
PrecedenceRules.power()
PrecedenceRules.product()
PrecedenceRules.restricted()
PrecedenceRules.skew()
PrecedenceRules.sym()
PrecedenceRules.terminal()
PrecedenceRules.trace()
UC
UC.Gamma
UC.Omega
UC.bold_math_A
UC.bold_math_a
UC.circled_times
UC.combining_overline
UC.combining_right_arrow_above
UC.cross_product
UC.division_slash
UC.dot
UC.element_of
UC.epsilon
UC.for_all
UC.gamma
UC.ge
UC.gt
UC.integral
UC.integral_contour
UC.integral_double
UC.integral_surface
UC.integral_triple
UC.integral_volume
UC.le
UC.left_angled_bracket
UC.left_double_angled_bracket
UC.left_white_square_bracket
UC.logical_and
UC.logical_not
UC.logical_or
UC.lt
UC.nabla
UC.nary_product
UC.ne
UC.not_element_of
UC.omega
UC.partial
UC.right_angled_bracket
UC.right_double_angled_bracket
UC.right_white_squared_bracket
UC.sqrt
UC.subscript_digits
UC.subscript_equals
UC.subscript_left_paren
UC.subscript_minus
UC.subscript_plus
UC.subscript_right_paren
UC.sum
UC.superscript_digits
UC.superscript_equals
UC.superscript_left_paren
UC.superscript_minus
UC.superscript_plus
UC.superscript_right_paren
UC.thin_space
UC.transpose
binop()
bolden_letter()
bolden_string()
expression2unicode()
form2unicode()
format_index()
get_integral_symbol()
is_int()
mathop()
measure_font()
opfont()
overline_string()
par()
precedence()
subscript_digit()
subscript_number()
superscript_digit()
superscript_number()
ufl2unicode()
- Module contents
- ufl.utils package
Submodules¶
ufl.action module¶
This module defines the Action class.
- class ufl.action.Action(*args, **kw)[source]¶
Bases:
BaseForm
UFL base form type: respresents the action of an object on another.
- For example:
res = Ax
A would be the first argument, left and x would be the second argument, right.
Action objects will result when the action of an assembled object (e.g. a Matrix) is taken. This delays the evaluation of the action until assembly occurs.
- ufl_operands¶
ufl.adjoint module¶
This module defines the Adjoint class.
ufl.algebra module¶
Basic algebra operations.
- class ufl.algebra.Abs(a)[source]¶
Bases:
Operator
Absolute value.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.algebra.Conj(a)[source]¶
Bases:
Operator
Complex conjugate.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.algebra.Division(a, b)[source]¶
Bases:
Operator
Division.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- ufl_shape = ()¶
- class ufl.algebra.Imag(a)[source]¶
Bases:
Operator
Imaginary part.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.algebra.Power(a, b)[source]¶
Bases:
Operator
Power.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- ufl_shape = ()¶
- class ufl.algebra.Product(a, b)[source]¶
Bases:
Operator
The product of two or more UFL objects.
- ufl_free_indices¶
- ufl_index_dimensions¶
- ufl_shape = ()¶
ufl.argument module¶
Argument.
This module defines the class Argument and a number of related classes (functions), including TestFunction and TrialFunction.
- class ufl.argument.Argument(*args, **kw)[source]¶
Bases:
FormArgument
,BaseArgument
UFL value: Representation of an argument to a form.
- ufl.argument.Arguments(function_space, number)[source]¶
Create an Argument in a mixed space.
Returns a tuple with the function components corresponding to the subelements.
- class ufl.argument.BaseArgument(function_space, number, part=None)[source]¶
Bases:
object
UFL value: Representation of an argument to a form.
- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- property ufl_shape¶
Return the associated UFL shape.
- class ufl.argument.Coargument(*args, **kw)[source]¶
Bases:
BaseForm
,BaseArgument
UFL value: Representation of an argument to a form in a dual space.
- ufl_operands¶
- ufl.argument.TestFunction(function_space, part=None)[source]¶
UFL value: Create a test function argument to a form.
- ufl.argument.TestFunctions(function_space)[source]¶
Create a TestFunction in a mixed space.
Returns a tuple with the function components corresponding to the subelements.
ufl.averaging module¶
Averaging operations.
ufl.cell module¶
Types for representing a cell.
- class ufl.cell.AbstractCell[source]¶
Bases:
UFLObject
A base class for all cells.
- edge_types() Tuple[AbstractCell, ...] [source]¶
Get the unique edge types.
- edges() Tuple[AbstractCell, ...] [source]¶
Get the edges.
- face_types() Tuple[AbstractCell, ...] [source]¶
Get the unique face types.
- faces() Tuple[AbstractCell, ...] [source]¶
Get the faces.
- facet_types() Tuple[AbstractCell, ...] [source]¶
Get the unique facet types.
Facets are entities of dimension tdim-1.
- facets() Tuple[AbstractCell, ...] [source]¶
Get the facets.
Facets are entities of dimension tdim-1.
- abstract has_simplex_facets() bool [source]¶
Return True if all the facets of this cell are simplex cells.
- abstract num_sub_entities(dim: int) int [source]¶
Get the number of sub-entities of the given dimension.
- peak_types() Tuple[AbstractCell, ...] [source]¶
Get the unique peak types.
Peaks are entities of dimension tdim-3.
- peaks() Tuple[AbstractCell, ...] [source]¶
Get the peaks.
Peaks are entities of dimension tdim-3.
- abstract reconstruct(**kwargs: Any) Cell [source]¶
Reconstruct this cell, overwriting properties by those in kwargs.
- ridge_types() Tuple[AbstractCell, ...] [source]¶
Get the unique ridge types.
Ridges are entities of dimension tdim-2.
- ridges() Tuple[AbstractCell, ...] [source]¶
Get the ridges.
Ridges are entities of dimension tdim-2.
- abstract sub_entities(dim: int) Tuple[AbstractCell, ...] [source]¶
Get the sub-entities of the given dimension.
- abstract sub_entity_types(dim: int) Tuple[AbstractCell, ...] [source]¶
Get the unique sub-entity types of the given dimension.
- vertex_types() Tuple[AbstractCell, ...] [source]¶
Get the unique vertices types.
- vertices() Tuple[AbstractCell, ...] [source]¶
Get the vertices.
- class ufl.cell.Cell(cellname: str)[source]¶
Bases:
AbstractCell
Representation of a named finite element cell with known structure.
- reconstruct(**kwargs: Any) Cell [source]¶
Reconstruct this cell, overwriting properties by those in kwargs.
- sub_entities(dim: int) Tuple[AbstractCell, ...] [source]¶
Get the sub-entities of the given dimension.
- sub_entity_types(dim: int) Tuple[AbstractCell, ...] [source]¶
Get the unique sub-entity types of the given dimension.
- class ufl.cell.TensorProductCell(*cells: Cell)[source]¶
Bases:
AbstractCell
Tensor product cell.
- reconstruct(**kwargs: Any) Cell [source]¶
Reconstruct this cell, overwriting properties by those in kwargs.
- sub_cells() List[AbstractCell] [source]¶
Return list of cell factors.
- sub_entities(dim: int) Tuple[AbstractCell, ...] [source]¶
Get the sub-entities of the given dimension.
- sub_entity_types(dim: int) Tuple[AbstractCell, ...] [source]¶
Get the unique sub-entity types of the given dimension.
- ufl.cell.as_cell(cell: AbstractCell | str | Tuple[AbstractCell, ...]) AbstractCell [source]¶
Convert any valid object to a Cell or return cell if it is already a Cell.
Allows an already valid cell, a known cellname string, or a tuple of cells for a product cell.
ufl.checks module¶
Utility functions for checking properties of expressions.
- ufl.checks.is_cellwise_constant(expr)[source]¶
Return whether expression is constant over a single cell.
- ufl.checks.is_python_scalar(expression)[source]¶
Return True iff expression is of a Python scalar type.
- ufl.checks.is_scalar_constant_expression(expr)[source]¶
Check if an expression is a globally constant scalar expression.
ufl.classes module¶
Classes.
This file is useful for external code like tests and form compilers, since it enables the syntax “from ufl.classes import CellFacetooBar” for getting implementation details not exposed through the default ufl namespace. It also contains functionality used by algorithms for dealing with groups of classes, and for mapping types to different handler functions.
- class ufl.classes.Abs(a)[source]¶
Bases:
Operator
Absolute value.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.classes.AbstractCell[source]¶
Bases:
UFLObject
A base class for all cells.
- edge_types() Tuple[AbstractCell, ...] [source]¶
Get the unique edge types.
- edges() Tuple[AbstractCell, ...] [source]¶
Get the edges.
- face_types() Tuple[AbstractCell, ...] [source]¶
Get the unique face types.
- faces() Tuple[AbstractCell, ...] [source]¶
Get the faces.
- facet_types() Tuple[AbstractCell, ...] [source]¶
Get the unique facet types.
Facets are entities of dimension tdim-1.
- facets() Tuple[AbstractCell, ...] [source]¶
Get the facets.
Facets are entities of dimension tdim-1.
- abstract has_simplex_facets() bool [source]¶
Return True if all the facets of this cell are simplex cells.
- abstract num_sub_entities(dim: int) int [source]¶
Get the number of sub-entities of the given dimension.
- peak_types() Tuple[AbstractCell, ...] [source]¶
Get the unique peak types.
Peaks are entities of dimension tdim-3.
- peaks() Tuple[AbstractCell, ...] [source]¶
Get the peaks.
Peaks are entities of dimension tdim-3.
- abstract reconstruct(**kwargs: Any) Cell [source]¶
Reconstruct this cell, overwriting properties by those in kwargs.
- ridge_types() Tuple[AbstractCell, ...] [source]¶
Get the unique ridge types.
Ridges are entities of dimension tdim-2.
- ridges() Tuple[AbstractCell, ...] [source]¶
Get the ridges.
Ridges are entities of dimension tdim-2.
- abstract sub_entities(dim: int) Tuple[AbstractCell, ...] [source]¶
Get the sub-entities of the given dimension.
- abstract sub_entity_types(dim: int) Tuple[AbstractCell, ...] [source]¶
Get the unique sub-entity types of the given dimension.
- vertex_types() Tuple[AbstractCell, ...] [source]¶
Get the unique vertices types.
- vertices() Tuple[AbstractCell, ...] [source]¶
Get the vertices.
- class ufl.classes.AbstractDomain(topological_dimension, geometric_dimension)[source]¶
Bases:
object
Symbolic representation of a geometric domain.
Domain has only a geometric and a topological dimension.
- class ufl.classes.AbstractFiniteElement[source]¶
Bases:
ABC
Base class for all finite elements.
To make your element library compatible with UFL, you should make a subclass of AbstractFiniteElement and provide implementions of all the abstract methods and properties. All methods and properties that are not marked as abstract are implemented here and should not need to be overwritten in your subclass.
An example of how the methods in your subclass could be implemented can be found in Basix; see https://github.com/FEniCS/basix/blob/main/python/basix/ufl.py
- property components: Dict[Tuple[int, ...], int]¶
Get the numbering of the components of the element.
- Returns:
A map from the components of the values on a physical cell (eg (0, 1)) to flat component numbers on the reference cell (eg 1)
- abstract property embedded_subdegree: int¶
Degree of the maximum degree Lagrange space that is spanned by this element.
This returns the degree of the highest degree Lagrange space such that the polynomial space of the Lagrange space is a subspace of this element’s polynomial space. If this element’s polynomial space does not include the constant function, this function should return -1.
Note that on a simplex cells, the polynomial space of Lagrange space is a complete polynomial space, but on other cells this is not true. For example, on quadrilateral cells, the degree 1 Lagrange space includes the degree 2 polynomial xy.
- abstract property embedded_superdegree: int | None¶
Degree of the minimum degree Lagrange space that spans this element.
This returns the degree of the lowest degree Lagrange space such that the polynomial space of the Lagrange space is a superspace of this element’s polynomial space. If this element contains basis functions that are not in any Lagrange space, this function should return None.
Note that on a simplex cells, the polynomial space of Lagrange space is a complete polynomial space, but on other cells this is not true. For example, on quadrilateral cells, the degree 1 Lagrange space includes the degree 2 polynomial xy.
- is_cellwise_constant() bool [source]¶
Check whether this element is spatially constant over each cell.
- property num_sub_elements: int¶
Return number of sub-elements.
This function does not recurse: ie it does not count the sub-elements of sub-elements.
- abstract property pullback: AbstractPullback¶
Return the pullback for this element.
- abstract property reference_value_shape: Tuple[int, ...]¶
Return the shape of the value space on the reference cell.
- property reference_value_size: int¶
Return the integer product of the reference value shape.
- abstract property sobolev_space: SobolevSpace¶
Return the underlying Sobolev space.
- abstract property sub_elements: List¶
Return list of sub-elements.
This function does not recurse: ie it does not extract the sub-elements of sub-elements.
- class ufl.classes.AbstractPullback[source]¶
Bases:
ABC
An abstract pull back.
- apply(expr: Expr) Expr [source]¶
Apply the pull back.
- Args:
expr: A function on a physical cell
Returns: The function pulled back to the reference cell
- abstract property is_identity: bool¶
Is this pull back the identity (or the identity applied to mutliple components).
- abstract physical_value_shape(element, domain) Tuple[int, ...] [source]¶
Get the physical value shape when this pull back is applied to an element on a domain.
- Args:
element: The element that the pull back is applied to domain: The domain
- Returns:
The value shape when the pull back is applied to the given element
- class ufl.classes.Acos(argument)[source]¶
Bases:
MathFunction
Inverse cosine.
- class ufl.classes.Action(*args, **kw)[source]¶
Bases:
BaseForm
UFL base form type: respresents the action of an object on another.
- For example:
res = Ax
A would be the first argument, left and x would be the second argument, right.
Action objects will result when the action of an assembled object (e.g. a Matrix) is taken. This delays the evaluation of the action until assembly occurs.
- ufl_operands¶
- class ufl.classes.Adjoint(*args, **kw)[source]¶
Bases:
BaseForm
UFL base form type: represents the adjoint of an object.
Adjoint objects will result when the adjoint of an assembled object (e.g. a Matrix) is taken. This delays the evaluation of the adjoint until assembly occurs.
- ufl_operands¶
- class ufl.classes.AndCondition(left, right)[source]¶
Bases:
BinaryCondition
And condition.
- class ufl.classes.Argument(*args, **kw)[source]¶
Bases:
FormArgument
,BaseArgument
UFL value: Representation of an argument to a form.
- class ufl.classes.Asin(argument)[source]¶
Bases:
MathFunction
Inverse sine.
- class ufl.classes.Atan(argument)[source]¶
Bases:
MathFunction
Inverse tangent.
- class ufl.classes.Atan2(arg1, arg2)[source]¶
Bases:
Operator
Inverse tangent with two inputs.
- ufl_free_indices = ()¶
- ufl_index_dimensions = ()¶
- ufl_shape = ()¶
- class ufl.classes.BaseFormCoordinateDerivative(integrand, coefficients, arguments, coefficient_derivatives)[source]¶
Bases:
BaseFormDerivative
,CoordinateDerivative
Derivative of a base form w.r.t. the SpatialCoordinates.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.classes.BaseFormDerivative(integrand, coefficients, arguments, coefficient_derivatives)[source]¶
Bases:
CoefficientDerivative
,BaseForm
Derivative of a base form w.r.t the degrees of freedom in a discrete Coefficient.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.classes.BaseFormOperator(*operands, function_space, derivatives=None, argument_slots=())[source]¶
Bases:
Operator
,BaseForm
,Counted
Base form operator.
- argument_slots(outer_form=False)[source]¶
Returns a tuple of expressions containing argument and coefficient based expressions.
We get an argument uhat when we take the Gateaux derivative in the direction uhat: d/du N(u; v*) = dNdu(u; uhat, v*) where uhat is a ufl.Argument and v* a ufl.Coargument Applying the action replace the last argument by coefficient: action(dNdu(u; uhat, v*), w) = dNdu(u; w, v*) where du is a ufl.Coefficient.
- ufl_free_indices = ()¶
- ufl_function_space()[source]¶
Return the function space associated to the operator.
I.e. return the dual of the base form operator’s Coargument.
- ufl_index_dimensions = ()¶
- ufl_operands¶
- property ufl_shape¶
Return the UFL shape of the coefficient.produced by the operator.
- class ufl.classes.BaseFormOperatorCoordinateDerivative(integrand, coefficients, arguments, coefficient_derivatives)[source]¶
Bases:
BaseFormOperatorDerivative
,CoordinateDerivative
Derivative of a base form operator w.r.t. the SpatialCoordinates.
- property ufl_free_indices¶
Built-in immutable sequence.
If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable’s items.
If the argument is a tuple, the return value is the same object.
- property ufl_index_dimensions¶
Built-in immutable sequence.
If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable’s items.
If the argument is a tuple, the return value is the same object.
- property ufl_shape¶
Return the UFL shape of the coefficient.produced by the operator.
- class ufl.classes.BaseFormOperatorDerivative(integrand, coefficients, arguments, coefficient_derivatives)[source]¶
Bases:
BaseFormDerivative
,BaseFormOperator
Derivative of a base form operator w.r.t the degrees of freedom in a discrete Coefficient.
- argument_slots(outer_form=False)[source]¶
Return a tuple of expressions containing argument and coefficient based expressions.
- property ufl_free_indices¶
Built-in immutable sequence.
If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable’s items.
If the argument is a tuple, the return value is the same object.
- property ufl_index_dimensions¶
Built-in immutable sequence.
If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable’s items.
If the argument is a tuple, the return value is the same object.
- property ufl_shape¶
Return the UFL shape of the coefficient.produced by the operator.
- class ufl.classes.BesselFunction(name, nu, argument)[source]¶
Bases:
Operator
Base class for all bessel functions.
- ufl_free_indices = ()¶
- ufl_index_dimensions = ()¶
- ufl_shape = ()¶
- class ufl.classes.BesselI(nu, argument)[source]¶
Bases:
BesselFunction
Bessel I function.
- class ufl.classes.BesselJ(nu, argument)[source]¶
Bases:
BesselFunction
Bessel J function.
- class ufl.classes.BesselK(nu, argument)[source]¶
Bases:
BesselFunction
Bessel K function.
- class ufl.classes.BesselY(nu, argument)[source]¶
Bases:
BesselFunction
Bessel Y function.
- class ufl.classes.Cell(cellname: str)[source]¶
Bases:
AbstractCell
Representation of a named finite element cell with known structure.
- reconstruct(**kwargs: Any) Cell [source]¶
Reconstruct this cell, overwriting properties by those in kwargs.
- sub_entities(dim: int) Tuple[AbstractCell, ...] [source]¶
Get the sub-entities of the given dimension.
- sub_entity_types(dim: int) Tuple[AbstractCell, ...] [source]¶
Get the unique sub-entity types of the given dimension.
- class ufl.classes.CellAvg(f)[source]¶
Bases:
Operator
Cell average.
- evaluate(x, mapping, component, index_values)[source]¶
Performs an approximate symbolic evaluation, since we don’t have a cell.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.classes.CellCoordinate(domain)[source]¶
Bases:
GeometricCellQuantity
The coordinate in a reference cell.
In the context of expression integration, represents the reference cell coordinate of each quadrature point.
In the context of expression evaluation in a point in a cell, represents that point in the reference coordinate system of the cell.
- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- name = 'X'¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.CellDiameter(domain)[source]¶
Bases:
GeometricCellQuantity
The diameter of the cell, i.e., maximal distance of two points in the cell.
- name = 'diameter'¶
- class ufl.classes.CellEdgeVectors(domain)[source]¶
Bases:
GeometricCellQuantity
The vectors between physical cell vertices for each edge in cell.
- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- name = 'CEV'¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.CellFacetJacobian(domain)[source]¶
Bases:
GeometricFacetQuantity
The Jacobian of the mapping from reference facet to reference cell coordinates.
CFJ_ij = dX_i/dXf_j
- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- name = 'CFJ'¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.CellFacetJacobianDeterminant(domain)[source]¶
Bases:
GeometricFacetQuantity
The pseudo-determinant of the CellFacetJacobian.
- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- name = 'detCFJ'¶
- class ufl.classes.CellFacetJacobianInverse(domain)[source]¶
Bases:
GeometricFacetQuantity
The pseudo-inverse of the CellFacetJacobian.
- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- name = 'CFK'¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.CellFacetOrigin(domain)[source]¶
Bases:
GeometricFacetQuantity
The reference cell coordinate corresponding to origin of a reference facet.
- name = 'X0f'¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.CellNormal(domain)[source]¶
Bases:
GeometricCellQuantity
The upwards pointing normal vector of the current manifold cell.
- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- name = 'cell_normal'¶
- property ufl_shape¶
Return the number of coordinates defined (i.e. the geometric dimension of the domain).
- class ufl.classes.CellOrientation(domain)[source]¶
Bases:
GeometricCellQuantity
The orientation (+1/-1) of the current cell.
For non-manifold cells (tdim == gdim), this equals the sign of the Jacobian determinant, i.e. +1 if the physical cell is oriented the same way as the reference cell and -1 otherwise.
For manifold cells of tdim==gdim-1 this is input data belonging to the mesh, used to distinguish between the sides of the manifold.
- name = 'cell_orientation'¶
- class ufl.classes.CellOrigin(domain)[source]¶
Bases:
GeometricCellQuantity
The spatial coordinate corresponding to origin of a reference cell.
- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- name = 'x0'¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.CellVertices(domain)[source]¶
Bases:
GeometricCellQuantity
Physical cell vertices.
- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- name = 'CV'¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.CellVolume(domain)[source]¶
Bases:
GeometricCellQuantity
The volume of the cell.
- name = 'volume'¶
- class ufl.classes.Circumradius(domain)[source]¶
Bases:
GeometricCellQuantity
The circumradius of the cell.
- name = 'circumradius'¶
- class ufl.classes.Coargument(*args, **kw)[source]¶
Bases:
BaseForm
,BaseArgument
UFL value: Representation of an argument to a form in a dual space.
- ufl_operands¶
- class ufl.classes.Coefficient(*args, **kw)[source]¶
Bases:
FormArgument
,BaseCoefficient
UFL form argument type: Representation of a form coefficient.
- class ufl.classes.CoefficientDerivative(integrand, coefficients, arguments, coefficient_derivatives)[source]¶
Bases:
Derivative
Derivative of form integrand w.r.t. the degrees of freedom in a discrete Coefficient.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.classes.Cofactor(A)[source]¶
Bases:
CompoundTensorOperator
Cofactor.
- ufl_free_indices = ()¶
- ufl_index_dimensions = ()¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.Cofunction(*args, **kw)[source]¶
Bases:
BaseCoefficient
,BaseForm
UFL form argument type: Representation of a form coefficient from a dual space.
- ufl_operands¶
- class ufl.classes.ComplexValue(value)[source]¶
Bases:
ScalarValue
Representation of a constant, complex scalar.
- class ufl.classes.ComponentTensor(expression, indices)[source]¶
Bases:
Operator
Maps the free indices of a scalar valued expression to tensor axes.
- ufl_free_indices¶
- ufl_index_dimensions¶
- ufl_shape¶
- class ufl.classes.CompoundDerivative(operands)[source]¶
Bases:
Derivative
Base class for all compound derivative types.
- class ufl.classes.CompoundTensorOperator(operands)[source]¶
Bases:
Operator
Compount tensor operator.
- class ufl.classes.Condition(operands)[source]¶
Bases:
Operator
Condition.
- ufl_free_indices = ()¶
- ufl_index_dimensions = ()¶
- ufl_shape = ()¶
- class ufl.classes.Conditional(condition, true_value, false_value)[source]¶
Bases:
Operator
Conditional expression.
In C++ these take the format (condition ? true_value : false_value).
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.classes.Conj(a)[source]¶
Bases:
Operator
Complex conjugate.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.classes.Constant(domain, shape=(), count=None)[source]¶
-
Constant.
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.ConstantValue[source]¶
Bases:
Terminal
Constant value.
- class ufl.classes.ContravariantPiola[source]¶
Bases:
AbstractPullback
The contravariant Piola pull back.
- apply(expr)[source]¶
Apply the pull back.
- Args:
expr: A function on a physical cell
Returns: The function pulled back to the reference cell
- property is_identity: bool¶
Is this pull back the identity (or the identity applied to mutliple components).
- physical_value_shape(element, domain) Tuple[int, ...] [source]¶
Get the physical value shape when this pull back is applied to an element on a domain.
- Args:
element: The element that the pull back is applied to domain: The domain
- Returns:
The value shape when the pull back is applied to the given element
- class ufl.classes.CoordinateDerivative(integrand, coefficients, arguments, coefficient_derivatives)[source]¶
Bases:
CoefficientDerivative
Derivative of the integrand of a form w.r.t. the SpatialCoordinates.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.classes.Cos(argument)[source]¶
Bases:
MathFunction
Cosine.
- class ufl.classes.Cosh(argument)[source]¶
Bases:
MathFunction
Hyperbolic cosine.
- class ufl.classes.CovariantPiola[source]¶
Bases:
AbstractPullback
The covariant Piola pull back.
- apply(expr)[source]¶
Apply the pull back.
- Args:
expr: A function on a physical cell
Returns: The function pulled back to the reference cell
- property is_identity: bool¶
Is this pull back the identity (or the identity applied to mutliple components).
- physical_value_shape(element, domain) Tuple[int, ...] [source]¶
Get the physical value shape when this pull back is applied to an element on a domain.
- Args:
element: The element that the pull back is applied to domain: The domain
- Returns:
The value shape when the pull back is applied to the given element
- class ufl.classes.Cross(a, b)[source]¶
Bases:
CompoundTensorOperator
Cross.
- ufl_free_indices¶
- ufl_index_dimensions¶
- ufl_shape = (3,)¶
- class ufl.classes.Curl(f)[source]¶
Bases:
CompoundDerivative
Compound derivative.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- ufl_shape¶
- class ufl.classes.CustomPullback[source]¶
Bases:
AbstractPullback
Custom pull back.
This should probably be removed.
- apply(expr)[source]¶
Apply the pull back.
- Args:
expr: A function on a physical cell
Returns: The function pulled back to the reference cell
- property is_identity: bool¶
Is this pull back the identity (or the identity applied to mutliple components).
- physical_value_shape(element, domain) Tuple[int, ...] [source]¶
Get the physical value shape when this pull back is applied to an element on a domain.
- Args:
element: The element that the pull back is applied to domain: The domain
- Returns:
The value shape when the pull back is applied to the given element
- class ufl.classes.Derivative(operands)[source]¶
Bases:
Operator
Base class for all derivative types.
- class ufl.classes.Determinant(A)[source]¶
Bases:
CompoundTensorOperator
Determinant.
- ufl_free_indices = ()¶
- ufl_index_dimensions = ()¶
- ufl_shape = ()¶
- class ufl.classes.Deviatoric(A)[source]¶
Bases:
CompoundTensorOperator
Deviatoric.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.classes.DirectionalSobolevSpace(orders)[source]¶
Bases:
SobolevSpace
Directional Sobolev space.
Symbolic representation of a Sobolev space with varying smoothness in different spatial directions.
- class ufl.classes.Div(f)[source]¶
Bases:
CompoundDerivative
Div.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.Division(a, b)[source]¶
Bases:
Operator
Division.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- ufl_shape = ()¶
- class ufl.classes.Dot(a, b)[source]¶
Bases:
CompoundTensorOperator
Dot.
- ufl_free_indices¶
- ufl_index_dimensions¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.DoubleContravariantPiola[source]¶
Bases:
AbstractPullback
The double contravariant Piola pull back.
- apply(expr)[source]¶
Apply the pull back.
- Args:
expr: A function on a physical cell
Returns: The function pulled back to the reference cell
- property is_identity: bool¶
Is this pull back the identity (or the identity applied to mutliple components).
- physical_value_shape(element, domain) Tuple[int, ...] [source]¶
Get the physical value shape when this pull back is applied to an element on a domain.
- Args:
element: The element that the pull back is applied to domain: The domain
- Returns:
The value shape when the pull back is applied to the given element
- class ufl.classes.DoubleCovariantPiola[source]¶
Bases:
AbstractPullback
The double covariant Piola pull back.
- apply(expr)[source]¶
Apply the pull back.
- Args:
expr: A function on a physical cell
Returns: The function pulled back to the reference cell
- property is_identity: bool¶
Is this pull back the identity (or the identity applied to mutliple components).
- physical_value_shape(element, domain) Tuple[int, ...] [source]¶
Get the physical value shape when this pull back is applied to an element on a domain.
- Args:
element: The element that the pull back is applied to domain: The domain
- Returns:
The value shape when the pull back is applied to the given element
- class ufl.classes.DualSpace(domain, element, label='')[source]¶
Bases:
BaseFunctionSpace
,UFLObject
Representation of a Dual space.
- class ufl.classes.EQ(left, right)[source]¶
Bases:
BinaryCondition
Equality condition.
- class ufl.classes.Equation(lhs, rhs)[source]¶
Bases:
object
Equation.
This class is used to represent equations expressed by the “==” operator. Examples include a == L and F == 0 where a, L and F are Form objects.
- class ufl.classes.Erf(argument)[source]¶
Bases:
MathFunction
Erf function.
- class ufl.classes.Exp(argument)[source]¶
Bases:
MathFunction
Exponentiation..
- class ufl.classes.Expr[source]¶
Bases:
object
Base class for all UFL expression types.
- Instance properties
Every
Expr
instance will have certain properties. The most important ones areufl_operands
,ufl_shape
,ufl_free_indices
, andufl_index_dimensions
properties. Expressions are immutable and hashable.- Type traits
The
Expr
API defines a number of type traits that each subclass needs to provide. Most of these are specified indirectly via the arguments to theufl_type
class decorator, allowing UFL to do some consistency checks and automate most of the traits for most types. Type traits are accessed via a class or instance object of the formobj._ufl_traitname_
. See the source code for description of each type trait.- Operators
Some Python special functions are implemented in this class, some are implemented in subclasses, and some are attached to this class in the
ufl_type
class decorator.- Defining subclasses
To define a new expression class, inherit from either
Terminal
orOperator
, and apply theufl_type
class decorator with suitable arguments. See the docstring ofufl_type
for details on its arguments. Looking at existing classes similar to the one you wish to add is a good idea. Looking through the comments in theExpr
class andufl_type
to understand all the properties that may need to be specified is also a good idea. Note that many algorithms in UFL and form compilers will need handlers implemented for each new type::.@ufl_type() class MyOperator(Operator): pass
- Type collections
All
Expr
subclasses are collected byufl_type
in global variables available viaExpr
.- Profiling
Object creation statistics can be collected by doing
Expr.ufl_enable_profiling() # ... run some code initstats, delstats = Expr.ufl_disable_profiling()
Giving a list of creation and deletion counts for each typecode.
- property T¶
Transpose a rank-2 tensor expression.
For more general transpose operations of higher order tensor expressions, use indexing and Tensor.
- dx(*ii)¶
Return the partial derivative with respect to spatial variable number ii.
- evaluate(x, mapping, component, index_values)[source]¶
Evaluate expression at given coordinate with given values for terminals.
- static ufl_disable_profiling()[source]¶
Turn off the object counting mechanism. Return object init and del counts.
- class ufl.classes.ExprList(*operands)[source]¶
Bases:
Operator
List of Expr objects. For internal use, never to be created by end users.
- property ufl_free_indices¶
Get the UFL free indices.
- property ufl_index_dimensions¶
Get the UFL index dimensions.
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.ExprMapping(*operands)[source]¶
Bases:
Operator
Mapping of Expr objects. For internal use, never to be created by end users.
- property ufl_free_indices¶
Get the UFL free indices.
- property ufl_index_dimensions¶
Get the UFL index dimensions.
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.ExternalOperator(*operands, function_space, derivatives=None, argument_slots=())[source]¶
Bases:
BaseFormOperator
External operator.
- ufl_element()[source]¶
Shortcut to get the finite element of the function space of the external operator.
- ufl_operands¶
- class ufl.classes.FacetArea(domain)[source]¶
Bases:
GeometricFacetQuantity
The area of the facet.
- name = 'facetarea'¶
- class ufl.classes.FacetAvg(f)[source]¶
Bases:
Operator
Facet average.
- evaluate(x, mapping, component, index_values)[source]¶
Performs an approximate symbolic evaluation, since we dont have a cell.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.classes.FacetCoordinate(domain)[source]¶
Bases:
GeometricFacetQuantity
The coordinate in a reference cell of a facet.
In the context of expression integration over a facet, represents the reference facet coordinate of each quadrature point.
In the context of expression evaluation in a point on a facet, represents that point in the reference coordinate system of the facet.
- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- name = 'Xf'¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.FacetEdgeVectors(domain)[source]¶
Bases:
GeometricFacetQuantity
The vectors between physical cell vertices for each edge in current facet.
- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- name = 'FEV'¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.FacetJacobian(domain)[source]¶
Bases:
GeometricFacetQuantity
The Jacobian of the mapping from reference facet to spatial coordinates.
FJ_ij = dx_i/dXf_j
The FacetJacobian is the product of the Jacobian and CellFacetJacobian:
FJ = dx/dXf = dx/dX dX/dXf = J * CFJ
- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- name = 'FJ'¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.FacetJacobianDeterminant(domain)[source]¶
Bases:
GeometricFacetQuantity
The pseudo-determinant of the FacetJacobian.
- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- name = 'detFJ'¶
- class ufl.classes.FacetJacobianInverse(domain)[source]¶
Bases:
GeometricFacetQuantity
The pseudo-inverse of the FacetJacobian.
- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- name = 'FK'¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.FacetNormal(domain)[source]¶
Bases:
GeometricFacetQuantity
The outwards pointing normal vector of the current facet.
- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- name = 'n'¶
- property ufl_shape¶
Return the number of coordinates defined (i.e. the geometric dimension of the domain).
- class ufl.classes.FacetOrientation(domain)[source]¶
Bases:
GeometricFacetQuantity
The orientation (+1/-1) of the current facet relative to the reference cell.
- name = 'facet_orientation'¶
- class ufl.classes.FacetOrigin(domain)[source]¶
Bases:
GeometricFacetQuantity
The spatial coordinate corresponding to origin of a reference facet.
- name = 'x0f'¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.FiniteElement(family: str, cell: Cell, degree: int, reference_value_shape: Tuple[int, ...], pullback: AbstractPullback, sobolev_space: SobolevSpace, sub_elements=[], _repr: str | None = None, _str: str | None = None, subdegree: int | None = None)[source]¶
Bases:
AbstractFiniteElement
A directly defined finite element.
- property embedded_subdegree: int¶
Degree of the maximum degree Lagrange space that is spanned by this element.
This returns the degree of the highest degree Lagrange space such that the polynomial space of the Lagrange space is a subspace of this element’s polynomial space. If this element’s polynomial space does not include the constant function, this function should return -1.
Note that on a simplex cells, the polynomial space of Lagrange space is a complete polynomial space, but on other cells this is not true. For example, on quadrilateral cells, the degree 1 Lagrange space includes the degree 2 polynomial xy.
- property embedded_superdegree: int | None¶
Degree of the minimum degree Lagrange space that spans this element.
This returns the degree of the lowest degree Lagrange space such that the polynomial space of the Lagrange space is a superspace of this element’s polynomial space. If this element contains basis functions that are not in any Lagrange space, this function should return None.
Note that on a simplex cells, the polynomial space of Lagrange space is a complete polynomial space, but on other cells this is not true. For example, on quadrilateral cells, the degree 1 Lagrange space includes the degree 2 polynomial xy.
- property pullback: AbstractPullback¶
Return the pullback for this element.
- property reference_value_shape: Tuple[int, ...]¶
Return the shape of the value space on the reference cell.
- property sobolev_space: SobolevSpace¶
Return the underlying Sobolev space.
- property sub_elements: List¶
Return list of sub-elements.
This function does not recurse: ie it does not extract the sub-elements of sub-elements.
- class ufl.classes.FixedIndex(value)[source]¶
Bases:
IndexBase
UFL value: An index with a specific value assigned.
- class ufl.classes.FloatValue(value)[source]¶
Bases:
RealValue
Representation of a constant scalar floating point value.
- class ufl.classes.Form(integrals)[source]¶
Bases:
BaseForm
Description of a weak form consisting of a sum of integrals over subdomains.
- coefficient_numbering()[source]¶
Return a contiguous numbering of coefficients in a mapping
{coefficient:number}
.
- constant_numbering()[source]¶
Return a contiguous numbering of constants in a mapping
{constant:number}
.
- geometric_dimension()[source]¶
Return the geometric dimension shared by all domains and functions in this form.
- integrals_by_domain(domain)[source]¶
Return a sequence of all integrals with a particular integration domain.
- integrals_by_type(integral_type)[source]¶
Return a sequence of all integrals with a particular domain type.
- max_subdomain_ids()[source]¶
Returns a mapping on the form
{domain:{integral_type:max_subdomain_id}}
.
- signature()[source]¶
Signature for use with jit cache (independent of incidental numbering of indices etc).
- terminal_numbering()[source]¶
Return a contiguous numbering for all counted objects in the form.
The returned object is mapping from terminal to its number (an integer).
The numbering is computed per type so :class:`Coefficient`s, :class:`Constant`s, etc will each be numbered from zero.
- ufl_cell()[source]¶
Return the single cell this form is defined on.
Fails if multiple cells are found.
- class ufl.classes.FormArgument[source]¶
Bases:
Terminal
An abstract class for a form argument (a thing in a primal finite element space).
- class ufl.classes.FormSum(*args, **kwargs)[source]¶
Bases:
BaseForm
Form sum.
Description of a weighted sum of variational forms and form-like objects components is the list of Forms to be summed arg_weights is a list of tuples of component index and weight
- ufl_operands¶
- class ufl.classes.FunctionSpace(domain, element, label='')[source]¶
Bases:
BaseFunctionSpace
,UFLObject
Representation of a Function space.
- class ufl.classes.GE(left, right)[source]¶
Bases:
BinaryCondition
Greater than or equal to condition.
- class ufl.classes.GT(left, right)[source]¶
Bases:
BinaryCondition
Greater than condition.
- class ufl.classes.GeometricCellQuantity(domain)[source]¶
Bases:
GeometricQuantity
Geometric cell quantity.
- class ufl.classes.GeometricFacetQuantity(domain)[source]¶
Bases:
GeometricQuantity
Geometric facet quantity.
- class ufl.classes.GeometricQuantity(domain)[source]¶
Bases:
Terminal
Geometric quantity.
- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- ufl_shape = ()¶
- class ufl.classes.Grad(f)[source]¶
Bases:
CompoundDerivative
Grad.
- evaluate(x, mapping, component, index_values, derivatives=())[source]¶
Get child from mapping and return the component asked for.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.Identity(dim)[source]¶
Bases:
ConstantValue
Representation of an identity matrix.
- ufl_shape¶
- class ufl.classes.IdentityPullback[source]¶
Bases:
AbstractPullback
The identity pull back.
- apply(expr)[source]¶
Apply the pull back.
- Args:
expr: A function on a physical cell
Returns: The function pulled back to the reference cell
- property is_identity: bool¶
Is this pull back the identity (or the identity applied to mutliple components).
- physical_value_shape(element, domain) Tuple[int, ...] [source]¶
Get the physical value shape when this pull back is applied to an element on a domain.
- Args:
element: The element that the pull back is applied to domain: The domain
- Returns:
The value shape when the pull back is applied to the given element
- class ufl.classes.Imag(a)[source]¶
Bases:
Operator
Imaginary part.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.classes.Index(count=None)[source]¶
-
UFL value: An index with no value assigned.
Used to represent free indices in Einstein indexing notation.
- class ufl.classes.IndexSum(summand, index)[source]¶
Bases:
Operator
Index sum.
- ufl_free_indices¶
- ufl_index_dimensions¶
- property ufl_shape¶
Get UFL shape.
- class ufl.classes.Indexed(expression, multiindex)[source]¶
Bases:
Operator
Indexed expression.
- ufl_free_indices¶
- ufl_index_dimensions¶
- ufl_shape = ()¶
- class ufl.classes.Inner(a, b)[source]¶
Bases:
CompoundTensorOperator
Inner.
- ufl_free_indices¶
- ufl_index_dimensions¶
- ufl_shape = ()¶
- class ufl.classes.IntValue(value)[source]¶
Bases:
RealValue
Representation of a constant scalar integer value.
- class ufl.classes.Integral(integrand, integral_type, domain, subdomain_id, metadata, subdomain_data)[source]¶
Bases:
object
An integral over a single domain.
- reconstruct(integrand=None, integral_type=None, domain=None, subdomain_id=None, metadata=None, subdomain_data=None)[source]¶
Construct a new Integral object with some properties replaced with new values.
- Example:
<a = Integral instance> b = a.reconstruct(expand_compounds(a.integrand())) c = a.reconstruct(metadata={‘quadrature_degree’:2})
- class ufl.classes.Interpolate(expr, v)[source]¶
Bases:
BaseFormOperator
Symbolic representation of the interpolation operator.
- ufl_operands¶
- class ufl.classes.Inverse(A)[source]¶
Bases:
CompoundTensorOperator
Inverse.
- ufl_free_indices = ()¶
- ufl_index_dimensions = ()¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.Jacobian(domain)[source]¶
Bases:
GeometricCellQuantity
The Jacobian of the mapping from reference cell to spatial coordinates.
\[\begin{split}J_{ij} = \\frac{dx_i}{dX_j}\end{split}\]- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- name = 'J'¶
- property ufl_shape¶
Return the number of coordinates defined (i.e. the geometric dimension of the domain).
- class ufl.classes.JacobianDeterminant(domain)[source]¶
Bases:
GeometricCellQuantity
The determinant of the Jacobian.
Represents the signed determinant of a square Jacobian or the pseudo-determinant of a non-square Jacobian.
- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- name = 'detJ'¶
- class ufl.classes.JacobianInverse(domain)[source]¶
Bases:
GeometricCellQuantity
The inverse of the Jacobian.
Represents the inverse of a square Jacobian or the pseudo-inverse of a non-square Jacobian.
- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- name = 'K'¶
- property ufl_shape¶
Return the number of coordinates defined (i.e. the geometric dimension of the domain).
- class ufl.classes.L2Piola[source]¶
Bases:
AbstractPullback
The L2 Piola pull back.
- apply(expr)[source]¶
Apply the pull back.
- Args:
expr: A function on a physical cell
Returns: The function pulled back to the reference cell
- property is_identity: bool¶
Is this pull back the identity (or the identity applied to mutliple components).
- physical_value_shape(element, domain) Tuple[int, ...] [source]¶
Get the physical value shape when this pull back is applied to an element on a domain.
- Args:
element: The element that the pull back is applied to domain: The domain
- Returns:
The value shape when the pull back is applied to the given element
- class ufl.classes.LE(left, right)[source]¶
Bases:
BinaryCondition
Less than or equal condition.
- class ufl.classes.LT(left, right)[source]¶
Bases:
BinaryCondition
Less than condition.
- class ufl.classes.Label(count=None)[source]¶
-
Label.
- property ufl_free_indices¶
Get the UFL free indices.
- property ufl_index_dimensions¶
Get the UFL index dimensions.
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.ListTensor(*expressions)[source]¶
Bases:
Operator
Wraps a list of expressions into a tensor valued expression of one higher rank.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.Ln(argument)[source]¶
Bases:
MathFunction
Natural logarithm.
- class ufl.classes.MathFunction(name, argument)[source]¶
Bases:
Operator
Base class for all unary scalar math functions.
- ufl_free_indices = ()¶
- ufl_index_dimensions = ()¶
- ufl_shape = ()¶
- class ufl.classes.Matrix(row_space, column_space, count=None)[source]¶
-
An assemble linear operator between two function spaces.
- ufl_operands¶
- class ufl.classes.MaxCellEdgeLength(domain)[source]¶
Bases:
GeometricCellQuantity
The maximum edge length of the cell.
- name = 'maxcelledgelength'¶
- class ufl.classes.MaxFacetEdgeLength(domain)[source]¶
Bases:
GeometricFacetQuantity
The maximum edge length of the facet.
- name = 'maxfacetedgelength'¶
- class ufl.classes.MaxValue(left, right)[source]¶
Bases:
Operator
Take the maximum of two values.
- ufl_free_indices = ()¶
- ufl_index_dimensions = ()¶
- ufl_shape = ()¶
- class ufl.classes.Measure(integral_type, domain=None, subdomain_id='everywhere', metadata=None, subdomain_data=None)[source]¶
Bases:
object
Representation of an integration measure.
The Measure object holds information about integration properties to be transferred to a Form on multiplication with a scalar expression.
- integral_type()[source]¶
Return the domain type.
Valid domain types are “cell”, “exterior_facet”, “interior_facet”, etc.
- metadata()[source]¶
Return the integral metadata.
This data is not interpreted by UFL. It is passed to the form compiler which can ignore it or use it to compile each integral of a form in a different way.
- reconstruct(integral_type=None, subdomain_id=None, domain=None, metadata=None, subdomain_data=None)[source]¶
Construct a new Measure object with some properties replaced with new values.
- Example:
<dm = Measure instance> b = dm.reconstruct(subdomain_id=2) c = dm.reconstruct(metadata={ “quadrature_degree”: 3 })
- Used by the call operator, so this is equivalent:
b = dm(2) c = dm(0, { “quadrature_degree”: 3 })
- class ufl.classes.MeasureProduct(*measures)[source]¶
Bases:
object
Represents a product of measures.
This is a notational intermediate object to handle the notation
f*(dm1*dm2)
This is work in progress and not functional. It needs support in other parts of ufl and the rest of the code generation chain.
- class ufl.classes.MeasureSum(*measures)[source]¶
Bases:
object
Represents a sum of measures.
- This is a notational intermediate object to translate the notation
f*(ds(1)+ds(3))
- into
f*ds(1) + f*ds(3)
- class ufl.classes.Mesh(coordinate_element, ufl_id=None, cargo=None)[source]¶
Bases:
AbstractDomain
,UFLObject
Symbolic representation of a mesh.
- ufl_id()¶
Return the ufl_id of this object.
- class ufl.classes.MeshView(mesh, topological_dimension, ufl_id=None)[source]¶
Bases:
AbstractDomain
,UFLObject
Symbolic representation of a mesh.
- ufl_id()¶
Return the ufl_id of this object.
- class ufl.classes.MinCellEdgeLength(domain)[source]¶
Bases:
GeometricCellQuantity
The minimum edge length of the cell.
- name = 'mincelledgelength'¶
- class ufl.classes.MinFacetEdgeLength(domain)[source]¶
Bases:
GeometricFacetQuantity
The minimum edge length of the facet.
- name = 'minfacetedgelength'¶
- class ufl.classes.MinValue(left, right)[source]¶
Bases:
Operator
Take the minimum of two values.
- ufl_free_indices = ()¶
- ufl_index_dimensions = ()¶
- ufl_shape = ()¶
- class ufl.classes.MixedElement(sub_elements)[source]¶
Bases:
FiniteElement
A mixed element.
- class ufl.classes.MixedFunctionSpace(*args)[source]¶
Bases:
AbstractFunctionSpace
,UFLObject
Mixed function space.
- dual(*args)[source]¶
Return the dual to this function space.
If no additional arguments are passed then a MixedFunctionSpace is returned whose components are the duals of the originals.
If additional arguments are passed, these must be integers. In this case, the MixedFunctionSpace which is returned will have dual components in the positions corresponding to the arguments passed, and the original components in the other positions.
- class ufl.classes.MixedPullback(element: _AbstractFiniteElement)[source]¶
Bases:
AbstractPullback
Pull back for a mixed element.
- apply(expr)[source]¶
Apply the pull back.
- Args:
expr: A function on a physical cell
Returns: The function pulled back to the reference cell
- property is_identity: bool¶
Is this pull back the identity (or the identity applied to mutliple components).
- physical_value_shape(element, domain) Tuple[int, ...] [source]¶
Get the physical value shape when this pull back is applied to an element on a domain.
- Args:
element: The element that the pull back is applied to domain: The domain
- Returns:
The value shape when the pull back is applied to the given element
- class ufl.classes.MultiIndex(indices)[source]¶
Bases:
Terminal
Represents a sequence of indices, either fixed or free.
- property ufl_free_indices¶
Get the UFL free indices.
This should not be used.
- property ufl_index_dimensions¶
Get the UFL index dimensions.
This should not be used.
- property ufl_shape¶
Get the UFL shape.
This should not be used.
- class ufl.classes.NE(left, right)[source]¶
Bases:
BinaryCondition
Not equal condition.
- class ufl.classes.NablaDiv(f)[source]¶
Bases:
CompoundDerivative
Nabla div.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.NablaGrad(f)[source]¶
Bases:
CompoundDerivative
Nabla grad.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.NegativeRestricted(f)[source]¶
Bases:
Restricted
Negative restriction.
- exception ufl.classes.NonStandardPullbackException[source]¶
Bases:
BaseException
Exception to raise if a map is non-standard.
- class ufl.classes.Operator(operands=None)[source]¶
Bases:
Expr
Base class for all operators, i.e. non-terminal expression types.
- ufl_operands¶
- class ufl.classes.OrCondition(left, right)[source]¶
Bases:
BinaryCondition
Or condition.
- class ufl.classes.Outer(a, b)[source]¶
Bases:
CompoundTensorOperator
Outer.
- ufl_free_indices¶
- ufl_index_dimensions¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.PermutationSymbol(dim)[source]¶
Bases:
ConstantValue
Representation of a permutation symbol.
This is also known as the Levi-Civita symbol, antisymmetric symbol, or alternating symbol.
- ufl_shape¶
- class ufl.classes.Perp(A)[source]¶
Bases:
CompoundTensorOperator
Perp.
- ufl_free_indices = ()¶
- ufl_index_dimensions = ()¶
- ufl_shape = (2,)¶
- class ufl.classes.PhysicalPullback[source]¶
Bases:
AbstractPullback
Physical pull back.
This should probably be removed.
- apply(expr)[source]¶
Apply the pull back.
- Args:
expr: A function on a physical cell
Returns: The function pulled back to the reference cell
- property is_identity: bool¶
Is this pull back the identity (or the identity applied to mutliple components).
- physical_value_shape(element, domain) Tuple[int, ...] [source]¶
Get the physical value shape when this pull back is applied to an element on a domain.
- Args:
element: The element that the pull back is applied to domain: The domain
- Returns:
The value shape when the pull back is applied to the given element
- class ufl.classes.PositiveRestricted(f)[source]¶
Bases:
Restricted
Positive restriction.
- class ufl.classes.Power(a, b)[source]¶
Bases:
Operator
Power.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- ufl_shape = ()¶
- class ufl.classes.Product(a, b)[source]¶
Bases:
Operator
The product of two or more UFL objects.
- ufl_free_indices¶
- ufl_index_dimensions¶
- ufl_shape = ()¶
- class ufl.classes.QuadratureWeight(domain)[source]¶
Bases:
GeometricQuantity
The current quadrature weight.
Only used inside a quadrature context.
- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- name = 'weight'¶
- class ufl.classes.Real(a)[source]¶
Bases:
Operator
Real part.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.classes.RealValue(value)[source]¶
Bases:
ScalarValue
Abstract class used to differentiate real values from complex ones.
- ufl_free_indices = ()¶
- ufl_index_dimensions = ()¶
- ufl_shape = ()¶
- class ufl.classes.ReferenceCellEdgeVectors(domain)[source]¶
Bases:
GeometricCellQuantity
The vectors between reference cell vertices for each edge in cell.
- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- name = 'RCEV'¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.ReferenceCellVolume(domain)[source]¶
Bases:
GeometricCellQuantity
The volume of the reference cell.
- name = 'reference_cell_volume'¶
- class ufl.classes.ReferenceCurl(f)[source]¶
Bases:
CompoundDerivative
Reference curl.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- ufl_shape¶
- class ufl.classes.ReferenceDiv(f)[source]¶
Bases:
CompoundDerivative
Reference divergence.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.ReferenceFacetEdgeVectors(domain)[source]¶
Bases:
GeometricFacetQuantity
The vectors between reference cell vertices for each edge in current facet.
- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- name = 'RFEV'¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.ReferenceFacetVolume(domain)[source]¶
Bases:
GeometricFacetQuantity
The volume of the reference cell of the current facet.
- name = 'reference_facet_volume'¶
- class ufl.classes.ReferenceGrad(f)[source]¶
Bases:
CompoundDerivative
Reference grad.
- evaluate(x, mapping, component, index_values, derivatives=())[source]¶
Get child from mapping and return the component asked for.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.ReferenceNormal(domain)[source]¶
Bases:
GeometricFacetQuantity
The outwards pointing normal vector of the current facet on the reference cell.
- name = 'reference_normal'¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.ReferenceValue(f)[source]¶
Bases:
Operator
Representation of the reference cell value of a form argument.
- evaluate(x, mapping, component, index_values, derivatives=())[source]¶
Get child from mapping and return the component asked for.
- ufl_free_indices = ()¶
- ufl_index_dimensions = ()¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.classes.Restricted(f)[source]¶
Bases:
Operator
Restriction.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.classes.ScalarValue(value)[source]¶
Bases:
ConstantValue
A constant scalar value.
- ufl_free_indices = ()¶
- ufl_index_dimensions = ()¶
- ufl_shape = ()¶
- class ufl.classes.Sin(argument)[source]¶
Bases:
MathFunction
Sine.
- class ufl.classes.Sinh(argument)[source]¶
Bases:
MathFunction
Hyperbolic sine.
- class ufl.classes.Skew(A)[source]¶
Bases:
CompoundTensorOperator
Skew.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.classes.SobolevSpace(name, parents=None)[source]¶
Bases:
object
Symbolic representation of a Sobolev space.
This implements a subset of the methods of a Python set so that finite elements and other Sobolev spaces can be tested for inclusion.
- class ufl.classes.SpatialCoordinate(domain)[source]¶
Bases:
GeometricCellQuantity
The coordinate in a domain.
In the context of expression integration, represents the domain coordinate of each quadrature point.
In the context of expression evaluation in a point, represents the value of that point.
- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- name = 'x'¶
- property ufl_shape¶
Return the number of coordinates defined (i.e. the geometric dimension of the domain).
- class ufl.classes.Sqrt(argument)[source]¶
Bases:
MathFunction
Square root.
- class ufl.classes.Sum(a, b)[source]¶
Bases:
Operator
Sum.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.classes.Sym(A)[source]¶
Bases:
CompoundTensorOperator
Sym.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.classes.SymmetricElement(symmetry: Dict[Tuple[int, ...], int], sub_elements: List[AbstractFiniteElement])[source]¶
Bases:
FiniteElement
A symmetric finite element.
- class ufl.classes.SymmetricPullback(element: _AbstractFiniteElement, symmetry: Dict[tuple[int, ...], int])[source]¶
Bases:
AbstractPullback
Pull back for an element with symmetry.
- apply(expr)[source]¶
Apply the pull back.
- Args:
expr: A function on a physical cell
Returns: The function pulled back to the reference cell
- property is_identity: bool¶
Is this pull back the identity (or the identity applied to mutliple components).
- physical_value_shape(element, domain) Tuple[int, ...] [source]¶
Get the physical value shape when this pull back is applied to an element on a domain.
- Args:
element: The element that the pull back is applied to domain: The domain
- Returns:
The value shape when the pull back is applied to the given element
- class ufl.classes.Tan(argument)[source]¶
Bases:
MathFunction
Tangent.
- class ufl.classes.Tanh(argument)[source]¶
Bases:
MathFunction
Hyperbolic tangent.
- class ufl.classes.TensorProductCell(*cells: Cell)[source]¶
Bases:
AbstractCell
Tensor product cell.
- reconstruct(**kwargs: Any) Cell [source]¶
Reconstruct this cell, overwriting properties by those in kwargs.
- sub_cells() List[AbstractCell] [source]¶
Return list of cell factors.
- sub_entities(dim: int) Tuple[AbstractCell, ...] [source]¶
Get the sub-entities of the given dimension.
- sub_entity_types(dim: int) Tuple[AbstractCell, ...] [source]¶
Get the unique sub-entity types of the given dimension.
- class ufl.classes.TensorProductFunctionSpace(*function_spaces)[source]¶
Bases:
AbstractFunctionSpace
,UFLObject
Tensor product function space.
- class ufl.classes.Terminal[source]¶
Bases:
Expr
Base class for terminal objects.
A terminal node in the UFL expression tree.
- evaluate(x, mapping, component, index_values, derivatives=())[source]¶
Get self from mapping and return the component asked for.
- ufl_free_indices = ()¶
- ufl_index_dimensions = ()¶
- ufl_operands = ()¶
- ufl.classes.TestFunction(function_space, part=None)[source]¶
UFL value: Create a test function argument to a form.
- ufl.classes.TestFunctions(function_space)[source]¶
Create a TestFunction in a mixed space.
Returns a tuple with the function components corresponding to the subelements.
- class ufl.classes.Trace(A)[source]¶
Bases:
CompoundTensorOperator
Trace.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- ufl_shape = ()¶
- class ufl.classes.Transposed(A)[source]¶
Bases:
CompoundTensorOperator
Transposed tensor.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
Get the UFL shape.
- ufl.classes.TrialFunction(function_space, part=None)[source]¶
UFL value: Create a trial function argument to a form.
- ufl.classes.TrialFunctions(function_space)[source]¶
Create a TrialFunction in a mixed space.
Returns a tuple with the function components corresponding to the subelements.
- class ufl.classes.UndefinedPullback[source]¶
Bases:
AbstractPullback
Undefined pull back.
This should probably be removed.
- property is_identity: bool¶
Is this pull back the identity (or the identity applied to mutliple components).
- physical_value_shape(element, domain) Tuple[int, ...] [source]¶
Get the physical value shape when this pull back is applied to an element on a domain.
- Args:
element: The element that the pull back is applied to domain: The domain
- Returns:
The value shape when the pull back is applied to the given element
- class ufl.classes.Variable(expression, label=None)[source]¶
Bases:
Operator
A Variable is a representative for another expression.
It will be used by the end-user mainly for defining a quantity to differentiate w.r.t. using diff. Example:
e = <...> e = variable(e) f = exp(e**2) df = diff(f, e)
- ufl_free_indices = ()¶
- ufl_index_dimensions = ()¶
- property ufl_shape¶
- class ufl.classes.VariableDerivative(f, v)[source]¶
Bases:
Derivative
Variable Derivative.
- ufl_free_indices¶
- ufl_index_dimensions¶
- ufl_shape¶
ufl.coefficient module¶
This module defines the Coefficient class and a number of related classes, including Constant.
- class ufl.coefficient.BaseCoefficient(function_space, count=None)[source]¶
Bases:
Counted
UFL form argument type: Parent Representation of a form coefficient.
- is_cellwise_constant()[source]¶
Return whether this expression is spatially constant over each cell.
- ufl_element()[source]¶
Shortcut to get the finite element of the function space of this coefficient.
- property ufl_shape¶
Return the associated UFL shape.
- class ufl.coefficient.Coefficient(*args, **kw)[source]¶
Bases:
FormArgument
,BaseCoefficient
UFL form argument type: Representation of a form coefficient.
ufl.compound_expressions module¶
Support for compound expressions as equivalent representations using basic operators.
- ufl.compound_expressions.codeterminant_expr_nxn(A, rows, cols)[source]¶
Determinant of a n by n matrix.
- ufl.compound_expressions.generic_pseudo_determinant_expr(A)[source]¶
Compute the pseudo-determinant of A: sqrt(det(A.T*A)).
ufl.conditional module¶
This module defines classes for conditional expressions.
- class ufl.conditional.AndCondition(left, right)[source]¶
Bases:
BinaryCondition
And condition.
- class ufl.conditional.BinaryCondition(name, left, right)[source]¶
Bases:
Condition
Binary condition.
- class ufl.conditional.Condition(operands)[source]¶
Bases:
Operator
Condition.
- ufl_free_indices = ()¶
- ufl_index_dimensions = ()¶
- ufl_shape = ()¶
- class ufl.conditional.Conditional(condition, true_value, false_value)[source]¶
Bases:
Operator
Conditional expression.
In C++ these take the format (condition ? true_value : false_value).
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.conditional.EQ(left, right)[source]¶
Bases:
BinaryCondition
Equality condition.
- class ufl.conditional.GE(left, right)[source]¶
Bases:
BinaryCondition
Greater than or equal to condition.
- class ufl.conditional.GT(left, right)[source]¶
Bases:
BinaryCondition
Greater than condition.
- class ufl.conditional.LE(left, right)[source]¶
Bases:
BinaryCondition
Less than or equal condition.
- class ufl.conditional.LT(left, right)[source]¶
Bases:
BinaryCondition
Less than condition.
- class ufl.conditional.MaxValue(left, right)[source]¶
Bases:
Operator
Take the maximum of two values.
- ufl_free_indices = ()¶
- ufl_index_dimensions = ()¶
- ufl_shape = ()¶
- class ufl.conditional.MinValue(left, right)[source]¶
Bases:
Operator
Take the minimum of two values.
- ufl_free_indices = ()¶
- ufl_index_dimensions = ()¶
- ufl_shape = ()¶
- class ufl.conditional.NE(left, right)[source]¶
Bases:
BinaryCondition
Not equal condition.
- class ufl.conditional.OrCondition(left, right)[source]¶
Bases:
BinaryCondition
Or condition.
ufl.constant module¶
Support fpr non-literal values which are constant with respect to a domain.
ufl.constantvalue module¶
This module defines classes representing constant values.
- class ufl.constantvalue.ComplexValue(value)[source]¶
Bases:
ScalarValue
Representation of a constant, complex scalar.
- class ufl.constantvalue.ConstantValue[source]¶
Bases:
Terminal
Constant value.
- class ufl.constantvalue.FloatValue(value)[source]¶
Bases:
RealValue
Representation of a constant scalar floating point value.
- class ufl.constantvalue.Identity(dim)[source]¶
Bases:
ConstantValue
Representation of an identity matrix.
- ufl_shape¶
- class ufl.constantvalue.IntValue(value)[source]¶
Bases:
RealValue
Representation of a constant scalar integer value.
- class ufl.constantvalue.PermutationSymbol(dim)[source]¶
Bases:
ConstantValue
Representation of a permutation symbol.
This is also known as the Levi-Civita symbol, antisymmetric symbol, or alternating symbol.
- ufl_shape¶
- class ufl.constantvalue.RealValue(value)[source]¶
Bases:
ScalarValue
Abstract class used to differentiate real values from complex ones.
- ufl_free_indices = ()¶
- ufl_index_dimensions = ()¶
- ufl_shape = ()¶
- class ufl.constantvalue.ScalarValue(value)[source]¶
Bases:
ConstantValue
A constant scalar value.
- ufl_free_indices = ()¶
- ufl_index_dimensions = ()¶
- ufl_shape = ()¶
ufl.differentiation module¶
Differential operators.
- class ufl.differentiation.BaseFormCoordinateDerivative(integrand, coefficients, arguments, coefficient_derivatives)[source]¶
Bases:
BaseFormDerivative
,CoordinateDerivative
Derivative of a base form w.r.t. the SpatialCoordinates.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.differentiation.BaseFormDerivative(integrand, coefficients, arguments, coefficient_derivatives)[source]¶
Bases:
CoefficientDerivative
,BaseForm
Derivative of a base form w.r.t the degrees of freedom in a discrete Coefficient.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.differentiation.BaseFormOperatorCoordinateDerivative(integrand, coefficients, arguments, coefficient_derivatives)[source]¶
Bases:
BaseFormOperatorDerivative
,CoordinateDerivative
Derivative of a base form operator w.r.t. the SpatialCoordinates.
- property ufl_free_indices¶
Built-in immutable sequence.
If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable’s items.
If the argument is a tuple, the return value is the same object.
- property ufl_index_dimensions¶
Built-in immutable sequence.
If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable’s items.
If the argument is a tuple, the return value is the same object.
- property ufl_shape¶
Return the UFL shape of the coefficient.produced by the operator.
- class ufl.differentiation.BaseFormOperatorDerivative(integrand, coefficients, arguments, coefficient_derivatives)[source]¶
Bases:
BaseFormDerivative
,BaseFormOperator
Derivative of a base form operator w.r.t the degrees of freedom in a discrete Coefficient.
- argument_slots(outer_form=False)[source]¶
Return a tuple of expressions containing argument and coefficient based expressions.
- property ufl_free_indices¶
Built-in immutable sequence.
If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable’s items.
If the argument is a tuple, the return value is the same object.
- property ufl_index_dimensions¶
Built-in immutable sequence.
If no argument is given, the constructor returns an empty tuple. If iterable is specified the tuple is initialized from iterable’s items.
If the argument is a tuple, the return value is the same object.
- property ufl_shape¶
Return the UFL shape of the coefficient.produced by the operator.
- class ufl.differentiation.CoefficientDerivative(integrand, coefficients, arguments, coefficient_derivatives)[source]¶
Bases:
Derivative
Derivative of form integrand w.r.t. the degrees of freedom in a discrete Coefficient.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.differentiation.CompoundDerivative(operands)[source]¶
Bases:
Derivative
Base class for all compound derivative types.
- class ufl.differentiation.CoordinateDerivative(integrand, coefficients, arguments, coefficient_derivatives)[source]¶
Bases:
CoefficientDerivative
Derivative of the integrand of a form w.r.t. the SpatialCoordinates.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
- class ufl.differentiation.Curl(f)[source]¶
Bases:
CompoundDerivative
Compound derivative.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- ufl_shape¶
- class ufl.differentiation.Derivative(operands)[source]¶
Bases:
Operator
Base class for all derivative types.
- class ufl.differentiation.Div(f)[source]¶
Bases:
CompoundDerivative
Div.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.differentiation.Grad(f)[source]¶
Bases:
CompoundDerivative
Grad.
- evaluate(x, mapping, component, index_values, derivatives=())[source]¶
Get child from mapping and return the component asked for.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.differentiation.NablaDiv(f)[source]¶
Bases:
CompoundDerivative
Nabla div.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.differentiation.NablaGrad(f)[source]¶
Bases:
CompoundDerivative
Nabla grad.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.differentiation.ReferenceCurl(f)[source]¶
Bases:
CompoundDerivative
Reference curl.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- ufl_shape¶
- class ufl.differentiation.ReferenceDiv(f)[source]¶
Bases:
CompoundDerivative
Reference divergence.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
Get the UFL shape.
- class ufl.differentiation.ReferenceGrad(f)[source]¶
Bases:
CompoundDerivative
Reference grad.
- evaluate(x, mapping, component, index_values, derivatives=())[source]¶
Get child from mapping and return the component asked for.
- property ufl_free_indices¶
- property ufl_index_dimensions¶
- property ufl_shape¶
Get the UFL shape.
ufl.domain module¶
Types for representing a geometric domain.
- class ufl.domain.AbstractDomain(topological_dimension, geometric_dimension)[source]¶
Bases:
object
Symbolic representation of a geometric domain.
Domain has only a geometric and a topological dimension.
- class ufl.domain.Mesh(coordinate_element, ufl_id=None, cargo=None)[source]¶
Bases:
AbstractDomain
,UFLObject
Symbolic representation of a mesh.
- ufl_id()¶
Return the ufl_id of this object.
- class ufl.domain.MeshView(mesh, topological_dimension, ufl_id=None)[source]¶
Bases:
AbstractDomain
,UFLObject
Symbolic representation of a mesh.
- ufl_id()¶
Return the ufl_id of this object.
- ufl.domain.extract_unique_domain(expr)[source]¶
Return the single unique domain expression is defined on or throw an error.
ufl.duals module¶
Predicates for recognising duals.
ufl.equation module¶
The Equation class, used to express equations like a == L.
ufl.exprcontainers module¶
This module defines special types for representing mapping of expressions to expressions.