Personal tools
You are here: Home Forum Use Bad use of MEDCoupling/Loader ?

Bad use of MEDCoupling/Loader ?

Up to Use

Bad use of MEDCoupling/Loader ?

Posted by Philippe Leveque at October 26. 2012

Hello,

I created a MED file using (python) MEDCoupling/Loader API.
This file contains the results (1 field named CONTR_2D) of a static non linear calculation with 5 iterations.

For each of these 1*5=5 fields (in the MEDCoupling sense), I set the time, iteration number, and order number values with the "setTime" method :
f.setTime( time, iterationNumber, orderNumber )
 
But when I import my MED file with Salome (6.5.0), the iterationNumber is not displayed.

However, when I dump the file I can read the iteration number. For instance (CONTR_2D at the 5th iteration) : 

(**************************************************************************)
(* CHAMP |CONTR_2D| A L'ÉTAPE DE CALCUL (n°dt,n°it)=( 05,-01) ,           *)
(* SUR LE MAILLAGE |mon_mail| A L'ÉTAPE DE CALCUL (n°dt,n°it)=(-01,-01) : *)
(**************************************************************************)

Is it a lack in my MED file (I attached the file) ?
If not, how can I display the iteration number with Post-Pro module ?

Thanks,

PhL

Attachments

Re: Bad use of MEDCoupling/Loader ?

Posted by Saint Michael at October 26. 2012

Hello Philippe

Post-Pro shows only a time value of a field, and there is no way to learn it's iteration number via GUI. It's possible to retrieve the iteration number in python console only:

>>> salome.myStudy.FindObjectID("0:1:1:1:1:3:1:3").FindAttribute("AttributeString")[1].Value()
'myComment=TIMESTAMP;myMeshName=mon_mail;myEntityId=3;myFieldName=CONTR_2D;myTimeStampId=2;myNumComponent=1'

Here myTimeStampId=2 is an iteration number

St.Michael

Re: Bad use of MEDCoupling/Loader ?

Posted by Philippe Leveque at October 26. 2012

OK.

Thanks a lot !

PhL

 

Previously Saint Michael wrote:

Hello Philippe

Post-Pro shows only a time value of a field, and there is no way to learn it's iteration number via GUI. It's possible to retrieve the iteration number in python console only:

>>> salome.myStudy.FindObjectID("0:1:1:1:1:3:1:3").FindAttribute("AttributeString")[1].Value()
'myComment=TIMESTAMP;myMeshName=mon_mail;myEntityId=3;myFieldName=CONTR_2D;myTimeStampId=2;myNumComponent=1'

Here myTimeStampId=2 is an iteration number

St.Michael

 

Powered by Ploneboard
Document Actions