VertexCFD  0.0-dev
VertexCFD_Closure_IncompressibleLSVOFVariableProperties.hpp
1 #ifndef VERTEXCFD_CLOSURE_INCOMPRESSIBLELSVOFVARIABLEPROPERTIES_HPP
2 #define VERTEXCFD_CLOSURE_INCOMPRESSIBLELSVOFVARIABLEPROPERTIES_HPP
3 
4 #include "utils/VertexCFD_Utils_PhaseIndex.hpp"
5 
6 #include <Panzer_Dimension.hpp>
7 #include <Panzer_Evaluator_WithBaseImpl.hpp>
8 
9 #include <Phalanx_DataLayout.hpp>
10 #include <Phalanx_Evaluator_Derived.hpp>
11 #include <Phalanx_Evaluator_WithBaseImpl.hpp>
12 #include <Phalanx_Field.hpp>
13 #include <Phalanx_FieldManager.hpp>
14 #include <Phalanx_KokkosDeviceTypes.hpp>
15 #include <Phalanx_MDField.hpp>
16 #include <Phalanx_config.hpp>
17 
18 #include <Kokkos_Core.hpp>
19 
20 #include <string>
21 
22 namespace VertexCFD
23 {
24 namespace ClosureModel
25 {
26 //---------------------------------------------------------------------------//
27 // Multi-dimension variable property evaluation for LSVOF Navier-Stokes
28 // equations
29 //---------------------------------------------------------------------------//
30 template<class EvalType, class Traits>
32  : public panzer::EvaluatorWithBaseImpl<Traits>,
33  public PHX::EvaluatorDerived<EvalType, Traits>
34 {
35  public:
36  using scalar_type = typename EvalType::ScalarT;
37  using view_layout = typename PHX::DevLayout<scalar_type>::type;
38 
40  const panzer::IntegrationRule& ir,
41  const Teuchos::ParameterList& lsvof_params,
42  const std::vector<std::string>& phase_names,
43  const bool& build_dxdts = true,
44  const std::string& field_prefix = "");
45 
46  void evaluateFields(typename Traits::EvalData workset) override;
47 
48  KOKKOS_INLINE_FUNCTION
49  void operator()(
50  const Kokkos::TeamPolicy<PHX::exec_space>::member_type& team) const;
51 
52  PHX::MDField<scalar_type, panzer::Cell, panzer::Point> _rho;
53  PHX::MDField<scalar_type, panzer::Cell, panzer::Point> _mu;
54  PHX::MDField<scalar_type, panzer::Cell, panzer::Point> _dxdt_rho;
55 
56  private:
57  bool _build_dxdts;
58  Teuchos::RCP<PHX::DataLayout> _phase_layout;
59  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point, PhaseIndex>
60  _alphas;
61  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point, PhaseIndex>
62  _dxdt_alphas;
63  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point> _alpha_n;
64  Kokkos::View<double*, view_layout, PHX::mem_space> _phase_rho;
65  Kokkos::View<double*, view_layout, PHX::mem_space> _phase_mu;
66 };
67 
68 //---------------------------------------------------------------------------//
69 
70 } // end namespace ClosureModel
71 } // end namespace VertexCFD
72 
73 #endif // end VERTEXCFD_CLOSURE_INCOMPRESSIBLELSVOFVARIABLEPROPERTIES_HPP
VertexCFD
Definition: tstMethodManufacturedSolutionBC.cpp:23
VertexCFD::ClosureModel::IncompressibleLSVOFVariableProperties
Definition: VertexCFD_Closure_IncompressibleLSVOFVariableProperties.hpp:34