VertexCFD  0.0-dev
VertexCFD_Closure_IncompressibleLSVOFNthPhaseFraction.hpp
1 #ifndef VERTEXCFD_CLOSURE_INCOMPRESSIBLELSVOFNTHPHASEFRACTION_HPP
2 #define VERTEXCFD_CLOSURE_INCOMPRESSIBLELSVOFNTHPHASEFRACTION_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 // Evaluator for the Nth phase fraction of a multiphase system, for which
28 // there is no transport equation
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 
39  const panzer::IntegrationRule& ir,
40  const std::vector<std::string>& phase_names,
41  const std::string& field_prefix = "");
42 
43  void evaluateFields(typename Traits::EvalData workset) override;
44 
45  KOKKOS_INLINE_FUNCTION
46  void operator()(
47  const Kokkos::TeamPolicy<PHX::exec_space>::member_type& team) const;
48 
49  PHX::MDField<scalar_type, panzer::Cell, panzer::Point> _alpha_n;
50 
51  private:
52  Teuchos::RCP<PHX::DataLayout> _phase_layout;
53 
54  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point, PhaseIndex>
55  _alphas;
56 };
57 
58 //---------------------------------------------------------------------------//
59 
60 } // end namespace ClosureModel
61 } // end namespace VertexCFD
62 
63 #endif // end VERTEXCFD_CLOSURE_INCOMPRESSIBLELSVOFNTHPHASEFRACTION_HPP
VertexCFD
Definition: tstMethodManufacturedSolutionBC.cpp:23
VertexCFD::ClosureModel::IncompressibleLSVOFNthPhaseFraction
Definition: VertexCFD_Closure_IncompressibleLSVOFNthPhaseFraction.hpp:34