VertexCFD  0.0-dev
VertexCFD_Closure_ConductionTimeStepSize.hpp
1 #ifndef VERTEXCFD_CLOSURE_CONDUCTIONTIMESTEPSIZE_HPP
2 #define VERTEXCFD_CLOSURE_CONDUCTIONTIMESTEPSIZE_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 <Teuchos_ParameterList.hpp>
13 
14 namespace VertexCFD
15 {
16 namespace ClosureModel
17 {
18 //---------------------------------------------------------------------------//
27 template<class EvalType, class Traits>
28 class ConductionTimeStepSize : public panzer::EvaluatorWithBaseImpl<Traits>,
29  public PHX::EvaluatorDerived<EvalType, Traits>
30 {
31 public:
36  using scalar_type = typename EvalType::ScalarT;
37 
44  ConductionTimeStepSize(const panzer::IntegrationRule& ir);
45 
53  void evaluateFields(typename Traits::EvalData workset) override;
54 
67  KOKKOS_INLINE_FUNCTION
68  void operator()(
69  const Kokkos::TeamPolicy<PHX::exec_space>::member_type& team) const;
70 
75  PHX::MDField<scalar_type, panzer::Cell, panzer::Point> _local_dt;
76 
77 private:
79  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point>
80  _thermal_conductivity;
81 
83  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point> _specific_heat;
84 
86  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point> _solid_density;
87 
89  PHX::MDField<const double, panzer::Cell, panzer::Point, panzer::Dim>
90  _element_length;
91 };
92 
93 //---------------------------------------------------------------------------//
94 
95 } // end namespace ClosureModel
96 } // end namespace VertexCFD
97 
98 #endif // end VERTEXCFD_CLOSURE_CONDUCTIONTIMESTEPSIZE_HPP
VertexCFD
Definition: tstMethodManufacturedSolutionBC.cpp:23
VertexCFD::ClosureModel::ConductionTimeStepSize
Compute a stable time‑step size for the conduction equation.
Definition: VertexCFD_Closure_ConductionTimeStepSize.hpp:30
VertexCFD::ClosureModel::ConductionTimeStepSize::operator()
KOKKOS_INLINE_FUNCTION void operator()(const Kokkos::TeamPolicy< PHX::exec_space >::member_type &team) const
Functor invoked by Kokkos for each team of cells.
Definition: VertexCFD_Closure_ConductionTimeStepSize_impl.hpp:45
VertexCFD::ClosureModel::ConductionTimeStepSize::ConductionTimeStepSize
ConductionTimeStepSize(const panzer::IntegrationRule &ir)
Constructor.
Definition: VertexCFD_Closure_ConductionTimeStepSize_impl.hpp:12
VertexCFD::ClosureModel::ConductionTimeStepSize::evaluateFields
void evaluateFields(typename Traits::EvalData workset) override
Evaluate the time‑step size on the supplied workset.
Definition: VertexCFD_Closure_ConductionTimeStepSize_impl.hpp:34
VertexCFD::ClosureModel::ConductionTimeStepSize::_local_dt
PHX::MDField< scalar_type, panzer::Cell, panzer::Point > _local_dt
Output field: local time‑step size.
Definition: VertexCFD_Closure_ConductionTimeStepSize.hpp:75
VertexCFD::ClosureModel::ConductionTimeStepSize::scalar_type
typename EvalType::ScalarT scalar_type
Scalar type used by the evaluation type.
Definition: VertexCFD_Closure_ConductionTimeStepSize.hpp:36