RAW_SERIES output format for ParticleScalarFieldSaver

Asked by Michele Griffa

Dear ESyS-Particle developers/users.

I have a question that relates to my previous thread #168545 but that is more general so that I post it here separately.

What's exactly the output format of a particle scalar fieldSaver when its fileFormat argument is equal to "RAW_SERIES" ?

I understood that when fileFormat = "SUM", the master task writes on file the sum of the scalar variable, where the sum is over all the particles, one line for each sampling time step.

From thread # 168545, I understood that with fileFormat = "RAW_SERIES" the master task should write on disk a file for each recording time step and each file should contain the scalar variable of interest for each particle.
However, I tried to use it with "e_kin_linear" as the fieldName and the result was a single file, with many values.

The source code in ParticleFieldMaster.cpp seems to confirm that the master task writes everything in a single file, with different lines referring to different sampling time steps. However, in the actual output file there is no linefeed character.

The motivation behind the question is that I would like to have written on different files, at different recording time steps,
each particle's position, radius and a certain scalar variable, say the translational kinetic energy.
Does the scalar particle fieldSaver record only the wanted scalar field and nothing else for each particle ?
Do I need to write my own runnable for obatining that type of output file or is there any other fieldSaver doing so ?

Thanks a lot in advance for the precious support.

Best regards

Michele

Question information

Language:
English Edit question
Status:
Answered
For:
ESyS-Particle Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
SteffenAbe (s-abe) said :
#1

Hi Michele,

currently the scalar particle field saver does indeed only output the specified field and nothing else (i.e. one value per particle) when the output format "RAW_SERIES" is chosen. Each line (row) in the file is from one time step.

> The motivation behind the question is that I would like to have written on different files,
> at different recording time steps, each particle's position, radius and a certain scalar variable,
> say the translational kinetic energy.
Give me a day or two to implement the additional write function in ScalarParticleFieldMaster. Given that the necessary data (ID, position, radius, field) are collected by the Master anyway (see ScalarParticleFieldMaster::collectFull) it should be a just a matter of copying and slightly adjusting VectorParticleFieldMaster::writeAsRawWithID().

Steffen

Revision history for this message
Michele Griffa (michele-griffa) said :
#2

Hello Steffen

That update of any particle scalar fieldSaver would be extremely helpful, at least from my application point of view.
Single particle scalar field values are useful only when they can be associated to the particle position, at each recording time step, in order to be able to plot
spatial maps of such scalar field.

Thanks a lot for the support.

Best regards

M
----------------------------------------------------------------------------------------------------------------
Michele Griffa, PhD
Research Scientist
Empa
Swiss Federal Laboratories for Materials Science and Technology
Überlandstrasse 129
8600 Dübendorf
Switzerland
Tel +41 58 765 4789
Fax +41 58 765 4009
<email address hidden>
www.empa.ch

Additional Web site: http://www.calcolodistr.altervista.org/en/index_en.html
-------------------------------------------------------------------------------------------------------------------

-----Ursprüngliche Nachricht-----
Von: <email address hidden> [mailto:<email address hidden>] Im Auftrag von SteffenAbe
Gesendet: Mittwoch, 2. November 2011 14:51
An: Griffa, Michele
Betreff: Re: [Question #177126]: RAW_SERIES output format for ParticleScalarFieldSaver

Your question #177126 on ESyS-Particle changed:
https://answers.launchpad.net/esys-particle/+question/177126

    Status: Open => Answered

SteffenAbe proposed the following answer:
Hi Michele,

currently the scalar particle field saver does indeed only output the specified field and nothing else (i.e. one value per particle) when the output format "RAW_SERIES" is chosen. Each line (row) in the file is from one time step.

> The motivation behind the question is that I would like to have
> written on different files, at different recording time steps, each
> particle's position, radius and a certain scalar variable, say the translational kinetic energy.
Give me a day or two to implement the additional write function in ScalarParticleFieldMaster. Given that the necessary data (ID, position, radius, field) are collected by the Master anyway (see ScalarParticleFieldMaster::collectFull) it should be a just a matter of copying and slightly adjusting VectorParticleFieldMaster::writeAsRawWithID().

Steffen

--
If this answers your question, please go to the following page to let us know that it is solved:
https://answers.launchpad.net/esys-particle/+question/177126/+confirm?answer_id=0

If you still need help, you can reply to this email or go to the following page to enter your feedback:
https://answers.launchpad.net/esys-particle/+question/177126

You received this question notification because you asked the question.

Revision history for this message
Dion Weatherley (d-weatherley) said :
#3

Hi Michele and Steffen,

I've added a link to this question thread on the Blueprint regarding FieldSaver improvements:
https://blueprints.launchpad.net/esys-particle/+spec/improve-fieldsaver-code

Cheers,

Dion.

Revision history for this message
SteffenAbe (s-abe) said :
#4

I have added a save mode which should cover the requested format to ScalarParticleFieldSaver to rev. 1030.

The save format parameter for the ParticleScalarFieldSaverPrms is "RAW_WITH_POS_ID",
Saved data format is one time step per file, colums in the file are:

ParticleID ParticlePositionX ParticlePositionY ParticlePositionZ ParticleRadius Field

Steffen

Can you help with this problem?

Provide an answer of your own, or ask Michele Griffa for more information if necessary.

To post a message you must log in.