VertexCFD  0.0-dev
VertexCFD_Closure_MetricTensor.hpp
1 #ifndef VERTEXCFD_CLOSURE_METRICTENSOR_HPP
2 #define VERTEXCFD_CLOSURE_METRICTENSOR_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_FieldManager.hpp>
10 #include <Phalanx_KokkosDeviceTypes.hpp>
11 #include <Phalanx_MDField.hpp>
12 
13 #include <Kokkos_Core.hpp>
14 
15 namespace VertexCFD
16 {
17 namespace ClosureModel
18 {
19 //---------------------------------------------------------------------------//
20 template<class EvalType, class Traits>
21 class MetricTensor : public panzer::EvaluatorWithBaseImpl<Traits>,
22  public PHX::EvaluatorDerived<EvalType, Traits>
23 {
24  public:
25  using scalar_type = typename EvalType::ScalarT;
26 
27  PHX::MDField<double, panzer::Cell, panzer::Point, panzer::Dim, panzer::Dim>
28  _metric_tensor;
29 
30  MetricTensor(const panzer::IntegrationRule& ir);
31 
32  void postRegistrationSetup(typename Traits::SetupData sd,
33  PHX::FieldManager<Traits>& fm) override;
34 
35  void evaluateFields(typename Traits::EvalData workset) override;
36 
37  template<int NumSpaceDim>
38  KOKKOS_INLINE_FUNCTION void
39  operator()(std::integral_constant<int, NumSpaceDim>,
40  const int cell,
41  const int point) const;
42 
43  private:
44  const int _ir_degree;
45  const int _num_topo_dim;
46  int _ir_index;
47 
48  PHX::MDField<const double, panzer::Cell, panzer::Point, panzer::Dim, panzer::Dim>
49  _jacobian;
50 
51  Kokkos::View<double**, PHX::mem_space> _element_map;
52 };
53 
54 //---------------------------------------------------------------------------//
55 
56 } // end namespace ClosureModel
57 } // end namespace VertexCFD
58 
59 #endif // end VERTEXCFD_CLOSURE_METRICTENSOR_HPP
VertexCFD
Definition: tstMethodManufacturedSolutionBC.cpp:23
VertexCFD::ClosureModel::MetricTensor
Definition: VertexCFD_Closure_MetricTensor.hpp:23