-
Notifications
You must be signed in to change notification settings - Fork 4
Create XMF file template for pebble data HDF5 #56
Copy link
Copy link
Open
Labels
Comp:AnalysisThis issue has to do with the analysis component of the code or document. (plots, postprocessing)This issue has to do with the analysis component of the code or document. (plots, postprocessing)Comp:CoreThis issue has to do with the main bulk of the code or document. (methods, main content)This issue has to do with the main bulk of the code or document. (methods, main content)Difficulty:1-BeginnerThis issue does not require expert knowledge and may be a good issue for new contributors.This issue does not require expert knowledge and may be a good issue for new contributors.Priority:1-CriticalThis is the highest priority (i.e. it is blocking other work or facing a deadline).This is the highest priority (i.e. it is blocking other work or facing a deadline).
Metadata
Metadata
Assignees
Labels
Comp:AnalysisThis issue has to do with the analysis component of the code or document. (plots, postprocessing)This issue has to do with the analysis component of the code or document. (plots, postprocessing)Comp:CoreThis issue has to do with the main bulk of the code or document. (methods, main content)This issue has to do with the main bulk of the code or document. (methods, main content)Difficulty:1-BeginnerThis issue does not require expert knowledge and may be a good issue for new contributors.This issue does not require expert knowledge and may be a good issue for new contributors.Priority:1-CriticalThis is the highest priority (i.e. it is blocking other work or facing a deadline).This is the highest priority (i.e. it is blocking other work or facing a deadline).
In a new branch on arfc/ghastly called velocity there is a single new file:
ghastly/data.pyWithin data.py, there is a function called_write_data_xmf. At the moment, it brute-force writes lines of text to a file, and it kinda sucks to look at. However, I believe it would be very doable as a jinja template (which is how Ghastly already auto-generates LAMMPS inputs).You do not need to understand XMF formatting or HDF5 to do this task. I'm attaching a file that
_write_data_xmfcreated so you know what the correct answer looks like, and can make the template for it.Anything you'd have to do to get this working has already been done in an existing template (looping, controlling whitespace, etc) - so between the current templates in
ghastly/templates/lammps/and the functions that call those templates in Ghastly, you should have a working example for everything you need to do.To work on this, you will want to
Then I'll be able to pull in your changes myself from arfc/ghastly's velocity branch to get the fix on my own fork.
here's the example xmf file (made into plain text so I can attach it)
example_xmf.txt
if you compare it to the function, you'll see that it has 50 timesteps, and there is a block it repeats, once for each timestep. this is where you'll want to use a loop in the jinja template itself. Also note that in
_write_data_xmf, when it writes strings, variables are inserted like this: {pebble_radius}. Those are the parts of the text that will be variables inside the jinja template, too - everything else in those strings can just be static text in the template.