The Open FUSION Toolkit 1.0.0-8905cc5
Modeling tools for plasma and fusion research and engineering
Loading...
Searching...
No Matches
Functions | Variables
OpenFUSIONToolkit._interface Namespace Reference

Detailed Description

Fortran interface definitions for Open FUSION Toolkit common runtime functions.

Authors
Chris Hansen
Date
Feb 2025

Functions

 ctypes_numpy_array (type, ndim)
 Create a ctypes argument object for a given numpy array type and dimension.
 
 ctypes_subroutine (function, argtypes=None, restype=None)
 Create a ctypes object for a FORTRAN subroutine (no return value)
 

Variables

 c_bool_ptr = ctypes.POINTER(c_bool)
 ctypes logical (bool) pointer alias
 
 c_bool_ptr_ptr = ctypes.POINTER(c_bool_ptr)
 ctypes logical (bool) double pointer alias
 
 c_double_ptr = ctypes.POINTER(c_double)
 ctypes 64-bit floating point (double) pointer type
 
 c_double_ptr_ptr = ctypes.POINTER(c_double_ptr)
 ctypes 64-bit floating point (double) double pointer
 
 c_int_ptr = ctypes.POINTER(c_int)
 ctypes 32-bit integer (int) pointer alias
 
 c_int_ptr_ptr = ctypes.POINTER(c_int_ptr)
 ctypes 32-bit integer (int) double pointer alias
 
 c_struct = ctypes.Structure
 ctypes struct alias
 
 c_void_ptr_ptr = ctypes.POINTER(c_void_p)
 ctypes void double pointer
 
float eC = 1.60217663e-19
 Electron charge.
 
int mu0 = numpy.pi*4.E-7
 Vacuum magnetic permeability.
 

Function Documentation

◆ ctypes_numpy_array()

ctypes_numpy_array (   type,
  ndim 
)

Create a ctypes argument object for a given numpy array type and dimension.

Parameters
typeNumPy c-compatible datatype (https://numpy.org/doc/stable/user/basics.types.html)
ndimNumber of dimensions in array

◆ ctypes_subroutine()

ctypes_subroutine (   function,
  argtypes = None,
  restype = None 
)

Create a ctypes object for a FORTRAN subroutine (no return value)

Parameters
functionFunction object from ctypes library
argtypesList of types for each argument (optional)

Variable Documentation

◆ c_bool_ptr

c_bool_ptr = ctypes.POINTER(c_bool)

ctypes logical (bool) pointer alias

◆ c_bool_ptr_ptr

c_bool_ptr_ptr = ctypes.POINTER(c_bool_ptr)

ctypes logical (bool) double pointer alias

◆ c_double_ptr

c_double_ptr = ctypes.POINTER(c_double)

ctypes 64-bit floating point (double) pointer type

◆ c_double_ptr_ptr

c_double_ptr_ptr = ctypes.POINTER(c_double_ptr)

ctypes 64-bit floating point (double) double pointer

◆ c_int_ptr

c_int_ptr = ctypes.POINTER(c_int)

ctypes 32-bit integer (int) pointer alias

◆ c_int_ptr_ptr

c_int_ptr_ptr = ctypes.POINTER(c_int_ptr)

ctypes 32-bit integer (int) double pointer alias

◆ c_struct

c_struct = ctypes.Structure

ctypes struct alias

◆ c_void_ptr_ptr

c_void_ptr_ptr = ctypes.POINTER(c_void_p)

ctypes void double pointer

◆ eC

float eC = 1.60217663e-19

Electron charge.

◆ mu0

int mu0 = numpy.pi*4.E-7

Vacuum magnetic permeability.