Content Description:
Using Python's ctypes and NumPy modules to invoke the finite element numerical calculation program of C/fortran mixed programming in a 32-bit or 64-bit Windows or gnu/linux system
Operating system and compilation environment:
32bit Win7 + mingw32 + gcc-4.8 + msys-1.0 + python2.7 + openblas-0.2.8
64bit Ubuntu 1404 + gcc-4.8 + python2.7 + openblas-0.2.8
Task decomposition:
1, packaging finite element numerical program, generate DLL or so format;
2. The Python script uses ctypes and numpy to define the input and output variables and invoke
Explanation:
A, why not f2py?
A: F2py project stagnation for many years, and F03, F08 standard Fortran and C programs can be seamlessly docking.
B, why use cTYPES?
A: cTYPES is a standard library that comes with Python, and Python itself is written in C.
C, why are there numpy?
Answer: NumPy's Ctypeslib module provides a simpler and more convenient way to call
?
?
Python calls C/fortran mixed dynamic link library--Previous