Provided by: python3-ffcx_0.3.0-3_all
NAME
fenicsformcompilerx - FEniCS Form Compiler X Documentation The is an experimental version of the FEniCS Form Compiler. It is developed at https://github.com/FEniCS/ffcx. ┌────────────────────┬──────────────────────────────────┐ │ffcx │ FEniCS Form Compiler (FFCx). │ ├────────────────────┼──────────────────────────────────┤ │ffcx.analysis │ Compiler stage 1: Analysis. │ ├────────────────────┼──────────────────────────────────┤ │ffcx.naming │ │ ├────────────────────┼──────────────────────────────────┤ │ffcx.codegeneration │ │ ├────────────────────┼──────────────────────────────────┤ │ffcx.compiler │ Main interface for compilation │ │ │ of forms. │ ├────────────────────┼──────────────────────────────────┤ │ffcx.formatting │ Compiler stage 5: Code │ │ │ formatting. │ ├────────────────────┼──────────────────────────────────┤ │ffcx.main │ Command-line interface to FFCx. │ ├────────────────────┼──────────────────────────────────┤ │ffcx.__main__ │ │ ├────────────────────┼──────────────────────────────────┤ │ffcx.parameters │ │ └────────────────────┴──────────────────────────────────┘
FFCX
FEniCS Form Compiler (FFCx). FFCx compiles finite element variational forms into C code.
FFCX.ANALYSIS
Compiler stage 1: Analysis. This module implements the analysis/preprocessing of variational forms, including automatic selection of elements, degrees and form representation type. Functions ┌─────────────────────────────────┬────────────────────────┐ │analyze_ufl_objects(ufl_objects, │ Analyze ufl object(s). │ │parameters) │ │ └─────────────────────────────────┴────────────────────────┘ Classes ┌──────────────────────┬───┐ │ufl_data(form_data, │ │ │unique_elements, ...) │ │ └──────────────────────┴───┘
FFCX.NAMING
Functions ┌─────────────────────────────────┬─────────────────────────────┐ │compute_signature(ufl_objects, │ Compute the signature hash. │ │tag) │ │ └─────────────────────────────────┴─────────────────────────────┘ │dofmap_name(ufl_element, prefix) │ │ ├─────────────────────────────────┼─────────────────────────────┤ │expression_name(expression, │ │ │prefix) │ │ ├─────────────────────────────────┼─────────────────────────────┤ │finite_element_name(ufl_element, │ │ │prefix) │ │ ├─────────────────────────────────┼─────────────────────────────┤ │form_name(original_form, │ │ │form_id, prefix) │ │ ├─────────────────────────────────┼─────────────────────────────┤ │integral_name(original_form, │ │ │integral_type, ...) │ │ └─────────────────────────────────┴─────────────────────────────┘
FFCX.CODEGENERATION
Functions ┌───────────────────┬──────────────────────────────────┐ │get_include_path() │ Return location of UFC header │ │ │ files. │ ├───────────────────┼──────────────────────────────────┤ │get_signature() │ Return SHA-1 hash of the │ │ │ contents of ufc.h. │ └───────────────────┴──────────────────────────────────┘
FFCX.COMPILER
Main interface for compilation of forms. Breaks the compilation into several sequential stages. The output of each stage is the input of the next stage. Compiler stages: 0. Language, parsing • Input: Python code or .ufl file • Output: UFL form This stage consists of parsing and expressing a form in the UFL form language. This stage is handled by UFL. 1. Analysis • Input: UFL form • Output: Preprocessed UFL form and FormData (metadata) This stage preprocesses the UFL form and extracts form metadata. It may also perform simplifications on the form. 2. Code representation • Input: Preprocessed UFL form and FormData (metadata) • Output: Intermediate Representation (IR) 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. The IR is stored as a dictionary, mapping names of UFC functions to data needed for generation of the corresponding code. 3. Code generation • Input: Intermediate Representation (IR) • Output: C code This stage examines the IR and generates the actual C code for the body of each UFC function. The code is stored as a dictionary, mapping names of UFC functions to strings containing the C code of the body of each function. 4. Code formatting • Input: C code • Output: C code files 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. Functions ┌──────────────────────────────────┬──────────────────────────────────┐ │compile_ufl_objects(ufl_objects[, │ Generate UFC code for a given │ │...]) │ UFL objects. │ └──────────────────────────────────┴──────────────────────────────────┘
FFCX.FORMATTING
Compiler stage 5: Code formatting. This module implements the formatting of UFC code from a given dictionary of generated C++ code for the body of each UFC function. It relies on templates for UFC code available as part of the module ufc_utils. Functions ┌─────────────────────────────────┬──────────────────────────────────┐ │format_code(code, parameters) │ Format given code in UFC format. │ ├─────────────────────────────────┼──────────────────────────────────┤ │write_code(code_h, code_c, │ │ │prefix, output_dir) │ │ └─────────────────────────────────┴──────────────────────────────────┘
FFCX.MAIN
Command-line interface to FFCx. Parse command-line arguments and generate code from input UFL form files. Functions ┌─────────────┬───┐ │main([args]) │ │ └─────────────┴───┘
FFCX.__MAIN__
FFCX.PARAMETERS
Functions ┌──────────────────────────────────────┬──────────────────────────────────┐ │get_parameters([priority_parameters]) │ Return (a copy of) the merged │ │ │ parameter values for FFCX. │ └──────────────────────────────────────┴──────────────────────────────────┘ • genindex • modindex • search
AUTHOR
FEniCS Project
COPYRIGHT
2021, FEniCS Project