Line data Source code
1 : /**********************************************************************/ 2 : /* DO NOT MODIFY THIS HEADER */ 3 : /* MAGPIE - Mesoscale Atomistic Glue Program for Integrated Execution */ 4 : /* */ 5 : /* Copyright 2017 Battelle Energy Alliance, LLC */ 6 : /* ALL RIGHTS RESERVED */ 7 : /**********************************************************************/ 8 : 9 : #pragma once 10 : 11 : #include "PKAGeneratorBase.h" 12 : 13 : /** 14 : * This PKAGenerator allows starting particles from a single 15 : * point within the domain. 16 : */ 17 : class PKAFixedPointGenerator : public PKAGeneratorBase 18 : { 19 : public: 20 : static InputParameters validParams(); 21 : 22 : PKAFixedPointGenerator(const InputParameters & parameters); 23 : 24 : virtual void appendPKAs(std::vector<MyTRIM_NS::IonBase> &, 25 : const MyTRIMRasterizer::PKAParameters &, 26 : const MyTRIMRasterizer::AveragedData &) const; 27 0 : virtual void meshChanged() { updateCachedElementID(); } 28 : 29 : protected: 30 : /// provides a mean to override the angular distribution of the PKAs in derived class 31 : virtual void setDirection(MyTRIM_NS::IonBase & ion) const; 32 : 33 : /// Uses point locator to determine the element id of the elemnt _point is in 34 : virtual void updateCachedElementID(); 35 : 36 : /// number of PKAs to be started from this point 37 : const unsigned int _num_pka; 38 : 39 : /// the location from which to start PKAs 40 : const Point _point; 41 : 42 : /// PKA nuclear charge 43 : const unsigned int _Z; 44 : 45 : /// PKA mass 46 : const Real _m; 47 : 48 : /// PKA Energy (in eV) 49 : const Real _E; 50 : 51 : /// point locator to determine element pointers form locations 52 : std::unique_ptr<PointLocatorBase> _pl; 53 : 54 : /// the element id of the element containing _point 55 : dof_id_type _elem_id; 56 : };