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 ufcx_utils.

Functions

format_code(code, options)

Format given code in UFC format.

write_code(code_h, code_c, prefix, output_dir)

ffcx.formatting.format_code(code, options: dict)[source]

Format given code in UFC format. Returns two strings with header and source file contents.

ffcx.formatting.write_code(code_h, code_c, prefix, output_dir)[source]