openmc icon indicating copy to clipboard operation
openmc copied to clipboard

Add PointCloud spatial distribution

Open gonuke opened this issue 1 year ago • 2 comments

Description

Allows users to define a list of points in space, each with a different relative intensity, to be sampled discretely. This is a valid SpatialDistribution and can be used anywhere that a SpatialDistribution is valid.

Fixes #3159

Checklist

  • [x] I have performed a self-review of my own code
  • [x] I have run clang-format (version 15) on any C++ source files (if applicable)
  • [x] I have followed the style guidelines for Python source files (if applicable)
  • [x] I have made corresponding changes to the documentation (if applicable)
  • [x] I have added tests that prove my fix is effective or that my feature works (if applicable)

gonuke avatar Oct 05 '24 13:10 gonuke

We have a user who has an existing approximation of a volumetric source by a high density list of isotropic point sources. They want to use that source for comparison to other simulations.

gonuke avatar Oct 10 '24 17:10 gonuke

While it may have been elegant to add an istream operator for Position the version I added did not round-trip with the existing ostream operator and it is more convenient in XML to not use the verbose ostream format.

Thus, I've relied on just reading a list of doubles and packing them into Position in the reader.

gonuke avatar Oct 12 '24 17:10 gonuke

Pinging @paulromano to see if this can move forward?

gonuke avatar Nov 13 '24 02:11 gonuke

All looks good to me - thanks @paulromano

gonuke avatar Nov 13 '24 19:11 gonuke