VertexCFD  0.0-dev
VertexCFD_Closure_ConductionFlux.hpp
1 #ifndef VERTEXCFD_CLOSURE_CONDUCTIONFLUX_HPP
2 #define VERTEXCFD_CLOSURE_CONDUCTIONFLUX_HPP
3 
4 #include <Panzer_Dimension.hpp>
5 #include <Panzer_Evaluator_WithBaseImpl.hpp>
6 #include <Panzer_IntegrationRule.hpp>
7 
8 #include <Phalanx_Evaluator_Derived.hpp>
9 #include <Phalanx_KokkosDeviceTypes.hpp>
10 #include <Phalanx_MDField.hpp>
11 
12 #include <Kokkos_Core.hpp>
13 
14 #include <string>
15 
16 namespace VertexCFD
17 {
18 namespace ClosureModel
19 {
20 //--------------------------------------------------------------------------//
21 // Thermal flux evaluation for conduction.
22 //--------------------------------------------------------------------------//
23 
34 template<class EvalType, class Traits>
35 class ConductionFlux : public panzer::EvaluatorWithBaseImpl<Traits>,
36  public PHX::EvaluatorDerived<EvalType, Traits>
37 {
38  public:
39  using scalar_type = typename EvalType::ScalarT;
40 
53  ConductionFlux(const panzer::IntegrationRule& ir,
54  const std::string& flux_prefix = "",
55  const std::string& gradient_prefix = "");
56 
65  void evaluateFields(typename Traits::EvalData workset) override;
66 
74  KOKKOS_INLINE_FUNCTION
75  void operator()(
76  const Kokkos::TeamPolicy<PHX::exec_space>::member_type& team) const;
77 
83  PHX::MDField<scalar_type, panzer::Cell, panzer::Point, panzer::Dim>
85 
86  private:
92  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point, panzer::Dim>
93  _grad_temperature;
94 
100  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point>
101  _thermal_conductivity;
102 
104  int _num_space_dim;
105 };
106 
107 //--------------------------------------------------------------------------//
108 
109 } // end namespace ClosureModel
110 } // end namespace VertexCFD
111 
112 #endif // end VERTEXCFD_CLOSURE_CONDUCTIONFLUX_HPP
VertexCFD
Definition: tstMethodManufacturedSolutionBC.cpp:23
VertexCFD::ClosureModel::ConductionFlux::_conduction_flux
PHX::MDField< scalar_type, panzer::Cell, panzer::Point, panzer::Dim > _conduction_flux
Field that stores the computed conductive flux.
Definition: VertexCFD_Closure_ConductionFlux.hpp:84
VertexCFD::ClosureModel::ConductionFlux
Evaluator that computes the conductive heat flux for a given temperature gradient and thermal conduc...
Definition: VertexCFD_Closure_ConductionFlux.hpp:37
VertexCFD::ClosureModel::ConductionFlux::evaluateFields
void evaluateFields(typename Traits::EvalData workset) override
Evaluate the conductive flux for each cell/point.
Definition: VertexCFD_Closure_ConductionFlux_impl.hpp:33
VertexCFD::ClosureModel::ConductionFlux::ConductionFlux
ConductionFlux(const panzer::IntegrationRule &ir, const std::string &flux_prefix="", const std::string &gradient_prefix="")
Constructor.
Definition: VertexCFD_Closure_ConductionFlux_impl.hpp:12
VertexCFD::ClosureModel::ConductionFlux::operator()
KOKKOS_INLINE_FUNCTION void operator()(const Kokkos::TeamPolicy< PHX::exec_space >::member_type &team) const
Kokkos functor invoked for a team of threads.
Definition: VertexCFD_Closure_ConductionFlux_impl.hpp:43