.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "FENICSFORMCOMPILERX" "1" "Feb 15, 2023" "0.5.0" "FEniCS Form Compiler X" .SH NAME fenicsformcompilerx \- FEniCS Form Compiler X Documentation .sp The is an experimental version of the FEniCS Form Compiler. It is developed at \fI\%https://github.com/FEniCS/ffcx\fP\&. .TS center; |l|l|. _ T{ \fI\%ffcx\fP T} T{ FEniCS Form Compiler (FFCx). T} _ T{ \fI\%ffcx.__main__\fP T} T{ T} _ T{ \fI\%ffcx.analysis\fP T} T{ Compiler stage 1: Analysis. T} _ T{ \fI\%ffcx.compiler\fP T} T{ Main interface for compilation of forms. T} _ T{ \fI\%ffcx.element_interface\fP T} T{ Finite element interface. T} _ T{ \fI\%ffcx.formatting\fP T} T{ Compiler stage 5: Code formatting. T} _ T{ \fI\%ffcx.main\fP T} T{ Command\-line interface to FFCx. T} _ T{ \fI\%ffcx.naming\fP T} T{ T} _ T{ \fI\%ffcx.codegeneration\fP T} T{ T} _ T{ \fI\%ffcx.parameters\fP T} T{ T} _ T{ \fI\%ffcx.ir.representation\fP T} T{ Compiler stage 2: Code representation. T} _ T{ \fI\%ffcx.ir.representationutils\fP T} T{ Utility functions for some code shared between representations. T} _ .TE .SH FFCX .sp FEniCS Form Compiler (FFCx). .sp FFCx compiles finite element variational forms into C code. .INDENT 0.0 .TP .B ffcx.get_parameters(priority_parameters: Optional[dict] = None) -> dict Return (a copy of) the merged parameter values for FFCX. .INDENT 7.0 .TP .B Parameters \fBpriority_parameters\fP – take priority over all other parameter values (see notes) .TP .B Returns \fBdict\fP .TP .B Return type merged parameter values .UNINDENT .sp Notes .sp This function sets the log level from the merged parameter values prior to returning. .sp The \fIffcx_parameters.json\fP files are cached on the first call. Subsequent calls to this function use this cache. .sp Priority ordering of parameters from highest to lowest is: .INDENT 7.0 .IP \(bu 2 \fBpriority_parameters\fP (API and command line parameters) .IP \(bu 2 \fB$PWD/ffcx_parameters.json\fP (local parameters) .IP \(bu 2 \fB$XDG_CONFIG_HOME/ffcx/ffcx_parameters.json\fP (user parameters) .IP \(bu 2 \fBFFCX_DEFAULT_PARAMETERS\fP in \fIffcx.parameters\fP .UNINDENT .sp \fIXDG_CONFIG_HOME\fP is \fI~/.config/\fP if the environment variable is not set. .sp Example \fIffcx_parameters.json\fP file: .INDENT 7.0 .INDENT 3.5 { “assume_aligned”: 32, “epsilon”: 1e\-7 } .UNINDENT .UNINDENT .UNINDENT .SH FFCX.__MAIN__ .INDENT 0.0 .TP .B ffcx.__main__.main(args=None) .UNINDENT .SH FFCX.ANALYSIS .sp Compiler stage 1: Analysis. .sp This module implements the analysis/preprocessing of variational forms, including automatic selection of elements, degrees and form representation type. .sp Functions .TS center; |l|l|. _ T{ \fI\%analyze_ufl_objects\fP(ufl_objects, parameters) T} T{ Analyze ufl object(s). T} _ .TE .sp Classes .TS center; |l|l|. _ T{ \fI\%UFLData\fP(form_data, unique_elements, ...) T} T{ Create new instance of UFLData(form_data, unique_elements, element_numbers, unique_coordinate_elements, expressions) T} _ .TE .INDENT 0.0 .TP .B class ffcx.analysis.UFLData(form_data, unique_elements, element_numbers, unique_coordinate_elements, expressions) Bases: \fBNamedTuple\fP .sp Create new instance of UFLData(form_data, unique_elements, element_numbers, unique_coordinate_elements, expressions) .INDENT 7.0 .TP .B element_numbers: Dict[_BasixElementBase, int] Alias for field number 2 .UNINDENT .INDENT 7.0 .TP .B expressions: List[Tuple[Expr, ndarray[\fI\%Any\fP, dtype[float64]], Expr]] Alias for field number 4 .UNINDENT .INDENT 7.0 .TP .B form_data: Tuple[FormData, \&...] Alias for field number 0 .UNINDENT .INDENT 7.0 .TP .B unique_coordinate_elements: List[_BasixElementBase] Alias for field number 3 .UNINDENT .INDENT 7.0 .TP .B unique_elements: List[_BasixElementBase] Alias for field number 1 .UNINDENT .UNINDENT .INDENT 0.0 .TP .B ffcx.analysis.analyze_ufl_objects(ufl_objects: List, parameters: Dict) -> \fI\%UFLData\fP Analyze ufl object(s). .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBufl_objects\fP – .IP \(bu 2 \fBparameters\fP – FFCx parameters. These parameters take priority over all other set parameters. .IP \(bu 2 \fBholding\fP (\fIReturns a data structure\fP) – .IP \(bu 2 \fB\-\-\-\-\-\-\-\fP – .IP \(bu 2 \fBform_datas\fP – Form_data objects .IP \(bu 2 \fBunique_elements\fP – Unique elements across all forms and expressions .IP \(bu 2 \fBelement_numbers\fP – Mapping to unique numbers for all elements .IP \(bu 2 \fBunique_coordinate_elements\fP – Unique coordinate elements across all forms and expressions .IP \(bu 2 \fBexpressions\fP – List of all expressions after post\-processing, with its evaluation points and the original expression .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B ffcx.analysis.convert_element(element: FiniteElementBase) -> _BasixElementBase Convert and element to a FFCx element. .UNINDENT .SH FFCX.COMPILER .sp Main interface for compilation of forms. .sp Breaks the compilation into several sequential stages. The output of each stage is the input of the next stage. .SS Compiler stages .INDENT 0.0 .IP 0. 4 Language, parsing .INDENT 4.0 .IP \(bu 2 Input: Python code or .ufl file .IP \(bu 2 Output: UFL form .UNINDENT .sp This stage consists of parsing and expressing a form in the UFL form language. This stage is handled by UFL. .IP 1. 4 Analysis .INDENT 4.0 .IP \(bu 2 Input: UFL form .IP \(bu 2 Output: Preprocessed UFL form and FormData (metadata) .UNINDENT .sp This stage preprocesses the UFL form and extracts form metadata. It may also perform simplifications on the form. .IP 2. 4 Code representation .INDENT 4.0 .IP \(bu 2 Input: Preprocessed UFL form and FormData (metadata) .IP \(bu 2 Output: Intermediate Representation (IR) .UNINDENT .sp This stage examines the input and generates all data needed for code generation. This includes generation of finite element basis functions, extraction of data for mapping of degrees of freedom and possible precomputation of integrals. Most of the complexity of compilation is handled in this stage. .sp The IR is stored as a dictionary, mapping names of UFC functions to data needed for generation of the corresponding code. .IP 3. 4 Code generation .INDENT 4.0 .IP \(bu 2 Input: Intermediate Representation (IR) .IP \(bu 2 Output: C code .UNINDENT .sp This stage examines the IR and generates the actual C code for the body of each UFC function. .sp The code is stored as a dictionary, mapping names of UFC functions to strings containing the C code of the body of each function. .IP 4. 4 Code formatting .INDENT 4.0 .IP \(bu 2 Input: C code .IP \(bu 2 Output: C code files .UNINDENT .sp This stage examines the generated C++ code and formats it according to the UFC format, generating as output one or more .h/.c files conforming to the UFC format. .UNINDENT .sp Functions .TS center; |l|l|. _ T{ \fI\%compile_ufl_objects\fP(ufl_objects[, ...]) T} T{ Generate UFC code for a given UFL objects. T} _ .TE .INDENT 0.0 .TP .B ffcx.compiler.analyze_ufl_objects(ufl_objects: List, parameters: Dict) -> \fI\%UFLData\fP Analyze ufl object(s). .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBufl_objects\fP – .IP \(bu 2 \fBparameters\fP – FFCx parameters. These parameters take priority over all other set parameters. .IP \(bu 2 \fBholding\fP (\fIReturns a data structure\fP) – .IP \(bu 2 \fB\-\-\-\-\-\-\-\fP – .IP \(bu 2 \fBform_datas\fP – Form_data objects .IP \(bu 2 \fBunique_elements\fP – Unique elements across all forms and expressions .IP \(bu 2 \fBelement_numbers\fP – Mapping to unique numbers for all elements .IP \(bu 2 \fBunique_coordinate_elements\fP – Unique coordinate elements across all forms and expressions .IP \(bu 2 \fBexpressions\fP – List of all expressions after post\-processing, with its evaluation points and the original expression .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B ffcx.compiler.compile_ufl_objects(ufl_objects: List[\fI\%Any\fP], object_names: Dict = {}, prefix: str = None, parameters: Dict = {}, visualise: bool = False) Generate UFC code for a given UFL objects. .INDENT 7.0 .TP .B Parameters \fBufl_objects\fP (\fI@param\fP) – Objects to be compiled. Accepts elements, forms, integrals or coordinate mappings. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B ffcx.compiler.compute_ir(analysis: \fI\%UFLData\fP, object_names, prefix, parameters, visualise) Compute intermediate representation. .UNINDENT .INDENT 0.0 .TP .B ffcx.compiler.format_code(code, parameters: dict) Format given code in UFC format. Returns two strings with header and source file contents. .UNINDENT .INDENT 0.0 .TP .B ffcx.compiler.generate_code(ir, parameters) -> CodeBlocks Generate code blocks from intermediate representation. .UNINDENT .INDENT 0.0 .TP .B ffcx.compiler.time() -> floating point number Return the current time in seconds since the Epoch. Fractions of a second may be present if the system clock provides them. .UNINDENT .SH FFCX.ELEMENT_INTERFACE .sp Finite element interface. .sp Functions .TS center; |l|l|. _ T{ \fI\%basix_index\fP(indices) T} T{ Get the Basix index of a derivative. T} _ T{ \fI\%convert_element\fP(element) T} T{ Convert and element to a FFCx element. T} _ T{ \fI\%create_element\fP(element) T} T{ Create an FFCx element from a UFL element. T} _ T{ \fI\%create_quadrature\fP(cellname, degree, rule) T} T{ Create a quadrature rule. T} _ T{ \fI\%map_facet_points\fP(points, facet, cellname) T} T{ Map points from a reference facet to a physical facet. T} _ T{ \fI\%reference_cell_vertices\fP(cellname) T} T{ Get the vertices of a reference cell. T} _ .TE .sp Classes .TS center; |l|l|. _ T{ \fI\%QuadratureElement\fP(element) T} T{ A quadrature element. T} _ .TE .INDENT 0.0 .TP .B class ffcx.element_interface.QuadratureElement(element: FiniteElementBase) Bases: \fB_BasixElementBase\fP .sp A quadrature element. .sp Initialise the element. .INDENT 7.0 .TP .B property cell_type: CellType Basix cell type used to initialise the element. .UNINDENT .INDENT 7.0 .TP .B property dim: int Number of DOFs the element has. .UNINDENT .INDENT 7.0 .TP .B property discontinuous: bool True if the discontinuous version of the element is used. .UNINDENT .INDENT 7.0 .TP .B property dpc_variant: DPCVariant Basix DPC variant used to initialise the element. .UNINDENT .INDENT 7.0 .TP .B property element_family: ElementFamily Basix element family used to initialise the element. .UNINDENT .INDENT 7.0 .TP .B property entity_closure_dofs: List[List[List[int]]] DOF numbers associated with the closure of each entity. .UNINDENT .INDENT 7.0 .TP .B property entity_dofs: List[List[List[int]]] DOF numbers associated with each entity. .UNINDENT .INDENT 7.0 .TP .B property family_name: str Family name of the element. .UNINDENT .INDENT 7.0 .TP .B get_component_element(flat_component: int) -> Tuple[_BasixElementBase, int, int] Get element that represents a component of the element, and the offset and stride of the component. .INDENT 7.0 .TP .B Parameters \fBflat_component\fP – The component .TP .B Returns component element, offset of the component, stride of the component .UNINDENT .UNINDENT .INDENT 7.0 .TP .B property interpolation_nderivs: int The number of derivatives needed when interpolating. .UNINDENT .INDENT 7.0 .TP .B property lagrange_variant: LagrangeVariant Basix Lagrange variant used to initialise the element. .UNINDENT .INDENT 7.0 .TP .B property num_entity_closure_dofs: List[List[int]] Number of DOFs associated with the closure of each entity. .UNINDENT .INDENT 7.0 .TP .B property num_entity_dofs: List[List[int]] Number of DOFs associated with each entity. .UNINDENT .INDENT 7.0 .TP .B property num_global_support_dofs: int Get the number of global support DOFs. .UNINDENT .INDENT 7.0 .TP .B property reference_geometry: ndarray[\fI\%Any\fP, dtype[float64]] Geometry of the reference element. .UNINDENT .INDENT 7.0 .TP .B property reference_topology: List[List[List[int]]] Topology of the reference element. .UNINDENT .INDENT 7.0 .TP .B tabulate(nderivs: int, points: ndarray[\fI\%Any\fP, dtype[float64]]) -> ndarray[\fI\%Any\fP, dtype[float64]] Tabulate the basis functions of the element. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBnderivs\fP – Number of derivatives to tabulate. .IP \(bu 2 \fBpoints\fP – Points to tabulate at .UNINDENT .TP .B Returns Tabulated basis functions .UNINDENT .UNINDENT .INDENT 7.0 .TP .B property ufcx_element_type: str Element type. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B ffcx.element_interface.basix_index(indices: Tuple[int]) -> int Get the Basix index of a derivative. .UNINDENT .INDENT 0.0 .TP .B ffcx.element_interface.convert_element(element: FiniteElementBase) -> _BasixElementBase Convert and element to a FFCx element. .UNINDENT .INDENT 0.0 .TP .B ffcx.element_interface.create_element(element: FiniteElementBase) -> _BasixElementBase Create an FFCx element from a UFL element. .INDENT 7.0 .TP .B Parameters \fBelement\fP – A UFL finite element .TP .B Returns A Basix finite element .UNINDENT .UNINDENT .INDENT 0.0 .TP .B ffcx.element_interface.create_quadrature(cellname, degree, rule) -> Tuple[ndarray[\fI\%Any\fP, dtype[float64]], ndarray[\fI\%Any\fP, dtype[float64]]] Create a quadrature rule. .UNINDENT .INDENT 0.0 .TP .B ffcx.element_interface.lru_cache(maxsize=128, typed=False) Least\-recently\-used cache decorator. .sp If \fImaxsize\fP is set to None, the LRU features are disabled and the cache can grow without bound. .sp If \fItyped\fP is True, arguments of different types will be cached separately. For example, f(3.0) and f(3) will be treated as distinct calls with distinct results. .sp Arguments to the cached function must be hashable. .sp View the cache statistics named tuple (hits, misses, maxsize, currsize) with f.cache_info(). Clear the cache and statistics with f.cache_clear(). Access the underlying function with f.__wrapped__. .sp See: \fI\%https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU\fP) .UNINDENT .INDENT 0.0 .TP .B ffcx.element_interface.map_facet_points(points: ndarray[\fI\%Any\fP, dtype[float64]], facet: int, cellname: str) -> ndarray[\fI\%Any\fP, dtype[float64]] Map points from a reference facet to a physical facet. .UNINDENT .INDENT 0.0 .TP .B ffcx.element_interface.reference_cell_vertices(cellname: str) -> ndarray[\fI\%Any\fP, dtype[float64]] Get the vertices of a reference cell. .UNINDENT .SH FFCX.FORMATTING .sp Compiler stage 5: Code formatting. .sp This module implements the formatting of UFC code from a given dictionary of generated C++ code for the body of each UFC function. .sp It relies on templates for UFC code available as part of the module ufcx_utils. .sp Functions .TS center; |l|l|. _ T{ \fI\%format_code\fP(code, parameters) T} T{ Format given code in UFC format. T} _ T{ \fI\%write_code\fP(code_h, code_c, prefix, output_dir) T} T{ T} _ .TE .INDENT 0.0 .TP .B ffcx.formatting.format_code(code, parameters: dict) Format given code in UFC format. Returns two strings with header and source file contents. .UNINDENT .INDENT 0.0 .TP .B ffcx.formatting.write_code(code_h, code_c, prefix, output_dir) .UNINDENT .SH FFCX.MAIN .sp Command\-line interface to FFCx. .sp Parse command\-line arguments and generate code from input UFL form files. .sp Functions .TS center; |l|l|. _ T{ \fI\%main\fP([args]) T} T{ T} _ .TE .INDENT 0.0 .TP .B ffcx.main.get_parameters(priority_parameters: Optional[dict] = None) -> dict Return (a copy of) the merged parameter values for FFCX. .INDENT 7.0 .TP .B Parameters \fBpriority_parameters\fP – take priority over all other parameter values (see notes) .TP .B Returns \fBdict\fP .TP .B Return type merged parameter values .UNINDENT .sp Notes .sp This function sets the log level from the merged parameter values prior to returning. .sp The \fIffcx_parameters.json\fP files are cached on the first call. Subsequent calls to this function use this cache. .sp Priority ordering of parameters from highest to lowest is: .INDENT 7.0 .IP \(bu 2 \fBpriority_parameters\fP (API and command line parameters) .IP \(bu 2 \fB$PWD/ffcx_parameters.json\fP (local parameters) .IP \(bu 2 \fB$XDG_CONFIG_HOME/ffcx/ffcx_parameters.json\fP (user parameters) .IP \(bu 2 \fBFFCX_DEFAULT_PARAMETERS\fP in \fIffcx.parameters\fP .UNINDENT .sp \fIXDG_CONFIG_HOME\fP is \fI~/.config/\fP if the environment variable is not set. .sp Example \fIffcx_parameters.json\fP file: .INDENT 7.0 .INDENT 3.5 { “assume_aligned”: 32, “epsilon”: 1e\-7 } .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B ffcx.main.main(args=None) .UNINDENT .SH FFCX.NAMING .sp Functions .TS center; |l|l|. _ T{ \fI\%cdtype_to_numpy\fP(cdtype) T} T{ Map a C data type string NumPy datatype string. T} _ T{ \fI\%compute_signature\fP(ufl_objects, tag) T} T{ Compute the signature hash. T} _ T{ \fI\%dofmap_name\fP(ufl_element, prefix) T} T{ T} _ T{ \fI\%expression_name\fP(expression, prefix) T} T{ T} _ T{ \fI\%finite_element_name\fP(ufl_element, prefix) T} T{ T} _ T{ \fI\%form_name\fP(original_form, form_id, prefix) T} T{ T} _ T{ \fI\%integral_name\fP(original_form, integral_type, ...) T} T{ T} _ T{ \fI\%scalar_to_value_type\fP(scalar_type) T} T{ The C value type associated with a C scalar type. T} _ .TE .INDENT 0.0 .TP .B ffcx.naming.cdtype_to_numpy(cdtype: str) Map a C data type string NumPy datatype string. .UNINDENT .INDENT 0.0 .TP .B ffcx.naming.compute_signature(ufl_objects: List[Union[Form, FiniteElementBase, Tuple[Expr, ndarray[\fI\%Any\fP, dtype[float64]]]]], tag: str) -> str Compute the signature hash. .sp Based on the UFL type of the objects and an additional optional ‘tag’. .UNINDENT .INDENT 0.0 .TP .B ffcx.naming.convert_element(element: FiniteElementBase) -> _BasixElementBase Convert and element to a FFCx element. .UNINDENT .INDENT 0.0 .TP .B ffcx.naming.dofmap_name(ufl_element, prefix) .UNINDENT .INDENT 0.0 .TP .B ffcx.naming.expression_name(expression, prefix) .UNINDENT .INDENT 0.0 .TP .B ffcx.naming.finite_element_name(ufl_element, prefix) .UNINDENT .INDENT 0.0 .TP .B ffcx.naming.form_name(original_form, form_id, prefix) .UNINDENT .INDENT 0.0 .TP .B ffcx.naming.integral_name(original_form, integral_type, form_id, subdomain_id, prefix) .UNINDENT .INDENT 0.0 .TP .B ffcx.naming.scalar_to_value_type(scalar_type: str) -> str The C value type associated with a C scalar type. .INDENT 7.0 .TP .B Parameters \fBscalar_type\fP – A C type. .TP .B Returns The value type associated with \fBscalar_type\fP\&. E.g., if \fBscalar_type\fP is \fBfloat _Complex\fP the return value is ‘float’. .UNINDENT .UNINDENT .SH FFCX.CODEGENERATION .sp Functions .TS center; |l|l|. _ T{ \fI\%get_include_path\fP() T} T{ Return location of UFC header files. T} _ T{ \fI\%get_signature\fP() T} T{ Return SHA\-1 hash of the contents of ufcx.h. T} _ .TE .INDENT 0.0 .TP .B ffcx.codegeneration.get_include_path() Return location of UFC header files. .UNINDENT .INDENT 0.0 .TP .B ffcx.codegeneration.get_signature() Return SHA\-1 hash of the contents of ufcx.h. .sp In this implementation, the value is computed on import. .UNINDENT .SH FFCX.PARAMETERS .sp Functions .TS center; |l|l|. _ T{ \fI\%get_parameters\fP([priority_parameters]) T} T{ Return (a copy of) the merged parameter values for FFCX. T} _ .TE .INDENT 0.0 .TP .B class ffcx.parameters.Any(*args, **kwargs) Bases: \fBobject\fP .sp Special type indicating an unconstrained type. .INDENT 7.0 .IP \(bu 2 Any is compatible with every type. .IP \(bu 2 Any assumed to have all methods. .IP \(bu 2 All values assumed to be instances of Any. .UNINDENT .sp Note that all the above statements are true from the point of view of static type checkers. At runtime, Any should not be used with instance checks. .UNINDENT .INDENT 0.0 .TP .B class ffcx.parameters.Path(*args, **kwargs) Bases: \fBPurePath\fP .sp PurePath subclass that can make system calls. .sp Path represents a filesystem path but unlike PurePath, also offers methods to do system calls on path objects. Depending on your system, instantiating a Path will return either a PosixPath or a WindowsPath object. You can also instantiate a PosixPath or WindowsPath directly, but cannot instantiate a WindowsPath on a POSIX system or vice versa. .sp Construct a PurePath from one or several strings and or existing PurePath objects. The strings and path objects are combined so as to yield a canonicalized path, which is incorporated into the new PurePath object. .INDENT 7.0 .TP .B absolute() Return an absolute version of this path by prepending the current working directory. No normalization or symlink resolution is performed. .sp Use resolve() to get the canonical path to a file. .UNINDENT .INDENT 7.0 .TP .B chmod(mode, *, follow_symlinks=True) Change the permissions of the path, like os.chmod(). .UNINDENT .INDENT 7.0 .TP .B classmethod cwd() Return a new path pointing to the current working directory (as returned by os.getcwd()). .UNINDENT .INDENT 7.0 .TP .B exists() Whether this path exists. .UNINDENT .INDENT 7.0 .TP .B expanduser() Return a new path with expanded ~ and ~user constructs (as returned by os.path.expanduser) .UNINDENT .INDENT 7.0 .TP .B glob(pattern) Iterate over this subtree and yield all existing files (of any kind, including directories) matching the given relative pattern. .UNINDENT .INDENT 7.0 .TP .B group() Return the group name of the file gid. .UNINDENT .INDENT 7.0 .TP .B hardlink_to(target) Make this path a hard link pointing to the same file as \fItarget\fP\&. .sp Note the order of arguments (self, target) is the reverse of os.link’s. .UNINDENT .INDENT 7.0 .TP .B classmethod home() Return a new path pointing to the user’s home directory (as returned by os.path.expanduser(‘~’)). .UNINDENT .INDENT 7.0 .TP .B is_block_device() Whether this path is a block device. .UNINDENT .INDENT 7.0 .TP .B is_char_device() Whether this path is a character device. .UNINDENT .INDENT 7.0 .TP .B is_dir() Whether this path is a directory. .UNINDENT .INDENT 7.0 .TP .B is_fifo() Whether this path is a FIFO. .UNINDENT .INDENT 7.0 .TP .B is_file() Whether this path is a regular file (also True for symlinks pointing to regular files). .UNINDENT .INDENT 7.0 .TP .B is_mount() Check if this path is a POSIX mount point .UNINDENT .INDENT 7.0 .TP .B is_socket() Whether this path is a socket. .UNINDENT .INDENT 7.0 .TP .B is_symlink() Whether this path is a symbolic link. .UNINDENT .INDENT 7.0 .TP .B iterdir() Iterate over the files in this directory. Does not yield any result for the special paths ‘.’ and ‘..’. .UNINDENT .INDENT 7.0 .TP .B lchmod(mode) Like chmod(), except if the path points to a symlink, the symlink’s permissions are changed, rather than its target’s. .UNINDENT .INDENT 7.0 .TP .B link_to(target) Make the target path a hard link pointing to this path. .sp Note this function does not make this path a hard link to \fItarget\fP, despite the implication of the function and argument names. The order of arguments (target, link) is the reverse of Path.symlink_to, but matches that of os.link. .sp Deprecated since Python 3.10 and scheduled for removal in Python 3.12. Use \fIhardlink_to()\fP instead. .UNINDENT .INDENT 7.0 .TP .B lstat() Like stat(), except if the path points to a symlink, the symlink’s status information is returned, rather than its target’s. .UNINDENT .INDENT 7.0 .TP .B mkdir(mode=511, parents=False, exist_ok=False) Create a new directory at this given path. .UNINDENT .INDENT 7.0 .TP .B open(mode=\(aqr\(aq, buffering=\-1, encoding=None, errors=None, newline=None) Open the file pointed by this path and return a file object, as the built\-in open() function does. .UNINDENT .INDENT 7.0 .TP .B owner() Return the login name of the file owner. .UNINDENT .INDENT 7.0 .TP .B read_bytes() Open the file in bytes mode, read it, and close the file. .UNINDENT .INDENT 7.0 .TP .B read_text(encoding=None, errors=None) Open the file in text mode, read it, and close the file. .UNINDENT .INDENT 7.0 .TP .B readlink() Return the path to which the symbolic link points. .UNINDENT .INDENT 7.0 .TP .B rename(target) Rename this path to the target path. .sp The target path may be absolute or relative. Relative paths are interpreted relative to the current working directory, \fInot\fP the directory of the Path object. .sp Returns the new Path instance pointing to the target path. .UNINDENT .INDENT 7.0 .TP .B replace(target) Rename this path to the target path, overwriting if that path exists. .sp The target path may be absolute or relative. Relative paths are interpreted relative to the current working directory, \fInot\fP the directory of the Path object. .sp Returns the new Path instance pointing to the target path. .UNINDENT .INDENT 7.0 .TP .B resolve(strict=False) Make the path absolute, resolving all symlinks on the way and also normalizing it. .UNINDENT .INDENT 7.0 .TP .B rglob(pattern) Recursively yield all existing files (of any kind, including directories) matching the given relative pattern, anywhere in this subtree. .UNINDENT .INDENT 7.0 .TP .B rmdir() Remove this directory. The directory must be empty. .UNINDENT .INDENT 7.0 .TP .B samefile(other_path) Return whether other_path is the same or not as this file (as returned by os.path.samefile()). .UNINDENT .INDENT 7.0 .TP .B stat(*, follow_symlinks=True) Return the result of the stat() system call on this path, like os.stat() does. .UNINDENT .INDENT 7.0 .TP .B symlink_to(target, target_is_directory=False) Make this path a symlink pointing to the target path. Note the order of arguments (link, target) is the reverse of os.symlink. .UNINDENT .INDENT 7.0 .TP .B touch(mode=438, exist_ok=True) Create this file with the given access mode, if it doesn’t exist. .UNINDENT .INDENT 7.0 .TP .B unlink(missing_ok=False) Remove this file or link. If the path is a directory, use rmdir() instead. .UNINDENT .INDENT 7.0 .TP .B write_bytes(data) Open the file in bytes mode, write to it, and close the file. .UNINDENT .INDENT 7.0 .TP .B write_text(data, encoding=None, errors=None, newline=None) Open the file in text mode, write to it, and close the file. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B ffcx.parameters.get_parameters(priority_parameters: Optional[dict] = None) -> dict Return (a copy of) the merged parameter values for FFCX. .INDENT 7.0 .TP .B Parameters \fBpriority_parameters\fP – take priority over all other parameter values (see notes) .TP .B Returns \fBdict\fP .TP .B Return type merged parameter values .UNINDENT .sp Notes .sp This function sets the log level from the merged parameter values prior to returning. .sp The \fIffcx_parameters.json\fP files are cached on the first call. Subsequent calls to this function use this cache. .sp Priority ordering of parameters from highest to lowest is: .INDENT 7.0 .IP \(bu 2 \fBpriority_parameters\fP (API and command line parameters) .IP \(bu 2 \fB$PWD/ffcx_parameters.json\fP (local parameters) .IP \(bu 2 \fB$XDG_CONFIG_HOME/ffcx/ffcx_parameters.json\fP (user parameters) .IP \(bu 2 \fBFFCX_DEFAULT_PARAMETERS\fP in \fIffcx.parameters\fP .UNINDENT .sp \fIXDG_CONFIG_HOME\fP is \fI~/.config/\fP if the environment variable is not set. .sp Example \fIffcx_parameters.json\fP file: .INDENT 7.0 .INDENT 3.5 { “assume_aligned”: 32, “epsilon”: 1e\-7 } .UNINDENT .UNINDENT .UNINDENT .SH FFCX.IR.REPRESENTATION .sp Compiler stage 2: Code representation. .sp Module computes intermediate representations of forms, elements and dofmaps. For each UFC function, we extract the data needed for code generation at a later stage. .sp The representation should conform strictly to the naming and order of functions in UFC. Thus, for code generation of the function “foo”, one should only need to use the data stored in the intermediate representation under the key “foo”. .sp Functions .TS center; |l|l|. _ T{ \fI\%compute_ir\fP(analysis, object_names, prefix, ...) T} T{ Compute intermediate representation. T} _ .TE .sp Classes .TS center; |l|l|. _ T{ \fI\%CustomElementIR\fP(cell_type, value_shape, ...) T} T{ Create new instance of CustomElementIR(cell_type, value_shape, wcoeffs, x, M, map_type, interpolation_nderivs, discontinuous, highest_complete_degree, highest_degree) T} _ T{ \fI\%DataIR\fP(elements, dofmaps, integrals, forms, ...) T} T{ Create new instance of DataIR(elements, dofmaps, integrals, forms, expressions) T} _ T{ \fI\%DofMapIR\fP(id, name, signature, ...) T} T{ Create new instance of DofMapIR(id, name, signature, num_global_support_dofs, num_element_support_dofs, entity_dofs, num_entity_dofs, entity_closure_dofs, num_entity_closure_dofs, num_sub_dofmaps, sub_dofmaps, block_size) T} _ T{ \fI\%ElementIR\fP(id, name, signature, cell_shape, ...) T} T{ Create new instance of ElementIR(id, name, signature, cell_shape, topological_dimension, geometric_dimension, space_dimension, value_shape, reference_value_shape, degree, family, num_sub_elements, block_size, sub_elements, element_type, entity_dofs, lagrange_variant, dpc_variant, basix_family, basix_cell, discontinuous, custom_element) T} _ T{ \fI\%ExpressionIR\fP(name, element_dimensions, ...) T} T{ Create new instance of ExpressionIR(name, element_dimensions, params, unique_tables, unique_table_types, integrand, coefficient_numbering, coefficient_offsets, integral_type, entitytype, tensor_shape, expression_shape, original_constant_offsets, points, coefficient_names, constant_names, needs_facet_permutations, function_spaces, name_from_uflfile, original_coefficient_positions) T} _ T{ \fI\%FormIR\fP(id, name, signature, rank, ...) T} T{ Create new instance of FormIR(id, name, signature, rank, num_coefficients, num_constants, name_from_uflfile, function_spaces, original_coefficient_position, coefficient_names, constant_names, finite_elements, dofmaps, integral_names, subdomain_ids) T} _ T{ \fI\%IntegralIR\fP(integral_type, subdomain_id, ...) T} T{ Create new instance of IntegralIR(integral_type, subdomain_id, rank, geometric_dimension, topological_dimension, entitytype, num_facets, num_vertices, enabled_coefficients, element_dimensions, element_ids, tensor_shape, coefficient_numbering, coefficient_offsets, original_constant_offsets, params, cell_shape, unique_tables, unique_table_types, integrand, name, precision, needs_facet_permutations, coordinate_element) T} _ .TE .INDENT 0.0 .TP .B class ffcx.ir.representation.CustomElementIR(cell_type, value_shape, wcoeffs, x, M, map_type, interpolation_nderivs, discontinuous, highest_complete_degree, highest_degree) Bases: \fBNamedTuple\fP .sp Create new instance of CustomElementIR(cell_type, value_shape, wcoeffs, x, M, map_type, interpolation_nderivs, discontinuous, highest_complete_degree, highest_degree) .INDENT 7.0 .TP .B M: List[List[ndarray[\fI\%Any\fP, dtype[float64]]]] Alias for field number 4 .UNINDENT .INDENT 7.0 .TP .B cell_type: CellType Alias for field number 0 .UNINDENT .INDENT 7.0 .TP .B discontinuous: bool Alias for field number 7 .UNINDENT .INDENT 7.0 .TP .B highest_complete_degree: int Alias for field number 8 .UNINDENT .INDENT 7.0 .TP .B highest_degree: int Alias for field number 9 .UNINDENT .INDENT 7.0 .TP .B interpolation_nderivs: int Alias for field number 6 .UNINDENT .INDENT 7.0 .TP .B map_type: MapType Alias for field number 5 .UNINDENT .INDENT 7.0 .TP .B value_shape: Tuple[int, \&...] Alias for field number 1 .UNINDENT .INDENT 7.0 .TP .B wcoeffs: ndarray[\fI\%Any\fP, dtype[float64]] Alias for field number 2 .UNINDENT .INDENT 7.0 .TP .B x: List[List[ndarray[\fI\%Any\fP, dtype[float64]]]] Alias for field number 3 .UNINDENT .UNINDENT .INDENT 0.0 .TP .B class ffcx.ir.representation.DataIR(elements, dofmaps, integrals, forms, expressions) Bases: \fBNamedTuple\fP .sp Create new instance of DataIR(elements, dofmaps, integrals, forms, expressions) .INDENT 7.0 .TP .B dofmaps: List[\fI\%DofMapIR\fP] Alias for field number 1 .UNINDENT .INDENT 7.0 .TP .B elements: List[\fI\%ElementIR\fP] Alias for field number 0 .UNINDENT .INDENT 7.0 .TP .B expressions: List[\fI\%ExpressionIR\fP] Alias for field number 4 .UNINDENT .INDENT 7.0 .TP .B forms: List[\fI\%FormIR\fP] Alias for field number 3 .UNINDENT .INDENT 7.0 .TP .B integrals: List[\fI\%IntegralIR\fP] Alias for field number 2 .UNINDENT .UNINDENT .INDENT 0.0 .TP .B class ffcx.ir.representation.DofMapIR(id, name, signature, num_global_support_dofs, num_element_support_dofs, entity_dofs, num_entity_dofs, entity_closure_dofs, num_entity_closure_dofs, num_sub_dofmaps, sub_dofmaps, block_size) Bases: \fBNamedTuple\fP .sp Create new instance of DofMapIR(id, name, signature, num_global_support_dofs, num_element_support_dofs, entity_dofs, num_entity_dofs, entity_closure_dofs, num_entity_closure_dofs, num_sub_dofmaps, sub_dofmaps, block_size) .INDENT 7.0 .TP .B block_size: int Alias for field number 11 .UNINDENT .INDENT 7.0 .TP .B entity_closure_dofs: List[List[List[int]]] Alias for field number 7 .UNINDENT .INDENT 7.0 .TP .B entity_dofs: List[List[List[int]]] Alias for field number 5 .UNINDENT .INDENT 7.0 .TP .B id: int Alias for field number 0 .UNINDENT .INDENT 7.0 .TP .B name: str Alias for field number 1 .UNINDENT .INDENT 7.0 .TP .B num_element_support_dofs: int Alias for field number 4 .UNINDENT .INDENT 7.0 .TP .B num_entity_closure_dofs: List[List[int]] Alias for field number 8 .UNINDENT .INDENT 7.0 .TP .B num_entity_dofs: List[List[int]] Alias for field number 6 .UNINDENT .INDENT 7.0 .TP .B num_global_support_dofs: int Alias for field number 3 .UNINDENT .INDENT 7.0 .TP .B num_sub_dofmaps: int Alias for field number 9 .UNINDENT .INDENT 7.0 .TP .B signature: str Alias for field number 2 .UNINDENT .INDENT 7.0 .TP .B sub_dofmaps: List[str] Alias for field number 10 .UNINDENT .UNINDENT .INDENT 0.0 .TP .B class ffcx.ir.representation.ElementIR(id, name, signature, cell_shape, topological_dimension, geometric_dimension, space_dimension, value_shape, reference_value_shape, degree, family, num_sub_elements, block_size, sub_elements, element_type, entity_dofs, lagrange_variant, dpc_variant, basix_family, basix_cell, discontinuous, custom_element) Bases: \fBNamedTuple\fP .sp Create new instance of ElementIR(id, name, signature, cell_shape, topological_dimension, geometric_dimension, space_dimension, value_shape, reference_value_shape, degree, family, num_sub_elements, block_size, sub_elements, element_type, entity_dofs, lagrange_variant, dpc_variant, basix_family, basix_cell, discontinuous, custom_element) .INDENT 7.0 .TP .B basix_cell: CellType Alias for field number 19 .UNINDENT .INDENT 7.0 .TP .B basix_family: ElementFamily Alias for field number 18 .UNINDENT .INDENT 7.0 .TP .B block_size: int Alias for field number 12 .UNINDENT .INDENT 7.0 .TP .B cell_shape: str Alias for field number 3 .UNINDENT .INDENT 7.0 .TP .B custom_element: \fI\%CustomElementIR\fP Alias for field number 21 .UNINDENT .INDENT 7.0 .TP .B degree: int Alias for field number 9 .UNINDENT .INDENT 7.0 .TP .B discontinuous: bool Alias for field number 20 .UNINDENT .INDENT 7.0 .TP .B dpc_variant: DPCVariant Alias for field number 17 .UNINDENT .INDENT 7.0 .TP .B element_type: str Alias for field number 14 .UNINDENT .INDENT 7.0 .TP .B entity_dofs: List[List[List[int]]] Alias for field number 15 .UNINDENT .INDENT 7.0 .TP .B family: str Alias for field number 10 .UNINDENT .INDENT 7.0 .TP .B geometric_dimension: int Alias for field number 5 .UNINDENT .INDENT 7.0 .TP .B id: int Alias for field number 0 .UNINDENT .INDENT 7.0 .TP .B lagrange_variant: LagrangeVariant Alias for field number 16 .UNINDENT .INDENT 7.0 .TP .B name: str Alias for field number 1 .UNINDENT .INDENT 7.0 .TP .B num_sub_elements: int Alias for field number 11 .UNINDENT .INDENT 7.0 .TP .B reference_value_shape: Tuple[int, \&...] Alias for field number 8 .UNINDENT .INDENT 7.0 .TP .B signature: str Alias for field number 2 .UNINDENT .INDENT 7.0 .TP .B space_dimension: int Alias for field number 6 .UNINDENT .INDENT 7.0 .TP .B sub_elements: List[str] Alias for field number 13 .UNINDENT .INDENT 7.0 .TP .B topological_dimension: int Alias for field number 4 .UNINDENT .INDENT 7.0 .TP .B value_shape: Tuple[int, \&...] Alias for field number 7 .UNINDENT .UNINDENT .INDENT 0.0 .TP .B class ffcx.ir.representation.ExpressionIR(name, element_dimensions, params, unique_tables, unique_table_types, integrand, coefficient_numbering, coefficient_offsets, integral_type, entitytype, tensor_shape, expression_shape, original_constant_offsets, points, coefficient_names, constant_names, needs_facet_permutations, function_spaces, name_from_uflfile, original_coefficient_positions) Bases: \fBNamedTuple\fP .sp Create new instance of ExpressionIR(name, element_dimensions, params, unique_tables, unique_table_types, integrand, coefficient_numbering, coefficient_offsets, integral_type, entitytype, tensor_shape, expression_shape, original_constant_offsets, points, coefficient_names, constant_names, needs_facet_permutations, function_spaces, name_from_uflfile, original_coefficient_positions) .INDENT 7.0 .TP .B coefficient_names: List[str] Alias for field number 14 .UNINDENT .INDENT 7.0 .TP .B coefficient_numbering: Dict[Coefficient, int] Alias for field number 6 .UNINDENT .INDENT 7.0 .TP .B coefficient_offsets: Dict[Coefficient, int] Alias for field number 7 .UNINDENT .INDENT 7.0 .TP .B constant_names: List[str] Alias for field number 15 .UNINDENT .INDENT 7.0 .TP .B element_dimensions: Dict[FiniteElementBase, int] Alias for field number 1 .UNINDENT .INDENT 7.0 .TP .B entitytype: str Alias for field number 9 .UNINDENT .INDENT 7.0 .TP .B expression_shape: List[int] Alias for field number 11 .UNINDENT .INDENT 7.0 .TP .B function_spaces: Dict[str, Tuple[str, str, str, int, CellType, LagrangeVariant]] Alias for field number 17 .UNINDENT .INDENT 7.0 .TP .B integral_type: str Alias for field number 8 .UNINDENT .INDENT 7.0 .TP .B integrand: Dict[\fI\%QuadratureRule\fP, dict] Alias for field number 5 .UNINDENT .INDENT 7.0 .TP .B name: str Alias for field number 0 .UNINDENT .INDENT 7.0 .TP .B name_from_uflfile: str Alias for field number 18 .UNINDENT .INDENT 7.0 .TP .B needs_facet_permutations: bool Alias for field number 16 .UNINDENT .INDENT 7.0 .TP .B original_coefficient_positions: List[int] Alias for field number 19 .UNINDENT .INDENT 7.0 .TP .B original_constant_offsets: Dict[Constant, int] Alias for field number 12 .UNINDENT .INDENT 7.0 .TP .B params: dict Alias for field number 2 .UNINDENT .INDENT 7.0 .TP .B points: ndarray[\fI\%Any\fP, dtype[float64]] Alias for field number 13 .UNINDENT .INDENT 7.0 .TP .B tensor_shape: List[int] Alias for field number 10 .UNINDENT .INDENT 7.0 .TP .B unique_table_types: Dict[str, str] Alias for field number 4 .UNINDENT .INDENT 7.0 .TP .B unique_tables: Dict[str, ndarray[\fI\%Any\fP, dtype[float64]]] Alias for field number 3 .UNINDENT .UNINDENT .INDENT 0.0 .TP .B class ffcx.ir.representation.FormIR(id, name, signature, rank, num_coefficients, num_constants, name_from_uflfile, function_spaces, original_coefficient_position, coefficient_names, constant_names, finite_elements, dofmaps, integral_names, subdomain_ids) Bases: \fBNamedTuple\fP .sp Create new instance of FormIR(id, name, signature, rank, num_coefficients, num_constants, name_from_uflfile, function_spaces, original_coefficient_position, coefficient_names, constant_names, finite_elements, dofmaps, integral_names, subdomain_ids) .INDENT 7.0 .TP .B coefficient_names: List[str] Alias for field number 9 .UNINDENT .INDENT 7.0 .TP .B constant_names: List[str] Alias for field number 10 .UNINDENT .INDENT 7.0 .TP .B dofmaps: List[str] Alias for field number 12 .UNINDENT .INDENT 7.0 .TP .B finite_elements: List[str] Alias for field number 11 .UNINDENT .INDENT 7.0 .TP .B function_spaces: Dict[str, Tuple[str, str, str, int, CellType, LagrangeVariant]] Alias for field number 7 .UNINDENT .INDENT 7.0 .TP .B id: int Alias for field number 0 .UNINDENT .INDENT 7.0 .TP .B integral_names: Dict[str, List[str]] Alias for field number 13 .UNINDENT .INDENT 7.0 .TP .B name: str Alias for field number 1 .UNINDENT .INDENT 7.0 .TP .B name_from_uflfile: str Alias for field number 6 .UNINDENT .INDENT 7.0 .TP .B num_coefficients: int Alias for field number 4 .UNINDENT .INDENT 7.0 .TP .B num_constants: int Alias for field number 5 .UNINDENT .INDENT 7.0 .TP .B original_coefficient_position: List[int] Alias for field number 8 .UNINDENT .INDENT 7.0 .TP .B rank: int Alias for field number 3 .UNINDENT .INDENT 7.0 .TP .B signature: str Alias for field number 2 .UNINDENT .INDENT 7.0 .TP .B subdomain_ids: Dict[str, List[int]] Alias for field number 14 .UNINDENT .UNINDENT .INDENT 0.0 .TP .B class ffcx.ir.representation.Integral(integrand, integral_type, domain, subdomain_id, metadata, subdomain_data) Bases: \fBobject\fP .sp An integral over a single domain. .INDENT 7.0 .TP .B integral_type() Return the domain type of this integral. .UNINDENT .INDENT 7.0 .TP .B integrand() Return the integrand expression, which is an \fBExpr\fP instance. .UNINDENT .INDENT 7.0 .TP .B metadata() Return the compiler metadata this integral has been annotated with. .UNINDENT .INDENT 7.0 .TP .B reconstruct(integrand=None, integral_type=None, domain=None, subdomain_id=None, metadata=None, subdomain_data=None) Construct a new Integral object with some properties replaced with new values. .SS Example: .INDENT 7.0 .INDENT 3.5 b = a.reconstruct(expand_compounds(a.integrand())) c = a.reconstruct(metadata={‘quadrature_degree’:2}) .UNINDENT .UNINDENT .UNINDENT .INDENT 7.0 .TP .B subdomain_data() Return the domain data of this integral. .UNINDENT .INDENT 7.0 .TP .B subdomain_id() Return the subdomain id of this integral. .UNINDENT .INDENT 7.0 .TP .B ufl_domain() Return the integration domain of this integral. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B class ffcx.ir.representation.IntegralIR(integral_type, subdomain_id, rank, geometric_dimension, topological_dimension, entitytype, num_facets, num_vertices, enabled_coefficients, element_dimensions, element_ids, tensor_shape, coefficient_numbering, coefficient_offsets, original_constant_offsets, params, cell_shape, unique_tables, unique_table_types, integrand, name, precision, needs_facet_permutations, coordinate_element) Bases: \fBNamedTuple\fP .sp Create new instance of IntegralIR(integral_type, subdomain_id, rank, geometric_dimension, topological_dimension, entitytype, num_facets, num_vertices, enabled_coefficients, element_dimensions, element_ids, tensor_shape, coefficient_numbering, coefficient_offsets, original_constant_offsets, params, cell_shape, unique_tables, unique_table_types, integrand, name, precision, needs_facet_permutations, coordinate_element) .INDENT 7.0 .TP .B cell_shape: str Alias for field number 16 .UNINDENT .INDENT 7.0 .TP .B coefficient_numbering: Dict[Coefficient, int] Alias for field number 12 .UNINDENT .INDENT 7.0 .TP .B coefficient_offsets: Dict[Coefficient, int] Alias for field number 13 .UNINDENT .INDENT 7.0 .TP .B coordinate_element: str Alias for field number 23 .UNINDENT .INDENT 7.0 .TP .B element_dimensions: Dict[FiniteElementBase, int] Alias for field number 9 .UNINDENT .INDENT 7.0 .TP .B element_ids: Dict[FiniteElementBase, int] Alias for field number 10 .UNINDENT .INDENT 7.0 .TP .B enabled_coefficients: List[bool] Alias for field number 8 .UNINDENT .INDENT 7.0 .TP .B entitytype: str Alias for field number 5 .UNINDENT .INDENT 7.0 .TP .B geometric_dimension: int Alias for field number 3 .UNINDENT .INDENT 7.0 .TP .B integral_type: str Alias for field number 0 .UNINDENT .INDENT 7.0 .TP .B integrand: Dict[\fI\%QuadratureRule\fP, dict] Alias for field number 19 .UNINDENT .INDENT 7.0 .TP .B name: str Alias for field number 20 .UNINDENT .INDENT 7.0 .TP .B needs_facet_permutations: bool Alias for field number 22 .UNINDENT .INDENT 7.0 .TP .B num_facets: int Alias for field number 6 .UNINDENT .INDENT 7.0 .TP .B num_vertices: int Alias for field number 7 .UNINDENT .INDENT 7.0 .TP .B original_constant_offsets: Dict[Constant, int] Alias for field number 14 .UNINDENT .INDENT 7.0 .TP .B params: dict Alias for field number 15 .UNINDENT .INDENT 7.0 .TP .B precision: int Alias for field number 21 .UNINDENT .INDENT 7.0 .TP .B rank: int Alias for field number 2 .UNINDENT .INDENT 7.0 .TP .B subdomain_id: Union[str, Tuple[int, \&...], int] Alias for field number 1 .UNINDENT .INDENT 7.0 .TP .B tensor_shape: List[int] Alias for field number 11 .UNINDENT .INDENT 7.0 .TP .B topological_dimension: int Alias for field number 4 .UNINDENT .INDENT 7.0 .TP .B unique_table_types: Dict[str, str] Alias for field number 18 .UNINDENT .INDENT 7.0 .TP .B unique_tables: Dict[str, ndarray[\fI\%Any\fP, dtype[float64]]] Alias for field number 17 .UNINDENT .UNINDENT .INDENT 0.0 .TP .B class ffcx.ir.representation.QuadratureRule(points, weights) Bases: \fBobject\fP .INDENT 7.0 .TP .B id() Return unique deterministic identifier. .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 This identifier is used to provide unique names to tables and symbols in generated code. .UNINDENT .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B class ffcx.ir.representation.UFLData(form_data, unique_elements, element_numbers, unique_coordinate_elements, expressions) Bases: \fBNamedTuple\fP .sp Create new instance of UFLData(form_data, unique_elements, element_numbers, unique_coordinate_elements, expressions) .INDENT 7.0 .TP .B element_numbers: Dict[_BasixElementBase, int] Alias for field number 2 .UNINDENT .INDENT 7.0 .TP .B expressions: List[Tuple[Expr, ndarray[\fI\%Any\fP, dtype[float64]], Expr]] Alias for field number 4 .UNINDENT .INDENT 7.0 .TP .B form_data: Tuple[FormData, \&...] Alias for field number 0 .UNINDENT .INDENT 7.0 .TP .B unique_coordinate_elements: List[_BasixElementBase] Alias for field number 3 .UNINDENT .INDENT 7.0 .TP .B unique_elements: List[_BasixElementBase] Alias for field number 1 .UNINDENT .UNINDENT .INDENT 0.0 .TP .B ffcx.ir.representation.compute_integral_ir(cell, integral_type, entitytype, integrands, argument_shape, p, visualise) .UNINDENT .INDENT 0.0 .TP .B ffcx.ir.representation.compute_ir(analysis: \fI\%UFLData\fP, object_names, prefix, parameters, visualise) Compute intermediate representation. .UNINDENT .INDENT 0.0 .TP .B ffcx.ir.representation.convert_element(element: FiniteElementBase) -> _BasixElementBase Convert and element to a FFCx element. .UNINDENT .INDENT 0.0 .TP .B ffcx.ir.representation.create_quadrature_points_and_weights(integral_type, cell, degree, rule) Create quadrature rule and return points and weights. .UNINDENT .INDENT 0.0 .TP .B ffcx.ir.representation.sorted_expr_sum(seq) .UNINDENT .SH FFCX.IR.REPRESENTATIONUTILS .sp Utility functions for some code shared between representations. .sp Functions .TS center; |l|l|. _ T{ \fI\%create_quadrature_points_and_weights\fP(...) T} T{ Create quadrature rule and return points and weights. T} _ T{ \fI\%integral_type_to_entity_dim\fP(integral_type, tdim) T} T{ Given integral_type and domain tdim, return the tdim of the integration entity. T} _ T{ \fI\%map_integral_points\fP(points, integral_type, ...) T} T{ Map points from reference entity to its parent reference cell. T} _ .TE .sp Classes .TS center; |l|l|. _ T{ \fI\%QuadratureRule\fP(points, weights) T} T{ T} _ .TE .INDENT 0.0 .TP .B class ffcx.ir.representationutils.QuadratureRule(points, weights) Bases: \fBobject\fP .INDENT 7.0 .TP .B id() Return unique deterministic identifier. .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 This identifier is used to provide unique names to tables and symbols in generated code. .UNINDENT .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B ffcx.ir.representationutils.create_quadrature(cellname, degree, rule) -> Tuple[ndarray[\fI\%Any\fP, dtype[float64]], ndarray[\fI\%Any\fP, dtype[float64]]] Create a quadrature rule. .UNINDENT .INDENT 0.0 .TP .B ffcx.ir.representationutils.create_quadrature_points_and_weights(integral_type, cell, degree, rule) Create quadrature rule and return points and weights. .UNINDENT .INDENT 0.0 .TP .B ffcx.ir.representationutils.integral_type_to_entity_dim(integral_type, tdim) Given integral_type and domain tdim, return the tdim of the integration entity. .UNINDENT .INDENT 0.0 .TP .B ffcx.ir.representationutils.map_facet_points(points: ndarray[\fI\%Any\fP, dtype[float64]], facet: int, cellname: str) -> ndarray[\fI\%Any\fP, dtype[float64]] Map points from a reference facet to a physical facet. .UNINDENT .INDENT 0.0 .TP .B ffcx.ir.representationutils.map_integral_points(points, integral_type, cell, entity) Map points from reference entity to its parent reference cell. .UNINDENT .INDENT 0.0 .TP .B ffcx.ir.representationutils.reference_cell_vertices(cellname: str) -> ndarray[\fI\%Any\fP, dtype[float64]] Get the vertices of a reference cell. .UNINDENT .INDENT 0.0 .IP \(bu 2 \fI\%Index\fP .IP \(bu 2 \fI\%Module Index\fP .IP \(bu 2 \fI\%Search Page\fP .UNINDENT .SH AUTHOR FEniCS Project .SH COPYRIGHT 2023, FEniCS Project .\" Generated by docutils manpage writer. .