Cartesian Mesh + Fields in Med
Cartesian Mesh + Fields in MedPosted by eXav at June 10. 2012
Hello Salome users and developers!
Is it right, that has no possibility to write cartesian mesh with fields in currently med coupling framework?
I have done some manipulations with MEDLoader, MEDFileMesh, MEDFileCMesh, MEDFileData, MEDFileField, MEDCoupling, MEDCouplingCMesh, MEDCouplingFieldDouble, but have not achieved my goal.
My goal is writing MEDCouplingCMesh and MEDCouplingFieldDouble in med file and reading from.
I can write it with using MEDCouplingCMesh::buildUnstructured, but I will lose cartesian mesh advantages and can not read it into cartesian mesh.
Thanks for comments and attention!
Re: Cartesian Mesh + Fields in MedPosted by Anthony GEAY at June 11. 2012
Your are right it is not available in 6.4.0. Sorry ! There is a bug. In attached file a script that do that in Salome 6.5.0 that will come very soon. Sorry for this inconvenience.
Re: Cartesian Mesh + Fields in MedPosted by eXav at June 11. 2012
thank for comment.
I saw the script and I waited it will be work in my salome. Now I know reasons.
And one question, Can I use this functions with Salome from git repos?
Re: Cartesian Mesh + Fields in MedPosted by Anthony GEAY at June 12. 2012
Yes indeed ! The version "V6_main_20120608" of MED should work.
git clone git://git.salome-platform.org/MED.git
git checkout -b V6_main_20120608 remotes/origin/V6_main
Re: Cartesian Mesh + Fields in MedPosted by eXav at June 12. 2012
It is good. Will try ro use.
Re: Cartesian Mesh + Fields in MedPosted by eXav at June 14. 2012
And one question to salome people about med.
I want to couple fortran code with med. What part of MED framework I can use? Is it possible to use MEDCoupling and MEDLoader too?
I have no any expirience in fortran.
Thank for attention.
Re: Cartesian Mesh + Fields in MedPosted by Anthony GEAY at June 15. 2012
1)If only coupling, strictly speaking, is needed, MEDCoupling, MEDCouplingRemapper package is more relevant because there is no prerequisites (excepted libstdc++ !). So it is easier to link them to your code.
2)If you need to, (or you want to) write a MED file internally in your code, in addition of coupling, you need to be linked with MEDLoader. MEDLoader includes MEDCoupling and depends from MEDCoupling. MEDLoader=MEDCoupling+MEDfile I/O. But with MEDLoader you will need to be linked with medfile and hdf5.
Users of solution 1 write MED files in separate component in their coupling graph. Meshes and fields are exchanged through top API of code (using CORBA if needed.
Re: Cartesian Mesh + Fields in MedPosted by eXav at June 15. 2012
Hello Anthony, Thank for usefull information.
I think, coupling is the next step of my work.
Now I created xdata module for calculating cartesian grid with some fields, which depends from GEOM Objects. Using this module I can write ( thank for you advice ) cartesian mesh with fields into med file.
On current stage I need in reading this med file from fortran code.
Do you know anything about linking MEDLoader with fortran? Or will be more easily to wrap fortran solver in C++ library?