VertexCFD  0.0-dev
VertexCFD_Closure_ElementLength.hpp
1 #ifndef VERTEXCFD_CLOSURE_ELEMENTLENGTH_HPP
2 #define VERTEXCFD_CLOSURE_ELEMENTLENGTH_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 <Kokkos_Core.hpp>
13 
14 namespace VertexCFD
15 {
16 namespace ClosureModel
17 {
18 //---------------------------------------------------------------------------//
19 // Element length (dimensional) evaluator.
20 //---------------------------------------------------------------------------//
21 template<class EvalType, class Traits>
22 class ElementLength : public panzer::EvaluatorWithBaseImpl<Traits>,
23  public PHX::EvaluatorDerived<EvalType, Traits>
24 {
25  public:
26  using scalar_type = typename EvalType::ScalarT;
27 
28  ElementLength(const panzer::IntegrationRule& ir,
29  const std::string& prefix = "");
30 
31  void evaluateFields(typename Traits::EvalData workset) override;
32 
33  KOKKOS_INLINE_FUNCTION
34  void operator()(
35  const Kokkos::TeamPolicy<PHX::exec_space>::member_type& team) const;
36 
37  public:
38  PHX::MDField<double, panzer::Cell, panzer::Point, panzer::Dim> _element_length;
39 
40  private:
41  PHX::MDField<double, panzer::Cell, panzer::BASIS, panzer::IP, panzer::Dim>
42  _grad_basis;
43 };
44 
45 //---------------------------------------------------------------------------//
46 
47 } // end namespace ClosureModel
48 } // end namespace VertexCFD
49 
50 #endif // end VERTEXCFD_CLOSURE_ELEMENTLENGTH_HPP
VertexCFD
Definition: tstMethodManufacturedSolutionBC.cpp:23
VertexCFD::ClosureModel::ElementLength
Definition: VertexCFD_Closure_ElementLength.hpp:24