fgen.wrapping_strategies.passing_to_fortran_steps#

Data model for how we pass data from Python to Fortran

PassingToFortranSteps#

class PassingToFortranSteps(preparatory_python_calls, fortran_module_callable_args)[source]#

Bases: object

Container for holding the steps required to pass data to Fortran

property fortran_callable_arg_list: list[str]#

Argument list to use when calling a Fortran callable

Note that this may not be the entire argument list, it is only the calls for the arguments managed by self.

fortran_module_callable_args: tuple[tuple[str, str], ...]#

Tuple of argument-value pairs to pass to the Fortran module callable

The first element of each element in fortran_module_callable_args is the name expected by Fortran, the second element is the name of the Python variable.

There might be differences from the user-facing Python arguments, because we don’t always pass values straight through.

preparatory_python_calls: typing.Optional[str]#

Calls required in Python to prepare to pass the data to Fortran