Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Integration of nuclear networks #310

Open
wants to merge 82 commits into
base: develop
Choose a base branch
from
Open

Integration of nuclear networks #310

wants to merge 82 commits into from

Conversation

jolatechno
Copy link
Collaborator

Added the Nuclear Network submodule:

  • Made sure that it would be included in the Cmake build process.
  • Made sure that SPH-EXA would still compile without the nuclear network submodule.
  • Started adding the nuclear data container to simulation data.
  • Some boiler plate nuclear propagator and nuclear energy observable.

@jolatechno
Copy link
Collaborator Author

jolatechno commented Oct 10, 2022

Edit: my bad about the formating, I didn't know what the right clang formating was.

{

template<class Dataset>
class NuclearSedovGrid : public ISimInitializer<Dataset>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to bother with a regular grid init for the SPH part when using nnet. This option is only there to run a minimal example if HDF5 is absent for some reason. This is never useful for more elaborate workload, such as when using nnet.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I will remove the grid propagator then.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still pending.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I remove the grid propagator I always get an error, do you mean that the glass propagator is not needed ? I don't properly understand the difference between the grid and glass propagators.

@@ -39,6 +39,9 @@
#include "time_energies.hpp"
#include "gravitational_waves.hpp"
#include "wind_bubble_fraction.hpp"
#ifdef USE_NUCLEAR_NETWORKS
#include "nuclear_observable.hpp"
#endif
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you want to register the new nuclear_observable in the factor in this file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no real nuclear test case so I don't know where to reference nuclear_observable in the factory, but it will be done in the future. I don't think IO is the first thing to do in the integration.

@sekelle
Copy link
Collaborator

sekelle commented Oct 11, 2022

As a general remark, I would not put the NuclearData class inside the nnet submodule. Instead, in physics/nnet you could have two folders, one for the submodule, and another one for the interfaces to the submodule. NuclearData is, effectively, one of those interfaces, as it is modeled according to the requirements of the SPH-EXA application front-end and has header dependencies on the Cornerstone library.

If you have a choice, I would not introduce this dependency on Cornerstone into your nnet code. As an example, you can look at the gravity solver Ryoanji. We don't pass ParticlesData, or any Octree class from Cornerstone to Ryoanji. Instead, we pass the coordinate fields, masses and the tree as elementary arrays of floating point or integer types. This allows as to swap it out for something else if we need to, as long as the storage format stays the same. And we enable somebody else to call Ryoanji
who might not be using ParticlesData or Cornerstone to build octrees.

Another analogy could be BLAS matrix-matrix multiplication (dgemm). Rather than a custom matrix class, the interface accepts floating point arrays in a specific format: column or row major.

jolatechno and others added 3 commits November 8, 2022 14:44
Add temperature equation to nuclear networks
… get the first somewhat working simulation, and added cases without nuclear network to the nuclear propagator
@jolatechno jolatechno changed the title Nuclear network Integration of nuclear networks Nov 11, 2022
@sekelle
Copy link
Collaborator

sekelle commented Nov 14, 2022

I've updated this branch to include the latest version in the develop branch and updated the submodule version of the SPH-EXA-nnet repository.

The main problem is still that all of the nuclear-network code is included via headers into the compilation unit of the SPH-EXA main function. At the level of the propagator, the call to sphnnet::computeNuclearReactions should be made through a library interface.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants