symfem.functionals¶
Functionals used to define the dual sets.
Classes¶
A functional. |
|
A point evaluation. |
|
A point evaluation. |
|
A point evaluation of a given derivative. |
|
A point evaluation of a derivative in a fixed direction. |
|
A point evaluation of a normal derivative. |
|
A point evaluation of a component of a second derivative. |
|
An evaluation of an inner product at a point. |
|
A point evaluation in a given direction. |
|
A point evaluation of the divergence. |
|
An integral against a function. |
|
An integral of the divergence against a function. |
|
An integral of a directional derivative of a scalar function. |
|
An integral moment. |
|
An integral moment of the derivative of a scalar function. |
|
An integral moment of the divergence of a vector function. |
|
An integral moment in the tangential direction. |
|
An integral moment in the normal direction. |
|
An integral moment of the trace of a matrix. |
|
An integral moment in the normal direction. |
|
An integral moment of the inner product with a vector. |
|
An integral moment of the inner product with the normal direction. |
Module Contents¶
- class symfem.functionals.BaseFunctional(reference: symfem.references.Reference, entity: tuple[int, int], mapping: str | None)¶
Bases:
abc.ABCA functional.
- reference¶
- entity¶
- mapping¶
- property nderivs: int¶
- Abstractmethod:
Number of derivatives.
- entity_dim() int¶
Get the dimension of the entity this DOF is associated with.
- Returns:
The dimension of the entity this DOF is associated with
- entity_number() int¶
Get the number of the entity this DOF is associated with.
- Returns:
The number of the entity this DOF is associated with
- perform_mapping(fs: list[symfem.functions.Function], map: symfem.geometry.PointType, inverse_map: symfem.geometry.PointType) list[symfem.functions.Function]¶
Map functions to a cell.
- Parameters:
fs – functions
map – Map from the reference cell to a physical cell
inverse_map – Map to the reference cell from a physical cell
- Returns:
Mapped functions
- entity_tex() str¶
Get the entity the DOF is associated with in TeX format.
- Returns:
TeX representation of entity
- entity_definition() str¶
Get the definition of the entity the DOF is associated with.
- Returns:
The definition
- dof_direction() symfem.geometry.PointType | None¶
Get the direction of the DOF.
- Returns:
The direction
- eval(function: symfem.functions.Function, symbolic: bool = True) symfem.functions.ScalarFunction | float¶
Apply to the functional to a function.
- Parameters:
function – The function
symbolic – Should it be applied symbolically?
- Returns:
The value of the functional for the function
- abstractmethod dof_point() symfem.geometry.PointType¶
Get the location of the DOF in the cell.
- Returns:
The point
- adjusted_dof_point() symfem.geometry.PointType¶
Get the adjusted position of the DOF in the cell for plotting.
- Returns:
The point
- eval_symbolic(function: symfem.functions.Function) symfem.functions.ScalarFunction¶
Symbolically apply the functional to a function.
- Parameters:
function – The function
- Returns:
The value of the functional for the function
- abstractmethod _eval_symbolic(function: symfem.functions.Function) symfem.functions.Function¶
Apply to the functional to a function.
- Parameters:
function – The function
- Returns:
The value of the functional for the function
- abstractmethod get_tex() tuple[str, list[str]]¶
Get a representation of the functional as TeX, and list of terms involved.
- Returns:
Representation of the functional as TeX, and list of terms involved
- abstractmethod discrete(poly_degree: int) DiscreteDof¶
Get points and weights that define this DOF discretely.
- Parameters:
poly_degree – The polynomial degree of the element. This may be used to decide which degree quadrature rule to use
- Returns:
Points (a list of lists whose indices are [point_index][dimension]) and weights (a list of list of lists whose indices are [dimension][point_index][derivative])
- name = 'Base functional'¶
- class symfem.functionals.PointEvaluation(reference: symfem.references.Reference, point_in: symfem.functions.FunctionInput, entity: tuple[int, int], mapping: str | None = 'identity')¶
Bases:
BaseFunctionalA point evaluation.
- point¶
- property nderivs: int¶
Number of derivatives.
- _eval_symbolic(function: symfem.functions.Function) symfem.functions.Function¶
Apply to the functional to a function.
- Parameters:
function – The function
- Returns:
The value of the functional for the function
- dof_point() symfem.geometry.PointType¶
Get the location of the DOF in the cell.
- Returns:
The point
- adjusted_dof_point() symfem.geometry.PointType¶
Get the adjusted position of the DOF in the cell for plotting.
- Returns:
The point
- get_tex() tuple[str, list[str]]¶
Get a representation of the functional as TeX, and list of terms involved.
- Returns:
Representation of the functional as TeX, and list of terms involved
- discrete(poly_degree: int) DiscreteDof¶
Get points and weights that define this DOF discretely.
- Parameters:
poly_degree – The polynomial degree of the element. This may be used to decide which degree quadrature rule to use
- Returns:
Points (a list of lists whose indices are [point_index][dimension]) and weights (a list of list of lists whose indices are [dimension][point_index][derivative])
- name = 'Point evaluation'¶
- class symfem.functionals.WeightedPointEvaluation(reference: symfem.references.Reference, point_in: symfem.functions.FunctionInput, weight: sympy.core.expr.Expr, entity: tuple[int, int], mapping: str | None = 'identity')¶
Bases:
BaseFunctionalA point evaluation.
- point¶
- weight¶
- property nderivs: int¶
Number of derivatives.
- _eval_symbolic(function: symfem.functions.Function) symfem.functions.Function¶
Apply to the functional to a function.
- Parameters:
function – The function
- Returns:
The value of the functional for the function
- dof_point() symfem.geometry.PointType¶
Get the location of the DOF in the cell.
- Returns:
The point
- adjusted_dof_point() symfem.geometry.PointType¶
Get the adjusted position of the DOF in the cell for plotting.
- Returns:
The point
- get_tex() tuple[str, list[str]]¶
Get a representation of the functional as TeX, and list of terms involved.
- Returns:
Representation of the functional as TeX, and list of terms involved
- discrete(poly_degree: int) DiscreteDof¶
Get points and weights that define this DOF discretely.
- Parameters:
poly_degree – The polynomial degree of the element. This may be used to decide which degree quadrature rule to use
- Returns:
Points (a list of lists whose indices are [point_index][dimension]) and weights (a list of list of lists whose indices are [dimension][point_index][derivative])
- name = 'Weighted point evaluation'¶
- class symfem.functionals.DerivativePointEvaluation(reference: symfem.references.Reference, point_in: symfem.functions.FunctionInput, derivative: tuple[int, Ellipsis], entity: tuple[int, int], mapping: str | None = None)¶
Bases:
BaseFunctionalA point evaluation of a given derivative.
- point¶
- derivative¶
- property nderivs: int¶
Number of derivatives.
- _eval_symbolic(function: symfem.functions.Function) symfem.functions.Function¶
Apply to the functional to a function.
- Parameters:
function – The function
- Returns:
The value of the functional for the function
- dof_point() symfem.geometry.PointType¶
Get the location of the DOF in the cell.
- Returns:
The point
- adjusted_dof_point() symfem.geometry.PointType¶
Get the adjusted position of the DOF in the cell for plotting.
- Returns:
The point
- perform_mapping(fs: list[symfem.functions.Function], map: symfem.geometry.PointType, inverse_map: symfem.geometry.PointType) list[symfem.functions.Function]¶
Map functions to a cell.
- Parameters:
fs – functions
map – Map from the reference cell to a physical cell
inverse_map – Map to the reference cell from a physical cell
- Returns:
Mapped functions
- get_tex() tuple[str, list[str]]¶
Get a representation of the functional as TeX, and list of terms involved.
- Returns:
Representation of the functional as TeX, and list of terms involved
- abstractmethod discrete(poly_degree: int) DiscreteDof¶
Get points and weights that define this DOF discretely.
- Parameters:
poly_degree – The polynomial degree of the element. This may be used to decide which degree quadrature rule to use
- Returns:
Points (a list of lists whose indices are [point_index][dimension]) and weights (a list of list of lists whose indices are [dimension][point_index][derivative])
- name = 'Point derivative evaluation'¶
- class symfem.functionals.PointDirectionalDerivativeEvaluation(reference: symfem.references.Reference, point_in: symfem.functions.FunctionInput, direction_in: symfem.functions.FunctionInput, entity: tuple[int, int], mapping: str | None = 'identity')¶
Bases:
BaseFunctionalA point evaluation of a derivative in a fixed direction.
- point¶
- dir¶
- property nderivs: int¶
Number of derivatives.
- _eval_symbolic(function: symfem.functions.Function) symfem.functions.Function¶
Apply to the functional to a function.
- Parameters:
function – The function
- Returns:
The value of the functional for the function
- dof_point() symfem.geometry.PointType¶
Get the location of the DOF in the cell.
- Returns:
The point
- dof_direction() symfem.geometry.PointType | None¶
Get the direction of the DOF.
- Returns:
The direction
- adjusted_dof_point() symfem.geometry.PointType¶
Get the adjusted position of the DOF in the cell for plotting.
- Returns:
The point
- get_tex() tuple[str, list[str]]¶
Get a representation of the functional as TeX, and list of terms involved.
- Returns:
Representation of the functional as TeX, and list of terms involved
- abstractmethod discrete(poly_degree: int) DiscreteDof¶
Get points and weights that define this DOF discretely.
- Parameters:
poly_degree – The polynomial degree of the element. This may be used to decide which degree quadrature rule to use
- Returns:
Points (a list of lists whose indices are [point_index][dimension]) and weights (a list of list of lists whose indices are [dimension][point_index][derivative])
- name = 'Point evaluation of directional derivative'¶
- class symfem.functionals.PointNormalDerivativeEvaluation(reference: symfem.references.Reference, point_in: symfem.functions.FunctionInput, edge: symfem.references.Reference, entity: tuple[int, int], mapping: str | None = 'identity')¶
Bases:
PointDirectionalDerivativeEvaluationA point evaluation of a normal derivative.
- reference¶
- property nderivs: int¶
Number of derivatives.
- get_tex() tuple[str, list[str]]¶
Get a representation of the functional as TeX, and list of terms involved.
- Returns:
Representation of the functional as TeX, and list of terms involved
- abstractmethod discrete(poly_degree: int) DiscreteDof¶
Get points and weights that define this DOF discretely.
- Parameters:
poly_degree – The polynomial degree of the element. This may be used to decide which degree quadrature rule to use
- Returns:
Points (a list of lists whose indices are [point_index][dimension]) and weights (a list of list of lists whose indices are [dimension][point_index][derivative])
- name = 'Point evaluation of normal derivative'¶
- class symfem.functionals.PointComponentSecondDerivativeEvaluation(reference: symfem.references.Reference, point_in: symfem.functions.FunctionInput, component: tuple[int, int], entity: tuple[int, int], mapping: str | None = 'identity')¶
Bases:
BaseFunctionalA point evaluation of a component of a second derivative.
- point¶
- component¶
- property nderivs: int¶
Number of derivatives.
- _eval_symbolic(function: symfem.functions.Function) symfem.functions.Function¶
Apply to the functional to a function.
- Parameters:
function – The function
- Returns:
The value of the functional for the function
- dof_point() symfem.geometry.PointType¶
Get the location of the DOF in the cell.
- Returns:
The point
- adjusted_dof_point() symfem.geometry.PointType¶
Get the adjusted position of the DOF in the cell for plotting.
- Returns:
The point
- get_tex() tuple[str, list[str]]¶
Get a representation of the functional as TeX, and list of terms involved.
- Returns:
Representation of the functional as TeX, and list of terms involved
- abstractmethod discrete(poly_degree: int) DiscreteDof¶
Get points and weights that define this DOF discretely.
- Parameters:
poly_degree – The polynomial degree of the element. This may be used to decide which degree quadrature rule to use
- Returns:
Points (a list of lists whose indices are [point_index][dimension]) and weights (a list of list of lists whose indices are [dimension][point_index][derivative])
- name = 'Point evaluation of Hessian component'¶
- class symfem.functionals.PointInnerProduct(reference: symfem.references.Reference, point_in: symfem.functions.FunctionInput, lvec: symfem.functions.FunctionInput, rvec: symfem.functions.FunctionInput, entity: tuple[int, int], mapping: str | None = 'identity')¶
Bases:
BaseFunctionalAn evaluation of an inner product at a point.
- point¶
- lvec¶
- rvec¶
- property nderivs: int¶
Number of derivatives.
- _eval_symbolic(function: symfem.functions.Function) symfem.functions.Function¶
Apply to the functional to a function.
- Parameters:
function – The function
- Returns:
The value of the functional for the function
- dof_point() symfem.geometry.PointType¶
Get the location of the DOF in the cell.
- Returns:
The point
- dof_direction() symfem.geometry.PointType | None¶
Get the direction of the DOF.
- Returns:
The direction
- adjusted_dof_point() symfem.geometry.PointType¶
Get the adjusted position of the DOF in the cell for plotting.
- Returns:
The point
- get_tex() tuple[str, list[str]]¶
Get a representation of the functional as TeX, and list of terms involved.
- Returns:
Representation of the functional as TeX, and list of terms involved
- discrete(poly_degree: int) DiscreteDof¶
Get points and weights that define this DOF discretely.
- Parameters:
poly_degree – The polynomial degree of the element. This may be used to decide which degree quadrature rule to use
- Returns:
Points (a list of lists whose indices are [point_index][dimension]) and weights (a list of list of lists whose indices are [dimension][point_index][derivative])
- name = 'Point inner product'¶
- class symfem.functionals.DotPointEvaluation(reference: symfem.references.Reference, point_in: symfem.functions.FunctionInput, vector_in: symfem.functions.FunctionInput, entity: tuple[int, int], mapping: str | None = 'identity')¶
Bases:
BaseFunctionalA point evaluation in a given direction.
- point¶
- vector¶
- property nderivs: int¶
Number of derivatives.
- _eval_symbolic(function: symfem.functions.Function) symfem.functions.Function¶
Apply to the functional to a function.
- Parameters:
function – The function
- Returns:
The value of the functional for the function
- dof_point() symfem.geometry.PointType¶
Get the location of the DOF in the cell.
- Returns:
The point
- dof_direction() symfem.geometry.PointType | None¶
Get the direction of the DOF.
- Returns:
The direction
- adjusted_dof_point() symfem.geometry.PointType¶
Get the adjusted position of the DOF in the cell for plotting.
- Returns:
The point
- get_tex() tuple[str, list[str]]¶
Get a representation of the functional as TeX, and list of terms involved.
- Returns:
Representation of the functional as TeX, and list of terms involved
- discrete(poly_degree: int) DiscreteDof¶
Get points and weights that define this DOF discretely.
- Parameters:
poly_degree – The polynomial degree of the element. This may be used to decide which degree quadrature rule to use
- Returns:
Points (a list of lists whose indices are [point_index][dimension]) and weights (a list of list of lists whose indices are [dimension][point_index][derivative])
- name = 'Dot point evaluation'¶
- class symfem.functionals.PointDivergenceEvaluation(reference: symfem.references.Reference, point_in: symfem.functions.FunctionInput, entity: tuple[int, int], mapping: str | None = 'identity')¶
Bases:
BaseFunctionalA point evaluation of the divergence.
- point¶
- property nderivs: int¶
Number of derivatives.
- _eval_symbolic(function: symfem.functions.Function) symfem.functions.Function¶
Apply to the functional to a function.
- Parameters:
function – The function
- Returns:
The value of the functional for the function
- dof_point() symfem.geometry.PointType¶
Get the location of the DOF in the cell.
- Returns:
The point
- dof_direction() symfem.geometry.PointType | None¶
Get the direction of the DOF.
- Returns:
The direction
- adjusted_dof_point() symfem.geometry.PointType¶
Get the adjusted position of the DOF in the cell for plotting.
- Returns:
The point
- get_tex() tuple[str, list[str]]¶
Get a representation of the functional as TeX, and list of terms involved.
- Returns:
Representation of the functional as TeX, and list of terms involved
- abstractmethod discrete(poly_degree: int) DiscreteDof¶
Get points and weights that define this DOF discretely.
- Parameters:
poly_degree – The polynomial degree of the element. This may be used to decide which degree quadrature rule to use
- Returns:
Points (a list of lists whose indices are [point_index][dimension]) and weights (a list of list of lists whose indices are [dimension][point_index][derivative])
- name = 'Point evaluation of divergence'¶
- class symfem.functionals.IntegralAgainst(reference: symfem.references.Reference, f_in: symfem.functions.FunctionInput, entity: tuple[int, int], mapping: str | None = 'identity')¶
Bases:
BaseFunctionalAn integral against a function.
- integral_domain¶
- property nderivs: int¶
Number of derivatives.
- dof_point() symfem.geometry.PointType¶
Get the location of the DOF in the cell.
- Returns:
The point
- _eval_symbolic(function: symfem.functions.Function) symfem.functions.Function¶
Apply to the functional to a function.
- Parameters:
function – The function
- Returns:
The value of the functional for the function
- dot(function: symfem.functions.Function) symfem.functions.ScalarFunction¶
Dot a function with the moment function.
- Parameters:
function – The function
- Returns:
The product of the function and the moment function
- get_tex() tuple[str, list[str]]¶
Get a representation of the functional as TeX, and list of terms involved.
- Returns:
Representation of the functional as TeX, and list of terms involved
- discrete(poly_degree: int) DiscreteDof¶
Get points and weights that define this DOF discretely.
- Parameters:
poly_degree – The polynomial degree of the element. This may be used to decide which degree quadrature rule to use
- Returns:
Points (a list of lists whose indices are [point_index][dimension]) and weights (a list of list of lists whose indices are [dimension][point_index][derivative])
- name = 'Integral against'¶
- class symfem.functionals.IntegralOfDivergenceAgainst(reference: symfem.references.Reference, f_in: symfem.functions.FunctionInput, entity: tuple[int, int], mapping: str | None = 'identity')¶
Bases:
BaseFunctionalAn integral of the divergence against a function.
- integral_domain¶
- f¶
- property nderivs: int¶
Number of derivatives.
- dof_point() symfem.geometry.PointType¶
Get the location of the DOF in the cell.
- Returns:
The point
- _eval_symbolic(function: symfem.functions.Function) symfem.functions.Function¶
Apply to the functional to a function.
- Parameters:
function – The function
- Returns:
The value of the functional for the function
- dot(function: symfem.functions.ScalarFunction) symfem.functions.ScalarFunction¶
Dot a function with the moment function.
- Parameters:
function – The function
- Returns:
The product of the function and the moment function
- get_tex() tuple[str, list[str]]¶
Get a representation of the functional as TeX, and list of terms involved.
- Returns:
Representation of the functional as TeX, and list of terms involved
- abstractmethod discrete(poly_degree: int) DiscreteDof¶
Get points and weights that define this DOF discretely.
- Parameters:
poly_degree – The polynomial degree of the element. This may be used to decide which degree quadrature rule to use
- Returns:
Points (a list of lists whose indices are [point_index][dimension]) and weights (a list of list of lists whose indices are [dimension][point_index][derivative])
- name = 'Integral of divergence against'¶
- class symfem.functionals.IntegralOfDirectionalMultiderivative(reference: symfem.references.Reference, directions: symfem.geometry.SetOfPoints, orders: tuple[int, Ellipsis], entity: tuple[int, int], scale: int = 1, mapping: str | None = 'identity')¶
Bases:
BaseFunctionalAn integral of a directional derivative of a scalar function.
- integral_domain¶
- directions¶
- orders¶
- scale = 1¶
- property nderivs: int¶
Number of derivatives.
- dof_point() symfem.geometry.PointType¶
Get the location of the DOF in the cell.
- Returns:
The point
- _eval_symbolic(function: symfem.functions.Function) symfem.functions.Function¶
Apply to the functional to a function.
- Parameters:
function – The function
- Returns:
The value of the functional for the function
- perform_mapping(fs: list[symfem.functions.Function], map: symfem.geometry.PointType, inverse_map: symfem.geometry.PointType) list[symfem.functions.Function]¶
Map functions to a cell.
- Parameters:
fs – functions
map – Map from the reference cell to a physical cell
inverse_map – Map to the reference cell from a physical cell
- Returns:
Mapped functions
- get_tex() tuple[str, list[str]]¶
Get a representation of the functional as TeX, and list of terms involved.
- Returns:
Representation of the functional as TeX, and list of terms involved
- abstractmethod discrete(poly_degree: int) DiscreteDof¶
Get points and weights that define this DOF discretely.
- Parameters:
poly_degree – The polynomial degree of the element. This may be used to decide which degree quadrature rule to use
- Returns:
Points (a list of lists whose indices are [point_index][dimension]) and weights (a list of list of lists whose indices are [dimension][point_index][derivative])
- name = 'Integral of a directional derivative'¶
- class symfem.functionals.IntegralMoment(reference: symfem.references.Reference, f_in: symfem.functions.FunctionInput, dof: BaseFunctional, entity: tuple[int, int], mapping: str | None = 'identity', map_function: bool = True)¶
Bases:
BaseFunctionalAn integral moment.
- integral_domain¶
- dof¶
- property nderivs: int¶
Number of derivatives.
- _eval_symbolic(function: symfem.functions.Function) symfem.functions.Function¶
Apply to the functional to a function.
- Parameters:
function – The function
- Returns:
The value of the functional for the function
- dot(function: symfem.functions.Function) symfem.functions.ScalarFunction¶
Dot a function with the moment function.
- Parameters:
function – The function
- Returns:
The product of the function and the moment function
- dof_point() symfem.geometry.PointType¶
Get the location of the DOF in the cell.
- Returns:
The point
- dof_direction() symfem.geometry.PointType | None¶
Get the direction of the DOF.
- Returns:
The direction
- get_tex() tuple[str, list[str]]¶
Get a representation of the functional as TeX, and list of terms involved.
- Returns:
Representation of the functional as TeX, and list of terms involved
- discrete(poly_degree: int) DiscreteDof¶
Get points and weights that define this DOF discretely.
- Parameters:
poly_degree – The polynomial degree of the element. This may be used to decide which degree quadrature rule to use
- Returns:
Points (a list of lists whose indices are [point_index][dimension]) and weights (a list of list of lists whose indices are [dimension][point_index][derivative])
- name = 'Integral moment'¶
- class symfem.functionals.DerivativeIntegralMoment(reference: symfem.references.Reference, f: symfem.functions.FunctionInput, dot_with_in: symfem.functions.FunctionInput, dof: BaseFunctional, entity: tuple[int, int], mapping: str | None = 'identity')¶
Bases:
IntegralMomentAn integral moment of the derivative of a scalar function.
- dot_with¶
- property nderivs: int¶
Number of derivatives.
- dot(function: symfem.functions.Function) symfem.functions.ScalarFunction¶
Dot a function with the moment function.
- Parameters:
function – The function
- Returns:
The product of the function and the moment function
- dof_direction() symfem.geometry.PointType | None¶
Get the direction of the DOF.
- Returns:
The direction
- _eval_symbolic(function: symfem.functions.Function) symfem.functions.Function¶
Apply to the functional to a function.
- Parameters:
function – The function
- Returns:
The value of the functional for the function
- abstractmethod discrete(poly_degree: int) DiscreteDof¶
Get points and weights that define this DOF discretely.
- Parameters:
poly_degree – The polynomial degree of the element. This may be used to decide which degree quadrature rule to use
- Returns:
Points (a list of lists whose indices are [point_index][dimension]) and weights (a list of list of lists whose indices are [dimension][point_index][derivative])
- name = 'Derivative integral moment'¶
- class symfem.functionals.DivergenceIntegralMoment(reference: symfem.references.Reference, f_in: symfem.functions.FunctionInput, dof: BaseFunctional, entity: tuple[int, int], mapping: str | None = 'identity')¶
Bases:
IntegralMomentAn integral moment of the divergence of a vector function.
- property nderivs: int¶
Number of derivatives.
- _eval_symbolic(function: symfem.functions.Function) symfem.functions.Function¶
Apply to the functional to a function.
- Parameters:
function – The function
- Returns:
The value of the functional for the function
- get_tex() tuple[str, list[str]]¶
Get a representation of the functional as TeX, and list of terms involved.
- Returns:
Representation of the functional as TeX, and list of terms involved
- abstractmethod discrete(poly_degree: int) DiscreteDof¶
Get points and weights that define this DOF discretely.
- Parameters:
poly_degree – The polynomial degree of the element. This may be used to decide which degree quadrature rule to use
- Returns:
Points (a list of lists whose indices are [point_index][dimension]) and weights (a list of list of lists whose indices are [dimension][point_index][derivative])
- name = 'Integral moment of divergence'¶
- class symfem.functionals.TangentIntegralMoment(reference: symfem.references.Reference, f_in: symfem.functions.FunctionInput, dof: BaseFunctional, entity: tuple[int, int], mapping: str | None = 'covariant')¶
Bases:
IntegralMomentAn integral moment in the tangential direction.
- _scalar_f¶
- dof_direction() symfem.geometry.PointType | None¶
Get the direction of the DOF.
- Returns:
The direction
- get_tex() tuple[str, list[str]]¶
Get a representation of the functional as TeX, and list of terms involved.
- Returns:
Representation of the functional as TeX, and list of terms involved
- name = 'Tangential integral moment'¶
- class symfem.functionals.NormalIntegralMoment(reference: symfem.references.Reference, f_in: symfem.functions.FunctionInput, dof: BaseFunctional, entity: tuple[int, int], mapping: str | None = 'contravariant')¶
Bases:
IntegralMomentAn integral moment in the normal direction.
- _scalar_f¶
- dof_direction() symfem.geometry.PointType | None¶
Get the direction of the DOF.
- Returns:
The direction
- get_tex() tuple[str, list[str]]¶
Get a representation of the functional as TeX, and list of terms involved.
- Returns:
Representation of the functional as TeX, and list of terms involved
- name = 'Normal integral moment'¶
- class symfem.functionals.TraceIntegralMoment(reference: symfem.references.Reference, f_in: symfem.functions.FunctionInput, dof: BaseFunctional, entity: tuple[int, int], mapping: str | None = 'contravariant')¶
Bases:
IntegralMomentAn integral moment of the trace of a matrix.
- dot(function: symfem.functions.Function) symfem.functions.ScalarFunction¶
Take the product of a function with the trace of the matrix.
- Parameters:
function – The function
- Returns:
The inner product of the function and the matrix’s trace
- get_tex() tuple[str, list[str]]¶
Get a representation of the functional as TeX, and list of terms involved.
- Returns:
Representation of the functional as TeX, and list of terms involved
- abstractmethod discrete(poly_degree: int) DiscreteDof¶
Get points and weights that define this DOF discretely.
- Parameters:
poly_degree – The polynomial degree of the element. This may be used to decide which degree quadrature rule to use
- Returns:
Points (a list of lists whose indices are [point_index][dimension]) and weights (a list of list of lists whose indices are [dimension][point_index][derivative])
- name = 'Trace integral moment'¶
- class symfem.functionals.NormalDerivativeIntegralMoment(reference: symfem.references.Reference, f_in: symfem.functions.FunctionInput, dof: BaseFunctional, entity: tuple[int, int], mapping: str | None = 'identity')¶
Bases:
DerivativeIntegralMomentAn integral moment in the normal direction.
- get_tex() tuple[str, list[str]]¶
Get a representation of the functional as TeX, and list of terms involved.
- Returns:
Representation of the functional as TeX, and list of terms involved
- property nderivs: int¶
Number of derivatives.
- abstractmethod discrete(poly_degree: int) DiscreteDof¶
Get points and weights that define this DOF discretely.
- Parameters:
poly_degree – The polynomial degree of the element. This may be used to decide which degree quadrature rule to use
- Returns:
Points (a list of lists whose indices are [point_index][dimension]) and weights (a list of list of lists whose indices are [dimension][point_index][derivative])
- name = 'Normal derivative integral moment'¶
- class symfem.functionals.InnerProductIntegralMoment(reference: symfem.references.Reference, f_in: symfem.functions.FunctionInput, inner_with_left_in: symfem.functions.FunctionInput, inner_with_right_in: symfem.functions.FunctionInput, dof: BaseFunctional, entity: tuple[int, int], mapping: str | None = 'identity')¶
Bases:
IntegralMomentAn integral moment of the inner product with a vector.
- inner_with_left¶
- inner_with_right¶
- dot(function: symfem.functions.Function) symfem.functions.ScalarFunction¶
Take the inner product of a function with the moment direction.
- Parameters:
function – The function
- Returns:
The inner product of the function and the moment direction
- dof_direction() symfem.geometry.PointType | None¶
Get the direction of the DOF.
- Returns:
The direction
- get_tex() tuple[str, list[str]]¶
Get a representation of the functional as TeX, and list of terms involved.
- Returns:
Representation of the functional as TeX, and list of terms involved
- discrete(poly_degree: int) DiscreteDof¶
Get points and weights that define this DOF discretely.
- Parameters:
poly_degree – The polynomial degree of the element. This may be used to decide which degree quadrature rule to use
- Returns:
Points (a list of lists whose indices are [point_index][dimension]) and weights (a list of list of lists whose indices are [dimension][point_index][derivative])
- name = 'Inner product integral moment'¶
- class symfem.functionals.NormalInnerProductIntegralMoment(reference: symfem.references.Reference, f_in: symfem.functions.FunctionInput, dof: BaseFunctional, entity: tuple[int, int], mapping: str | None = 'double_contravariant')¶
Bases:
InnerProductIntegralMomentAn integral moment of the inner product with the normal direction.
- get_tex() tuple[str, list[str]]¶
Get a representation of the functional as TeX, and list of terms involved.
- Returns:
Representation of the functional as TeX, and list of terms involved
- name = 'Normal inner product integral moment'¶