VertexCFD  0.0-dev
VertexCFD_Closure_RADFissionSourceExactSolution.hpp
1 #ifndef VERTEXCFD_CLOSURE_RADFISSIONSOURCEEXACTSOLUTION_HPP
2 #define VERTEXCFD_CLOSURE_RADFISSIONSOURCEEXACTSOLUTION_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 <Teuchos_ParameterList.hpp>
16 
17 #include <Kokkos_Core.hpp>
18 
19 namespace VertexCFD
20 {
21 namespace ClosureModel
22 {
23 //---------------------------------------------------------------------------//
24 // Fission source term exact solution.
25 //---------------------------------------------------------------------------//
26 template<class EvalType, class Traits>
28  : public panzer::EvaluatorWithBaseImpl<Traits>,
29  public PHX::EvaluatorDerived<EvalType, Traits>
30 {
31  public:
32  using scalar_type = typename EvalType::ScalarT;
33 
35  const panzer::IntegrationRule& ir,
37  const Teuchos::ParameterList& closure_params);
38 
39  void evaluateFields(typename Traits::EvalData workset) override;
40 
41  KOKKOS_INLINE_FUNCTION
42  void operator()(
43  const Kokkos::TeamPolicy<PHX::exec_space>::member_type& team) const;
44 
45  private:
46  int _num_species;
47 
48  public:
49  Kokkos::Array<PHX::MDField<scalar_type, panzer::Cell, panzer::Point>,
50  VertexCFD::Constants::MAX_NUM_VIEW>
51  _exact_species;
52  PHX::MDField<scalar_type, panzer::Cell, panzer::Point> _neutron_flux;
53 
54  private:
55  double _xs;
56  double _avagadro;
57  Kokkos::View<double*, Kokkos::LayoutLeft, PHX::mem_space> _gamma;
58  double _a;
59  double _b;
60  double _kappa;
61  double _beta;
62  double _flux_amp;
63  bool _calc_flux;
64  Kokkos::Array<double, VertexCFD::Constants::MAX_NUM_VIEW> _initial_amp;
65  double _time;
66 
67  enum TmpVars
68  {
69  CONSTS,
70  CONSTC,
71  NUM_TMPS
72  };
73 
75  using scratch_view
76  = Kokkos::View<scalar_type**,
77  typename PHX::DevLayout<scalar_type>::type,
78  typename PHX::exec_space::scratch_memory_space,
79  Kokkos::MemoryUnmanaged>;
80 };
81 
82 //---------------------------------------------------------------------------//
83 
84 } // namespace ClosureModel
85 } // end namespace VertexCFD
86 
87 #endif // VERTEXCFD_CLOSURE_RADFISSIONSOURCEEXACTSOLUTION_HPP
VertexCFD
Definition: tstMethodManufacturedSolutionBC.cpp:23
VertexCFD::ClosureModel::RADFissionSourceExactSolution
Definition: VertexCFD_Closure_RADFissionSourceExactSolution.hpp:30
VertexCFD::SpeciesProperties::ConstantSpeciesProperties
Definition: VertexCFD_ConstantSpeciesProperties.hpp:17