Package sfc :: Package codegeneration :: Module codegeneration
[hide private]
[frames] | no frames]

Module codegeneration

source code

Codegeneration utilities.

Functions [hide private]
 
common_system_headers() source code
 
apply_code_dict(format_string, code_dict)
Template formatting with improved checking for template argument mismatch.
source code
 
generate_finite_element_code(ferep) source code
 
generate_dof_map_code(ferep) source code
 
generate_cell_integral_code(integrals, formrep) source code
 
generate_exterior_facet_integral_code(integrals, formrep) source code
 
generate_interior_facet_integral_code(integrals, formrep) source code
 
generate_form_code(formrep) source code
 
write_file(filename, text) source code
 
write_code(classname, code) source code
 
compiler_input(input, objects=None, common_cell=None)
Map different kinds of input to a list of UFL elements and a list of FormData instances.
source code
 
generate_code(input, objects, options=None, common_cell=None)
Generate code from input and options.
source code
Variables [hide private]
  _header_template = r""...
  _implementation_template = r""...
  dolfin_header_template = ""...
Function Details [hide private]

compiler_input(input, objects=None, common_cell=None)

source code 
Map different kinds of input to a list of
UFL elements and a list of FormData instances.

The following input formats are allowed:
- ufl.Form
- ufl.algorithms.FormData
- ufl.FiniteElementBase
- list of the above

Returns:
    elements, formdatas

generate_code(input, objects, options=None, common_cell=None)

source code 

Generate code from input and options.

Parameters:
  • input - TODO
  • options - TODO

Variables Details [hide private]

_header_template

Value:
r"""/*
 * %(name)s.h
 *
 * This file was automatically generated by SFC.
 *
 * http://www.fenics.org/syfi/
 *
 */
...

_implementation_template

Value:
r"""/*
 * %(name)s.cpp
 *
 * This file was automatically generated by SFC.
 *
 * http://www.fenics.org/syfi/
 *
 */
...

dolfin_header_template

Value:
"""/*
 * DOLFIN wrapper code generated by the SyFi Form Compiler.
 */

%s
"""