VertexCFD  0.0-dev
VertexCFD_Closure_InductionConvectiveMomentumFlux.hpp
1 #ifndef VERTEXCFD_CLOSURE_INDUCTIONCONVECTIVEMOMENTUMFLUX_HPP
2 #define VERTEXCFD_CLOSURE_INDUCTIONCONVECTIVEMOMENTUMFLUX_HPP
3 
4 #include "full_induction_mhd_solver/mhd_properties/VertexCFD_FullInductionMHDProperties.hpp"
5 
6 #include "utils/VertexCFD_Utils_MagneticDim.hpp"
7 
8 #include <Panzer_Dimension.hpp>
9 #include <Panzer_Evaluator_WithBaseImpl.hpp>
10 
11 #include <Phalanx_Evaluator_Derived.hpp>
12 #include <Phalanx_Evaluator_WithBaseImpl.hpp>
13 #include <Phalanx_FieldManager.hpp>
14 #include <Phalanx_config.hpp>
15 
16 #include <Kokkos_Core.hpp>
17 
18 #include <string>
19 
20 namespace VertexCFD
21 {
22 namespace ClosureModel
23 {
24 //---------------------------------------------------------------------------//
25 // Multi-dimension induction convective flux evaluation.
26 //---------------------------------------------------------------------------//
27 template<class EvalType, class Traits, int NumSpaceDim>
29  : public panzer::EvaluatorWithBaseImpl<Traits>,
30  public PHX::EvaluatorDerived<EvalType, Traits>
31 {
32  public:
33  using scalar_type = typename EvalType::ScalarT;
34  static constexpr int num_space_dim = NumSpaceDim;
35 
37  const panzer::IntegrationRule& ir,
39  const std::string& flux_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  Kokkos::Array<
48  PHX::MDField<scalar_type, panzer::Cell, panzer::Point, panzer::Dim>,
49  num_space_dim>
50  _momentum_flux;
51 
52  private:
53  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point, MagneticDim>
54  _total_magnetic_field;
55  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point> _magnetic_pressure;
56 
57  double _magnetic_permeability;
58 };
59 
60 //---------------------------------------------------------------------------//
61 
62 } // end namespace ClosureModel
63 } // end namespace VertexCFD
64 
65 #endif // end VERTEXCFD_CLOSURE_INDUCTIONCONVECTIVEMOMENTUMFLUX_HPP
VertexCFD
Definition: tstMethodManufacturedSolutionBC.cpp:23
VertexCFD::MHDProperties::FullInductionMHDProperties
Definition: VertexCFD_FullInductionMHDProperties.hpp:17
VertexCFD::ClosureModel::InductionConvectiveMomentumFlux
Definition: VertexCFD_Closure_InductionConvectiveMomentumFlux.hpp:31