ENKI

Previous topic

Coder package

Next topic

Calibrate functions

Coder Templates package

The Coder Templates module provides templates that suport code generation in coder.py classes.

coder_templates.create_calib_c_template(language='C')[source]

Retrieves template for a C function file that implements calibration mode calculation of model functions for a specific phase instance.

The calibration functions expose the model parameters using getters and setters, which otherwise are fixed as constants in the fast routines, allowing the compiler to optimize the resulting code.

The user does not normally call this function directly.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_calib_h_template(language='C')[source]

Retrieves template for an include file that implements calibration mode calculation of model functions for a specific phase instance.

The calibration functions expose the model parameters using getters and setters, which otherwise are fixed as constants in the fast routines, allowing the compiler to optimize the resulting code.

The user does not normally call this function directly.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_calib_pyx_template(language='C')[source]

Retrieves calib code template for cython pyx file.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_code_for_born_functions(language='C')[source]

Retrieves code that provides a reference to the Born functions.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_code_for_debye_function(language='C')[source]

Retrieves a block of code that provides an implementation of the Debye function.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_code_for_dh_functions(language='C')[source]

Retrieves code that provides a reference to the Debye-Hückel solvent functions.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_fast_c_template(language='C')[source]

Retrieves template for a C function file that implements fast calculation of model functions for a specific phase instance.

The user does not normally call this function directly.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_fast_h_template(language='C')[source]

Retrieves template for an include file that implements fast calculation of model functions for a specific phase instance.

The user does not normally call this function directly.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_fast_pyx_template(language='C')[source]

Retrieves fast code template for cython pyx file.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_pyxbld_template(language='C')[source]

Retrieves template for cython pyxbld file.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_redundant_calib_TV_template(language='C')[source]

Retrieves template for redundant thermodynamic functions associated with Helmholtz models.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_redundant_function_template(language='C', model_type='TP')[source]

Retrieves template for redundant thermodynamic functions.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

model_type: string

Potential type, either Gibbs free energy (‘TP’) or Helmholtz free energy (‘TV’)

Returns:

string :

The template string.

coder_templates.create_soln_calc_template(language='C')[source]

Retrieves template for solution functions.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_soln_calib_code_template(language='C')[source]

Retrieves template for calibration code solution template.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_soln_calib_extra_template(language='C')[source]

Retrieves template for solution calibration functions that retrieve and set values of model parameters.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_soln_calib_include_template(language='C')[source]

Retrieves template for calibration include file solution template.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_soln_calib_pyx_template(language='C')[source]

Retrieves calib solution code template for cython pyx file.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_soln_calib_template(language='C')[source]

Retrieves template for solution calibration functions.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_soln_deriv_template(language='C')[source]

Retrieves template for solution derivative functions.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_soln_fast_code_template(language='C')[source]

Retrieves template for fast code solution template.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_soln_fast_include_template(language='C')[source]

Retrieves template for fast include file solution template.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_soln_fast_pyx_template(language='C')[source]

Retrieves fast solution code template for cython pyx file.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_soln_pyxbld_template(language='C')[source]

Retrieves template for cython solution pyxbld file.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_soln_redun_template(language='C')[source]

Retrieves template for solution redundant functions.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_soln_std_state_include_template(language='C')[source]

Retrieves template for standard state properties include template.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_ordering_gaussj_template(language='C')[source]

Retrieves template for generation of guassj code.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_ordering_code_template(language='C')[source]

Retrieves template for generation of ordering code.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_complx_soln_calc_template(language='C')[source]

Retrieves template for generation of solution property code.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.

coder_templates.create_complx_soln_calib_template(language='C')[source]

Retrieves template for generation of solution property code.

Parameters:

language : string

Language syntax for generated code, (“C” is the C99 programming language)

Returns:

string :

The template string.