VertexCFD  0.0-dev
VertexCFD_Closure_ConductionExactSolution.hpp
1 #ifndef VERTEXCFD_CLOSURE_CONDUCTIONEXACTSOLUTION_HPP
2 #define VERTEXCFD_CLOSURE_CONDUCTIONEXACTSOLUTION_HPP
3 
4 #include <Panzer_Dimension.hpp>
5 #include <Panzer_Evaluator_WithBaseImpl.hpp>
6 
7 #include <Phalanx_Evaluator_Derived.hpp>
8 #include <Phalanx_Evaluator_WithBaseImpl.hpp>
9 #include <Phalanx_FieldManager.hpp>
10 #include <Phalanx_config.hpp>
11 
12 #include <Teuchos_ParameterList.hpp>
13 
14 #include <Kokkos_Core.hpp>
15 
16 namespace VertexCFD
17 {
18 namespace ClosureModel
19 {
20 //--------------------------------------------------------------------//
21 // Conduction exact solution.
22 //--------------------------------------------------------------------//
23 
37 template<class EvalType, class Traits, int NumSpaceDim>
38 class ConductionExactSolution : public panzer::EvaluatorWithBaseImpl<Traits>,
39  public PHX::EvaluatorDerived<EvalType, Traits>
40 {
41  public:
43  using scalar_type = typename EvalType::ScalarT;
45  static constexpr int num_space_dim = NumSpaceDim;
46 
59  ConductionExactSolution(const panzer::IntegrationRule& ir,
60  const Teuchos::ParameterList& closure_params);
61 
70  void postRegistrationSetup(typename Traits::SetupData sd,
71  PHX::FieldManager<Traits>& fm) override;
72 
82  void evaluateFields(typename Traits::EvalData workset) override;
83 
92  KOKKOS_INLINE_FUNCTION
93  void operator()(
94  const Kokkos::TeamPolicy<PHX::exec_space>::member_type& team) const;
95 
100  PHX::MDField<double, panzer::Cell, panzer::Point> _lagrange_pressure;
101 
107  Kokkos::Array<PHX::MDField<double, panzer::Cell, panzer::Point>, num_space_dim>
109 
114  PHX::MDField<double, panzer::Cell, panzer::Point> _temperature;
115 
116  private:
118  int _ir_degree;
119 
121  double _q;
122 
124  double _k;
125 
127  double _T_right;
128 
130  int _ir_index;
131 
133  PHX::MDField<const double, panzer::Cell, panzer::Point, panzer::Dim> _ip_coords;
134 };
135 
136 //--------------------------------------------------------------------//
137 
138 } // namespace ClosureModel
139 } // end namespace VertexCFD
140 
141 #endif // VERTEXCFD_CLOSURE_CONDUCTIONEXACTSOLUTION_HPP
VertexCFD
Definition: tstMethodManufacturedSolutionBC.cpp:23
VertexCFD::ClosureModel::ConductionExactSolution::_temperature
PHX::MDField< double, panzer::Cell, panzer::Point > _temperature
Exact temperature field.
Definition: VertexCFD_Closure_ConductionExactSolution.hpp:114
VertexCFD::ClosureModel::ConductionExactSolution::num_space_dim
static constexpr int num_space_dim
Number of spatial dimensions (compile‑time constant).
Definition: VertexCFD_Closure_ConductionExactSolution.hpp:45
VertexCFD::ClosureModel::ConductionExactSolution::postRegistrationSetup
void postRegistrationSetup(typename Traits::SetupData sd, PHX::FieldManager< Traits > &fm) override
Perform post‑registration setup.
Definition: VertexCFD_Closure_ConductionExactSolution_impl.hpp:46
VertexCFD::ClosureModel::ConductionExactSolution::scalar_type
typename EvalType::ScalarT scalar_type
Scalar type used by the evaluation type.
Definition: VertexCFD_Closure_ConductionExactSolution.hpp:43
VertexCFD::ClosureModel::ConductionExactSolution::_lagrange_pressure
PHX::MDField< double, panzer::Cell, panzer::Point > _lagrange_pressure
Exact Lagrange pressure field.
Definition: VertexCFD_Closure_ConductionExactSolution.hpp:100
VertexCFD::ClosureModel::ConductionExactSolution::_velocity
Kokkos::Array< PHX::MDField< double, panzer::Cell, panzer::Point >, num_space_dim > _velocity
Exact velocity vector field.
Definition: VertexCFD_Closure_ConductionExactSolution.hpp:108
VertexCFD::ClosureModel::ConductionExactSolution
Evaluator providing the exact analytical solution for a steady conduction problem.
Definition: VertexCFD_Closure_ConductionExactSolution.hpp:40
VertexCFD::ClosureModel::ConductionExactSolution::ConductionExactSolution
ConductionExactSolution(const panzer::IntegrationRule &ir, const Teuchos::ParameterList &closure_params)
Constructor.
Definition: VertexCFD_Closure_ConductionExactSolution_impl.hpp:22
VertexCFD::ClosureModel::ConductionExactSolution::operator()
KOKKOS_INLINE_FUNCTION void operator()(const Kokkos::TeamPolicy< PHX::exec_space >::member_type &team) const
Kokkos functor for team‑level parallel evaluation.
Definition: VertexCFD_Closure_ConductionExactSolution_impl.hpp:67
VertexCFD::ClosureModel::ConductionExactSolution::evaluateFields
void evaluateFields(typename Traits::EvalData workset) override
Evaluate the exact solution fields on the workset.
Definition: VertexCFD_Closure_ConductionExactSolution_impl.hpp:54