'\" t .\" 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" "Apr 11, 2024" "0.8.0.dev0" "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{ Run ffcx on a UFL file. 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{ Naming. T} _ T{ \fI\%ffcx.codegeneration\fP T} T{ FFCx code generation. T} _ T{ \fI\%ffcx.options\fP T} T{ Options. 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_options(priority_options: dict | None = None) -> dict Return (a copy of) the merged option values for FFCX. .INDENT 7.0 .TP .B Parameters \fBpriority_options\fP – take priority over all other option values (see notes) .TP .B Returns merged option values .UNINDENT .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 This function sets the log level from the merged option values prior to returning. .sp The \fIffcx_options.json\fP files are cached on the first call. Subsequent calls to this function use this cache. .sp Priority ordering of options from highest to lowest is: .INDENT 0.0 .IP \(bu 2 \fBpriority_options\fP (API and command line options) .IP \(bu 2 \fB$PWD/ffcx_options.json\fP (local options) .IP \(bu 2 \fB$XDG_CONFIG_HOME/ffcx/ffcx_options.json\fP (user options) .IP \(bu 2 \fBFFCX_DEFAULT_OPTIONS\fP in \fIffcx.options\fP .UNINDENT .sp \fIXDG_CONFIG_HOME\fP is \fI~/.config/\fP if the environment variable is not set. .sp Example \fIffcx_options.json\fP file: .INDENT 0.0 .INDENT 3.5 { “epsilon”: 1e\-7 } .UNINDENT .UNINDENT .UNINDENT .UNINDENT .UNINDENT .SH FFCX.__MAIN__ .sp Run ffcx on a UFL file. .INDENT 0.0 .TP .B ffcx.__main__.main(args=None) Run ffcx on a UFL file. .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, options) T} T{ Analyze ufl object(s). T} _ .TE .sp Classes .TS center; |l|l|. _ T{ \fI\%UFLData\fP(form_data, unique_elements, ...) T} T{ UFL data. T} _ .TE .INDENT 0.0 .TP .B class ffcx.analysis.UFLData(form_data: tuple[FormData, \&...], unique_elements: list[_ElementBase], element_numbers: dict[_ElementBase, int], unique_coordinate_elements: list[_ElementBase], expressions: list[tuple[Expr, ndarray[\fI\%Any\fP, dtype[float64]], Expr]]) Bases: \fBNamedTuple\fP .sp UFL data. .sp Create new instance of UFLData(form_data, unique_elements, element_numbers, unique_coordinate_elements, expressions) .INDENT 7.0 .TP .B element_numbers: dict[_ElementBase, 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[_ElementBase] Alias for field number 3 .UNINDENT .INDENT 7.0 .TP .B unique_elements: list[_ElementBase] Alias for field number 1 .UNINDENT .UNINDENT .INDENT 0.0 .TP .B ffcx.analysis.analyze_ufl_objects(ufl_objects: list, options: dict) -> \fI\%UFLData\fP Analyze ufl object(s). .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBufl_objects\fP – UFL objects .IP \(bu 2 \fBoptions\fP – FFCx options. These options take priority over all other set options. .UNINDENT .TP .B Returns form_datas: Form_data objects unique_elements: Unique elements across all forms and expressions element_numbers: Mapping to unique numbers for all elements unique_coordinate_elements: Unique coordinate elements across all forms and expressions expressions: List of all expressions after post\-processing, with its evaluation points .INDENT 7.0 .INDENT 3.5 and the original expression .UNINDENT .UNINDENT .TP .B Return type A data structure holding .UNINDENT .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, options: dict) -> \fI\%UFLData\fP Analyze ufl object(s). .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBufl_objects\fP – UFL objects .IP \(bu 2 \fBoptions\fP – FFCx options. These options take priority over all other set options. .UNINDENT .TP .B Returns form_datas: Form_data objects unique_elements: Unique elements across all forms and expressions element_numbers: Mapping to unique numbers for all elements unique_coordinate_elements: Unique coordinate elements across all forms and expressions expressions: List of all expressions after post\-processing, with its evaluation points .INDENT 7.0 .INDENT 3.5 and the original expression .UNINDENT .UNINDENT .TP .B Return type A data structure holding .UNINDENT .UNINDENT .INDENT 0.0 .TP .B ffcx.compiler.compile_ufl_objects(ufl_objects: list[\fI\%Any\fP], object_names: dict = {}, prefix: str | None = None, options: dict = {}, visualise: bool = False) Generate UFC code for a given UFL objects. .INDENT 7.0 .TP .B Parameters .INDENT 7.0 .IP \(bu 2 \fBufl_objects\fP – Objects to be compiled. Accepts elements, forms, integrals or coordinate mappings. object_names: Object names .IP \(bu 2 \fBobject_names\fP – TODO. .IP \(bu 2 \fBprefix\fP – Prefix .IP \(bu 2 \fBoptions\fP – Options .IP \(bu 2 \fBvisualise\fP – Toggle visualisation .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B ffcx.compiler.compute_ir(analysis: \fI\%UFLData\fP, object_names, prefix, options, visualise) Compute intermediate representation. .UNINDENT .INDENT 0.0 .TP .B ffcx.compiler.format_code(code, options: 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, options) -> 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\%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 .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.create_quadrature(cellname: str, degree: int, rule: str, elements: list[_ElementBase]) -> 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.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, options) T} T{ Format given code in UFC format. T} _ T{ \fI\%write_code\fP(code_h, code_c, prefix, output_dir) T} T{ Write code to files. T} _ .TE .INDENT 0.0 .TP .B ffcx.formatting.format_code(code, options: 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) Write code to files. .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{ Run ffcx on a UFL file. T} _ .TE .INDENT 0.0 .TP .B ffcx.main.arg_type alias of \fBint\fP .UNINDENT .INDENT 0.0 .TP .B ffcx.main.get_options(priority_options: dict | None = None) -> dict Return (a copy of) the merged option values for FFCX. .INDENT 7.0 .TP .B Parameters \fBpriority_options\fP – take priority over all other option values (see notes) .TP .B Returns merged option values .UNINDENT .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 This function sets the log level from the merged option values prior to returning. .sp The \fIffcx_options.json\fP files are cached on the first call. Subsequent calls to this function use this cache. .sp Priority ordering of options from highest to lowest is: .INDENT 0.0 .IP \(bu 2 \fBpriority_options\fP (API and command line options) .IP \(bu 2 \fB$PWD/ffcx_options.json\fP (local options) .IP \(bu 2 \fB$XDG_CONFIG_HOME/ffcx/ffcx_options.json\fP (user options) .IP \(bu 2 \fBFFCX_DEFAULT_OPTIONS\fP in \fIffcx.options\fP .UNINDENT .sp \fIXDG_CONFIG_HOME\fP is \fI~/.config/\fP if the environment variable is not set. .sp Example \fIffcx_options.json\fP file: .INDENT 0.0 .INDENT 3.5 { “epsilon”: 1e\-7 } .UNINDENT .UNINDENT .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B ffcx.main.main(args=None) Run ffcx on a UFL file. .UNINDENT .SH FFCX.NAMING .sp Naming. .sp Functions .TS center; |l|l|. _ 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{ Get DOF map name. T} _ T{ \fI\%expression_name\fP(expression, prefix) T} T{ Get expression name. T} _ T{ \fI\%finite_element_name\fP(ufl_element, prefix) T} T{ Get finite element name. T} _ T{ \fI\%form_name\fP(original_form, form_id, prefix) T} T{ Get form name. T} _ T{ \fI\%integral_name\fP(original_form, integral_type, ...) T} T{ Get integral name. T} _ .TE .INDENT 0.0 .TP .B ffcx.naming.compute_signature(ufl_objects: list[Form | _ElementBase | 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.dofmap_name(ufl_element, prefix) Get DOF map name. .UNINDENT .INDENT 0.0 .TP .B ffcx.naming.expression_name(expression, prefix) Get expression name. .UNINDENT .INDENT 0.0 .TP .B ffcx.naming.finite_element_name(ufl_element, prefix) Get finite element name. .UNINDENT .INDENT 0.0 .TP .B ffcx.naming.form_name(original_form, form_id, prefix) Get form name. .UNINDENT .INDENT 0.0 .TP .B ffcx.naming.integral_name(original_form, integral_type, form_id, subdomain_id, prefix) Get integral name. .UNINDENT .SH FFCX.CODEGENERATION .sp FFCx code generation. .sp Functions .TS center; |l|l|. _ T{ \fI\%get_include_path\fP() T} T{ Return location of UFCx 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 UFCx 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.OPTIONS .sp Options. .sp Functions .TS center; |l|l|. _ T{ \fI\%get_options\fP([priority_options]) T} T{ Return (a copy of) the merged option values for FFCX. T} _ .TE .INDENT 0.0 .TP .B class ffcx.options.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.options.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.options.get_options(priority_options: dict | None = None) -> dict Return (a copy of) the merged option values for FFCX. .INDENT 7.0 .TP .B Parameters \fBpriority_options\fP – take priority over all other option values (see notes) .TP .B Returns merged option values .UNINDENT .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 This function sets the log level from the merged option values prior to returning. .sp The \fIffcx_options.json\fP files are cached on the first call. Subsequent calls to this function use this cache. .sp Priority ordering of options from highest to lowest is: .INDENT 0.0 .IP \(bu 2 \fBpriority_options\fP (API and command line options) .IP \(bu 2 \fB$PWD/ffcx_options.json\fP (local options) .IP \(bu 2 \fB$XDG_CONFIG_HOME/ffcx/ffcx_options.json\fP (user options) .IP \(bu 2 \fBFFCX_DEFAULT_OPTIONS\fP in \fIffcx.options\fP .UNINDENT .sp \fIXDG_CONFIG_HOME\fP is \fI~/.config/\fP if the environment variable is not set. .sp Example \fIffcx_options.json\fP file: .INDENT 0.0 .INDENT 3.5 { “epsilon”: 1e\-7 } .UNINDENT .UNINDENT .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{ Intermediate representation of a custom element. T} _ T{ \fI\%DataIR\fP(elements, dofmaps, integrals, forms, ...) T} T{ Intermediate representation of data. T} _ T{ \fI\%DofMapIR\fP(id, name, signature, ...) T} T{ Intermediate representation of a DOF map. T} _ T{ \fI\%ElementIR\fP(id, name, signature, cell_shape, ...) T} T{ Intermediate representation of an element. T} _ T{ \fI\%ExpressionIR\fP(name, element_dimensions, ...) T} T{ Intermediate representation of an expression. T} _ T{ \fI\%FormIR\fP(id, name, signature, rank, ...) T} T{ Intermediate representation of a form. T} _ T{ \fI\%IntegralIR\fP(integral_type, subdomain_id, ...) T} T{ Intermediate representation of an integral. T} _ T{ \fI\%QuadratureIR\fP(cell_shape, points, weights) T} T{ Intermediate representation of a quadrature rule. T} _ .TE .INDENT 0.0 .TP .B class ffcx.ir.representation.CustomElementIR(cell_type: CellType, value_shape: tuple[int, \&...], wcoeffs: ndarray[\fI\%Any\fP, dtype[float64]], x: list[list[ndarray[\fI\%Any\fP, dtype[float64]]]], M: list[list[ndarray[\fI\%Any\fP, dtype[float64]]]], map_type: MapType, sobolev_space: SobolevSpace, interpolation_nderivs: int, discontinuous: bool, embedded_subdegree: int, embedded_superdegree: int, polyset_type: PolysetType) Bases: \fBNamedTuple\fP .sp Intermediate representation of a custom element. .sp Create new instance of CustomElementIR(cell_type, value_shape, wcoeffs, x, M, map_type, sobolev_space, interpolation_nderivs, discontinuous, embedded_subdegree, embedded_superdegree, polyset_type) .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 8 .UNINDENT .INDENT 7.0 .TP .B embedded_subdegree: int Alias for field number 9 .UNINDENT .INDENT 7.0 .TP .B embedded_superdegree: int Alias for field number 10 .UNINDENT .INDENT 7.0 .TP .B interpolation_nderivs: int Alias for field number 7 .UNINDENT .INDENT 7.0 .TP .B map_type: MapType Alias for field number 5 .UNINDENT .INDENT 7.0 .TP .B polyset_type: PolysetType Alias for field number 11 .UNINDENT .INDENT 7.0 .TP .B sobolev_space: SobolevSpace Alias for field number 6 .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: list[\fI\%ElementIR\fP], dofmaps: list[\fI\%DofMapIR\fP], integrals: list[\fI\%IntegralIR\fP], forms: list[\fI\%FormIR\fP], expressions: list[\fI\%ExpressionIR\fP]) Bases: \fBNamedTuple\fP .sp Intermediate representation of data. .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: int, name: str, signature: str, num_global_support_dofs: int, num_element_support_dofs: int, entity_dofs: list[list[list[int]]], entity_closure_dofs: list[list[list[int]]], num_entity_closure_dofs: list[list[int]], num_sub_dofmaps: int, sub_dofmaps: list[str], block_size: int) Bases: \fBNamedTuple\fP .sp Intermediate representation of a DOF map. .sp Create new instance of DofMapIR(id, name, signature, num_global_support_dofs, num_element_support_dofs, 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 10 .UNINDENT .INDENT 7.0 .TP .B entity_closure_dofs: list[list[list[int]]] Alias for field number 6 .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 7 .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 8 .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 9 .UNINDENT .UNINDENT .INDENT 0.0 .TP .B class ffcx.ir.representation.ElementIR(id: int, name: str, signature: str, cell_shape: str, topological_dimension: int, space_dimension: int, reference_value_shape: tuple[int, \&...], degree: int, num_sub_elements: int, block_size: int, sub_elements: list[str], element_type: str, entity_dofs: list[list[list[int]]], lagrange_variant: LagrangeVariant, dpc_variant: DPCVariant, basix_family: ElementFamily, basix_cell: CellType, discontinuous: bool, custom_element: \fI\%CustomElementIR\fP, custom_quadrature: \fI\%QuadratureIR\fP) Bases: \fBNamedTuple\fP .sp Intermediate representation of an element. .sp Create new instance of ElementIR(id, name, signature, cell_shape, topological_dimension, space_dimension, reference_value_shape, degree, num_sub_elements, block_size, sub_elements, element_type, entity_dofs, lagrange_variant, dpc_variant, basix_family, basix_cell, discontinuous, custom_element, custom_quadrature) .INDENT 7.0 .TP .B basix_cell: CellType Alias for field number 16 .UNINDENT .INDENT 7.0 .TP .B basix_family: ElementFamily Alias for field number 15 .UNINDENT .INDENT 7.0 .TP .B block_size: int Alias for field number 9 .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 18 .UNINDENT .INDENT 7.0 .TP .B custom_quadrature: \fI\%QuadratureIR\fP Alias for field number 19 .UNINDENT .INDENT 7.0 .TP .B degree: int Alias for field number 7 .UNINDENT .INDENT 7.0 .TP .B discontinuous: bool Alias for field number 17 .UNINDENT .INDENT 7.0 .TP .B dpc_variant: DPCVariant Alias for field number 14 .UNINDENT .INDENT 7.0 .TP .B element_type: str Alias for field number 11 .UNINDENT .INDENT 7.0 .TP .B entity_dofs: list[list[list[int]]] Alias for field number 12 .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 13 .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 8 .UNINDENT .INDENT 7.0 .TP .B reference_value_shape: tuple[int, \&...] Alias for field number 6 .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 5 .UNINDENT .INDENT 7.0 .TP .B sub_elements: list[str] Alias for field number 10 .UNINDENT .INDENT 7.0 .TP .B topological_dimension: int Alias for field number 4 .UNINDENT .UNINDENT .INDENT 0.0 .TP .B class ffcx.ir.representation.ExpressionIR(name: str, element_dimensions: dict[_ElementBase, int], options: dict, unique_tables: dict[str, ndarray[\fI\%Any\fP, dtype[float64]]], unique_table_types: dict[str, str], integrand: dict[\fI\%QuadratureRule\fP, dict], coefficient_numbering: dict[Coefficient, int], coefficient_offsets: dict[Coefficient, int], integral_type: str, entitytype: str, tensor_shape: list[int], expression_shape: list[int], original_constant_offsets: dict[Constant, int], points: ndarray[\fI\%Any\fP, dtype[float64]], coefficient_names: list[str], constant_names: list[str], needs_facet_permutations: bool, function_spaces: dict[str, tuple[str, str, str, int, CellType, LagrangeVariant, tuple[int]]], name_from_uflfile: str, original_coefficient_positions: list[int]) Bases: \fBNamedTuple\fP .sp Intermediate representation of an expression. .sp Create new instance of ExpressionIR(name, element_dimensions, options, 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[_ElementBase, 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, tuple[int]]] 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 options: dict Alias for field number 2 .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 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: int, name: str, signature: str, rank: int, num_coefficients: int, num_constants: int, name_from_uflfile: str, function_spaces: dict[str, tuple[str, str, str, int, CellType, LagrangeVariant, tuple[int]]], original_coefficient_position: list[int], coefficient_names: list[str], constant_names: list[str], finite_elements: list[str], dofmaps: list[str], integral_names: dict[str, list[str]], subdomain_ids: dict[str, list[int]]) Bases: \fBNamedTuple\fP .sp Intermediate representation of a form. .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, tuple[int]]] 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. .sp Initialise. .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. .sp Example .sp b = a.reconstruct(expand_compounds(a.integrand())) c = a.reconstruct(metadata={‘quadrature_degree’:2}) .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: str, subdomain_id: str | tuple[int, \&...] | int, rank: int, geometric_dimension: int, topological_dimension: int, entitytype: str, num_facets: int, num_vertices: int, enabled_coefficients: list[bool], element_dimensions: dict[_ElementBase, int], element_ids: dict[_ElementBase, int], tensor_shape: list[int], coefficient_numbering: dict[Coefficient, int], coefficient_offsets: dict[Coefficient, int], original_constant_offsets: dict[Constant, int], options: dict, cell_shape: str, unique_tables: dict[str, ndarray[\fI\%Any\fP, dtype[float64]]], unique_table_types: dict[str, str], integrand: dict[\fI\%QuadratureRule\fP, dict], name: str, needs_facet_permutations: bool, coordinate_element: str, sum_factorization: bool) Bases: \fBNamedTuple\fP .sp Intermediate representation of an integral. .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, options, cell_shape, unique_tables, unique_table_types, integrand, name, needs_facet_permutations, coordinate_element, sum_factorization) .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 22 .UNINDENT .INDENT 7.0 .TP .B element_dimensions: dict[_ElementBase, int] Alias for field number 9 .UNINDENT .INDENT 7.0 .TP .B element_ids: dict[_ElementBase, 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 21 .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 options: dict Alias for field number 15 .UNINDENT .INDENT 7.0 .TP .B original_constant_offsets: dict[Constant, int] Alias for field number 14 .UNINDENT .INDENT 7.0 .TP .B rank: int Alias for field number 2 .UNINDENT .INDENT 7.0 .TP .B subdomain_id: str | tuple[int, \&...] | int Alias for field number 1 .UNINDENT .INDENT 7.0 .TP .B sum_factorization: bool Alias for field number 23 .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.QuadratureIR(cell_shape: str, points: ndarray[\fI\%Any\fP, dtype[float64]], weights: ndarray[\fI\%Any\fP, dtype[float64]]) Bases: \fBNamedTuple\fP .sp Intermediate representation of a quadrature rule. .sp Create new instance of QuadratureIR(cell_shape, points, weights) .INDENT 7.0 .TP .B cell_shape: str Alias for field number 0 .UNINDENT .INDENT 7.0 .TP .B points: ndarray[\fI\%Any\fP, dtype[float64]] Alias for field number 1 .UNINDENT .INDENT 7.0 .TP .B weights: ndarray[\fI\%Any\fP, dtype[float64]] Alias for field number 2 .UNINDENT .UNINDENT .INDENT 0.0 .TP .B class ffcx.ir.representation.QuadratureRule(points, weights, tensor_factors=None) Bases: \fBobject\fP .sp A quadrature rule. .sp Initialise. .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: tuple[FormData, \&...], unique_elements: list[_ElementBase], element_numbers: dict[_ElementBase, int], unique_coordinate_elements: list[_ElementBase], expressions: list[tuple[Expr, ndarray[\fI\%Any\fP, dtype[float64]], Expr]]) Bases: \fBNamedTuple\fP .sp UFL data. .sp Create new instance of UFLData(form_data, unique_elements, element_numbers, unique_coordinate_elements, expressions) .INDENT 7.0 .TP .B element_numbers: dict[_ElementBase, 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[_ElementBase] Alias for field number 3 .UNINDENT .INDENT 7.0 .TP .B unique_elements: list[_ElementBase] 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) Compute intermediate representation for an integral. .UNINDENT .INDENT 0.0 .TP .B ffcx.ir.representation.compute_ir(analysis: \fI\%UFLData\fP, object_names, prefix, options, visualise) Compute intermediate representation. .UNINDENT .INDENT 0.0 .TP .B ffcx.ir.representation.create_quadrature_points_and_weights(integral_type, cell, degree, rule, elements, use_tensor_product=False) Create quadrature rule and return points and weights. .UNINDENT .INDENT 0.0 .TP .B ffcx.ir.representation.sorted_expr_sum(seq) Sorted expr sum. .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[, tensor_factors]) T} T{ A quadrature rule. T} _ .TE .INDENT 0.0 .TP .B class ffcx.ir.representationutils.QuadratureRule(points, weights, tensor_factors=None) Bases: \fBobject\fP .sp A quadrature rule. .sp Initialise. .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: str, degree: int, rule: str, elements: list[_ElementBase]) -> 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, elements, use_tensor_product=False) 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 2024, FEniCS Project .\" Generated by docutils manpage writer. .