VertexCFD  0.0-dev
VertexCFD_Closure_IncompressibleLSVOFScalarConvectiveFlux.hpp
1 #ifndef VERTEXCFD_CLOSURE_INCOMPRESSIBLELSVOFSCALARCONVECTIVEFLUX_HPP
2 #define VERTEXCFD_CLOSURE_INCOMPRESSIBLELSVOFSCALARCONVECTIVEFLUX_HPP
3 
4 #include "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_FieldManager.hpp>
13 #include <Phalanx_config.hpp>
14 
15 #include <Kokkos_Core.hpp>
16 
17 #include <string>
18 
19 namespace VertexCFD
20 {
21 namespace ClosureModel
22 {
23 //---------------------------------------------------------------------------//
24 // Multi-dimension convective flux evaluation for LSVOF scalar equation
25 //---------------------------------------------------------------------------//
26 template<class EvalType, class Traits, int NumSpaceDim>
28  : public panzer::EvaluatorWithBaseImpl<Traits>,
29  public PHX::EvaluatorDerived<EvalType, Traits>
30 {
31  public:
32  using scalar_type = typename EvalType::ScalarT;
33  static constexpr int num_space_dim = NumSpaceDim;
34 
35  IncompressibleLSVOFScalarConvectiveFlux(const panzer::IntegrationRule& ir,
36  const int& phase_index,
37  const int& num_lsvof_dofs,
38  const std::string& equation_name,
39  const std::string& flux_prefix = "",
40  const std::string& field_prefix
41  = "");
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  public:
50  PHX::MDField<scalar_type, panzer::Cell, panzer::Point, panzer::Dim>
51  _scalar_flux;
52 
53  private:
54  int _phase_index;
55  Teuchos::RCP<PHX::DataLayout> _phase_layout;
56 
57  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point, PhaseIndex>
58  _volume_fractions;
59  Kokkos::Array<PHX::MDField<const scalar_type, panzer::Cell, panzer::Point>,
60  num_space_dim>
61  _velocity;
62 };
63 
64 //---------------------------------------------------------------------------//
65 
66 } // end namespace ClosureModel
67 } // end namespace VertexCFD
68 
69 #endif // end VERTEXCFD_CLOSURE_INCOMPRESSIBLELSVOFSCALARCONVECTIVEFLUX_HPP
VertexCFD
Definition: tstMethodManufacturedSolutionBC.cpp:23
VertexCFD::ClosureModel::IncompressibleLSVOFScalarConvectiveFlux
Definition: VertexCFD_Closure_IncompressibleLSVOFScalarConvectiveFlux.hpp:30