Comments (6)
Dear Teslos
I have downloaded your modifications and as it is a long time since I used
linux I have some difficulties testing your modification on Windows. I
will continue working on it, hopefully I can sort it out as it looks very
nice.
My email is [email protected] if you want to contact me directly.
Best wishes
Bosse
2015-01-11 14:21 GMT+01:00 ∃teslos [email protected]:
Dear Prof. Sundman,
I have finished the iso_c_binding for the new TQ interface. The new zip
file you can download from my git repo
https://github.com/Teslos/opencalphad. The main iso binding interface is
in liboctqisoc.F90.
I am also new to git versioning system, so I hope that I properly merged
your version with my modified version.
There still some open issuses with the with deprecated functions for
example tqgcom, which currently don't work in the this version of TQ
interface. But I suppose you will update these functions or removed them in
a new version.
The module variables which are now global to liboctq interface are
exported in iso_c_binding as global variables in C program. I think this is
not a good design decision, but iso_c_binding standard does not give any
other option to do this (at least I don't know of any). Currently, all
global variables and function are prefixed with c_ for example c_ntup. This
reduces the probability that it will clash with names of other variables in
C program but it doesn't eliminate it. Thank you very much for the
opencalphad project!!Best regards,
∃t—
Reply to this email directly or view it on GitHub
#11.
from opencalphad.
Dear Prof. Sundman,
The first test version of Python interface to TQ using cython is finished. You can test it by building the library with python setup.py build_ext --inplace
. Also, liboceq.a
has to be in local directory. This creates pyoctq.so
that can be imported in python script. For building I have used Cython version 0.21.2 and Python 2.7.9 on mac os x. Running python test_pyoctq.py
gives this output:
System with 2 elements: ['FE', 'NI']
and 2 phases:
['LIQUID', 'FCC_A1']
Mode : 1
Composition set(s) created: 1
Grid minimization: 16 gridpoints 4.6200E-04 s and 0 clockcycles
Phase change: its/add/remove: 7 1 0
Phase change: its/add/remove: 11 0 2
Equilibrium calculation 16, its, 3.3430E-03 s and 3 clockcycles
Amount of 2 phases:
0.000000000
1.000000000
Phase : LIQUID
Stable phase : LIQUID, amount: 1.000000
Phase : 1 1
FE : 0.243154,
NI : 0.756846,
Phase : FCC_A1
Stable phase : FCC_A1, amount: 0.300000
Phase : 2 1
FE : 0.500000,
NI : 0.500000,
Component, mole fraction and chemical potential
FE 0.500000 -48015.506985
NI 0.500000 -54794.509223
I am still working on the problem of one and zero array offset, as defaults in F90 and python are different..So I think it would be wise to set the index of the phases in python from 0--n and not 1--n as in the fortran code.
Best regards,
∃t
from opencalphad.
@Teslos For this case, have you considered using f2py?
from opencalphad.
Hi Richard,
Yes I have considered using f2py, but it seems that it is not actively developed. The Cython seems to be good alternative because after doing C interface with iso_c_binding you can get Cython support almost for free. So you get bindings for C and Python...
Do you think that it is better to use f2py? There is also fwrap library that looks good...
Best regards,
∃t
from opencalphad.
I do not have very much experience with any of them. I only ask about f2py because it's what the developers of numpy use and it's a very well-known and high-quality Python library.
from opencalphad.
Yes you are right, but I think fwrap was developed to replace f2py, but it is also not updated for several years...
Best regards,
∃t
from opencalphad.
Related Issues (20)
- Error at gtp3.F90:1880 while compiling HOT 3
- Can the opencalphad calculate the solidification route of alloys by the Scheil model? HOT 1
- Error in running tests in TQ3lib-clean HOT 2
- OpenCalphad build with MinGW HOT 7
- Gnuplot plotting HOT 1
- Problem with TP functions with real powers, and SOLGASMIX converter HOT 4
- Error 4244 at peritectic reaction HOT 2
- Calculation of a surrounded single in a diagram. HOT 1
- Modeling ordered phases with more then 1 interstitial sublattice HOT 2
- Mapping problems HOT 1
- Segmentation fault HOT 4
- OCASI compilation failure HOT 2
- fpm support HOT 5
- TQ4 parallel-alnipt input file HOT 7
- start.OCM causes crash HOT 7
- Too complicated TP function term HOT 1
- Defining components HOT 2
- Waiting time/ Scheil solidification calculation HOT 6
- Identifiers or acronyms HOT 2
- Legend/subtitles/set position HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencalphad.