From d953c2afa7db14c2a18be6735f0be7f3f3b73c59 Mon Sep 17 00:00:00 2001 From: Clang-formatter Date: Tue, 21 Aug 2018 10:22:23 -0600 Subject: [PATCH 1/4] Clang-format source files (#328) --- src/auxkernels/AtomicDensityAux.C | 16 +- src/auxkernels/MyTRIMDensityAux.C | 12 +- src/auxkernels/MyTRIMElementEnergyAux.C | 9 +- src/auxkernels/MyTRIMElementResultAux.C | 9 +- src/auxkernels/SPPARKSAux.C | 13 +- src/base/MagpieApp.C | 7 +- src/dirackernels/MyTRIMDiracSource.C | 15 +- src/kernels/CoupledDefectAnnihilation.C | 3 +- src/kernels/DefectAnnihilation.C | 3 +- src/kernels/MyTRIMElementHeatSource.C | 10 +- src/kernels/MyTRIMElementSource.C | 9 +- src/kernels/RadialGreensSource.C | 2 +- src/main.C | 3 +- src/other/MooseMyTRIMCore.C | 5 +- src/other/MooseMyTRIMEnergyDeposition.C | 17 +- src/other/MooseMyTRIMMaterial.C | 4 +- src/other/PointLocatorRegularOrthogonal.C | 33 +- src/other/PointLocatorRegularOrthogonalData.C | 13 +- src/other/ThreadedRecoilDiracSourceLoop.C | 18 +- src/other/ThreadedRecoilElementAveragedLoop.C | 25 +- src/other/ThreadedRecoilLoopBase.C | 44 +-- src/postprocessors/IsotopeRecoilRate.C | 25 +- src/postprocessors/MyTRIMPKAInConeInfo.C | 18 +- src/postprocessors/MyTRIMPKAInfo.C | 20 +- src/postprocessors/RMSDistance.C | 3 +- .../MultiAppNeutronicsSpectrumTransfer.C | 23 +- src/userobjects/MyTRIMDiracRun.C | 14 +- src/userobjects/MyTRIMElementRun.C | 22 +- src/userobjects/MyTRIMRunBase.C | 12 +- .../NeutronicsSpectrumSamplerBase.C | 46 +-- .../NeutronicsSpectrumSamplerFission.C | 44 ++- src/userobjects/PKAConstant.C | 14 +- src/userobjects/PKAFunction.C | 14 +- src/userobjects/PKAGeneratorNeutronicsBase.C | 31 +- src/userobjects/SPPARKSUserObject.C | 286 +++++++++++++----- src/utils/DiscreteFissionPKAPDF.C | 40 ++- src/utils/DiscretePKAPDF.C | 45 +-- src/utils/DiscretePKAPDFBase.C | 15 +- src/utils/MagpieUtils.C | 12 +- .../IsotopeRecoilRateSampler.C | 34 ++- src/vectorpostprocessors/MyTRIMDiracResult.C | 12 +- .../MyTRIMPKAEnergyHistogram.C | 18 +- .../MyTRIMPKAStatistics.C | 25 +- src/vectorpostprocessors/PKAList.C | 12 +- 44 files changed, 664 insertions(+), 391 deletions(-) diff --git a/src/auxkernels/AtomicDensityAux.C b/src/auxkernels/AtomicDensityAux.C index 3b836ed7..e9f162b2 100644 --- a/src/auxkernels/AtomicDensityAux.C +++ b/src/auxkernels/AtomicDensityAux.C @@ -13,17 +13,21 @@ registerMooseObject("MagpieApp", AtomicDensityAux); -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = validParams(); - params.addClassDescription("Compute the atomic density as Atoms/volume at an element using data from a MyTRIMRasterizer. Volume is in the Mesh units set in the rasterizer."); - params.addRequiredParam("rasterizer", "MyTRIMRasterizer object to provide material data"); + params.addClassDescription("Compute the atomic density as Atoms/volume at an element using data " + "from a MyTRIMRasterizer. Volume is in the Mesh units set in the " + "rasterizer."); + params.addRequiredParam("rasterizer", + "MyTRIMRasterizer object to provide material data"); return params; } -AtomicDensityAux::AtomicDensityAux(const InputParameters & parameters) : - AuxKernel(parameters), +AtomicDensityAux::AtomicDensityAux(const InputParameters & parameters) + : AuxKernel(parameters), _rasterizer(getUserObject("rasterizer")), _volume_scale(Utility::pow<3>(_rasterizer.getTrimParameters().length_scale / 1000.0)) { diff --git a/src/auxkernels/MyTRIMDensityAux.C b/src/auxkernels/MyTRIMDensityAux.C index ad2b2283..bd87a57b 100644 --- a/src/auxkernels/MyTRIMDensityAux.C +++ b/src/auxkernels/MyTRIMDensityAux.C @@ -11,17 +11,19 @@ registerMooseObject("MagpieApp", MyTRIMDensityAux); -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = validParams(); params.addClassDescription("Returns the material density in g/cm^3"); - params.addRequiredParam("rasterizer", "MyTRIMRasterizer object to provide material data"); + params.addRequiredParam("rasterizer", + "MyTRIMRasterizer object to provide material data"); return params; } -MyTRIMDensityAux::MyTRIMDensityAux(const InputParameters & parameters) : - AuxKernel(parameters), +MyTRIMDensityAux::MyTRIMDensityAux(const InputParameters & parameters) + : AuxKernel(parameters), _rasterizer(getUserObject("rasterizer")), _trim_parameters(_rasterizer.getTrimParameters()), _nvars(_trim_parameters.nVars()) diff --git a/src/auxkernels/MyTRIMElementEnergyAux.C b/src/auxkernels/MyTRIMElementEnergyAux.C index a3f92911..c3783238 100644 --- a/src/auxkernels/MyTRIMElementEnergyAux.C +++ b/src/auxkernels/MyTRIMElementEnergyAux.C @@ -11,15 +11,16 @@ registerMooseObject("MagpieApp", MyTRIMElementEnergyAux); -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = MyTRIMElementEnergyAccess::validParams(); return params; } -MyTRIMElementEnergyAux::MyTRIMElementEnergyAux(const InputParameters & parameters) : - MyTRIMElementEnergyAccess(parameters) +MyTRIMElementEnergyAux::MyTRIMElementEnergyAux(const InputParameters & parameters) + : MyTRIMElementEnergyAccess(parameters) { /** * having this AuxKernel also depend on the rasterizer bumps the rasterizer into diff --git a/src/auxkernels/MyTRIMElementResultAux.C b/src/auxkernels/MyTRIMElementResultAux.C index 8fbe7ad4..d1aa8600 100644 --- a/src/auxkernels/MyTRIMElementResultAux.C +++ b/src/auxkernels/MyTRIMElementResultAux.C @@ -11,15 +11,16 @@ registerMooseObject("MagpieApp", MyTRIMElementResultAux); -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = MyTRIMElementResultAccess::validParams(); return params; } -MyTRIMElementResultAux::MyTRIMElementResultAux(const InputParameters & parameters) : - MyTRIMElementResultAccess(parameters) +MyTRIMElementResultAux::MyTRIMElementResultAux(const InputParameters & parameters) + : MyTRIMElementResultAccess(parameters) { /** * having this AuxKernel also depend on the rasterizer bumps the rasterizer into diff --git a/src/auxkernels/SPPARKSAux.C b/src/auxkernels/SPPARKSAux.C index c8c78757..9347d4ea 100644 --- a/src/auxkernels/SPPARKSAux.C +++ b/src/auxkernels/SPPARKSAux.C @@ -11,8 +11,9 @@ registerMooseObject("MagpieApp", SPPARKSAux); -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = validParams(); params.addRequiredParam("user_object", "Name of SPPARKSUserObject"); @@ -22,8 +23,8 @@ InputParameters validParams() return params; } -SPPARKSAux::SPPARKSAux(const InputParameters & parameters) : - AuxKernel(parameters), +SPPARKSAux::SPPARKSAux(const InputParameters & parameters) + : AuxKernel(parameters), _spparks(getUserObject("user_object")), _var(getParam("var")), _array(getParam("array")) @@ -36,10 +37,10 @@ SPPARKSAux::computeValue() switch (_array) { case 0: // Integer Array - return _spparks.getIntValue(_current_node->id(), _var); + return _spparks.getIntValue(_current_node->id(), _var); case 1: // Double Array - return _spparks.getDoubleValue(_current_node->id(), _var); + return _spparks.getDoubleValue(_current_node->id(), _var); default: mooseError("Internal error."); diff --git a/src/base/MagpieApp.C b/src/base/MagpieApp.C index d86e07a3..bb15f5dd 100644 --- a/src/base/MagpieApp.C +++ b/src/base/MagpieApp.C @@ -26,8 +26,7 @@ validParams() // dependent apps know about the MagpieApp label. registerKnownLabel("MagpieApp"); -MagpieApp::MagpieApp(const InputParameters & parameters) - : MooseApp(parameters) +MagpieApp::MagpieApp(const InputParameters & parameters) : MooseApp(parameters) { srand(processor_id()); @@ -38,9 +37,7 @@ MagpieApp::MagpieApp(const InputParameters & parameters) MagpieApp::associateSyntax(_syntax, _action_factory); } -MagpieApp::~MagpieApp() -{ -} +MagpieApp::~MagpieApp() {} extern "C" void MagpieApp__registerApps() diff --git a/src/dirackernels/MyTRIMDiracSource.C b/src/dirackernels/MyTRIMDiracSource.C index f5ef97a2..d787ad64 100644 --- a/src/dirackernels/MyTRIMDiracSource.C +++ b/src/dirackernels/MyTRIMDiracSource.C @@ -13,11 +13,13 @@ registerMooseObject("MagpieApp", MyTRIMDiracSource); -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = validParams(); - params.addRequiredParam("runner", "Name of the MyTRIMDiracRun userobject to pull data from."); + params.addRequiredParam( + "runner", "Name of the MyTRIMDiracRun userobject to pull data from."); params.addParam("ivar", "Element index"); MooseEnum defectType("VAC=0 INT REPLACEMENT_IN REPLACEMENT_OUT", "VAC"); params.addParam("defect", defectType, "Defect type to read out"); @@ -28,8 +30,8 @@ InputParameters validParams() return params; } -MyTRIMDiracSource::MyTRIMDiracSource(const InputParameters & parameters) : - DiracKernel(parameters), +MyTRIMDiracSource::MyTRIMDiracSource(const InputParameters & parameters) + : DiracKernel(parameters), _mytrim(getUserObject("runner")), _rasterizer(_mytrim.rasterizer()), _ivar(getParam("ivar")), @@ -37,7 +39,8 @@ MyTRIMDiracSource::MyTRIMDiracSource(const InputParameters & parameters) : _trim_parameters(_rasterizer.getTrimParameters()) { if (getParam("drop_duplicate_points") == true) - mooseWarning("Explicitly setting drop_duplicate_points to true will cause overlapping defects to be miscounted."); + mooseWarning("Explicitly setting drop_duplicate_points to true will cause overlapping defects " + "to be miscounted."); } void diff --git a/src/kernels/CoupledDefectAnnihilation.C b/src/kernels/CoupledDefectAnnihilation.C index 9b165373..cb408a44 100644 --- a/src/kernels/CoupledDefectAnnihilation.C +++ b/src/kernels/CoupledDefectAnnihilation.C @@ -15,7 +15,8 @@ InputParameters validParams() { InputParameters params = validParams(); - params.addClassDescription("Coupled annihilation rate kernel that is proportional to the product of two coupled variables c and v."); + params.addClassDescription("Coupled annihilation rate kernel that is proportional to the product " + "of two coupled variables c and v."); params.addRequiredCoupledVar("c", "First defect concentration"); params.addRequiredCoupledVar("v", "Other defect concentration"); params.addParam("prefactor", 1.0, "Annihilation rate"); diff --git a/src/kernels/DefectAnnihilation.C b/src/kernels/DefectAnnihilation.C index f2a0ba95..8c4bcaa2 100644 --- a/src/kernels/DefectAnnihilation.C +++ b/src/kernels/DefectAnnihilation.C @@ -15,7 +15,8 @@ InputParameters validParams() { InputParameters params = validParams(); - params.addClassDescription("Annihilation rate kernel that is proportional to the product of the kernel variable and the coupled variable"); + params.addClassDescription("Annihilation rate kernel that is proportional to the product of the " + "kernel variable and the coupled variable"); params.addRequiredCoupledVar("v", "Other defect concentration"); params.addParam("prefactor", 1.0, "Annihilation rate"); return params; diff --git a/src/kernels/MyTRIMElementHeatSource.C b/src/kernels/MyTRIMElementHeatSource.C index 720f2dd2..dbf2ecf7 100644 --- a/src/kernels/MyTRIMElementHeatSource.C +++ b/src/kernels/MyTRIMElementHeatSource.C @@ -11,16 +11,16 @@ registerMooseObject("MagpieApp", MyTRIMElementHeatSource); -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = MyTRIMElementEnergyAccess::validParams(); return params; } -MyTRIMElementHeatSource::MyTRIMElementHeatSource(const InputParameters & parameters) : - MyTRIMElementEnergyAccess(parameters), - _dt(_fe_problem.dt()) +MyTRIMElementHeatSource::MyTRIMElementHeatSource(const InputParameters & parameters) + : MyTRIMElementEnergyAccess(parameters), _dt(_fe_problem.dt()) { } diff --git a/src/kernels/MyTRIMElementSource.C b/src/kernels/MyTRIMElementSource.C index 95262e25..63ca7952 100644 --- a/src/kernels/MyTRIMElementSource.C +++ b/src/kernels/MyTRIMElementSource.C @@ -11,16 +11,17 @@ registerMooseObject("MagpieApp", MyTRIMElementSource); -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = MyTRIMElementResultAccess::validParams(); params.addParam("prefactor", 1.0, "Prefactor to scale the applied production rate"); return params; } -MyTRIMElementSource::MyTRIMElementSource(const InputParameters & parameters) : - MyTRIMElementResultAccess(parameters), +MyTRIMElementSource::MyTRIMElementSource(const InputParameters & parameters) + : MyTRIMElementResultAccess(parameters), _prefactor(getParam("prefactor")), _trim_parameters(_rasterizer.getTrimParameters()) { diff --git a/src/kernels/RadialGreensSource.C b/src/kernels/RadialGreensSource.C index f4e4ef08..2df0886c 100644 --- a/src/kernels/RadialGreensSource.C +++ b/src/kernels/RadialGreensSource.C @@ -40,5 +40,5 @@ RadialGreensSource::precalculateResidual() Real RadialGreensSource::computeQpResidual() { - return - _gamma * _result->second[_qp] / (_JxW[_qp] * _coord[_qp]) * _test[_i][_qp]; + return -_gamma * _result->second[_qp] / (_JxW[_qp] * _coord[_qp]) * _test[_i][_qp]; } diff --git a/src/main.C b/src/main.C index 862463c9..709d8037 100644 --- a/src/main.C +++ b/src/main.C @@ -8,7 +8,8 @@ PerfLog Moose::perf_log("Magpie"); // Begin the main program. -int main(int argc, char *argv[]) +int +main(int argc, char * argv[]) { // Initialize MPI, solvers and MOOSE MooseInit init(argc, argv); diff --git a/src/other/MooseMyTRIMCore.C b/src/other/MooseMyTRIMCore.C index b8290393..91209cdc 100644 --- a/src/other/MooseMyTRIMCore.C +++ b/src/other/MooseMyTRIMCore.C @@ -9,9 +9,8 @@ #include "MooseMyTRIMCore.h" #include "MooseMyTRIMSample.h" -MooseMyTRIMCore::MooseMyTRIMCore(MyTRIM_NS::SimconfType * simconf, MooseMyTRIMSample * sample) : - MyTRIM_NS::TrimBase(simconf, sample), - _dim(sample->getDim()) +MooseMyTRIMCore::MooseMyTRIMCore(MyTRIM_NS::SimconfType * simconf, MooseMyTRIMSample * sample) + : MyTRIM_NS::TrimBase(simconf, sample), _dim(sample->getDim()) { } diff --git a/src/other/MooseMyTRIMEnergyDeposition.C b/src/other/MooseMyTRIMEnergyDeposition.C index 4fec75ed..5adbcc56 100644 --- a/src/other/MooseMyTRIMEnergyDeposition.C +++ b/src/other/MooseMyTRIMEnergyDeposition.C @@ -9,10 +9,11 @@ #include "MooseMyTRIMEnergyDeposition.h" #include "MooseMyTRIMSample.h" -MooseMyTRIMEnergyDeposition::MooseMyTRIMEnergyDeposition(MyTRIM_NS::SimconfType * simconf, MooseMyTRIMSample * sample, - std::list > & edep_list) : - MooseMyTRIMCore(simconf, sample), - _edep_list(edep_list) +MooseMyTRIMEnergyDeposition::MooseMyTRIMEnergyDeposition( + MyTRIM_NS::SimconfType * simconf, + MooseMyTRIMSample * sample, + std::list> & edep_list) + : MooseMyTRIMCore(simconf, sample), _edep_list(edep_list) { } @@ -38,9 +39,10 @@ MooseMyTRIMEnergyDeposition::checkPKAState() case MyTRIM_NS::IonBase::REPLACEMENT: case MyTRIM_NS::IonBase::SUBSTITUTIONAL: - // deposit residual energy of the stopped PKA, electronic stopping, and binding energy to the new lattice site + // deposit residual energy of the stopped PKA, electronic stopping, and binding energy to the + // new lattice site depositEnergy(_pka, _pka->_E + _element->_Elbind + _dee); - return ; + return; case MyTRIM_NS::IonBase::VACANCY: mooseError("PKA should never be in this state"); @@ -64,5 +66,6 @@ MooseMyTRIMEnergyDeposition::followRecoil() void MooseMyTRIMEnergyDeposition::depositEnergy(MyTRIM_NS::IonBase * ion, Real E) { - _edep_list.push_back(std::make_pair(Point(ion->_pos(0), ion->_pos(1), _dim == 2 ? 0.0 : ion->_pos(2)), E)); + _edep_list.push_back( + std::make_pair(Point(ion->_pos(0), ion->_pos(1), _dim == 2 ? 0.0 : ion->_pos(2)), E)); } diff --git a/src/other/MooseMyTRIMMaterial.C b/src/other/MooseMyTRIMMaterial.C index 6b1cb5d0..fb003ba0 100644 --- a/src/other/MooseMyTRIMMaterial.C +++ b/src/other/MooseMyTRIMMaterial.C @@ -8,8 +8,8 @@ #include "MooseMyTRIMMaterial.h" -MooseMyTRIMMaterial::MooseMyTRIMMaterial(MyTRIM_NS::SimconfType * simconf) : - MyTRIM_NS::MaterialBase(simconf, 0.0) +MooseMyTRIMMaterial::MooseMyTRIMMaterial(MyTRIM_NS::SimconfType * simconf) + : MyTRIM_NS::MaterialBase(simconf, 0.0) { } diff --git a/src/other/PointLocatorRegularOrthogonal.C b/src/other/PointLocatorRegularOrthogonal.C index 27151dfe..1a590b4f 100644 --- a/src/other/PointLocatorRegularOrthogonal.C +++ b/src/other/PointLocatorRegularOrthogonal.C @@ -14,15 +14,13 @@ #include "libmesh/mesh_base.h" PointLocatorRegularOrthogonal::PointLocatorRegularOrthogonal(const MeshBase & mesh, - const PointLocatorBase * master) : - PointLocatorBase(mesh, master), - _out_of_mesh_mode(false), - _data(nullptr) + const PointLocatorBase * master) + : PointLocatorBase(mesh, master), _out_of_mesh_mode(false), _data(nullptr) { if (master != nullptr) { const PointLocatorRegularOrthogonal * my_master = - cast_ptr(master); + cast_ptr(master); if (!my_master->initialized()) mooseError("Linking a slave point locator to an uninitialized master is not allowed."); @@ -32,10 +30,7 @@ PointLocatorRegularOrthogonal::PointLocatorRegularOrthogonal(const MeshBase & me } } -PointLocatorRegularOrthogonal::~PointLocatorRegularOrthogonal() -{ - this->clear (); -} +PointLocatorRegularOrthogonal::~PointLocatorRegularOrthogonal() { this->clear(); } void PointLocatorRegularOrthogonal::clear() @@ -57,7 +52,8 @@ PointLocatorRegularOrthogonal::clear() void PointLocatorRegularOrthogonal::init() { - mooseError("PointLocatorRegularOrthogonal needs to be explicitly initialized with mesh meta data."); + mooseError( + "PointLocatorRegularOrthogonal needs to be explicitly initialized with mesh meta data."); } void @@ -73,8 +69,8 @@ PointLocatorRegularOrthogonal::init(const std::vector & cell_count } const Elem * -PointLocatorRegularOrthogonal::operator() (const Point & p, - const std::set * /* allowed_subdomains */) const +PointLocatorRegularOrthogonal:: +operator()(const Point & p, const std::set * /* allowed_subdomains */) const { Point el_pos; const Elem * el = _data->rootElement(p, el_pos); @@ -90,7 +86,8 @@ PointLocatorRegularOrthogonal::operator() (const Point & p, for (unsigned int i = 0; i < _data->_dim; ++i) if (el_pos(i) >= 0.5) { - // fortunately the libMesh child ordering is this simple (bit 0/1 for left right of center point, etc.) + // fortunately the libMesh child ordering is this simple (bit 0/1 for left right of center + // point, etc.) child += 1 << i; el_pos(i) = (el_pos(i) - 0.5) * 2.0; } @@ -102,11 +99,13 @@ PointLocatorRegularOrthogonal::operator() (const Point & p, } void -PointLocatorRegularOrthogonal::operator() (const Point & p, - std::set & candidate_elements, - const std::set * /* allowed_subdomains */) const +PointLocatorRegularOrthogonal:: +operator()(const Point & p, + std::set & candidate_elements, + const std::set * /* allowed_subdomains */) const { - // return just one match, the exact one TODO: return all neighbors if we are fuzzily on a face/edge/node + // return just one match, the exact one TODO: return all neighbors if we are fuzzily on a + // face/edge/node candidate_elements.insert((*this)(p)); return; } diff --git a/src/other/PointLocatorRegularOrthogonalData.C b/src/other/PointLocatorRegularOrthogonalData.C index 351d60b1..7da2961e 100644 --- a/src/other/PointLocatorRegularOrthogonalData.C +++ b/src/other/PointLocatorRegularOrthogonalData.C @@ -11,11 +11,12 @@ #include "libmesh/mesh_base.h" #include "libmesh/elem.h" -PointLocatorRegularOrthogonalData::PointLocatorRegularOrthogonalData(const std::vector & cell_count, - const Point & min_corner, - const Point & max_corner, - const MeshBase & mesh) : - _dim(cell_count.size()), +PointLocatorRegularOrthogonalData::PointLocatorRegularOrthogonalData( + const std::vector & cell_count, + const Point & min_corner, + const Point & max_corner, + const MeshBase & mesh) + : _dim(cell_count.size()), _cell_count(cell_count), _min_corner(min_corner), _cell_size(max_corner - min_corner) @@ -35,7 +36,7 @@ PointLocatorRegularOrthogonalData::PointLocatorRegularOrthogonalData(const std:: _root_elems.assign(num_root_elems, nullptr); // sort all level 0 elements into the table - auto el = mesh.level_elements_begin(0); + auto el = mesh.level_elements_begin(0); const auto end_el = mesh.level_elements_end(0); for (; el != end_el; ++el) { diff --git a/src/other/ThreadedRecoilDiracSourceLoop.C b/src/other/ThreadedRecoilDiracSourceLoop.C index 5a29c203..2a3ccf8c 100644 --- a/src/other/ThreadedRecoilDiracSourceLoop.C +++ b/src/other/ThreadedRecoilDiracSourceLoop.C @@ -8,14 +8,16 @@ #include "ThreadedRecoilDiracSourceLoop.h" -ThreadedRecoilDiracSourceLoop::ThreadedRecoilDiracSourceLoop(const MyTRIMRasterizer & rasterizer, const MooseMesh & mesh) : - ThreadedRecoilLoopBase(rasterizer, mesh) +ThreadedRecoilDiracSourceLoop::ThreadedRecoilDiracSourceLoop(const MyTRIMRasterizer & rasterizer, + const MooseMesh & mesh) + : ThreadedRecoilLoopBase(rasterizer, mesh) { } // Splitting Constructor -ThreadedRecoilDiracSourceLoop::ThreadedRecoilDiracSourceLoop(const ThreadedRecoilDiracSourceLoop & x, Threads::split /*split*/) : - ThreadedRecoilLoopBase(x, Threads::split()) +ThreadedRecoilDiracSourceLoop::ThreadedRecoilDiracSourceLoop( + const ThreadedRecoilDiracSourceLoop & x, Threads::split /*split*/) + : ThreadedRecoilLoopBase(x, Threads::split()) { } @@ -26,14 +28,16 @@ ThreadedRecoilDiracSourceLoop::join(const ThreadedRecoilDiracSourceLoop & rl) } void -ThreadedRecoilDiracSourceLoop::addDefectToResult(const Point & p, unsigned int var, ThreadedRecoilDiracSourceLoop::DefectType type) +ThreadedRecoilDiracSourceLoop::addDefectToResult(const Point & p, + unsigned int var, + ThreadedRecoilDiracSourceLoop::DefectType type) { const Elem * elem = (*_pl)(p); if (elem != nullptr && var < _nvars) _result_list.push_back(MyTRIMResult(p, var, type, elem->id())); } -template<> +template <> void dataStore(std::ostream & stream, ThreadedRecoilDiracSourceLoop::MyTRIMResult & dsl, void * context) { @@ -43,7 +47,7 @@ dataStore(std::ostream & stream, ThreadedRecoilDiracSourceLoop::MyTRIMResult & d dataStore(stream, dsl._elem_id, context); } -template<> +template <> void dataLoad(std::istream & stream, ThreadedRecoilDiracSourceLoop::MyTRIMResult & dsl, void * context) { diff --git a/src/other/ThreadedRecoilElementAveragedLoop.C b/src/other/ThreadedRecoilElementAveragedLoop.C index c156f986..7d9b7d11 100644 --- a/src/other/ThreadedRecoilElementAveragedLoop.C +++ b/src/other/ThreadedRecoilElementAveragedLoop.C @@ -8,14 +8,16 @@ #include "ThreadedRecoilElementAveragedLoop.h" -ThreadedRecoilElementAveragedLoop::ThreadedRecoilElementAveragedLoop(const MyTRIMRasterizer & rasterizer, const MooseMesh & mesh) : - ThreadedRecoilLoopBase(rasterizer, mesh) +ThreadedRecoilElementAveragedLoop::ThreadedRecoilElementAveragedLoop( + const MyTRIMRasterizer & rasterizer, const MooseMesh & mesh) + : ThreadedRecoilLoopBase(rasterizer, mesh) { } // Splitting Constructor -ThreadedRecoilElementAveragedLoop::ThreadedRecoilElementAveragedLoop(const ThreadedRecoilElementAveragedLoop & x, Threads::split /*split*/) : - ThreadedRecoilLoopBase(x, Threads::split()) +ThreadedRecoilElementAveragedLoop::ThreadedRecoilElementAveragedLoop( + const ThreadedRecoilElementAveragedLoop & x, Threads::split /*split*/) + : ThreadedRecoilLoopBase(x, Threads::split()) { } @@ -47,7 +49,8 @@ ThreadedRecoilElementAveragedLoop::join(const ThreadedRecoilElementAveragedLoop } void -ThreadedRecoilElementAveragedLoop::addDefectToResult(const Point & p, unsigned int var, ThreadedRecoilElementAveragedLoop::DefectType type) +ThreadedRecoilElementAveragedLoop::addDefectToResult( + const Point & p, unsigned int var, ThreadedRecoilElementAveragedLoop::DefectType type) { const Elem * elem = (*_pl)(p); if (elem == nullptr || var >= _nvars) @@ -80,17 +83,21 @@ ThreadedRecoilElementAveragedLoop::addEnergyToResult(const Point & p, Real edep) i->second._energy += edep; } -template<> +template <> void -dataStore(std::ostream & stream, ThreadedRecoilElementAveragedLoop::MyTRIMResult & eal, void * context) +dataStore(std::ostream & stream, + ThreadedRecoilElementAveragedLoop::MyTRIMResult & eal, + void * context) { dataStore(stream, eal._defects, context); dataStore(stream, eal._energy, context); } -template<> +template <> void -dataLoad(std::istream & stream, ThreadedRecoilElementAveragedLoop::MyTRIMResult & eal, void * context) +dataLoad(std::istream & stream, + ThreadedRecoilElementAveragedLoop::MyTRIMResult & eal, + void * context) { dataLoad(stream, eal._defects, context); dataLoad(stream, eal._energy, context); diff --git a/src/other/ThreadedRecoilLoopBase.C b/src/other/ThreadedRecoilLoopBase.C index 66c680cb..53bae097 100644 --- a/src/other/ThreadedRecoilLoopBase.C +++ b/src/other/ThreadedRecoilLoopBase.C @@ -18,10 +18,15 @@ // Specialization for PointListAdaptor template <> inline const Point & -PointListAdaptor::getPoint(const ThreadedRecoilLoopBase::MyTRIMDefectBufferItem & item) const { return item.first; } +PointListAdaptor::getPoint( + const ThreadedRecoilLoopBase::MyTRIMDefectBufferItem & item) const +{ + return item.first; +} -ThreadedRecoilLoopBase::ThreadedRecoilLoopBase(const MyTRIMRasterizer & rasterizer, const MooseMesh & mesh) : - _rasterizer(rasterizer), +ThreadedRecoilLoopBase::ThreadedRecoilLoopBase(const MyTRIMRasterizer & rasterizer, + const MooseMesh & mesh) + : _rasterizer(rasterizer), _trim_parameters(_rasterizer.getTrimParameters()), _nvars(_trim_parameters.nVars()), _mesh(mesh), @@ -31,8 +36,9 @@ ThreadedRecoilLoopBase::ThreadedRecoilLoopBase(const MyTRIMRasterizer & rasteriz } // Splitting Constructor -ThreadedRecoilLoopBase::ThreadedRecoilLoopBase(const ThreadedRecoilLoopBase & x, Threads::split /*split*/) : - _rasterizer(x._rasterizer), +ThreadedRecoilLoopBase::ThreadedRecoilLoopBase(const ThreadedRecoilLoopBase & x, + Threads::split /*split*/) + : _rasterizer(x._rasterizer), _trim_parameters(x._trim_parameters), _nvars(x._nvars), _mesh(x._mesh), @@ -42,7 +48,7 @@ ThreadedRecoilLoopBase::ThreadedRecoilLoopBase(const ThreadedRecoilLoopBase & x, } void -ThreadedRecoilLoopBase::operator() (const PKARange & pka_list) +ThreadedRecoilLoopBase::operator()(const PKARange & pka_list) { // fetch a point locator _pl = _mesh.getPointLocator(); @@ -57,7 +63,7 @@ ThreadedRecoilLoopBase::operator() (const PKARange & pka_list) std::queue recoils; // create a list potentially used for energy deposition - std::list > edep_list; + std::list> edep_list; // build the requested TRIM module std::unique_ptr TRIM; @@ -85,7 +91,8 @@ ThreadedRecoilLoopBase::operator() (const PKARange & pka_list) // copy the pka list into the recoil queue for (auto && pka : pka_list) { - // seed the RNG with the seed assigned to the primary knock on atom (for parallel reproducibility) + // seed the RNG with the seed assigned to the primary knock on atom (for parallel + // reproducibility) _simconf.seed(pka._seed); // push primary knock on atom onto the recoil queue @@ -147,12 +154,14 @@ ThreadedRecoilLoopBase::operator() (const PKARange & pka_list) if (recoil->_state == MyTRIM_NS::IonBase::INTERSTITIAL) _interstitial_buffer.push_back(std::make_pair(recoil->_pos, recoil->_tag)); else if (recoil->_state == MyTRIM_NS::IonBase::REPLACEMENT) - addDefectToResult(_rasterizer.periodicPoint(recoil->_pos), recoil->_tag, REPLACEMENT_IN); - // BUG: untracked PKAs in replacement collisions will cause a REPLACEMENT_OUT without a REPLACEMENT_IN! + addDefectToResult( + _rasterizer.periodicPoint(recoil->_pos), recoil->_tag, REPLACEMENT_IN); + // BUG: untracked PKAs in replacement collisions will cause a REPLACEMENT_OUT without a + // REPLACEMENT_IN! } // store energy deposition - for (auto & edep: edep_list) + for (auto & edep : edep_list) addEnergyToResult(_rasterizer.periodicPoint(edep.first), edep.second); edep_list.clear(); } @@ -171,10 +180,10 @@ ThreadedRecoilLoopBase::operator() (const PKARange & pka_list) { // 1. build kd-tree for the vacancies const unsigned int max_leaf_size = 50; // slightly affects runtime - auto point_list = PointListAdaptor(_vacancy_buffer.begin(), _vacancy_buffer.end()); + auto point_list = + PointListAdaptor(_vacancy_buffer.begin(), _vacancy_buffer.end()); auto kd_tree = libmesh_make_unique( - LIBMESH_DIM, point_list, - nanoflann::KDTreeSingleIndexAdaptorParams(max_leaf_size)); + LIBMESH_DIM, point_list, nanoflann::KDTreeSingleIndexAdaptorParams(max_leaf_size)); mooseAssert(kd_tree != nullptr, "KDTree was not properly initialized."); kd_tree->buildIndex(); @@ -184,7 +193,7 @@ ThreadedRecoilLoopBase::operator() (const PKARange & pka_list) // 2. iterate over interstitials and recombine them if they are with r_rec of a vacancy std::vector> ret_matches; - for (auto & i: _interstitial_buffer) + for (auto & i : _interstitial_buffer) { ret_matches.clear(); std::size_t n_result = kd_tree->radiusSearch(&(i.first(0)), r_rec2, ret_matches, params); @@ -205,12 +214,11 @@ ThreadedRecoilLoopBase::operator() (const PKARange & pka_list) } } - // add remaining defects to result - for (auto & i: _interstitial_buffer) // the should happen above + for (auto & i : _interstitial_buffer) // the should happen above if (i.second != libMesh::invalid_uint) addDefectToResult(_rasterizer.periodicPoint(i.first), i.second, INTERSTITIAL); - for (auto & v: _vacancy_buffer) + for (auto & v : _vacancy_buffer) if (v.second != libMesh::invalid_uint) addDefectToResult(_rasterizer.periodicPoint(v.first), v.second, VACANCY); } diff --git a/src/postprocessors/IsotopeRecoilRate.C b/src/postprocessors/IsotopeRecoilRate.C index 39f85c42..5de20d7f 100644 --- a/src/postprocessors/IsotopeRecoilRate.C +++ b/src/postprocessors/IsotopeRecoilRate.C @@ -13,27 +13,34 @@ registerMooseObject("MagpieApp", IsotopeRecoilRate); -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = validParams(); - params.addRequiredParam("target_isotope", "The isotope name that you want to get the total recoil rate for"); + params.addRequiredParam( + "target_isotope", "The isotope name that you want to get the total recoil rate for"); params.addRequiredParam("point_id", "The index of the point in neutronics_sampler"); - params.addRequiredParam("neutronics_sampler", "The neutronics sampler object that the data is retrieved from"); - params.addParam("scaling_factor", 1, "A scaling factor multiplying the isotope recoil rate"); - params.addClassDescription("Gets the total recoil rate from target_isotope at point point_id contained in the neutronics_sampler"); + params.addRequiredParam( + "neutronics_sampler", "The neutronics sampler object that the data is retrieved from"); + params.addParam( + "scaling_factor", 1, "A scaling factor multiplying the isotope recoil rate"); + params.addClassDescription("Gets the total recoil rate from target_isotope at point point_id " + "contained in the neutronics_sampler"); return params; } -IsotopeRecoilRate::IsotopeRecoilRate(const InputParameters & params) : - GeneralPostprocessor(params), +IsotopeRecoilRate::IsotopeRecoilRate(const InputParameters & params) + : GeneralPostprocessor(params), _target_isotope(getParam("target_isotope")), _point_id(getParam("point_id")), _neutronics_sampler(getUserObject("neutronics_sampler")), _scaling_factor(getPostprocessorValue("scaling_factor")) { if (_neutronics_sampler.getNumberOfPoints() < _point_id) - mooseError("The provided neutronics sampler object only has", _neutronics_sampler.getNumberOfPoints(), " points"); + mooseError("The provided neutronics sampler object only has", + _neutronics_sampler.getNumberOfPoints(), + " points"); if (!_neutronics_sampler.hasIsotope(_target_isotope)) mooseError("Target isotope ", _target_isotope, " not preset in neutronics sampler object"); diff --git a/src/postprocessors/MyTRIMPKAInConeInfo.C b/src/postprocessors/MyTRIMPKAInConeInfo.C index 77113a5f..d4513fbf 100644 --- a/src/postprocessors/MyTRIMPKAInConeInfo.C +++ b/src/postprocessors/MyTRIMPKAInConeInfo.C @@ -10,19 +10,23 @@ registerMooseObject("MagpieApp", MyTRIMPKAInConeInfo); -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = validParams(); - params.addClassDescription("Aggregate a global property of the primary knock-on atom for PKAs within a cone of " - "opening angle opening_angle along cone_axis"); + params.addClassDescription( + "Aggregate a global property of the primary knock-on atom for PKAs within a cone of " + "opening angle opening_angle along cone_axis"); params.addRequiredParam("cone_axis", "Axis of the cone"); - params.addRequiredParam("opening_angle", "Opening angle of the cone = twice the angle measured from cone_axis to surface"); + params.addRequiredParam( + "opening_angle", + "Opening angle of the cone = twice the angle measured from cone_axis to surface"); return params; } -MyTRIMPKAInConeInfo::MyTRIMPKAInConeInfo(const InputParameters & params) : - MyTRIMPKAInfo(params), +MyTRIMPKAInConeInfo::MyTRIMPKAInConeInfo(const InputParameters & params) + : MyTRIMPKAInfo(params), _direction(getParam("cone_axis")), _min_cosine(std::cos(0.5 * getParam("opening_angle"))) { diff --git a/src/postprocessors/MyTRIMPKAInfo.C b/src/postprocessors/MyTRIMPKAInfo.C index f60fe090..63cda7db 100644 --- a/src/postprocessors/MyTRIMPKAInfo.C +++ b/src/postprocessors/MyTRIMPKAInfo.C @@ -11,19 +11,25 @@ registerMooseObject("MagpieApp", MyTRIMPKAInfo); -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = validParams(); - params.addClassDescription("Aggregate a global property of the primary knock-on atom (PKA) list (e.g. total energy or number of PKA)"); - params.addRequiredParam("rasterizer", "Name of the MyTRIMRasterizer userobject to pull data from"); + params.addClassDescription("Aggregate a global property of the primary knock-on atom (PKA) list " + "(e.g. total energy or number of PKA)"); + params.addRequiredParam( + "rasterizer", "Name of the MyTRIMRasterizer userobject to pull data from"); MooseEnum value_type_options("TOTAL_MASS=0 TOTAL_ENERGY TOTAL_CHARGE TOTAL_NUMBER"); - params.addParam("value_type", value_type_options, "The property of the PKA set which is aggregated by this postprocessor"); + params.addParam( + "value_type", + value_type_options, + "The property of the PKA set which is aggregated by this postprocessor"); return params; } -MyTRIMPKAInfo::MyTRIMPKAInfo(const InputParameters & params) : - GeneralPostprocessor(params), +MyTRIMPKAInfo::MyTRIMPKAInfo(const InputParameters & params) + : GeneralPostprocessor(params), _rasterizer(getUserObject("rasterizer")), _value_type(getParam("value_type").getEnum()) { diff --git a/src/postprocessors/RMSDistance.C b/src/postprocessors/RMSDistance.C index b0c05991..48705279 100644 --- a/src/postprocessors/RMSDistance.C +++ b/src/postprocessors/RMSDistance.C @@ -16,7 +16,8 @@ validParams() { InputParameters params = validParams(); params.addRequiredParam("point", "Point to which the RMS distance is computed"); - params.addClassDescription("Computes the RMS distance of a distribution with respect to a fixed point."); + params.addClassDescription( + "Computes the RMS distance of a distribution with respect to a fixed point."); return params; } diff --git a/src/transfers/MultiAppNeutronicsSpectrumTransfer.C b/src/transfers/MultiAppNeutronicsSpectrumTransfer.C index 020fba18..3a73d859 100644 --- a/src/transfers/MultiAppNeutronicsSpectrumTransfer.C +++ b/src/transfers/MultiAppNeutronicsSpectrumTransfer.C @@ -17,22 +17,26 @@ registerMooseObject("MagpieApp", MultiAppNeutronicsSpectrumTransfer); -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = validParams(); params.addRequiredParam("pka_neutronics", "PKA generator object name."); - params.addRequiredParam("radiation_damage_sampler", "Neutronics user object providing the PDF data."); + params.addRequiredParam("radiation_damage_sampler", + "Neutronics user object providing the PDF data."); return params; } -MultiAppNeutronicsSpectrumTransfer::MultiAppNeutronicsSpectrumTransfer(const InputParameters & parameters) : - MultiAppTransfer(parameters), +MultiAppNeutronicsSpectrumTransfer::MultiAppNeutronicsSpectrumTransfer( + const InputParameters & parameters) + : MultiAppTransfer(parameters), _pka_generator_name(getParam("pka_neutronics")), _neutronics_pdf_name(getParam("radiation_damage_sampler")) { if (_direction != TO_MULTIAPP) - mooseError("MultiAppNeutronicsSpectrumTransfer can only send data from a neutronics master app to a mesoscale multiapp."); + mooseError("MultiAppNeutronicsSpectrumTransfer can only send data from a neutronics master app " + "to a mesoscale multiapp."); } void @@ -40,7 +44,8 @@ MultiAppNeutronicsSpectrumTransfer::execute() { // get the neutronics PDF user object FEProblemBase & from_problem = _multi_app->problemBase(); - const NeutronicsSpectrumSamplerBase & neutronics_pdf = from_problem.getUserObject(_neutronics_pdf_name); + const NeutronicsSpectrumSamplerBase & neutronics_pdf = + from_problem.getUserObject(_neutronics_pdf_name); // loop over all sub apps and copy over the neutronics data for (unsigned int i = 0; i < _multi_app->numGlobalApps(); ++i) @@ -52,7 +57,9 @@ MultiAppNeutronicsSpectrumTransfer::execute() for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid) { - PKAGeneratorNeutronicsBase & pka_uo = const_cast(_multi_app->appProblem(i).getUserObject(_pka_generator_name, tid)); + PKAGeneratorNeutronicsBase & pka_uo = const_cast( + _multi_app->appProblem(i).getUserObject(_pka_generator_name, + tid)); pka_uo.setPDF(zaids, energies, probabilities); } } diff --git a/src/userobjects/MyTRIMDiracRun.C b/src/userobjects/MyTRIMDiracRun.C index 4d85c404..a7094976 100644 --- a/src/userobjects/MyTRIMDiracRun.C +++ b/src/userobjects/MyTRIMDiracRun.C @@ -17,16 +17,17 @@ registerMooseObject("MagpieApp", MyTRIMDiracRun); -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = validParams(); - params.addClassDescription("Run a TRIM binary collision Monte Carlo simulation across the entire sample and gather the results for use with a source DiracKernel."); + params.addClassDescription("Run a TRIM binary collision Monte Carlo simulation across the entire " + "sample and gather the results for use with a source DiracKernel."); return params; } -MyTRIMDiracRun::MyTRIMDiracRun(const InputParameters & parameters) : - MyTRIMRunBase(parameters) +MyTRIMDiracRun::MyTRIMDiracRun(const InputParameters & parameters) : MyTRIMRunBase(parameters) { if (_trim_parameters.desired_npka != 0) mooseError("Result scaling not supported in MyTRIMDiracRun"); @@ -102,7 +103,8 @@ MyTRIMDiracRun::serialize(std::string & serialized_buffer) void MyTRIMDiracRun::deserialize(std::vector & serialized_buffers) { - mooseAssert(serialized_buffers.size() == _app.n_processors(), "Unexpected size of serialized_buffers: " << serialized_buffers.size()); + mooseAssert(serialized_buffers.size() == _app.n_processors(), + "Unexpected size of serialized_buffers: " << serialized_buffers.size()); // The input string stream used for deserialization std::istringstream iss; diff --git a/src/userobjects/MyTRIMElementRun.C b/src/userobjects/MyTRIMElementRun.C index 79a66810..e8917604 100644 --- a/src/userobjects/MyTRIMElementRun.C +++ b/src/userobjects/MyTRIMElementRun.C @@ -17,17 +17,19 @@ registerMooseObject("MagpieApp", MyTRIMElementRun); -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = validParams(); - params.addClassDescription("Run a TRIM binary collision Monte Carlo simulation across the entire sample and gather the results for use with an element averaged source Kernel."); + params.addClassDescription("Run a TRIM binary collision Monte Carlo simulation across the entire " + "sample and gather the results for use with an element averaged " + "source Kernel."); return params; } -MyTRIMElementRun::MyTRIMElementRun(const InputParameters & parameters) : - MyTRIMRunBase(parameters), - _zero(_nvars) +MyTRIMElementRun::MyTRIMElementRun(const InputParameters & parameters) + : MyTRIMRunBase(parameters), _zero(_nvars) { } @@ -124,7 +126,8 @@ MyTRIMElementRun::serialize(std::string & serialized_buffer) void MyTRIMElementRun::deserialize(std::vector & serialized_buffers) { - mooseAssert(serialized_buffers.size() == _app.n_processors(), "Unexpected size of serialized_buffers: " << serialized_buffers.size()); + mooseAssert(serialized_buffers.size() == _app.n_processors(), + "Unexpected size of serialized_buffers: " << serialized_buffers.size()); // The input string stream used for deserialization std::istringstream iss; @@ -154,8 +157,9 @@ MyTRIMElementRun::deserialize(std::vector & serialized_buffers) _result_map.emplace_hint(j, other_result); else { - mooseAssert(other_result.second._defects.size() == j->second._defects.size(), "Inconsistent TRIM defect vector sizes across processors."); - mooseAssert( j->second._defects.size() == _nvars, "Defect vector size must be _nvars."); + mooseAssert(other_result.second._defects.size() == j->second._defects.size(), + "Inconsistent TRIM defect vector sizes across processors."); + mooseAssert(j->second._defects.size() == _nvars, "Defect vector size must be _nvars."); for (unsigned int k = 0; k < _nvars; ++k) for (std::size_t l = 0; l < ThreadedRecoilDiracSourceLoop::N_DEFECTS; ++l) diff --git a/src/userobjects/MyTRIMRunBase.C b/src/userobjects/MyTRIMRunBase.C index 591a1c68..aaf5597f 100644 --- a/src/userobjects/MyTRIMRunBase.C +++ b/src/userobjects/MyTRIMRunBase.C @@ -9,11 +9,13 @@ #include "MyTRIMRunBase.h" #include "MooseMesh.h" -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = validParams(); - params.addRequiredParam("rasterizer", "MyTRIMRasterizer object to provide material data"); + params.addRequiredParam("rasterizer", + "MyTRIMRasterizer object to provide material data"); // we run this object once a timestep params.set("execute_on") = EXEC_TIMESTEP_BEGIN; @@ -22,8 +24,8 @@ InputParameters validParams() return params; } -MyTRIMRunBase::MyTRIMRunBase(const InputParameters & parameters) : - GeneralUserObject(parameters), +MyTRIMRunBase::MyTRIMRunBase(const InputParameters & parameters) + : GeneralUserObject(parameters), _rasterizer(getUserObject("rasterizer")), _trim_parameters(_rasterizer.getTrimParameters()), _nvars(_trim_parameters.nVars()), diff --git a/src/userobjects/NeutronicsSpectrumSamplerBase.C b/src/userobjects/NeutronicsSpectrumSamplerBase.C index 70c72f1d..0548a3e0 100644 --- a/src/userobjects/NeutronicsSpectrumSamplerBase.C +++ b/src/userobjects/NeutronicsSpectrumSamplerBase.C @@ -10,7 +10,7 @@ #include "MooseMesh.h" #ifdef RATTLESNAKE_ENABLED - #include "YakxsUtilities.h" +#include "YakxsUtilities.h" #endif // C++ includes @@ -18,28 +18,35 @@ #include #include -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = validParams(); - params.addRequiredParam >("target_isotope_names", "The list of target isotope names e.g. U235."); + params.addRequiredParam>("target_isotope_names", + "The list of target isotope names e.g. U235."); params.addRequiredCoupledVar("number_densities", "Number densities for each isotope."); - params.addRequiredParam >("energy_group_boundaries", "The energy group boundaries in units of eV orderd " - "from high to low [natural neutronics ordering]."); - params.addRequiredParam("L", "The maximum order of Legendre terms for expanding the recoil XS in mu_lab."); - params.addRequiredParam >("points", "The points where you want to evaluate the variables"); - params.addClassDescription("Radiation Damage user object base class.\n Computes PDFs from neutronics calculations that are used to sample PKAs in BCMC simulations."); + params.addRequiredParam>("energy_group_boundaries", + "The energy group boundaries in units of eV orderd " + "from high to low [natural neutronics ordering]."); + params.addRequiredParam( + "L", "The maximum order of Legendre terms for expanding the recoil XS in mu_lab."); + params.addRequiredParam>( + "points", "The points where you want to evaluate the variables"); + params.addClassDescription("Radiation Damage user object base class.\n Computes PDFs from " + "neutronics calculations that are used to sample PKAs in BCMC " + "simulations."); return params; } -NeutronicsSpectrumSamplerBase::NeutronicsSpectrumSamplerBase(const InputParameters & parameters) : - ElementUserObject(parameters), - _target_isotope_names(getParam >("target_isotope_names")), - _energy_group_boundaries(getParam >("energy_group_boundaries")), +NeutronicsSpectrumSamplerBase::NeutronicsSpectrumSamplerBase(const InputParameters & parameters) + : ElementUserObject(parameters), + _target_isotope_names(getParam>("target_isotope_names")), + _energy_group_boundaries(getParam>("energy_group_boundaries")), _I(_target_isotope_names.size()), _G(_energy_group_boundaries.size() - 1), _L(getParam("L")), - _points(getParam >("points")), + _points(getParam>("points")), _npoints(_points.size()), _qp_is_cached(false) { @@ -50,7 +57,7 @@ NeutronicsSpectrumSamplerBase::NeutronicsSpectrumSamplerBase(const InputParamete // get the number density variables _number_densities.resize(_I); for (unsigned int i = 0; i < _I; ++i) - _number_densities[i] = & coupledValue("number_densities", i); + _number_densities[i] = &coupledValue("number_densities", i); _zaids.resize(_I); for (unsigned int i = 0; i < _I; ++i) @@ -116,7 +123,8 @@ NeutronicsSpectrumSamplerBase::execute() for (unsigned int g = 0; g < _G; ++g) for (unsigned int p = 0; p < _nphi; ++p) for (unsigned int q = 0; q < _nmu; ++q) - _sample_point_data[_current_point]({i, g, p, q}) = computeRadiationDamagePDF(i, g, p, q); + _sample_point_data[_current_point]({i, g, p, q}) = + computeRadiationDamagePDF(i, g, p, q); } } } @@ -142,7 +150,8 @@ NeutronicsSpectrumSamplerBase::meshChanged() if (candidate_elem && candidate_elem->processor_id() == processor_id()) { _owner[j] = processor_id(); - if (_local_elem_to_contained_points.find(candidate_elem) != _local_elem_to_contained_points.end()) + if (_local_elem_to_contained_points.find(candidate_elem) != + _local_elem_to_contained_points.end()) _local_elem_to_contained_points[candidate_elem].push_back(j); else _local_elem_to_contained_points[candidate_elem] = {j}; @@ -248,6 +257,7 @@ NeutronicsSpectrumSamplerBase::localStringToZaid(std::string s) const return 942390; else if (s == "Pu240") return 942400; - mooseError("Isotope name ", s, " cannot be converted with the localStringToZaid conversion method."); + mooseError( + "Isotope name ", s, " cannot be converted with the localStringToZaid conversion method."); return 0; } diff --git a/src/userobjects/NeutronicsSpectrumSamplerFission.C b/src/userobjects/NeutronicsSpectrumSamplerFission.C index a7830693..f8eda5b1 100644 --- a/src/userobjects/NeutronicsSpectrumSamplerFission.C +++ b/src/userobjects/NeutronicsSpectrumSamplerFission.C @@ -13,34 +13,39 @@ registerMooseObject("MagpieApp", NeutronicsSpectrumSamplerFission); -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = validParams(); params.suppressParameter("L"); params.set("L") = 0; params.addRequiredCoupledVar("scalar_fluxes", "Scalar fluxes, dimension G."); - // FIXME: This is not the permanent solution for providing fission cross sections. It must be implemented as material - // property. - params.addRequiredParam >("fission_cross_sections", "Fission cross sections. Size = npoints x nisotopes x G."); - params.addClassDescription("Computes fractional fission rates (Ni * simga_fi * phi) for a selection of points.\nUsed for computing PDFs from fission reactions to sample PKAs."); + // FIXME: This is not the permanent solution for providing fission cross sections. It must be + // implemented as material property. + params.addRequiredParam>( + "fission_cross_sections", "Fission cross sections. Size = npoints x nisotopes x G."); + params.addClassDescription("Computes fractional fission rates (Ni * simga_fi * phi) for a " + "selection of points.\nUsed for computing PDFs from fission reactions " + "to sample PKAs."); return params; } -NeutronicsSpectrumSamplerFission::NeutronicsSpectrumSamplerFission(const InputParameters & parameters) : - NeutronicsSpectrumSamplerBase(parameters) +NeutronicsSpectrumSamplerFission::NeutronicsSpectrumSamplerFission( + const InputParameters & parameters) + : NeutronicsSpectrumSamplerBase(parameters) { _nmu = 1; - _nphi = 1; // can't initialize base class members in initializer + _nphi = 1; // can't initialize base class members in initializer - std::vector fxs = getParam >("fission_cross_sections"); + std::vector fxs = getParam>("fission_cross_sections"); if (fxs.size() != _npoints * _I * _G) mooseError("fission cross sections must be of length npoints x nisotopes x G"); // get scalar fluxes _scalar_flux.resize(_G); for (unsigned int g = 0; g < _G; ++g) - _scalar_flux[g] = & coupledValue("scalar_fluxes", g); + _scalar_flux[g] = &coupledValue("scalar_fluxes", g); // allocate and assign fission cross sections unsigned int p = 0; @@ -58,7 +63,8 @@ NeutronicsSpectrumSamplerFission::NeutronicsSpectrumSamplerFission(const InputPa } Real -NeutronicsSpectrumSamplerFission::totalRecoilRate(unsigned int point_id, const std::string & target_isotope) const +NeutronicsSpectrumSamplerFission::totalRecoilRate(unsigned int point_id, + const std::string & target_isotope) const { Real rate = 0.0; auto it = std::find(_target_isotope_names.begin(), _target_isotope_names.end(), target_isotope); @@ -71,16 +77,22 @@ NeutronicsSpectrumSamplerFission::totalRecoilRate(unsigned int point_id, const s } Real -NeutronicsSpectrumSamplerFission::computeRadiationDamagePDF(unsigned int i, unsigned int g, unsigned int /*p*/, unsigned int /*q*/) +NeutronicsSpectrumSamplerFission::computeRadiationDamagePDF(unsigned int i, + unsigned int g, + unsigned int /*p*/, + unsigned int /*q*/) { - return (*_scalar_flux[g])[_qp] * (*_number_densities[i])[_qp] * _fission_cross_section[_current_point][i][g]; + return (*_scalar_flux[g])[_qp] * (*_number_densities[i])[_qp] * + _fission_cross_section[_current_point][i][g]; } MultiIndex NeutronicsSpectrumSamplerFission::getPDF(unsigned int point_id) const { - mooseAssert(_sample_point_data[point_id].size()[2] == 1, "RadiationDamageBase: Dimension of mu index is not 1."); - mooseAssert(_sample_point_data[point_id].size()[3] == 1, "RadiationDamageBase: Dimension of phi index is not 1."); + mooseAssert(_sample_point_data[point_id].size()[2] == 1, + "RadiationDamageBase: Dimension of mu index is not 1."); + mooseAssert(_sample_point_data[point_id].size()[3] == 1, + "RadiationDamageBase: Dimension of phi index is not 1."); // the final index of the pdf has dimension 1 so we slice it to return a MI of dimension 2 return _sample_point_data[point_id].slice(3, 0).slice(2, 0); } diff --git a/src/userobjects/PKAConstant.C b/src/userobjects/PKAConstant.C index 88b74dbc..9c09f3a3 100644 --- a/src/userobjects/PKAConstant.C +++ b/src/userobjects/PKAConstant.C @@ -10,19 +10,23 @@ registerMooseObject("MagpieApp", PKAConstant); -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = validParams(); - params.addParam("pka_rate", 1e-8, "PKA rate per unit volume (uses mesh units defined in the rasterizer and moose time units)"); + params.addParam( + "pka_rate", + 1e-8, + "PKA rate per unit volume (uses mesh units defined in the rasterizer and moose time units)"); params.addRequiredParam("Z", "PKA nuclear charge"); params.addRequiredParam("m", "PKA mass in amu"); params.addRequiredParam("E", "PKA energy in eV"); return params; } -PKAConstant::PKAConstant(const InputParameters & parameters) : - PKAEmpiricalBase(parameters), +PKAConstant::PKAConstant(const InputParameters & parameters) + : PKAEmpiricalBase(parameters), _pka_rate(getParam("pka_rate")), _Z(getParam("Z")), _m(getParam("m")), diff --git a/src/userobjects/PKAFunction.C b/src/userobjects/PKAFunction.C index f472fae3..15146039 100644 --- a/src/userobjects/PKAFunction.C +++ b/src/userobjects/PKAFunction.C @@ -10,19 +10,23 @@ registerMooseObject("MagpieApp", PKAFunction); -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = validParams(); - params.addParam("pka_rate", 1e-8, "PKA rate per unit volume (uses mesh units defined in the rasterizer and moose time units)"); + params.addParam( + "pka_rate", + 1e-8, + "PKA rate per unit volume (uses mesh units defined in the rasterizer and moose time units)"); params.addRequiredParam("Z", "PKA nuclear charge"); params.addRequiredParam("m", "PKA mass in amu"); params.addRequiredParam("E", "PKA energy in eV"); return params; } -PKAFunction::PKAFunction(const InputParameters & parameters) : - PKAEmpiricalBase(parameters), +PKAFunction::PKAFunction(const InputParameters & parameters) + : PKAEmpiricalBase(parameters), _pka_rate(getFunction("pka_rate")), _Z(getFunction("Z")), _m(getFunction("m")), diff --git a/src/userobjects/PKAGeneratorNeutronicsBase.C b/src/userobjects/PKAGeneratorNeutronicsBase.C index 8fa54de7..df656763 100644 --- a/src/userobjects/PKAGeneratorNeutronicsBase.C +++ b/src/userobjects/PKAGeneratorNeutronicsBase.C @@ -11,23 +11,30 @@ #include "MultiIndex.h" #include "DiscreteFissionPKAPDF.h" -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = validParams(); - params.addParam>("partial_reaction_rates", "Partial neutronic reaction rates per unit volume [sum_g xs_{r,g,i} * phi_g], " - "r: reaction type, g: energy group, i: nuclide id.Provide number density as variable in rasterizer!"); - params.addParam>("averaged_number_densities", "The number density of the species averaged over the domain."); - params.addClassDescription("PKA generator (neutronics) user object base class.\n Takes pdf and samples PKAs due to various interactions."); + params.addParam>( + "partial_reaction_rates", + "Partial neutronic reaction rates per unit volume [sum_g xs_{r,g,i} * phi_g], " + "r: reaction type, g: energy group, i: nuclide id.Provide number density as variable in " + "rasterizer!"); + params.addParam>( + "averaged_number_densities", "The number density of the species averaged over the domain."); + params.addClassDescription("PKA generator (neutronics) user object base class.\n Takes pdf and " + "samples PKAs due to various interactions."); return params; } -PKAGeneratorNeutronicsBase::PKAGeneratorNeutronicsBase(const InputParameters & parameters) : - PKAGeneratorBase(parameters) +PKAGeneratorNeutronicsBase::PKAGeneratorNeutronicsBase(const InputParameters & parameters) + : PKAGeneratorBase(parameters) { if (isParamValid("partial_reaction_rates")) { - std::vector names = getParam>("partial_reaction_rates"); + std::vector names = + getParam>("partial_reaction_rates"); _partial_neutronics_reaction_rates.resize(names.size()); _stored_reaction_rates.resize(names.size()); for (unsigned int j = 0; j < names.size(); ++j) @@ -54,7 +61,8 @@ PKAGeneratorNeutronicsBase::PKAGeneratorNeutronicsBase(const InputParameters & p if (isParamValid("averaged_number_densities")) { - std::vector names = getParam>("averaged_number_densities"); + std::vector names = + getParam>("averaged_number_densities"); _averaged_number_densities.resize(names.size()); _stored_densities.resize(names.size()); for (unsigned int j = 0; j < names.size(); ++j) @@ -85,5 +93,6 @@ PKAGeneratorNeutronicsBase::PKAGeneratorNeutronicsBase(const InputParameters & p } if (_averaged_number_densities.size() != _partial_neutronics_reaction_rates.size()) - mooseError("partial_reaction_rates and averaged_number_densities must have the same number of entries."); + mooseError("partial_reaction_rates and averaged_number_densities must have the same number of " + "entries."); } diff --git a/src/userobjects/SPPARKSUserObject.C b/src/userobjects/SPPARKSUserObject.C index df247844..b9703303 100644 --- a/src/userobjects/SPPARKSUserObject.C +++ b/src/userobjects/SPPARKSUserObject.C @@ -14,21 +14,35 @@ registerMooseObject("MagpieApp", SPPARKSUserObject); -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = validParams(); params.addParam("file", "", "SPPARKS input file"); params.addParam("spparks_only", false, "Whether to run SPPARKS independently of MOOSE"); - params.addParam >("from_ivar", std::vector(), "Index into SPPARKS iarray. This data will be extracted from SPPARKS."); - params.addParam >("from_dvar", std::vector(), "Index into SPPARKS darray. This data will be extracted from SPPARKS."); - params.addParam >("to_ivar", std::vector(), "Index into SPPARKS iarray. This data will be copied to SPPARKS."); - params.addParam >("to_dvar", std::vector(), "Index into SPPARKS darray. This data will be copied to SPPARKS."); - - params.addParam >("int_vars", "Integer Vars to send to SPPARKS."); - params.addParam >("double_vars", "Double Vars to send to SPPARKS."); - params.addParam >("sol_vars", "Double solving-for Vars obtained from SPPARKS."); + params.addParam>( + "from_ivar", + std::vector(), + "Index into SPPARKS iarray. This data will be extracted from SPPARKS."); + params.addParam>( + "from_dvar", + std::vector(), + "Index into SPPARKS darray. This data will be extracted from SPPARKS."); + params.addParam>( + "to_ivar", + std::vector(), + "Index into SPPARKS iarray. This data will be copied to SPPARKS."); + params.addParam>( + "to_dvar", + std::vector(), + "Index into SPPARKS darray. This data will be copied to SPPARKS."); + + params.addParam>("int_vars", "Integer Vars to send to SPPARKS."); + params.addParam>("double_vars", "Double Vars to send to SPPARKS."); + params.addParam>("sol_vars", + "Double solving-for Vars obtained from SPPARKS."); params.addParam("xmin", 0.0, "Lower X Coordinate of the generated mesh"); params.addParam("ymin", 0.0, "Lower Y Coordinate of the generated mesh"); @@ -38,7 +52,8 @@ InputParameters validParams() params.addParam("zmax", 1.0, "Upper Z Coordinate of the generated mesh"); params.addParam("init_spparks", false, "Set values of SPPARKS variables at time zero."); - params.addParam("one_time_run", false, "Run SPPARKS just once at time zero."); // added by YF + params.addParam( + "one_time_run", false, "Run SPPARKS just once at time zero."); // added by YF params.addParam("time_spparks_time_ratio", 1, "Ratio of time to SPPARKS time."); // Hide from input file dump @@ -46,15 +61,15 @@ InputParameters validParams() return params; } -SPPARKSUserObject::SPPARKSUserObject(const InputParameters & params) : - GeneralUserObject(params), +SPPARKSUserObject::SPPARKSUserObject(const InputParameters & params) + : GeneralUserObject(params), _spparks(nullptr), _file(getParam("file")), _spparks_only(getParam("spparks_only")), - _from_ivar(getParam >("from_ivar")), - _from_dvar(getParam >("from_dvar")), - _to_ivar(getParam >("to_ivar")), - _to_dvar(getParam >("to_dvar")), + _from_ivar(getParam>("from_ivar")), + _from_dvar(getParam>("from_dvar")), + _to_ivar(getParam>("to_ivar")), + _to_dvar(getParam>("to_dvar")), _xmin(getParam("xmin")), _ymin(getParam("ymin")), _zmin(getParam("zmin")), @@ -73,7 +88,7 @@ SPPARKSUserObject::SPPARKSUserObject(const InputParameters & params) : { if (isParamValid("int_vars")) { - for (auto & name : getParam >("int_vars")) + for (auto & name : getParam>("int_vars")) _int_vars.push_back(&_fe_problem.getStandardVariable(0, name)); } if (_int_vars.size() != _to_ivar.size()) @@ -81,7 +96,7 @@ SPPARKSUserObject::SPPARKSUserObject(const InputParameters & params) : if (isParamValid("double_vars")) { - for (auto & name : getParam >("double_vars")) + for (auto & name : getParam>("double_vars")) _double_vars.push_back(&_fe_problem.getStandardVariable(0, name)); } if (_double_vars.size() != _to_dvar.size()) @@ -89,7 +104,7 @@ SPPARKSUserObject::SPPARKSUserObject(const InputParameters & params) : if (isParamValid("sol_vars")) { - for (auto & name : getParam >("sol_vars")) + for (auto & name : getParam>("sol_vars")) _sol_vars.push_back(&_fe_problem.getStandardVariable(0, name)); } @@ -116,10 +131,7 @@ SPPARKSUserObject::SPPARKSUserObject(const InputParameters & params) : _console << "\n>>>> SPPARKS NLOCAL: " << *iptr << " <<<<\n"; } -SPPARKSUserObject::~SPPARKSUserObject() -{ - spparks_close(_spparks); -} +SPPARKSUserObject::~SPPARKSUserObject() { spparks_close(_spparks); } void SPPARKSUserObject::initialize() @@ -296,9 +308,7 @@ SPPARKSUserObject::initialSetup() std::set spparks_id; // Local SPPARKS nodes for (int i = 0; i < nlcl; ++i) { - Point p(xyz_array[i][0], - _dim > 1 ? xyz_array[i][1] : 0, - _dim > 2 ? xyz_array[i][2] : 0); + Point p(xyz_array[i][0], _dim > 1 ? xyz_array[i][1] : 0, _dim > 2 ? xyz_array[i][2] : 0); spparks_id.insert(SPPARKSID(i, p)); } _num_local_spparks_nodes = spparks_id.size(); @@ -354,7 +364,8 @@ SPPARKSUserObject::initialSetup() // mooseError("Did not find MOOSE FEM node for each SPPARKS node, ", spparks_id.size() // , ", ", fem_id.size(), ", ", _spparks_to_fem.size()); - _console << "\n spparks size "<< spparks_id.size() << "not equal to fem size " << fem_id.size() << '\n'; + _console << "\n spparks size " << spparks_id.size() << "not equal to fem size " + << fem_id.size() << '\n'; } return; @@ -393,7 +404,7 @@ SPPARKSUserObject::initialSetup() // // TODO: These bboxes could/should be based on non-matched fem nodes. // - std::vector fem_bounds(num_procs*6, 0.0); + std::vector fem_bounds(num_procs * 6, 0.0); Real * e_bounds = &fem_bounds[0] + offset; e_bounds[0] = e_bounds[1] = e_bounds[2] = std::numeric_limits::max(); e_bounds[3] = e_bounds[4] = e_bounds[5] = std::numeric_limits::min(); @@ -407,7 +418,7 @@ SPPARKSUserObject::initialSetup() e_bounds[5] = std::max(e_bounds[5], id.coor(2)); } MeshTools::BoundingBox fem_bb(Point(e_bounds[0], e_bounds[1], e_bounds[2]), - Point(e_bounds[3], e_bounds[4], e_bounds[5])); + Point(e_bounds[3], e_bounds[4], e_bounds[5])); _communicator.sum(fem_bounds); // @@ -443,28 +454,54 @@ SPPARKSUserObject::initialSetup() std::vector num_fem_nodes(procs_overlapping_spparks_domain.size(), 0); std::vector num_spparks_nodes(procs_overlapping_fem_domain.size(), 0); - std::vector recv_request1(std::max(procs_overlapping_spparks_domain.size(), procs_overlapping_fem_domain.size())); - std::vector recv_request2(std::max(procs_overlapping_spparks_domain.size(), procs_overlapping_fem_domain.size())); + std::vector recv_request1( + std::max(procs_overlapping_spparks_domain.size(), procs_overlapping_fem_domain.size())); + std::vector recv_request2( + std::max(procs_overlapping_spparks_domain.size(), procs_overlapping_fem_domain.size())); int comm_tag = 100; for (unsigned int i = 0; i < procs_overlapping_spparks_domain.size(); ++i) // if (num_fem_nodes.size() && procs_overlapping_spparks_domain.size()) - MPI_Irecv(&num_fem_nodes[i], 1, MPI_UNSIGNED, procs_overlapping_spparks_domain[i], comm_tag, _communicator.get(), &recv_request1[i]); + MPI_Irecv(&num_fem_nodes[i], + 1, + MPI_UNSIGNED, + procs_overlapping_spparks_domain[i], + comm_tag, + _communicator.get(), + &recv_request1[i]); for (unsigned int i = 0; i < procs_overlapping_fem_domain.size(); ++i) // if (num_spparks_nodes.size() && procs_overlapping_fem_domain.size()) - MPI_Irecv(&num_spparks_nodes[i], 1, MPI_UNSIGNED, procs_overlapping_fem_domain[i], comm_tag+11, _communicator.get(), &recv_request2[i]); + MPI_Irecv(&num_spparks_nodes[i], + 1, + MPI_UNSIGNED, + procs_overlapping_fem_domain[i], + comm_tag + 11, + _communicator.get(), + &recv_request2[i]); for (unsigned int i = 0; i < procs_overlapping_fem_domain.size(); ++i) // if (procs_overlapping_fem_domain.size()) - MPI_Send(&_num_local_fem_nodes, 1, MPI_UNSIGNED, procs_overlapping_fem_domain[i], comm_tag, _communicator.get()); + MPI_Send(&_num_local_fem_nodes, + 1, + MPI_UNSIGNED, + procs_overlapping_fem_domain[i], + comm_tag, + _communicator.get()); for (unsigned int i = 0; i < procs_overlapping_spparks_domain.size(); ++i) // if (procs_overlapping_spparks_domain.size()) - MPI_Send(&_num_local_spparks_nodes, 1, MPI_UNSIGNED, procs_overlapping_spparks_domain[i], comm_tag+11, _communicator.get()); - - std::vector recv_status1(std::max(procs_overlapping_spparks_domain.size(), procs_overlapping_fem_domain.size())); - std::vector recv_status2(std::max(procs_overlapping_spparks_domain.size(), procs_overlapping_fem_domain.size())); + MPI_Send(&_num_local_spparks_nodes, + 1, + MPI_UNSIGNED, + procs_overlapping_spparks_domain[i], + comm_tag + 11, + _communicator.get()); + + std::vector recv_status1( + std::max(procs_overlapping_spparks_domain.size(), procs_overlapping_fem_domain.size())); + std::vector recv_status2( + std::max(procs_overlapping_spparks_domain.size(), procs_overlapping_fem_domain.size())); MPI_Waitall(procs_overlapping_spparks_domain.size(), &recv_request1[0], &recv_status1[0]); MPI_Waitall(procs_overlapping_fem_domain.size(), &recv_request2[0], &recv_status2[0]); @@ -474,20 +511,34 @@ SPPARKSUserObject::initialSetup() comm_tag = 200; int comm_tag_double = comm_tag + 1; - const unsigned int num_fem_nodes_total = std::accumulate(&num_fem_nodes[0], &num_fem_nodes[0]+num_fem_nodes.size(), 0); - const unsigned int num_spparks_nodes_total = std::accumulate(&num_spparks_nodes[0], &num_spparks_nodes[0]+num_spparks_nodes.size(), 0); + const unsigned int num_fem_nodes_total = + std::accumulate(&num_fem_nodes[0], &num_fem_nodes[0] + num_fem_nodes.size(), 0); + const unsigned int num_spparks_nodes_total = + std::accumulate(&num_spparks_nodes[0], &num_spparks_nodes[0] + num_spparks_nodes.size(), 0); std::vector remote_fem_nodes(num_fem_nodes_total); - std::vector remote_fem_coords(num_fem_nodes_total*3); + std::vector remote_fem_coords(num_fem_nodes_total * 3); std::vector remote_spparks_nodes(num_spparks_nodes_total); - std::vector remote_spparks_coords(num_spparks_nodes_total*3); + std::vector remote_spparks_coords(num_spparks_nodes_total * 3); offset = 0; // Receive MOOSE FEM nodes std::vector recv_request_coor1(procs_overlapping_spparks_domain.size()); for (unsigned int i = 0; i < procs_overlapping_spparks_domain.size(); ++i) { - MPI_Irecv(&remote_fem_nodes[offset], num_fem_nodes[i], MPI_UNSIGNED, procs_overlapping_spparks_domain[i], comm_tag, _communicator.get(), &recv_request1[i]); - MPI_Irecv(&remote_fem_coords[offset*3], num_fem_nodes[i]*3, MPI_DOUBLE, procs_overlapping_spparks_domain[i], comm_tag_double, _communicator.get(), &recv_request_coor1[i]); + MPI_Irecv(&remote_fem_nodes[offset], + num_fem_nodes[i], + MPI_UNSIGNED, + procs_overlapping_spparks_domain[i], + comm_tag, + _communicator.get(), + &recv_request1[i]); + MPI_Irecv(&remote_fem_coords[offset * 3], + num_fem_nodes[i] * 3, + MPI_DOUBLE, + procs_overlapping_spparks_domain[i], + comm_tag_double, + _communicator.get(), + &recv_request_coor1[i]); offset += num_fem_nodes[i]; } @@ -496,21 +547,33 @@ SPPARKSUserObject::initialSetup() offset = 0; for (unsigned int i = 0; i < procs_overlapping_fem_domain.size(); ++i) { - MPI_Irecv(&remote_spparks_nodes[offset], num_spparks_nodes[i], MPI_UNSIGNED, procs_overlapping_fem_domain[i], comm_tag+11, _communicator.get(), &recv_request2[i]); - MPI_Irecv(&remote_spparks_coords[offset*3], num_spparks_nodes[i]*3, MPI_DOUBLE, procs_overlapping_fem_domain[i], comm_tag_double+11, _communicator.get(), &recv_request_coor2[i]); + MPI_Irecv(&remote_spparks_nodes[offset], + num_spparks_nodes[i], + MPI_UNSIGNED, + procs_overlapping_fem_domain[i], + comm_tag + 11, + _communicator.get(), + &recv_request2[i]); + MPI_Irecv(&remote_spparks_coords[offset * 3], + num_spparks_nodes[i] * 3, + MPI_DOUBLE, + procs_overlapping_fem_domain[i], + comm_tag_double + 11, + _communicator.get(), + &recv_request_coor2[i]); offset += num_spparks_nodes[i]; } // Prepare vectors of MOOSE FEM ids, coordinates std::vector fem_ids(_num_local_fem_nodes); - std::vector fem_coords(3*_num_local_fem_nodes); + std::vector fem_coords(3 * _num_local_fem_nodes); offset = 0; for (auto & id : fem_id) { fem_ids[offset] = id.id; - fem_coords[offset*3+0] = id.coor(0); - fem_coords[offset*3+1] = id.coor(1); - fem_coords[offset*3+2] = id.coor(2); + fem_coords[offset * 3 + 0] = id.coor(0); + fem_coords[offset * 3 + 1] = id.coor(1); + fem_coords[offset * 3 + 2] = id.coor(2); ++offset; } @@ -518,21 +581,31 @@ SPPARKSUserObject::initialSetup() offset = 0; for (unsigned int i = 0; i < procs_overlapping_fem_domain.size(); ++i) { - MPI_Send(&fem_ids[0], _num_local_fem_nodes, MPI_UNSIGNED, procs_overlapping_fem_domain[i], comm_tag, _communicator.get()); - MPI_Send(&fem_coords[0], _num_local_fem_nodes*3, MPI_DOUBLE, procs_overlapping_fem_domain[i], comm_tag_double, _communicator.get()); + MPI_Send(&fem_ids[0], + _num_local_fem_nodes, + MPI_UNSIGNED, + procs_overlapping_fem_domain[i], + comm_tag, + _communicator.get()); + MPI_Send(&fem_coords[0], + _num_local_fem_nodes * 3, + MPI_DOUBLE, + procs_overlapping_fem_domain[i], + comm_tag_double, + _communicator.get()); ++offset; } // Prepare SPPARKS ids, coordinates std::vector spparks_ids(_num_local_spparks_nodes); - std::vector spparks_coords(3*_num_local_spparks_nodes); + std::vector spparks_coords(3 * _num_local_spparks_nodes); offset = 0; for (auto & id : spparks_id) { spparks_ids[offset] = id.id; - spparks_coords[offset*3+0] = id.coor(0); - spparks_coords[offset*3+1] = id.coor(1); - spparks_coords[offset*3+2] = id.coor(2); + spparks_coords[offset * 3 + 0] = id.coor(0); + spparks_coords[offset * 3 + 1] = id.coor(1); + spparks_coords[offset * 3 + 2] = id.coor(2); ++offset; } @@ -540,8 +613,18 @@ SPPARKSUserObject::initialSetup() offset = 0; for (unsigned int i = 0; i < procs_overlapping_spparks_domain.size(); ++i) { - MPI_Send(&spparks_ids[0], _num_local_spparks_nodes, MPI_UNSIGNED, procs_overlapping_spparks_domain[i], comm_tag+11, _communicator.get()); - MPI_Send(&spparks_coords[0], _num_local_spparks_nodes*3, MPI_DOUBLE, procs_overlapping_spparks_domain[i], comm_tag_double+11, _communicator.get()); + MPI_Send(&spparks_ids[0], + _num_local_spparks_nodes, + MPI_UNSIGNED, + procs_overlapping_spparks_domain[i], + comm_tag + 11, + _communicator.get()); + MPI_Send(&spparks_coords[0], + _num_local_spparks_nodes * 3, + MPI_DOUBLE, + procs_overlapping_spparks_domain[i], + comm_tag_double + 11, + _communicator.get()); ++offset; } @@ -558,24 +641,36 @@ SPPARKSUserObject::initialSetup() // Receive number of MOOSE FEM nodes on this processor that match SPPARKS nodes on another std::vector num_remote_fem_matches(procs_overlapping_fem_domain.size()); for (unsigned int i = 0; i < procs_overlapping_fem_domain.size(); ++i) - MPI_Irecv(&num_remote_fem_matches[i], 1, MPI_UNSIGNED, procs_overlapping_fem_domain[i], comm_tag, _communicator.get(), &recv_request1[i]); + MPI_Irecv(&num_remote_fem_matches[i], + 1, + MPI_UNSIGNED, + procs_overlapping_fem_domain[i], + comm_tag, + _communicator.get(), + &recv_request1[i]); // Receive number of SPPARKS nodes on this processor that match MOOSE FEM nodes on another std::vector num_remote_spparks_matches(procs_overlapping_spparks_domain.size()); for (unsigned int i = 0; i < procs_overlapping_spparks_domain.size(); ++i) - MPI_Irecv(&num_remote_spparks_matches[i], 1, MPI_UNSIGNED, procs_overlapping_spparks_domain[i], comm_tag+11, _communicator.get(), &recv_request2[i]); + MPI_Irecv(&num_remote_spparks_matches[i], + 1, + MPI_UNSIGNED, + procs_overlapping_spparks_domain[i], + comm_tag + 11, + _communicator.get(), + &recv_request2[i]); // Count number of remote MOOSE FEM nodes that match the processor's SPPARKS nodes // Store the matches - std::vector > spparks_matches(procs_overlapping_spparks_domain.size()); + std::vector> spparks_matches(procs_overlapping_spparks_domain.size()); offset = 0; for (unsigned int i = 0; i < procs_overlapping_spparks_domain.size(); ++i) for (unsigned int j = 0; j < num_fem_nodes[i]; ++j) { SPPARKSID tmp(remote_fem_nodes[offset], - Point(remote_fem_coords[offset*3+0], - remote_fem_coords[offset*3+1], - remote_fem_coords[offset*3+2])); + Point(remote_fem_coords[offset * 3 + 0], + remote_fem_coords[offset * 3 + 1], + remote_fem_coords[offset * 3 + 2])); auto iter = spparks_id.find(tmp); if (iter != spparks_id.end()) { @@ -588,15 +683,15 @@ SPPARKSUserObject::initialSetup() // Count number of remote SPPARKS nodes that match this processor's MOOSE FEM nodes // Store the matches - std::vector > fem_matches(procs_overlapping_fem_domain.size()); + std::vector> fem_matches(procs_overlapping_fem_domain.size()); offset = 0; for (unsigned int i = 0; i < procs_overlapping_fem_domain.size(); ++i) for (unsigned int j = 0; j < num_spparks_nodes[i]; ++j) { FEMID tmp(remote_spparks_nodes[offset], - Point(remote_spparks_coords[offset*3+0], - remote_spparks_coords[offset*3+1], - remote_spparks_coords[offset*3+2])); + Point(remote_spparks_coords[offset * 3 + 0], + remote_spparks_coords[offset * 3 + 1], + remote_spparks_coords[offset * 3 + 2])); auto iter = fem_id.find(tmp); if (iter != fem_id.end()) { @@ -612,7 +707,12 @@ SPPARKSUserObject::initialSetup() for (unsigned int i = 0; i < procs_overlapping_spparks_domain.size(); ++i) { spparks_sizes[i] = spparks_matches[i].size(); - MPI_Send(&spparks_sizes[i], 1, MPI_UNSIGNED, procs_overlapping_spparks_domain[i], comm_tag, _communicator.get()); + MPI_Send(&spparks_sizes[i], + 1, + MPI_UNSIGNED, + procs_overlapping_spparks_domain[i], + comm_tag, + _communicator.get()); } // Send number of SPPARKS nodes that match this processor's MOOSE FEM nodes @@ -620,7 +720,12 @@ SPPARKSUserObject::initialSetup() for (unsigned int i = 0; i < procs_overlapping_fem_domain.size(); ++i) { fem_sizes[i] = fem_matches[i].size(); - MPI_Send(&fem_sizes[i], 1, MPI_UNSIGNED, procs_overlapping_fem_domain[i], comm_tag+11, _communicator.get()); + MPI_Send(&fem_sizes[i], + 1, + MPI_UNSIGNED, + procs_overlapping_fem_domain[i], + comm_tag + 11, + _communicator.get()); } MPI_Waitall(procs_overlapping_fem_domain.size(), &recv_request1[0], &recv_status1[0]); @@ -632,35 +737,59 @@ SPPARKSUserObject::initialSetup() comm_tag = 400; // Receive MOOSE DEM ids that match SPPARKS nodes on another processor - std::vector > matched_fem_ids(procs_overlapping_fem_domain.size()); + std::vector> matched_fem_ids(procs_overlapping_fem_domain.size()); for (unsigned int i = 0; i < procs_overlapping_fem_domain.size(); ++i) { matched_fem_ids[i].resize(num_remote_fem_matches[i]); if (matched_fem_ids[i].size()) - MPI_Irecv(&matched_fem_ids[i][0], num_remote_fem_matches[i], MPI_UNSIGNED, procs_overlapping_fem_domain[i], comm_tag, _communicator.get(), &recv_request1[i]); + MPI_Irecv(&matched_fem_ids[i][0], + num_remote_fem_matches[i], + MPI_UNSIGNED, + procs_overlapping_fem_domain[i], + comm_tag, + _communicator.get(), + &recv_request1[i]); } // Receive SPPARKS ids that match MOOSE FEM nodes on another processor - std::vector > matched_spparks_ids(procs_overlapping_spparks_domain.size()); + std::vector> matched_spparks_ids( + procs_overlapping_spparks_domain.size()); for (unsigned int i = 0; i < procs_overlapping_spparks_domain.size(); ++i) { matched_spparks_ids[i].resize(num_remote_spparks_matches[i]); if (matched_spparks_ids[i].size()) - MPI_Irecv(&matched_spparks_ids[i][0], num_remote_spparks_matches[i], MPI_UNSIGNED, procs_overlapping_spparks_domain[i], comm_tag+11, _communicator.get(), &recv_request2[i]); + MPI_Irecv(&matched_spparks_ids[i][0], + num_remote_spparks_matches[i], + MPI_UNSIGNED, + procs_overlapping_spparks_domain[i], + comm_tag + 11, + _communicator.get(), + &recv_request2[i]); } // Send remote MOOSE FEM ids that match SPPARKS nodes on this processor for (unsigned int i = 0; i < procs_overlapping_spparks_domain.size(); ++i) { spparks_matches[i].resize(spparks_sizes[i]); - if (spparks_matches[i].size()) MPI_Send(&spparks_matches[i][0], spparks_sizes[i], MPI_UNSIGNED, procs_overlapping_spparks_domain[i], comm_tag, _communicator.get()); + if (spparks_matches[i].size()) + MPI_Send(&spparks_matches[i][0], + spparks_sizes[i], + MPI_UNSIGNED, + procs_overlapping_spparks_domain[i], + comm_tag, + _communicator.get()); } // Send remote SPPARKS ids that match MOOSE FEM nodes on this processor for (unsigned int i = 0; i < procs_overlapping_fem_domain.size(); ++i) { fem_matches[i].resize(fem_sizes[i]); if (fem_matches[i].size()) - MPI_Send(&fem_matches[i][0], fem_sizes[i], MPI_UNSIGNED, procs_overlapping_fem_domain[i], comm_tag+11, _communicator.get()); + MPI_Send(&fem_matches[i][0], + fem_sizes[i], + MPI_UNSIGNED, + procs_overlapping_fem_domain[i], + comm_tag + 11, + _communicator.get()); } MPI_Waitall(procs_overlapping_fem_domain.size(), &recv_request1[0], &recv_status1[0]); @@ -676,5 +805,6 @@ SPPARKSUserObject::initialSetup() for (unsigned int i = 0; i < procs_overlapping_spparks_domain.size(); ++i) for (unsigned int j = 0; j < num_remote_spparks_matches[i]; ++j) - _sending_proc_to_spparks_id[procs_overlapping_spparks_domain[i]].push_back(matched_spparks_ids[i][j]); + _sending_proc_to_spparks_id[procs_overlapping_spparks_domain[i]].push_back( + matched_spparks_ids[i][j]); } diff --git a/src/utils/DiscreteFissionPKAPDF.C b/src/utils/DiscreteFissionPKAPDF.C index 000d3b63..c97426e4 100644 --- a/src/utils/DiscreteFissionPKAPDF.C +++ b/src/utils/DiscreteFissionPKAPDF.C @@ -17,15 +17,17 @@ #include #include -DiscreteFissionPKAPDF::DiscreteFissionPKAPDF() : - DiscretePKAPDFBase(), +DiscreteFissionPKAPDF::DiscreteFissionPKAPDF() + : DiscretePKAPDFBase(), _marginal_cdf_target(MultiIndex({1})), _conditional_cdf_energy(MultiIndex({1})) { } -DiscreteFissionPKAPDF::DiscreteFissionPKAPDF(const std::vector & ZAID, const std::vector & energies, const MultiIndex & probabilities) : - DiscretePKAPDFBase(ZAID, energies), +DiscreteFissionPKAPDF::DiscreteFissionPKAPDF(const std::vector & ZAID, + const std::vector & energies, + const MultiIndex & probabilities) + : DiscretePKAPDFBase(ZAID, energies), _marginal_cdf_target(probabilities), _conditional_cdf_energy(probabilities) { @@ -60,7 +62,7 @@ DiscreteFissionPKAPDF::precomputeCDF(MultiIndex probabilities) } // Step 2: Compute cdf - for (auto target: _marginal_cdf_target) + for (auto target : _marginal_cdf_target) { index = target.first; index[0] -= 1; @@ -71,14 +73,14 @@ DiscreteFissionPKAPDF::precomputeCDF(MultiIndex probabilities) // Step 3: Renormalize to ensure that cdf[-1] == 1 index[0] = _nZA - 1; Real last_value = _marginal_cdf_target(index); - for (auto target: _marginal_cdf_target) + for (auto target : _marginal_cdf_target) target.second /= last_value; // Step 1: Compute the conditional distribution of the target w.r.t the sampled energy _conditional_cdf_energy = probabilities; // Step 2: Compute cdf - for (auto energy: _conditional_cdf_energy) + for (auto energy : _conditional_cdf_energy) { index = energy.first; index[1] -= 1; @@ -90,14 +92,14 @@ DiscreteFissionPKAPDF::precomputeCDF(MultiIndex probabilities) std::vector last_element_per_target; for (unsigned int j = 0; j < _conditional_cdf_energy.size()[0]; ++j) last_element_per_target.push_back(_conditional_cdf_energy({j, _ng - 1})); - for (auto energy: _conditional_cdf_energy) + for (auto energy : _conditional_cdf_energy) energy.second /= last_element_per_target[energy.first[0]]; } void DiscreteFissionPKAPDF::drawSample(std::vector & initial_state) const { - //resize initial_state + // resize initial_state initial_state.resize(2); // first sample the target ZAID and the energy group of the incident neutron @@ -111,7 +113,9 @@ DiscreteFissionPKAPDF::drawSample(std::vector & initial_stat // the real random variables also need to be resampled uniformly // within bin index[j] - auto neutron_energy = (_energies[sampled_indices[1]] - _energies[sampled_indices[1] + 1]) * MooseRandom::rand() + _energies[sampled_indices[1] + 1]; + auto neutron_energy = + (_energies[sampled_indices[1]] - _energies[sampled_indices[1] + 1]) * MooseRandom::rand() + + _energies[sampled_indices[1] + 1]; // pull the right fission yield table and sample Z, A, and energy auto energy = MagpieUtils::determineNeutronType(neutron_energy); @@ -123,7 +127,10 @@ DiscreteFissionPKAPDF::drawSample(std::vector & initial_stat /// check if key exists if (zaid_map.find(key) == zaid_map.end()) - mooseError("Fission product ZAID's not found for this target isotope, ", key, " at this energy, ", energy); + mooseError("Fission product ZAID's not found for this target isotope, ", + key, + " at this energy, ", + energy); if (cdf_map.find(key) == cdf_map.end()) mooseError("Sum yield not found for this target isotope, ", key, " at this energy, ", energy); @@ -163,9 +170,9 @@ DiscreteFissionPKAPDF::readFissionData(const std::vector & zaid_li for (unsigned int energy = 0; energy < MagpieUtils::NET_MAX; ++energy) { // Dummy maps - std::map > zaid_map; - std::map > cdf_map; - for (auto & zaid: zaid_list) + std::map> zaid_map; + std::map> cdf_map; + for (auto & zaid : zaid_list) { // check if $ENDF_FP_DIR is set auto path = std::getenv("ENDF_FP_DIR"); @@ -173,7 +180,8 @@ DiscreteFissionPKAPDF::readFissionData(const std::vector & zaid_li mooseError("Set $ENDF_FP_DIR to the directory holding the sum yield data files."); // check if file exists, if not continue - std::string filename = path + std::to_string(zaid) + "_" + MagpieUtils::neutronEnergyName(energy) + ".txt"; + std::string filename = + path + std::to_string(zaid) + "_" + MagpieUtils::neutronEnergyName(energy) + ".txt"; if (!MooseUtils::checkFileReadable(filename, false, false)) { // most isotopes have fission data for High but not for Fast wich is weird @@ -208,7 +216,7 @@ DiscreteFissionPKAPDF::readFissionData(const std::vector & zaid_li // renormalize to ensure that cdf[-1] == 1 unsigned int last_index = fission_probabilities.size() - 1; Real last_value = fission_probabilities[last_index]; - for (auto & probability: fission_probabilities) + for (auto & probability : fission_probabilities) probability /= last_value; // Step 4: Store std::vectors into maps diff --git a/src/utils/DiscretePKAPDF.C b/src/utils/DiscretePKAPDF.C index ccc088d7..c43b834d 100644 --- a/src/utils/DiscretePKAPDF.C +++ b/src/utils/DiscretePKAPDF.C @@ -11,8 +11,8 @@ #include "MooseRandom.h" #include "MagpieUtils.h" -DiscretePKAPDF::DiscretePKAPDF() : - DiscretePKAPDFBase(), +DiscretePKAPDF::DiscretePKAPDF() + : DiscretePKAPDFBase(), _probability_density_function(MultiIndex({1})), _marginal_cdf_mu(MultiIndex({1})), _marginal_cdf_phi(MultiIndex({1})), @@ -21,8 +21,10 @@ DiscretePKAPDF::DiscretePKAPDF() : { } -DiscretePKAPDF::DiscretePKAPDF(const std::vector & ZAID, const std::vector & energies, const MultiIndex & probabilities) : - DiscretePKAPDFBase(ZAID, energies), +DiscretePKAPDF::DiscretePKAPDF(const std::vector & ZAID, + const std::vector & energies, + const MultiIndex & probabilities) + : DiscretePKAPDFBase(ZAID, energies), _na(probabilities.size()[2]), _dphi(2.0 * libMesh::pi / _na), _np(probabilities.size()[3]), @@ -53,7 +55,7 @@ DiscretePKAPDF::precomputeCDF(MultiIndex probabilities) */ MultiIndex::size_type shape(4); MultiIndex::size_type index(4); - for (auto it: probabilities) + for (auto it : probabilities) { index = it.first; Real wt = _dmu * _dphi * (_energies[index[1]] - _energies[index[1] + 1]); @@ -78,7 +80,7 @@ DiscretePKAPDF::precomputeCDF(MultiIndex probabilities) } // Step 2: Compute cdf - for (auto zaid: _marginal_cdf_zaid) + for (auto zaid : _marginal_cdf_zaid) { index = zaid.first; index[0] -= 1; @@ -87,7 +89,7 @@ DiscretePKAPDF::precomputeCDF(MultiIndex probabilities) } // Step 3: Renormalize to ensure that cdf[-1] == 1 - for (auto zaid: _marginal_cdf_zaid) + for (auto zaid : _marginal_cdf_zaid) { index = zaid.first; index[0] = _nZA - 1; @@ -114,7 +116,7 @@ DiscretePKAPDF::precomputeCDF(MultiIndex probabilities) } // Step 2: Compute cdf - for (auto energy: _marginal_cdf_energy) + for (auto energy : _marginal_cdf_energy) { index = energy.first; index[1] -= 1; @@ -123,7 +125,7 @@ DiscretePKAPDF::precomputeCDF(MultiIndex probabilities) } // Step 3: Renormalize to ensure that cdf[-1] == 1 - for (auto energy: _marginal_cdf_energy) + for (auto energy : _marginal_cdf_energy) { index = energy.first; index[1] = _ng - 1; @@ -151,7 +153,7 @@ DiscretePKAPDF::precomputeCDF(MultiIndex probabilities) } // Step 2: Compute cdf - for (auto phi: _marginal_cdf_phi) + for (auto phi : _marginal_cdf_phi) { index = phi.first; index[2] -= 1; @@ -160,7 +162,7 @@ DiscretePKAPDF::precomputeCDF(MultiIndex probabilities) } // Step 3: Renormalize to ensure that cdf[-1] == 1 - for (auto phi: _marginal_cdf_phi) + for (auto phi : _marginal_cdf_phi) { index = phi.first; index[2] = _na - 1; @@ -174,7 +176,7 @@ DiscretePKAPDF::precomputeCDF(MultiIndex probabilities) _marginal_cdf_mu = probabilities; // Step 2: Compute cdf - for (auto mu: _marginal_cdf_mu) + for (auto mu : _marginal_cdf_mu) { index = mu.first; index[3] -= 1; @@ -183,7 +185,7 @@ DiscretePKAPDF::precomputeCDF(MultiIndex probabilities) } // Step 3: Renormalize to ensure that cdf[-1] == 1 - for (auto mu: _marginal_cdf_mu) + for (auto mu : _marginal_cdf_mu) { index = mu.first; index[3] = _np - 1; @@ -194,7 +196,7 @@ DiscretePKAPDF::precomputeCDF(MultiIndex probabilities) void DiscretePKAPDF::drawSample(std::vector & initial_state) const { - //resize initial_state + // resize initial_state initial_state.resize(1); /** @@ -214,7 +216,9 @@ DiscretePKAPDF::drawSample(std::vector & initial_state) cons // the real random variables also need to be resampled uniformly // within bin index[j] - initial_state[0]._E = (_energies[sampled_indices[1]] - _energies[sampled_indices[1] + 1]) * MooseRandom::rand() + _energies[sampled_indices[1] + 1]; + initial_state[0]._E = + (_energies[sampled_indices[1]] - _energies[sampled_indices[1] + 1]) * MooseRandom::rand() + + _energies[sampled_indices[1] + 1]; // NOTE: we need to sample the direction in this class because the direction is anisotropic Real sampled_phi = _dphi * MooseRandom::rand() + _dphi * sampled_indices[2]; @@ -237,7 +241,8 @@ DiscretePKAPDF::computeMagnitude(MultiIndex probabilities) } } -std::ostream & operator<< (std::ostream & out, const DiscretePKAPDF & pdf) +std::ostream & +operator<<(std::ostream & out, const DiscretePKAPDF & pdf) { out << "Magnitude " << pdf._magnitude << "\n"; out << "ZAIDs "; @@ -256,10 +261,10 @@ std::ostream & operator<< (std::ostream & out, const DiscretePKAPDF & pdf) { Real mu = (Real(jM) + 0.5) * pdf._dmu - 1.0; Real phi = (Real(jP) + 0.5) * pdf._dphi; - RealVectorValue omega(mu, std::cos(phi) * std::sqrt(1 - mu * mu), - std::sin(phi) * std::sqrt(1 - mu * mu)); - out << "Zaid: " << pdf._zaids[jZA] - << " Energies: [" << pdf._energies[jE + 1] << ", " << pdf._energies[jE] << "] " + RealVectorValue omega( + mu, std::cos(phi) * std::sqrt(1 - mu * mu), std::sin(phi) * std::sqrt(1 - mu * mu)); + out << "Zaid: " << pdf._zaids[jZA] << " Energies: [" << pdf._energies[jE + 1] << ", " + << pdf._energies[jE] << "] " << " phi [" << jP * pdf._dphi << ", " << (jP + 1) * pdf._dphi << "] " << " mu: [" << jM * pdf._dmu - 1.0 << ", " << (jM + 1) * pdf._dmu - 1.0 << "] " << " omega " << omega diff --git a/src/utils/DiscretePKAPDFBase.C b/src/utils/DiscretePKAPDFBase.C index 6455a22e..bd543949 100644 --- a/src/utils/DiscretePKAPDFBase.C +++ b/src/utils/DiscretePKAPDFBase.C @@ -10,20 +10,19 @@ #include "MooseError.h" #include "MooseRandom.h" - -DiscretePKAPDFBase::DiscretePKAPDFBase(const std::vector & ZAID, const std::vector & energies) : - _zaids(ZAID), - _nZA(_zaids.size()), - _energies(energies), - _ng(_energies.size() - 1) +DiscretePKAPDFBase::DiscretePKAPDFBase(const std::vector & ZAID, + const std::vector & energies) + : _zaids(ZAID), _nZA(_zaids.size()), _energies(energies), _ng(_energies.size() - 1) { } unsigned int -DiscretePKAPDFBase::sampleHelper(const MultiIndex & marginal_pdf, const MultiIndex::size_type indices) const +DiscretePKAPDFBase::sampleHelper(const MultiIndex & marginal_pdf, + const MultiIndex::size_type indices) const { if (marginal_pdf.dim() - indices.size() != 1) - mooseError("For sampling the indices vector must reduce the marginal_pdf to a one-dimensional ladder function."); + mooseError("For sampling the indices vector must reduce the marginal_pdf to a one-dimensional " + "ladder function."); MultiIndex::size_type dimension(indices.size()); for (unsigned int j = 0; j < indices.size(); ++j) dimension[j] = j; diff --git a/src/utils/MagpieUtils.C b/src/utils/MagpieUtils.C index cb8501cb..f1676eb0 100644 --- a/src/utils/MagpieUtils.C +++ b/src/utils/MagpieUtils.C @@ -14,9 +14,11 @@ #include -namespace MagpieUtils { +namespace MagpieUtils +{ -Point randomElementPoint(const Elem & el, const Point & rnd) +Point +randomElementPoint(const Elem & el, const Point & rnd) { FEType fe_type(el.default_order()); @@ -62,11 +64,11 @@ Point randomElementPoint(const Elem & el, const Point & rnd) break; // three more tets in the corners of the cube - else if (ref(0) + 1 - ref(1) + 1- ref(2) < 1) + else if (ref(0) + 1 - ref(1) + 1 - ref(2) < 1) ref = Point(ref(0), 1.0 - ref(1), 1.0 - ref(2)); - else if (1 - ref(0) + ref(1) + 1- ref(2) < 1) + else if (1 - ref(0) + ref(1) + 1 - ref(2) < 1) ref = Point(1.0 - ref(0), ref(1), 1.0 - ref(2)); - else if (1- ref(0) + 1 - ref(1) + ref(2) < 1) + else if (1 - ref(0) + 1 - ref(1) + ref(2) < 1) ref = Point(1.0 - ref(0), 1.0 - ref(1), ref(2)); // internal tet pair diff --git a/src/vectorpostprocessors/IsotopeRecoilRateSampler.C b/src/vectorpostprocessors/IsotopeRecoilRateSampler.C index f6ffe2ac..30a236cc 100644 --- a/src/vectorpostprocessors/IsotopeRecoilRateSampler.C +++ b/src/vectorpostprocessors/IsotopeRecoilRateSampler.C @@ -22,26 +22,35 @@ InputParameters validParams() { InputParameters params = validParams(); - params.addRequiredParam("target_isotope", "The isotope name that you want to get the total recoil rate for"); - params.addRequiredParam>("point_ids", "The indices of the points in neutronics_sampler"); - params.addRequiredParam("neutronics_sampler", "The neutronics sampler object that the data is retrieved from"); - params.addParam("scaling_factor", 1, "A scaling factor multiplying the isotope recoil rate"); - params.addClassDescription("Gets the total recoil rate from target_isotope at points provided in point_id contained in the neutronics_sampler"); + params.addRequiredParam( + "target_isotope", "The isotope name that you want to get the total recoil rate for"); + params.addRequiredParam>( + "point_ids", "The indices of the points in neutronics_sampler"); + params.addRequiredParam( + "neutronics_sampler", "The neutronics sampler object that the data is retrieved from"); + params.addParam( + "scaling_factor", 1, "A scaling factor multiplying the isotope recoil rate"); + params.addClassDescription("Gets the total recoil rate from target_isotope at points provided in " + "point_id contained in the neutronics_sampler"); return params; } IsotopeRecoilRateSampler::IsotopeRecoilRateSampler(const InputParameters & parameters) : GeneralVectorPostprocessor(parameters), - _target_isotope(getParam("target_isotope")), - _point_ids(getParam>("point_ids")), - _neutronics_sampler(getUserObject("neutronics_sampler")), - _scaling_factor(getPostprocessorValue("scaling_factor")), - _recoil_rates(declareVector("recoil_rates")) + _target_isotope(getParam("target_isotope")), + _point_ids(getParam>("point_ids")), + _neutronics_sampler(getUserObject("neutronics_sampler")), + _scaling_factor(getPostprocessorValue("scaling_factor")), + _recoil_rates(declareVector("recoil_rates")) { _recoil_rates.assign(_point_ids.size(), 0); for (auto & p : _point_ids) if (_neutronics_sampler.getNumberOfPoints() < p) - mooseError("The provided neutronics sampler object only has", _neutronics_sampler.getNumberOfPoints(), " points but point id ", p, " is requested"); + mooseError("The provided neutronics sampler object only has", + _neutronics_sampler.getNumberOfPoints(), + " points but point id ", + p, + " is requested"); if (!_neutronics_sampler.hasIsotope(_target_isotope)) mooseError("Target isotope ", _target_isotope, " not preset in neutronics sampler object"); @@ -51,5 +60,6 @@ void IsotopeRecoilRateSampler::execute() { for (unsigned int j = 0; j < _point_ids.size(); ++j) - _recoil_rates[j] = _scaling_factor * _neutronics_sampler.totalRecoilRate(_point_ids[j], _target_isotope); + _recoil_rates[j] = + _scaling_factor * _neutronics_sampler.totalRecoilRate(_point_ids[j], _target_isotope); } diff --git a/src/vectorpostprocessors/MyTRIMDiracResult.C b/src/vectorpostprocessors/MyTRIMDiracResult.C index b0637828..d665dcba 100644 --- a/src/vectorpostprocessors/MyTRIMDiracResult.C +++ b/src/vectorpostprocessors/MyTRIMDiracResult.C @@ -11,19 +11,21 @@ registerMooseObject("MagpieApp", MyTRIMDiracResult); -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = validParams(); - params.addRequiredParam("runner", "Name of the MyTRIMDiracRun userobject to pull data from."); + params.addRequiredParam( + "runner", "Name of the MyTRIMDiracRun userobject to pull data from."); params.addParam("ivar", "Element index"); MooseEnum defectType("VAC INT", "VAC"); params.addParam("defect", defectType, "Defect type to read out"); return params; } -MyTRIMDiracResult::MyTRIMDiracResult(const InputParameters & parameters) : - GeneralVectorPostprocessor(parameters), +MyTRIMDiracResult::MyTRIMDiracResult(const InputParameters & parameters) + : GeneralVectorPostprocessor(parameters), _mytrim(getUserObject("runner")), _ivar(getParam("ivar")), _defect(getParam("defect")), diff --git a/src/vectorpostprocessors/MyTRIMPKAEnergyHistogram.C b/src/vectorpostprocessors/MyTRIMPKAEnergyHistogram.C index c3042699..9d31652a 100644 --- a/src/vectorpostprocessors/MyTRIMPKAEnergyHistogram.C +++ b/src/vectorpostprocessors/MyTRIMPKAEnergyHistogram.C @@ -12,19 +12,23 @@ registerMooseObject("MagpieApp", MyTRIMPKAEnergyHistogram); -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = validParams(); - params.addClassDescription("Generate an energy histogram for the primary knock-on atom (PKA) list"); - params.addRequiredParam("rasterizer", "Name of the MyTRIMRasterizer userobject to pull data from"); + params.addClassDescription( + "Generate an energy histogram for the primary knock-on atom (PKA) list"); + params.addRequiredParam( + "rasterizer", "Name of the MyTRIMRasterizer userobject to pull data from"); params.addParam("channel_number", 50, "Number of energy channels"); - params.addRangeCheckedParam("channel_width", 5.0e6, "channel_width > 0", "Energy channel width in eV"); + params.addRangeCheckedParam( + "channel_width", 5.0e6, "channel_width > 0", "Energy channel width in eV"); return params; } -MyTRIMPKAEnergyHistogram::MyTRIMPKAEnergyHistogram(const InputParameters & params) : - GeneralVectorPostprocessor(params), +MyTRIMPKAEnergyHistogram::MyTRIMPKAEnergyHistogram(const InputParameters & params) + : GeneralVectorPostprocessor(params), _rasterizer(getUserObject("rasterizer")), _nchannels(getParam("channel_number")), _deltaE(getParam("channel_width")), diff --git a/src/vectorpostprocessors/MyTRIMPKAStatistics.C b/src/vectorpostprocessors/MyTRIMPKAStatistics.C index d5ad6a03..3006a4f9 100644 --- a/src/vectorpostprocessors/MyTRIMPKAStatistics.C +++ b/src/vectorpostprocessors/MyTRIMPKAStatistics.C @@ -12,19 +12,23 @@ registerMooseObject("MagpieApp", MyTRIMPKAStatistics); -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = validParams(); - params.addClassDescription("Compile a table of the number of PKA with the same value of a chosen property (e.g. a mass histogram)"); - params.addRequiredParam("rasterizer", "Name of the MyTRIMRasterizer userobject to pull data from"); + params.addClassDescription("Compile a table of the number of PKA with the same value of a chosen " + "property (e.g. a mass histogram)"); + params.addRequiredParam( + "rasterizer", "Name of the MyTRIMRasterizer userobject to pull data from"); MooseEnum value_type_options("MASS=0 ZAID"); - params.addParam("value_type", value_type_options, "The common property to bin the PKA set according to"); + params.addParam( + "value_type", value_type_options, "The common property to bin the PKA set according to"); return params; } -MyTRIMPKAStatistics::MyTRIMPKAStatistics(const InputParameters & params) : - GeneralVectorPostprocessor(params), +MyTRIMPKAStatistics::MyTRIMPKAStatistics(const InputParameters & params) + : GeneralVectorPostprocessor(params), _rasterizer(getUserObject("rasterizer")), _value_type(getParam("value_type").getEnum()), _property(declareVector(getParam("value_type"))), @@ -49,7 +53,8 @@ MyTRIMPKAStatistics::execute() for (auto & pka : pka_list) { const unsigned int Z = pka._Z; - const unsigned int M = std::round(pka._m);; + const unsigned int M = std::round(pka._m); + ; switch (_value_type) { @@ -87,7 +92,7 @@ MyTRIMPKAStatistics::finalize() // reconstitute the map _count_map.clear(); - for (auto & count_pair: count_flat) + for (auto & count_pair : count_flat) { auto i = _count_map.find(count_pair.first); if (i == _count_map.end()) @@ -100,7 +105,7 @@ MyTRIMPKAStatistics::finalize() // copy count map into count vector (ordering according to key is guaranteed) _property.reserve(_count_map.size()); _count.reserve(_count_map.size()); - for (auto & count_pair: _count_map) + for (auto & count_pair : _count_map) { _property.push_back(count_pair.first); _count.push_back(count_pair.second); diff --git a/src/vectorpostprocessors/PKAList.C b/src/vectorpostprocessors/PKAList.C index e277eadc..2e0ff0f3 100644 --- a/src/vectorpostprocessors/PKAList.C +++ b/src/vectorpostprocessors/PKAList.C @@ -11,16 +11,18 @@ registerMooseObject("MagpieApp", PKAList); -template<> -InputParameters validParams() +template <> +InputParameters +validParams() { InputParameters params = validParams(); - params.addRequiredParam("rasterizer", "Name of the MyTRIMRasterizer userobject that provides the PKA list."); + params.addRequiredParam( + "rasterizer", "Name of the MyTRIMRasterizer userobject that provides the PKA list."); return params; } -PKAList::PKAList(const InputParameters & parameters) : - GeneralVectorPostprocessor(parameters), +PKAList::PKAList(const InputParameters & parameters) + : GeneralVectorPostprocessor(parameters), _rasterizer(getUserObject("rasterizer")), _pka_list(_rasterizer.getPKAList()), _x(declareVector("x")), From 15cee7e9da5f97630178ac698439e3405b026df0 Mon Sep 17 00:00:00 2001 From: Daniel Schwen Date: Tue, 21 Aug 2018 11:34:49 -0600 Subject: [PATCH 2/4] Add additional documentation (#213) --- doc/content/source/mesh/MyTRIMMesh.md | 17 ++-- .../source/userobjects/MyTRIMRasterizer.md | 93 ++++++++++++------- doc/content/source/userobjects/PKAConstant.md | 13 +-- .../PKAFissionFragmentEmpirical.md | 11 +-- .../PKAFissionFragmentNeutronics.md | 47 +++++++--- .../userobjects/PKAFixedPointGenerator.md | 17 ++-- doc/content/source/userobjects/PKAFunction.md | 12 +-- .../userobjects/PKAGeneratorAlphaDecay.md | 8 -- .../source/userobjects/PKAGeneratorRecoil.md | 13 +-- doc/content/source/userobjects/PKAGun.md | 12 +-- doc/hidden.yml | 9 -- include/mesh/MyTRIMMesh.h | 8 ++ .../userobjects/PKAFissionFragmentEmpirical.h | 2 +- src/mesh/MyTRIMMesh.C | 2 + src/userobjects/PKAConstant.C | 1 + src/userobjects/PKAFissionFragmentEmpirical.C | 2 + src/userobjects/PKAFunction.C | 1 + 17 files changed, 146 insertions(+), 122 deletions(-) diff --git a/doc/content/source/mesh/MyTRIMMesh.md b/doc/content/source/mesh/MyTRIMMesh.md index 7a7e8345..c6e21e45 100644 --- a/doc/content/source/mesh/MyTRIMMesh.md +++ b/doc/content/source/mesh/MyTRIMMesh.md @@ -1,15 +1,16 @@ - - # MyTRIMMesh -!alert construction title=Undocumented Class -The MyTRIMMesh has not been documented, if you would like to contribute to MOOSE by -writing documentation, please see [/generate.md]. The content contained on this page explains -the typical documentation associated with a MooseObject; however, what is contained is ultimately -determined by what is necessary to make the documentation clear for users. - !syntax description /Mesh/MyTRIMMesh +Restricted regular orthogonal [GeneratedMesh](/GeneratedMesh.md) with equal size +level 0 elements (no bias) and EDGE2, QUAD4, or HEX8 elements only. These +restrictions allow the use of a custom super fast point locator to find elements +based on spatial locations (required for fast material property lookup in the +Binary Collision Monte Carlo stage). This mesh is also recommended for use with +the FourierTransform user object. + +The use of adaptivity is fully supported. + !syntax parameters /Mesh/MyTRIMMesh !syntax inputs /Mesh/MyTRIMMesh diff --git a/doc/content/source/userobjects/MyTRIMRasterizer.md b/doc/content/source/userobjects/MyTRIMRasterizer.md index 815284a4..96f37767 100644 --- a/doc/content/source/userobjects/MyTRIMRasterizer.md +++ b/doc/content/source/userobjects/MyTRIMRasterizer.md @@ -7,62 +7,91 @@ provided by MooseVariables specified in parameter `var` to prepare a rasterized domain on which binary collision Monte Carlo is performed. Rasterization is the process of averaging smoothly varying compositional data over each FEM mesh element. -The entries in of the `var`, `M`, and `Z` parameters are paired; we index them as $\gamma_j(\vec{r})$, $M_j$, and $Z_j$, respectively. -Loosely speaking $\gamma_j(\vec{r})$ represents the number density of isotope $j$ at point $\vec{r}$, $M_j$ is the atomic mass, and -$Z_j$ is the charge in units of $e$. +The entries in of the `var`, `M`, and `Z` parameters are paired; we index them +as $\gamma_j(\vec{r})$, $M_j$, and $Z_j$, respectively. Loosely speaking +$\gamma_j(\vec{r})$ represents the number density of isotope $j$ at point +$\vec{r}$, $M_j$ is the atomic mass, and $Z_j$ is the charge in units of $e$. + +The physical meaning of the `var` argument depends on what the user provides for +the `site_volume` parameter. `site_volume` is a material property and can vary +with space; it is denoted by $\Omega(\vec{r})$. MyTRIM computes the mass density +$\rho$ of the material by: -The physical meaning of the `var` argument depends on what the user provides for the -`site_volume` parameter. `site_volume` is a material property and can vary with space; -it is denoted by $\Omega(\vec{r})$. MyTRIM computes the mass density $\rho$ of the material by: \begin{equation} \rho = \sum\limits_{j=1}^J \frac{\gamma_j(\vec{r}) M_j}{N_A \Omega(\vec{r})}, \end{equation} -where $N_A$ is Avogadro's number. We identify $\gamma_j / \Omega$ as the number density $N_j$ defined -as the number of atoms of species $j$ per unit volume. The following choices for $\Omega$ may be usage -of the `site_volume` parameter: -$\Omega = 1$: $\gamma_j = N_j$ so that the user should store number densities in the variables specified - in `var`. +where $N_A$ is Avogadro's number. We identify $\gamma_j / \Omega$ as the number +density $N_j$ defined as the number of atoms of species $j$ per unit volume. The +following choices for $\Omega$ may be usage of the `site_volume` parameter: + +$\Omega = 1$: $\gamma_j = N_j$ so that the user should store number densities in +the variables specified in `var`. -$\Omega \equiv \text{compound volume, e.g. volume of UO}_2$: $\gamma_j$ should be the stoichiometric content of species $j$. Using the $\text{UO}_2$ example: +$\Omega \equiv \text{compound volume, e.g. volume of UO}_2$: $\gamma_j$ should +be the stoichiometric content of species $j$. Using the $\text{UO}_2$ example: $\gamma_U = 1$, $\gamma_O=2$. -$\Omega \equiv \text{average volume per atoms, i.e. } \frac{\text{volume}}{\text{number of atoms}}$: $\gamma_j$ should be the number fraction. In this case $\sum\limits_{j=1}^J \gamma_j=1$. +$\Omega \equiv \text{average volume per atoms, i.e. } +\frac{\text{volume}}{\text{number of atoms}}$: $\gamma_j$ should be the number +fraction. In this case $\sum\limits_{j=1}^J \gamma_j=1$. ## Computing the PKA list -Before performing damage cascades, the rasterizer computes the number of primary knock-on atoms (PKA) $n_{\text{PKA,l, M, Z}$ for each mesh element $l$, mass $M$ and atomic number $Z$ by: +Before performing damage cascades, the rasterizer computes the number of primary +knock-on atoms (PKA) $n_{\text{PKA,l, M, Z}$ for each mesh element $l$, mass $M$ +and atomic number $Z$ by: + \begin{equation} n_{\text{PKA},l,M,Z} = \Delta t \sum\limits_{k=1}^K p_k(A,Z) \int\limits_{V_l} dV R_k(\vec{r}), \end{equation} -where $\Delta t$ is the current time step, $k$ indexes the `PKAGenerator` objects provided in the `pka_generator` parameter, $p_k(M,Z)$ is the probability -that `PKAGenerator` $k$ produces a PKA with mass $M$ and atomic number $Z$, and $R_k(\vec{r})$ is the recoil rate of `PKAGenerator` $k$ that may depend on space. -$n_{\text{PKA},l,M,Z}$ is an integer number so it is rounded to the next higher value with a probability proportional to its truncated integer complement ($1.4$ would be $2$ with a probability of $0.4$, and $1$ with a probability of $0.6$). -The total number of PKAs is given by $n_{\text{PKA}} = \sum\limits_{l,M,Z} n_{\text{PKA},l,M,Z}$. + +where $\Delta t$ is the current time step, $k$ indexes the `PKAGenerator` +objects provided in the `pka_generator` parameter, $p_k(M,Z)$ is the probability +that `PKAGenerator` $k$ produces a PKA with mass $M$ and atomic number $Z$, and +$R_k(\vec{r})$ is the recoil rate of `PKAGenerator` $k$ that may depend on +space. $n_{\text{PKA},l,M,Z}$ is an integer number so it is rounded to the next +higher value with a probability proportional to its truncated integer complement +($1.4$ would be $2$ with a probability of $0.4$, and $1$ with a probability of +$0.6$). The total number of PKAs is given by $n_{\text{PKA}} = +\sum\limits_{l,M,Z} n_{\text{PKA},l,M,Z}$. ## Scaling PKA rates -The rasterizer provides two parameters for modifying the number of simulated PKAs without biasing the results. The parameter `max_pka_count` -limits the number of PKAs roughly to the provided integer number denoted by $n$. If the number of computed PKAs is smaller than or equal to `max_pka_count`, the parameter is ignored. If the -number of PKAs is larger than `max_pka_count`, PKAs are accepted with a probability of $n/n_{\text{PKA}}$. The actual number of PKAs is usually not identical to $n$ and is denoted by $n'$. -Any tallied result is, e.g. vacancy or interstitial densities or energy deposition, are multiplied by $n_{\text{PKA}/n'$. +The rasterizer provides two parameters for modifying the number of simulated +PKAs without biasing the results. The parameter `max_pka_count` limits the +number of PKAs roughly to the provided integer number denoted by $n$. If the +number of computed PKAs is smaller than or equal to `max_pka_count`, the +parameter is ignored. If the number of PKAs is larger than `max_pka_count`, PKAs +are accepted with a probability of $n/n_{\text{PKA}}$. The actual number of PKAs +is usually not identical to $n$ and is denoted by $n'$. Any tallied result is, +e.g. vacancy or interstitial densities or energy deposition, are multiplied by +$n_{\text{PKA}/n'$. -The parameter `recoil_rate_scaling` is a real number that is multiplied to the recoil rate $R_k(\vec{r})$. All tallied results are divided by `recoil_rate_scaling`. +The parameter `recoil_rate_scaling` is a real number that is multiplied to the +recoil rate $R_k(\vec{r})$. All tallied results are divided by +`recoil_rate_scaling`. ## Recombination -A simple model for recombination *within* damage cascades is currently implemented. A vacancy-interstitial pair is annihilated if their distance -is less than `r_rec`. Note that `r_rec` must be given in Angstrom. Recombination within damage cascades typically occurs within thermal spike areas -where sufficient energy has been deposited to displace virtually all contained atoms. In thermal spike areas the atoms are effectively in a liquid state. -Recrystallization takes place when energy has been dissipated from the thermal spike area and most Frenkel pairs annihilate. Surviving Frenkel pairs -have usually been transported out of the melted zone through collision sequences along closely packed directions. The current recombination model -does not accurately describe this physics. +A simple model for recombination *within* damage cascades is currently +implemented. A vacancy-interstitial pair is annihilated if their distance is +less than `r_rec`. Note that `r_rec` must be given in Angstrom. Recombination +within damage cascades typically occurs within thermal spike areas where +sufficient energy has been deposited to displace virtually all contained atoms. +In thermal spike areas the atoms are effectively in a liquid state. +Recrystallization takes place when energy has been dissipated from the thermal +spike area and most Frenkel pairs annihilate. Surviving Frenkel pairs have +usually been transported out of the melted zone through collision sequences +along closely packed directions. The current recombination model does not +accurately describe this physics. ## Periodic variables -If all variables in the `var` parameters are auxiliary variables, the rasterizer has to be made -aware of periodic boundaries. The user needs to provide a nonlinear variable that the desired periodic -variable apply to in the `periodic_var` parameter. +If all variables in the `var` parameters are auxiliary variables, the rasterizer +has to be made aware of periodic boundaries. The user needs to provide a +nonlinear variable that the desired periodic variable apply to in the +`periodic_var` parameter. !syntax parameters /UserObjects/MyTRIMRasterizer diff --git a/doc/content/source/userobjects/PKAConstant.md b/doc/content/source/userobjects/PKAConstant.md index 8a24eba2..36c24f42 100644 --- a/doc/content/source/userobjects/PKAConstant.md +++ b/doc/content/source/userobjects/PKAConstant.md @@ -1,19 +1,14 @@ - - # PKAConstant -!alert construction title=Undocumented Class -The PKAConstant has not been documented, if you would like to contribute to MOOSE by -writing documentation, please see [/generate.md]. The content contained on this page explains -the typical documentation associated with a MooseObject; however, what is contained is ultimately -determined by what is necessary to make the documentation clear for users. - !syntax description /UserObjects/PKAConstant +This generator will place PKAs uniformly in the domain with a random direction. +The mass, charge, and energy are constants given by the user. + !syntax parameters /UserObjects/PKAConstant !syntax inputs /UserObjects/PKAConstant -!syntax children /UserObjects/PKAConstant +!syntax children /UserObjects/PKkAConstant !bibtex bibliography diff --git a/doc/content/source/userobjects/PKAFissionFragmentEmpirical.md b/doc/content/source/userobjects/PKAFissionFragmentEmpirical.md index 9887af17..2b1cb668 100644 --- a/doc/content/source/userobjects/PKAFissionFragmentEmpirical.md +++ b/doc/content/source/userobjects/PKAFissionFragmentEmpirical.md @@ -1,15 +1,10 @@ - - # PKAFissionFragmentEmpirical -!alert construction title=Undocumented Class -The PKAFissionFragmentEmpirical has not been documented, if you would like to contribute to MOOSE by -writing documentation, please see [/generate.md]. The content contained on this page explains -the typical documentation associated with a MooseObject; however, what is contained is ultimately -determined by what is necessary to make the documentation clear for users. - !syntax description /UserObjects/PKAFissionFragmentEmpirical +Samples an empirical distribution using the MyTRIM MassInverter and EnergyInverter. +These distributions are parameterized from `insert citation here`. + !syntax parameters /UserObjects/PKAFissionFragmentEmpirical !syntax inputs /UserObjects/PKAFissionFragmentEmpirical diff --git a/doc/content/source/userobjects/PKAFissionFragmentNeutronics.md b/doc/content/source/userobjects/PKAFissionFragmentNeutronics.md index 2c4e06d0..a0cc6127 100644 --- a/doc/content/source/userobjects/PKAFissionFragmentNeutronics.md +++ b/doc/content/source/userobjects/PKAFissionFragmentNeutronics.md @@ -12,10 +12,17 @@ It is computed by: F_i(\vec{r}, \vec{\rho}) = \sum\limits_{g=1}^G N_i(\vec{r},\vec{\rho})\sigma_{f,g,i} \phi_g(\vec{r}), \end{equation} -where $\vec{r}$ is the location in the macroscopic, neutronics domain and $\vec{\rho}$ -is the location in the microscopic domain. These two locations are separated because their -scale is significantly separated by 3-4 orders of magnitude. Changes with $\vec{r}$ are -understood to be smooth changes of the average composition of the microscopic domain (orders of centimeters), while changes with $\vec{\rho}$ captures compositional changes between grains on the microscopic domain, i.e. on the orders of micro-meters. The notation of separating the spatial dependence into two scales follows homogenization theory. $N_i$ is the number density of isotope $i$, $\sigma_{f,g,i}$ is the microscopic fission cross section of isotope $i$ in group $g$, and $\phi_g$ is the scalar flux in group $g$. +where $\vec{r}$ is the location in the macroscopic, neutronics domain and +$\vec{\rho}$ is the location in the microscopic domain. These two locations are +separated because their scale is significantly separated by 3-4 orders of +magnitude. Changes with $\vec{r}$ are understood to be smooth changes of the +average composition of the microscopic domain (orders of centimeters), while +changes with $\vec{\rho}$ captures compositional changes between grains on the +microscopic domain, i.e. on the orders of micro-meters. The notation of +separating the spatial dependence into two scales follows homogenization theory. +$N_i$ is the number density of isotope $i$, $\sigma_{f,g,i}$ is the microscopic +fission cross section of isotope $i$ in group $g$, and $\phi_g$ is the scalar +flux in group $g$. Denoting the microscopic domain as $\Theta_m$ located at $\vec{r}_m$, we can define a slowly varying average of the number densities: @@ -23,35 +30,45 @@ Denoting the microscopic domain as $\Theta_m$ located at $\vec{r}_m$, we can def N_i(\vec{r}) = \frac{1}{\Theta_m} \int_{\Theta_m} N_i(\vec{r},\vec{\rho}) d\vec{\rho}. \end{equation} -$N_i(\vec{r})$ is the number density provided to neutronics calculations. The nuclide fission rates computed by the neutronics calculation is consequently the slowly varying average -given by: +$N_i(\vec{r})$ is the number density provided to neutronics calculations. The +nuclide fission rates computed by the neutronics calculation is consequently the +slowly varying average given by: \begin{equation} F_i (\vec{r}) = \sum\limits_{g=1}^G N_i(\vec{r})\sigma_{f,g,i}. \end{equation} -The `PKAFissionFragmentNeutronics` accepts the values of $F_i (\vec{r}_m)$ as the `partial_reaction_rates` parameter. -The fission rate density in the microscopic domain is computed by: +The `PKAFissionFragmentNeutronics` accepts the values of $F_i (\vec{r}_m)$ as +the `partial_reaction_rates` parameter. The fission rate density in the +microscopic domain is computed by: + \begin{equation} F_i (\vec{r}_m, \vec{\rho}) = \frac{N_i(\vec{r}_m, \vec{\rho})}{N_i(\vec{r}_m)} F_i(\vec{r}_m), \end{equation} -where $N_i(\vec{r}_m, \vec{\rho}) = \gamma_i(\vec{\rho}) / \Omega(\vec{\rho})$, $\Omega(\vec{\rho})$ is the site volume -that is provided to the `MyTRIMRasterizer` and $\gamma_i$ is the $i$-th variable provided to the `MyTRIMRasterizer's` `var` -parameter. Hence, we have: + +where $N_i(\vec{r}_m, \vec{\rho}) = \gamma_i(\vec{\rho}) / \Omega(\vec{\rho})$, +$\Omega(\vec{\rho})$ is the site volume that is provided to the +`MyTRIMRasterizer` and $\gamma_i$ is the $i$-th variable provided to the +`MyTRIMRasterizer's` `var` parameter. Hence, we have: + \begin{equation} F_i (\vec{r}_m, \vec{\rho}) = \frac{\gamma_i(\vec{\rho})}{\Omega(\vec{r}) N_i(\vec{r}_m)} F_i(\vec{r}_m), \end{equation} -`PKAFissionFragmentNeutronics` accepts the values of $N_i(\vec{r}_m)$ in the `averaged_number_densities` parameter. +`PKAFissionFragmentNeutronics` accepts the values of $N_i(\vec{r}_m)$ in the +`averaged_number_densities` parameter. -The expected number of fissions in a mesh element with index $j$ and volume $V_j$ is given by: +The expected number of fissions in a mesh element with index $j$ and volume +$V_j$ is given by: \begin{equation} C_i = \Delta t \int_{V_j} F_i (\vec{r}_m, \vec{\rho}) d\vec{\rho}. \end{equation} -Non-integer results are rounded up with a probability of the $C_i - \text{int}(C_i)$; otherwise -rounded down. Two PKAs are created from each fission event. The algorithm for sampling their type, energy, and direction of motion is described in [cite:SchunertTREATHeatSource]. +Non-integer results are rounded up with a probability of the $C_i - +\text{int}(C_i)$; otherwise rounded down. Two PKAs are created from each fission +event. The algorithm for sampling their type, energy, and direction of motion is +described in [cite:SchunertTREATHeatSource]. !syntax parameters /UserObjects/PKAFissionFragmentNeutronics diff --git a/doc/content/source/userobjects/PKAFixedPointGenerator.md b/doc/content/source/userobjects/PKAFixedPointGenerator.md index 06694d33..32837d1b 100644 --- a/doc/content/source/userobjects/PKAFixedPointGenerator.md +++ b/doc/content/source/userobjects/PKAFixedPointGenerator.md @@ -1,15 +1,16 @@ - - # PKAFixedPointGenerator -!alert construction title=Undocumented Class -The PKAFixedPointGenerator has not been documented, if you would like to contribute to MOOSE by -writing documentation, please see [/generate.md]. The content contained on this page explains -the typical documentation associated with a MooseObject; however, what is contained is ultimately -determined by what is necessary to make the documentation clear for users. - !syntax description /UserObjects/PKAFixedPointGenerator +Launches a given *number* of PKAs from a specified point. Each PKA is assigned a +random direction. For a generator with a uniform spatial distribution see +[PKAConstant](/PKAConstant.md). + +!alert note +The number of PKAs inserted by this generator is *independent* of the simulation timestep! + +For a generator with a specified PKA direction see [PKAGun](/PKAGun.md). + !syntax parameters /UserObjects/PKAFixedPointGenerator !syntax inputs /UserObjects/PKAFixedPointGenerator diff --git a/doc/content/source/userobjects/PKAFunction.md b/doc/content/source/userobjects/PKAFunction.md index ad56268b..04f802ed 100644 --- a/doc/content/source/userobjects/PKAFunction.md +++ b/doc/content/source/userobjects/PKAFunction.md @@ -1,15 +1,11 @@ - - # PKAFunction -!alert construction title=Undocumented Class -The PKAFunction has not been documented, if you would like to contribute to MOOSE by -writing documentation, please see [/generate.md]. The content contained on this page explains -the typical documentation associated with a MooseObject; however, what is contained is ultimately -determined by what is necessary to make the documentation clear for users. - !syntax description /UserObjects/PKAFunction +This generator performs similarly to [PKkAConstant](/PKAConstant.md), except +that each parameter can be a MOOOSE Function. Currently only the time variable +`t` can be used in the function expressions. + !syntax parameters /UserObjects/PKAFunction !syntax inputs /UserObjects/PKAFunction diff --git a/doc/content/source/userobjects/PKAGeneratorAlphaDecay.md b/doc/content/source/userobjects/PKAGeneratorAlphaDecay.md index a02a7117..719095e9 100644 --- a/doc/content/source/userobjects/PKAGeneratorAlphaDecay.md +++ b/doc/content/source/userobjects/PKAGeneratorAlphaDecay.md @@ -1,13 +1,5 @@ - - # PKAGeneratorAlphaDecay -!alert construction title=Undocumented Class -The PKAGeneratorAlphaDecay has not been documented, if you would like to contribute to MOOSE by -writing documentation, please see [/generate.md]. The content contained on this page explains -the typical documentation associated with a MooseObject; however, what is contained is ultimately -determined by what is necessary to make the documentation clear for users. - !syntax description /UserObjects/PKAGeneratorAlphaDecay !syntax parameters /UserObjects/PKAGeneratorAlphaDecay diff --git a/doc/content/source/userobjects/PKAGeneratorRecoil.md b/doc/content/source/userobjects/PKAGeneratorRecoil.md index 59a738bf..ef585eea 100644 --- a/doc/content/source/userobjects/PKAGeneratorRecoil.md +++ b/doc/content/source/userobjects/PKAGeneratorRecoil.md @@ -1,15 +1,12 @@ - - # PKAGeneratorRecoil -!alert construction title=Undocumented Class -The PKAGeneratorRecoil has not been documented, if you would like to contribute to MOOSE by -writing documentation, please see [/generate.md]. The content contained on this page explains -the typical documentation associated with a MooseObject; however, what is contained is ultimately -determined by what is necessary to make the documentation clear for users. - !syntax description /UserObjects/PKAGeneratorRecoil +This generator will receive a multidimensional probability distribution from a +[MultiAppNeutronicsSpectrumTransfer](/MultiAppNeutronicsSpectrumTransfer.md). +This probability distribution is sampled to insert PKAs with the right mass, +energy, and direction distribution. + !syntax parameters /UserObjects/PKAGeneratorRecoil !syntax inputs /UserObjects/PKAGeneratorRecoil diff --git a/doc/content/source/userobjects/PKAGun.md b/doc/content/source/userobjects/PKAGun.md index 6537fdc9..a5d04dd1 100644 --- a/doc/content/source/userobjects/PKAGun.md +++ b/doc/content/source/userobjects/PKAGun.md @@ -1,15 +1,11 @@ - - # PKAGun -!alert construction title=Undocumented Class -The PKAGun has not been documented, if you would like to contribute to MOOSE by -writing documentation, please see [/generate.md]. The content contained on this page explains -the typical documentation associated with a MooseObject; however, what is contained is ultimately -determined by what is necessary to make the documentation clear for users. - !syntax description /UserObjects/PKAGun +This generator can be uses to emulate SRIM/TRIM calculations. For a generator +with randomized PKA directions see +[PKAFixedPointGenerator](/PKAFixedPointGenerator.md). + !syntax parameters /UserObjects/PKAGun !syntax inputs /UserObjects/PKAGun diff --git a/doc/hidden.yml b/doc/hidden.yml index 3e91eae6..c70b4d18 100644 --- a/doc/hidden.yml +++ b/doc/hidden.yml @@ -8,7 +8,6 @@ - /Kernels/DefectAnnihilation - /Kernels/MyTRIMElementHeatSource - /Kernels/MyTRIMElementSource -- /Mesh/MyTRIMMesh - /Postprocessors/IsotopeRecoilRate - /Postprocessors/MyTRIMPKAInConeInfo - /Postprocessors/MyTRIMPKAInfo @@ -17,15 +16,7 @@ - /UserObjects/InelasticRecoil - /UserObjects/MyTRIMDiracRun - /UserObjects/MyTRIMElementRun -- /UserObjects/MyTRIMRasterizer - /UserObjects/NeutronicsSpectrumSamplerFission -- /UserObjects/PKAConstant -- /UserObjects/PKAFissionFragmentEmpirical -- /UserObjects/PKAFixedPointGenerator -- /UserObjects/PKAFunction -- /UserObjects/PKAGeneratorAlphaDecay -- /UserObjects/PKAGeneratorRecoil -- /UserObjects/PKAGun - /UserObjects/SPPARKSUserObject - /VectorPostprocessors/IsotopeRecoilRateSampler - /VectorPostprocessors/MyTRIMDiracResult diff --git a/include/mesh/MyTRIMMesh.h b/include/mesh/MyTRIMMesh.h index b1e3fefa..2f55b24e 100644 --- a/include/mesh/MyTRIMMesh.h +++ b/include/mesh/MyTRIMMesh.h @@ -17,6 +17,14 @@ class MyTRIMMesh; template <> InputParameters validParams(); +/** + * Restricted regular orthogonal generated mesh with equal size level 0 elements + * (no bias) and EDGE2, QUAD4, or HEX8 elements only. These restrictions allow + * the use of a custom super fast point locator to find elements based on spatial + * locations (required for fast material property lookup in the Binary Collision + * Monte Carlo stage). This mesh is also recommended for use with the FourierTransform + * user object. + */ class MyTRIMMesh : public GeneratedMesh { public: diff --git a/include/userobjects/PKAFissionFragmentEmpirical.h b/include/userobjects/PKAFissionFragmentEmpirical.h index 0954fa4d..899aef8f 100644 --- a/include/userobjects/PKAFissionFragmentEmpirical.h +++ b/include/userobjects/PKAFissionFragmentEmpirical.h @@ -18,7 +18,7 @@ template <> InputParameters validParams(); /** - * + * Fission fragment PKA generator usimg an empirical mass and energy distribution. */ class PKAFissionFragmentEmpirical : public PKAGeneratorBase { diff --git a/src/mesh/MyTRIMMesh.C b/src/mesh/MyTRIMMesh.C index 78e16e25..0d71879a 100644 --- a/src/mesh/MyTRIMMesh.C +++ b/src/mesh/MyTRIMMesh.C @@ -16,6 +16,8 @@ InputParameters validParams() { InputParameters params = validParams(); + params.addClassDescription( + "Regular orthogonal generated mesh with restrictions to simple elements."); params.suppressParameter("bias_x"); params.suppressParameter("bias_y"); params.suppressParameter("bias_z"); diff --git a/src/userobjects/PKAConstant.C b/src/userobjects/PKAConstant.C index 9c09f3a3..69ac7f2f 100644 --- a/src/userobjects/PKAConstant.C +++ b/src/userobjects/PKAConstant.C @@ -15,6 +15,7 @@ InputParameters validParams() { InputParameters params = validParams(); + params.addClassDescription("PKAs with constant mass, charge, energy, and rate"); params.addParam( "pka_rate", 1e-8, diff --git a/src/userobjects/PKAFissionFragmentEmpirical.C b/src/userobjects/PKAFissionFragmentEmpirical.C index b6367c9c..efe56e2b 100644 --- a/src/userobjects/PKAFissionFragmentEmpirical.C +++ b/src/userobjects/PKAFissionFragmentEmpirical.C @@ -15,6 +15,8 @@ InputParameters validParams() { InputParameters params = validParams(); + params.addClassDescription("Fission fragment PKA generator usimg an empirical mass and energy " + "distribution for LWR UO2 fuel"); params.addParam("fission_rate", 1e-8, "Fission rate per unit volume (uses mesh units defined in the " diff --git a/src/userobjects/PKAFunction.C b/src/userobjects/PKAFunction.C index 15146039..b58583b2 100644 --- a/src/userobjects/PKAFunction.C +++ b/src/userobjects/PKAFunction.C @@ -15,6 +15,7 @@ InputParameters validParams() { InputParameters params = validParams(); + params.addClassDescription("PKAs with time dependent mass, charge, energy, and rate"); params.addParam( "pka_rate", 1e-8, From 6cf12269ee8d465f774fc03ff0aa23d2c8716c86 Mon Sep 17 00:00:00 2001 From: Daniel Schwen Date: Tue, 21 Aug 2018 12:23:55 -0600 Subject: [PATCH 3/4] Fix typo (#213) --- doc/content/source/userobjects/PKAConstant.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/content/source/userobjects/PKAConstant.md b/doc/content/source/userobjects/PKAConstant.md index 36c24f42..150278eb 100644 --- a/doc/content/source/userobjects/PKAConstant.md +++ b/doc/content/source/userobjects/PKAConstant.md @@ -9,6 +9,6 @@ The mass, charge, and energy are constants given by the user. !syntax inputs /UserObjects/PKAConstant -!syntax children /UserObjects/PKkAConstant +!syntax children /UserObjects/PKAConstant !bibtex bibliography From d3891c81f9c6719bf3e3941d166d822d59b956cd Mon Sep 17 00:00:00 2001 From: Daniel Schwen Date: Tue, 21 Aug 2018 14:49:12 -0600 Subject: [PATCH 4/4] Add more docs (#213) --- doc/content/source/mesh/MyTRIMMesh.md | 2 +- .../MyTRIMPKAStatistics.md | 11 +++----- .../source/vectorpostprocessors/PKAList.md | 25 +++++++++++++------ doc/hidden.yml | 2 -- .../MyTRIMPKAStatistics.C | 6 ++--- src/vectorpostprocessors/PKAList.C | 1 + 6 files changed, 25 insertions(+), 22 deletions(-) diff --git a/doc/content/source/mesh/MyTRIMMesh.md b/doc/content/source/mesh/MyTRIMMesh.md index c6e21e45..595d96b2 100644 --- a/doc/content/source/mesh/MyTRIMMesh.md +++ b/doc/content/source/mesh/MyTRIMMesh.md @@ -7,7 +7,7 @@ level 0 elements (no bias) and EDGE2, QUAD4, or HEX8 elements only. These restrictions allow the use of a custom super fast point locator to find elements based on spatial locations (required for fast material property lookup in the Binary Collision Monte Carlo stage). This mesh is also recommended for use with -the FourierTransform user object. +the [FourierTransform](/FourierTransform.md) user object. The use of adaptivity is fully supported. diff --git a/doc/content/source/vectorpostprocessors/MyTRIMPKAStatistics.md b/doc/content/source/vectorpostprocessors/MyTRIMPKAStatistics.md index cf51992e..3181efe0 100644 --- a/doc/content/source/vectorpostprocessors/MyTRIMPKAStatistics.md +++ b/doc/content/source/vectorpostprocessors/MyTRIMPKAStatistics.md @@ -1,15 +1,10 @@ - - # MyTRIMPKAStatistics -!alert construction title=Undocumented Class -The MyTRIMPKAStatistics has not been documented, if you would like to contribute to MOOSE by -writing documentation, please see [/generate.md]. The content contained on this page explains -the typical documentation associated with a MooseObject; however, what is contained is ultimately -determined by what is necessary to make the documentation clear for users. - !syntax description /VectorPostprocessors/MyTRIMPKAStatistics +Generate a PKA histogram binned by either PKA mass or ZAID (unique identifier +built from nuclear charge and integer mass). + !syntax parameters /VectorPostprocessors/MyTRIMPKAStatistics !syntax inputs /VectorPostprocessors/MyTRIMPKAStatistics diff --git a/doc/content/source/vectorpostprocessors/PKAList.md b/doc/content/source/vectorpostprocessors/PKAList.md index 11f6a484..1c436761 100644 --- a/doc/content/source/vectorpostprocessors/PKAList.md +++ b/doc/content/source/vectorpostprocessors/PKAList.md @@ -1,15 +1,24 @@ - - # PKAList -!alert construction title=Undocumented Class -The PKAList has not been documented, if you would like to contribute to MOOSE by -writing documentation, please see [/generate.md]. The content contained on this page explains -the typical documentation associated with a MooseObject; however, what is contained is ultimately -determined by what is necessary to make the documentation clear for users. - !syntax description /VectorPostprocessors/PKAList +This vector postprocessor dumps the entire list of all primary knock-on atoms +(PKAs) generated by the active PKA generators in the current timestep. It +provides the following columns: + +| Column | Description | +| - | - | +| x | Point of origin x-coordinate | +| y | Point of origin y-coordinate | +| z | Point of origin z-coordinate | +| seed | Random number seed for the recoil cascade initiated by this PKA | +| m | PKA mass | +| Z | PKA nuclear charge | + +Note that each PKA has an assigned random number generator seed. This enables +reproducible random number generation in parallel runs, where PKAs are +distributed among multiple compute nodes. + !syntax parameters /VectorPostprocessors/PKAList !syntax inputs /VectorPostprocessors/PKAList diff --git a/doc/hidden.yml b/doc/hidden.yml index c70b4d18..1bf3fa6f 100644 --- a/doc/hidden.yml +++ b/doc/hidden.yml @@ -21,5 +21,3 @@ - /VectorPostprocessors/IsotopeRecoilRateSampler - /VectorPostprocessors/MyTRIMDiracResult - /VectorPostprocessors/MyTRIMPKAEnergyHistogram -- /VectorPostprocessors/MyTRIMPKAStatistics -- /VectorPostprocessors/PKAList diff --git a/src/vectorpostprocessors/MyTRIMPKAStatistics.C b/src/vectorpostprocessors/MyTRIMPKAStatistics.C index 3006a4f9..b84ce79a 100644 --- a/src/vectorpostprocessors/MyTRIMPKAStatistics.C +++ b/src/vectorpostprocessors/MyTRIMPKAStatistics.C @@ -70,9 +70,9 @@ MyTRIMPKAStatistics::execute() mooseError("Internal error"); } - auto i = _count_map.find(prop); - if (i == _count_map.end()) - i = _count_map.insert(_count_map.begin(), std::make_pair(prop, 1)); + auto i = _count_map.lower_bound(prop); + if (i == _count_map.end() || i->first != prop) + _count_map.emplace_hint(i, prop, 1); else i->second++; } diff --git a/src/vectorpostprocessors/PKAList.C b/src/vectorpostprocessors/PKAList.C index 2e0ff0f3..0dcda257 100644 --- a/src/vectorpostprocessors/PKAList.C +++ b/src/vectorpostprocessors/PKAList.C @@ -16,6 +16,7 @@ InputParameters validParams() { InputParameters params = validParams(); + params.addClassDescription("Dumps the entire PKA list"); params.addRequiredParam( "rasterizer", "Name of the MyTRIMRasterizer userobject that provides the PKA list."); return params;