VertexCFD  0.0-dev
VertexCFD_Closure_RADDiffusionFlux.hpp
1 #ifndef VERTEXCFD_CLOSURE_RADDIFFUSIONFLUX_HPP
2 #define VERTEXCFD_CLOSURE_RADDIFFUSIONFLUX_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 // Diffusion term for reaction advection diffusion equations
25 //---------------------------------------------------------------------------//
26 template<class EvalType, class Traits>
27 class RADDiffusionFlux : public panzer::EvaluatorWithBaseImpl<Traits>,
28  public PHX::EvaluatorDerived<EvalType, Traits>
29 {
30  public:
31  using scalar_type = typename EvalType::ScalarT;
32 
34  const panzer::IntegrationRule& ir,
36  const std::string& flux_prefix = "",
37  const std::string& gradient_prefix = "");
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  int _num_space_dim;
48 
49  public:
50  Kokkos::Array<
51  PHX::MDField<scalar_type, panzer::Cell, panzer::Point, panzer::Dim>,
52  VertexCFD::Constants::MAX_NUM_VIEW>
53  _species_flux;
54 
55  private:
56  Kokkos::Array<
57  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point, panzer::Dim>,
58  VertexCFD::Constants::MAX_NUM_VIEW>
59  _grad_species;
60 
61  double _nu;
62 };
63 
64 //---------------------------------------------------------------------------//
65 
66 } // end namespace ClosureModel
67 } // end namespace VertexCFD
68 
69 #endif // end VERTEXCFD_CLOSURE_RADDIFFUSIONFLUX_HPP
VertexCFD
Definition: tstMethodManufacturedSolutionBC.cpp:23
VertexCFD::SpeciesProperties::ConstantSpeciesProperties
Definition: VertexCFD_ConstantSpeciesProperties.hpp:17
VertexCFD::ClosureModel::RADDiffusionFlux
Definition: VertexCFD_Closure_RADDiffusionFlux.hpp:29