ffc.uflacs.backends.ffc package¶
Submodules¶
ffc.uflacs.backends.ffc.access module¶
FFC/UFC specific variable access.
-
class
ffc.uflacs.backends.ffc.access.
FFCBackendAccess
(ir, language, symbols, parameters)[source]¶ Bases:
ufl.corealg.multifunction.MultiFunction
FFC specific cpp formatter class.
-
cell_normal
(e, mt, tabledata, num_points)¶
-
facet_jacobian
(e, mt, tabledata, num_points)¶
-
facet_jacobian_determinant
(e, mt, tabledata, num_points)¶
-
facet_jacobian_inverse
(e, mt, tabledata, num_points)¶
-
facet_normal
(e, mt, tabledata, num_points)¶
-
jacobian_determinant
(e, mt, tabledata, num_points)¶
-
jacobian_inverse
(e, mt, tabledata, num_points)¶
-
ffc.uflacs.backends.ffc.backend module¶
Collection of FFC specific pieces for the code generation phase.
ffc.uflacs.backends.ffc.common module¶
FFC/UFC specific symbol naming.
-
ffc.uflacs.backends.ffc.common.
num_coordinate_component_dofs
(coordinate_element)[source]¶ Get the number of dofs for a coordinate component for this degree.
This is a local hack that works for Lagrange 1-3, better would be to get this passed by ffc from fiat through the ir. The table data is to messy to figure out a clean design for that quickly.
ffc.uflacs.backends.ffc.definitions module¶
FFC/UFC specific variable definitions.
-
class
ffc.uflacs.backends.ffc.definitions.
FFCBackendDefinitions
(ir, language, symbols, parameters)[source]¶ Bases:
ufl.corealg.multifunction.MultiFunction
FFC specific code definitions.
-
argument
(t, mt, tabledata, num_points, access)[source]¶ Arguments are accessed through element tables.
-
cell_coordinate
(e, mt, tabledata, num_points, access)[source]¶ Return definition code for the reference spatial coordinates.
If reference coordinates are given:
No definition needed.
If physical coordinates are given and domain is affine:
X = K*(x-x0)
This is inserted symbolically.
If physical coordinates are given and domain is non- affine:
Not currently supported.
-
cell_edge_vectors
(e, mt, tabledata, num_points, access)¶ These quantities refer to coordinate_dofs
-
cell_facet_jacobian
(e, mt, tabledata, num_points, access)¶ These quantities refer to constant tables defined in ufc_geometry.h.
-
cell_normal
(e, mt, tabledata, num_points, access)¶ These quantities are expected to be replaced in symbolic preprocessing.
-
cell_vertices
(e, mt, tabledata, num_points, access)¶ These quantities refer to coordinate_dofs
-
constant_value
(e, mt, tabledata, num_points, access)[source]¶ Constants simply use literals in the target language.
-
facet_edge_vectors
(e, mt, tabledata, num_points, access)¶ These quantities refer to coordinate_dofs
-
facet_jacobian
(e, mt, tabledata, num_points, access)¶ These quantities are expected to be replaced in symbolic preprocessing.
-
facet_jacobian_determinant
(e, mt, tabledata, num_points, access)¶ These quantities are expected to be replaced in symbolic preprocessing.
-
facet_jacobian_inverse
(e, mt, tabledata, num_points, access)¶ These quantities are expected to be replaced in symbolic preprocessing.
-
facet_normal
(e, mt, tabledata, num_points, access)¶ These quantities are expected to be replaced in symbolic preprocessing.
-
facet_orientation
(e, mt, tabledata, num_points, access)¶ These quantities refer to constant tables defined in ufc_geometry.h.
-
jacobian
(e, mt, tabledata, num_points, access)[source]¶ Return definition code for the Jacobian of x(X).
J = sum_k xdof_k grad_X xphi_k(X)
-
jacobian_determinant
(e, mt, tabledata, num_points, access)¶ These quantities are expected to be replaced in symbolic preprocessing.
-
jacobian_inverse
(e, mt, tabledata, num_points, access)¶ These quantities are expected to be replaced in symbolic preprocessing.
-
reference_cell_edge_vectors
(e, mt, tabledata, num_points, access)¶ These quantities refer to constant tables defined in ufc_geometry.h.
-
reference_cell_volume
(e, mt, tabledata, num_points, access)¶ These quantities refer to constant tables defined in ufc_geometry.h.
-
reference_facet_edge_vectors
(e, mt, tabledata, num_points, access)¶ These quantities refer to constant tables defined in ufc_geometry.h.
-
reference_facet_volume
(e, mt, tabledata, num_points, access)¶ These quantities refer to constant tables defined in ufc_geometry.h.
-
reference_normal
(e, mt, tabledata, num_points, access)¶ These quantities refer to constant tables defined in ufc_geometry.h.
-
spatial_coordinate
(e, mt, tabledata, num_points, access)[source]¶ Return definition code for the physical spatial coordinates.
- If physical coordinates are given:
- No definition needed.
- If reference coordinates are given:
- x = sum_k xdof_k xphi_k(X)
- If reference facet coordinates are given:
- x = sum_k xdof_k xphi_k(Xf)
-
ffc.uflacs.backends.ffc.symbols module¶
FFC/UFC specific symbol naming.
-
class
ffc.uflacs.backends.ffc.symbols.
FFCBackendSymbols
(language, coefficient_numbering)[source]¶ Bases:
object
FFC specific symbol definitions. Provides non-ufl symbols.
-
cell_orientation_argument
(restriction)[source]¶ Cell orientation argument in ufc. Not same as cell orientation in generated code.
-
cell_orientation_internal
(restriction)[source]¶ Internal value for cell orientation in generated code.
-
coefficient_dof_sum_index
()[source]¶ Index for loops over coefficient dofs, assumed to never be used in two nested loops.
-
coefficient_value
(mt)[source]¶ Symbol for variable holding value or derivative component of coefficient.
-
custom_quadrature_weights
()[source]¶ Quadrature weights including cell measure scaling, argument to custom integrals.
-
custom_weights_table
()[source]¶ Table for chunk of custom quadrature weights (including cell measure scaling).
-
points_table
(num_points)[source]¶ Table of quadrature points (points on the reference integration entity).
-
Module contents¶
The FFC specific backend to the UFLACS form compiler algorithms.