Table Of Contents

Previous topic

Pysic Utility modules

Next topic

pysic_interface (PyInterface.f90)

This Page

Pysic Fortran module

Pysic Fortran (pysic.pysic_fortran) is the Python interface of the Fortran core generated using f2py from PyInterface.F90. This is the only Fortran source file of Pysic that should be wrapped with f2py: the rest of the core needs to be directly compiled with a Fortran compiler to .mod Fortran modules.

The module is naturally accessible from within Python, but usually there should be no need to directly invoke its functions as pysic defines a more refined interface to the Fortran core, mainly through the class Pysic. It is assumed that the arguments passed to the functions have proper data types and array dimensions, and that they are called in such an order that the necessary memory allocations have been done within Fortran before data structures are accessed. Methods in Pysic do this automatically and are thus much safer to use than directly calling the functions in this module. The Fortran routines are documented here mostly for development purposes.

Modules of the Fortran core of Pysic