how to use DataManager?

Asked by Louise Olsen

Is there a better place to look for how to use DataManager than section 3.1.4 in user guide? I would like to save output from simulations each time step. This is how I used to do it using saveESD:

saveESD("VisParameter","data",timeStep=kk,vel=vel_mag, vel_vec=velocity, pressure = pressure, strain_rate_invariant_I=strain_rate_invariant_I,YieldCriteria=YieldCriteria,displacementTotal=displacementTotal)

Question information

Language:
English Edit question
Status:
Solved
For:
esys-escript Edit question
Assignee:
No assignee Edit question
Solved by:
Bob
Solved:
Last query:
Last reply:
Revision history for this message
Best Bob (caltinay) said :
#1

Short answer: no. Section 3.1.4, together with the class reference in section 3.2.9 is the place to look for DataManager related info.

In essence you create a DataManager instance, then call addData() with the variables you want to save, similar to your saveESD call. Finally, you call export() to save the files. If you are not concerned about restarting a simulation that's basically it. Otherwise the example in section 3.1.4 shows how to check for existing data and restart accordingly.

Revision history for this message
Louise Olsen (l-kettle1) said :
#2

Thanks Cihan Altinay, that solved my question.