VertexCFD  0.0-dev
VertexCFD_BoundaryState_IncompressibleCavityLid.hpp
1 #ifndef VERTEXCFD_BOUNDARYSTATE_INCOMPRESSIBLECAVITYLID_HPP
2 #define VERTEXCFD_BOUNDARYSTATE_INCOMPRESSIBLECAVITYLID_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 BoundaryCondition
19 {
20 //---------------------------------------------------------------------------//
21 // Lid condition for 2D or 3D lid-driven cavity problem
22 //---------------------------------------------------------------------------//
23 template<class EvalType, class Traits, int NumSpaceDim>
24 class IncompressibleCavityLid : public panzer::EvaluatorWithBaseImpl<Traits>,
25  public PHX::EvaluatorDerived<EvalType, Traits>
26 {
27  public:
28  using scalar_type = typename EvalType::ScalarT;
29  static constexpr int num_space_dim = NumSpaceDim;
30 
31  IncompressibleCavityLid(const panzer::IntegrationRule& ir,
32  const Teuchos::ParameterList& fluid_params,
33  const Teuchos::ParameterList& bc_params,
34  const bool is_edac);
35 
36  void postRegistrationSetup(typename Traits::SetupData sd,
37  PHX::FieldManager<Traits>& fm) override;
38 
39  void evaluateFields(typename Traits::EvalData workset) override;
40 
41  KOKKOS_INLINE_FUNCTION
42  void operator()(
43  const Kokkos::TeamPolicy<PHX::exec_space>::member_type& team) const;
44 
45  public:
46  PHX::MDField<scalar_type, panzer::Cell, panzer::Point>
47  _boundary_lagrange_pressure;
48  PHX::MDField<scalar_type, panzer::Cell, panzer::Point, panzer::Dim>
49  _boundary_grad_lagrange_pressure;
50  PHX::MDField<scalar_type, panzer::Cell, panzer::Point> _boundary_temperature;
51  PHX::MDField<scalar_type, panzer::Cell, panzer::Point, panzer::Dim>
52  _boundary_grad_temperature;
53  Kokkos::Array<PHX::MDField<scalar_type, panzer::Cell, panzer::Point>,
54  num_space_dim>
55  _boundary_velocity;
56 
57  Kokkos::Array<
58  PHX::MDField<scalar_type, panzer::Cell, panzer::Point, panzer::Dim>,
59  num_space_dim>
60  _boundary_grad_velocity;
61 
62  private:
63  int _ir_degree;
64  int _ir_index;
65 
66  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point> _lagrange_pressure;
67  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point, panzer::Dim>
68  _grad_lagrange_pressure;
69  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point, panzer::Dim>
70  _grad_temperature;
71 
72  Kokkos::Array<
73  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point, panzer::Dim>,
74  num_space_dim>
75  _grad_velocity;
76 
77  PHX::MDField<const double, panzer::Cell, panzer::Point, panzer::Dim> _ip_coords;
78 
79  bool _solve_temp;
80  bool _is_edac;
81  int _wall_dir;
82  int _vel_dir;
83  double _h;
84  double _u_wall;
85  double _T_bc;
86 };
87 
88 //---------------------------------------------------------------------------//
89 
90 } // end namespace BoundaryCondition
91 } // end namespace VertexCFD
92 
93 #endif // VERTEXCFD_BOUNDARYSTATE_INCOMPRESSIBLECAVITYLID_HPP
VertexCFD
Definition: tstMethodManufacturedSolutionBC.cpp:23
VertexCFD::BoundaryCondition::IncompressibleCavityLid
Definition: VertexCFD_BoundaryState_IncompressibleCavityLid.hpp:26