VertexCFD  0.0-dev
VertexCFD_BoundaryState_ViscousGradient.hpp
1 #ifndef VERTEXCFD_BOUNDARYSTATE_VISCOUSGRADIENT_HPP
2 #define VERTEXCFD_BOUNDARYSTATE_VISCOUSGRADIENT_HPP
3 
4 #include "Panzer_PureBasis.hpp"
5 #include <Panzer_Dimension.hpp>
6 #include <Panzer_Evaluator_WithBaseImpl.hpp>
7 
8 #include <Phalanx_Evaluator_Derived.hpp>
9 #include <Phalanx_Evaluator_WithBaseImpl.hpp>
10 #include <Phalanx_FieldManager.hpp>
11 #include <Phalanx_config.hpp>
12 
13 #include <Kokkos_Core.hpp>
14 
15 namespace VertexCFD
16 {
17 namespace BoundaryCondition
18 {
19 //---------------------------------------------------------------------------//
20 template<class EvalType, class Traits>
21 class ViscousGradient : public panzer::EvaluatorWithBaseImpl<Traits>,
22  public PHX::EvaluatorDerived<EvalType, Traits>
23 {
24  public:
25  using scalar_type = typename EvalType::ScalarT;
26 
27  ViscousGradient(const panzer::IntegrationRule& ir,
28  const std::string& dof_name);
29 
30  void evaluateFields(typename Traits::EvalData workset) override;
31 
32  KOKKOS_INLINE_FUNCTION
33  void operator()(
34  const Kokkos::TeamPolicy<PHX::exec_space>::member_type& team) const;
35 
36  PHX::MDField<scalar_type, panzer::Cell, panzer::Point, panzer::Dim> _grad;
37  PHX::MDField<scalar_type, panzer::Cell, panzer::Point, panzer::Dim>
38  _scaled_grad;
39 
40  private:
41  int _num_space_dim;
42  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point> _dof;
43  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point> _bnd_dof;
44  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point> _penalty_param;
45  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point, panzer::Dim>
46  _normals;
47 };
48 
49 //---------------------------------------------------------------------------//
50 
51 } // end namespace BoundaryCondition
52 } // end namespace VertexCFD
53 
54 #endif // VERTEXCFD_BOUNDARYSTATE_VISCOUSGRADIENT_HPP
VertexCFD
Definition: tstMethodManufacturedSolutionBC.cpp:23
VertexCFD::BoundaryCondition::ViscousGradient
Definition: VertexCFD_BoundaryState_ViscousGradient.hpp:23