VertexCFD  0.0-dev
VertexCFD_Closure_IncompressibleLSVOFSurfaceTensionForce.hpp
1 #ifndef VERTEXCFD_CLOSURE_INCOMPRESSIBLELSVOFSURFACETENSIONFORCE_HPP
2 #define VERTEXCFD_CLOSURE_INCOMPRESSIBLELSVOFSURFACETENSIONFORCE_HPP
3 
4 #include "utils/VertexCFD_Utils_Constants.hpp"
5 
6 #include <Panzer_Dimension.hpp>
7 #include <Panzer_Evaluator_WithBaseImpl.hpp>
8 
9 #include <Phalanx_Evaluator_Derived.hpp>
10 #include <Phalanx_Evaluator_WithBaseImpl.hpp>
11 #include <Phalanx_FieldManager.hpp>
12 #include <Phalanx_config.hpp>
13 
14 #include <Kokkos_Core.hpp>
15 
16 #include <string>
17 
18 namespace VertexCFD
19 {
20 namespace ClosureModel
21 {
22 //---------------------------------------------------------------------------//
23 // Multi-dimension evaluation for LSVOF surface tension force
24 //---------------------------------------------------------------------------//
25 template<class EvalType, class Traits, int NumSpaceDim>
27  : public panzer::EvaluatorWithBaseImpl<Traits>,
28  public PHX::EvaluatorDerived<EvalType, Traits>
29 {
30  public:
31  using scalar_type = typename EvalType::ScalarT;
32  static constexpr int num_space_dim = NumSpaceDim;
33 
35  const panzer::IntegrationRule& ir,
36  const Teuchos::ParameterList& closure_params,
37  const std::vector<std::string>& phase_names,
38  const std::string& flux_prefix = "",
39  const std::string& gradient_prefix = "");
40 
41  void evaluateFields(typename Traits::EvalData workset) override;
42 
43  KOKKOS_INLINE_FUNCTION
44  void operator()(
45  const Kokkos::TeamPolicy<PHX::exec_space>::member_type& team) const;
46 
47  public:
48  Kokkos::Array<
49  PHX::MDField<scalar_type, panzer::Cell, panzer::Point, panzer::Dim>,
50  num_space_dim>
51  _surface_tension_flux;
52 
53  private:
54  double _sigma_alpha;
55  int num_phases;
56 
57  Kokkos::Array<
58  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point, panzer::Dim>,
59  VertexCFD::Constants::MAX_NUM_VIEW>
60  _phase_grad;
61 
63  using scratch_view
64  = Kokkos::View<scalar_type*,
65  typename PHX::DevLayout<scalar_type>::type,
66  typename PHX::exec_space::scratch_memory_space,
67  Kokkos::MemoryUnmanaged>;
68 
69  using scratch_view_Fs
70  = Kokkos::View<scalar_type*,
71  typename PHX::DevLayout<scalar_type>::type,
72  typename PHX::exec_space::scratch_memory_space,
73  Kokkos::MemoryUnmanaged>;
74 
75  using scratch_view_normal
76  = Kokkos::View<scalar_type**,
77  typename PHX::DevLayout<scalar_type>::type,
78  typename PHX::exec_space::scratch_memory_space,
79  Kokkos::MemoryUnmanaged>;
80 };
81 
82 //---------------------------------------------------------------------------//
83 
84 } // end namespace ClosureModel
85 } // end namespace VertexCFD
86 
87 #endif // end VERTEXCFD_CLOSURE_INCOMPRESSIBLELSVOFSURFACETENSIONFORCE_HPP
VertexCFD
Definition: tstMethodManufacturedSolutionBC.cpp:23
VertexCFD::ClosureModel::IncompressibleLSVOFSurfaceTensionForce
Definition: VertexCFD_Closure_IncompressibleLSVOFSurfaceTensionForce.hpp:29