VertexCFD  0.0-dev
VertexCFD_Closure_RADReaction.hpp
1 #ifndef VERTEXCFD_CLOSURE_RADREACTION_HPP
2 #define VERTEXCFD_CLOSURE_RADREACTION_HPP
3 
4 #include "rad_solver/species_properties/VertexCFD_ConstantSpeciesProperties.hpp"
5 #include "utils/VertexCFD_Utils_Constants.hpp"
6 
7 #include <Panzer_Dimension.hpp>
8 #include <Panzer_Evaluator_WithBaseImpl.hpp>
9 
10 #include <Phalanx_Evaluator_Derived.hpp>
11 #include <Phalanx_Evaluator_WithBaseImpl.hpp>
12 #include <Phalanx_FieldManager.hpp>
13 #include <Phalanx_config.hpp>
14 
15 #include <Kokkos_Core.hpp>
16 
17 #include <string>
18 
19 namespace VertexCFD
20 {
21 namespace ClosureModel
22 {
23 //---------------------------------------------------------------------------//
24 // Reaction term for the RAD equation
25 //---------------------------------------------------------------------------//
26 template<class EvalType, class Traits>
27 class RADReaction : public panzer::EvaluatorWithBaseImpl<Traits>,
28  public PHX::EvaluatorDerived<EvalType, Traits>
29 {
30  public:
31  using scalar_type = typename EvalType::ScalarT;
32 
33  RADReaction(const panzer::IntegrationRule& ir,
35  const std::string& neutron_flux_name);
36 
37  void evaluateFields(typename Traits::EvalData workset) override;
38 
39  KOKKOS_INLINE_FUNCTION
40  void operator()(
41  const Kokkos::TeamPolicy<PHX::exec_space>::member_type& team) const;
42 
43  private:
44  int _num_species;
45 
46  public:
47  Kokkos::Array<PHX::MDField<scalar_type, panzer::Cell, panzer::Point>,
48  VertexCFD::Constants::MAX_NUM_VIEW>
49  _reaction_term;
50 
51  private:
52  Kokkos::Array<PHX::MDField<const scalar_type, panzer::Cell, panzer::Point>,
53  VertexCFD::Constants::MAX_NUM_VIEW>
54  _species;
55  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point> _neutron_flux;
56  Kokkos::View<double**, Kokkos::LayoutLeft, PHX::mem_space> _bateman_matrix;
57  Kokkos::View<double**, Kokkos::LayoutLeft, PHX::mem_space> _mic_cross_section;
58 
59  bool _build_bateman;
60  bool _build_transmutation;
61 };
62 
63 //---------------------------------------------------------------------------//
64 
65 } // end namespace ClosureModel
66 } // end namespace VertexCFD
67 
68 #endif // end VERTEXCFD_CLOSURE_RADREACTION_HPP
VertexCFD
Definition: tstMethodManufacturedSolutionBC.cpp:23
VertexCFD::ClosureModel::RADReaction
Definition: VertexCFD_Closure_RADReaction.hpp:29
VertexCFD::SpeciesProperties::ConstantSpeciesProperties
Definition: VertexCFD_ConstantSpeciesProperties.hpp:17