-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
progress on h5py method #12
base: main
Are you sure you want to change the base?
Conversation
…s_to_h5m into writing_files_h5py
…s_to_h5m into writing_files_h5py
I have added a switch that allows the method to be changed from "pymoab" to "h5py" This means the h5m output can now be generated using both methods and the neutron transport flux result can be compared. vertices = [
[0.0, 0.0, 0.0],
[1.0, 0.0, 0.0],
[0.0, 1.0, 0.0],
[0.0, 0.0, 1.0],
]
triangle_groups = [
[[0, 1, 2], [3, 1, 2], [0, 2, 3], [0, 1, 3]]
]
vertices_to_h5m(
vertices=vertices,
triangle_groups=triangle_groups,
material_tags=["mat1"],
h5m_filename=test_h5m_filename,
method = 'pymoab' # or 'h5py'
) I have also added some tests to this PR so that the the particle flux across the surface meshed geometry is measured and then I can check that both methods give the same result |
This should get the enviroment and tests up and runing git clone https://github.com/fusion-energy/vertices_to_h5m.git
git checkout writing_files_h5py
conda create --name software_help2 python=3.8
conda activate software_help2
conda install -c conda-forge moab
conda install -c conda-forge openmc
pip install h5py
pip install -e .[tests] |
This is the file that is being worked on on examples/example_two_volume_h5py.py once this works then I shall refactor the package core.py to allow a 'h5py' method |
To develop I've been running two example files to generate two hdf5 files python examples/example_two_volume_pymoab.py
python examples/example_two_volume_h5py.py Then I've been comparing the contents of h5m files produced
I've just added a simple test file that lives in the repo root and allows these two h5m files to be tested. This looks for tags and also uses the geometry in particle simulations. It is not part of the CI as it makes use of these two h5m files generated above.
@nschloe this should be the minimal setup and testing needed to prototype. Feel free to update the |
Thanks to Patrick for mentioning a couple of sources that describe the dagmc file metadata https://svalinn.github.io/DAGMC/contribute/devtheory.html#dagmc-setup https://svalinn.github.io/DAGMC/contribute/devtheory.html#dagmc-metadata https://sigma.mcs.anl.gov/moab/h5m-file-format/ And Paul |
@cfe316 this is one of the developments that might help make a smoother DAGMC workflow |
HDF5 fixes 4
This PR is work in progress, but the end goal is to offer another method of writing DAGMC compatible h5m files using h5py.