VertexCFD  0.0-dev
VertexCFD_Closure_GodunovPowellSource.hpp
1 #ifndef VERTEXCFD_CLOSURE_GODUNOVPOWELLSOURCE_HPP
2 #define VERTEXCFD_CLOSURE_GODUNOVPOWELLSOURCE_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 namespace VertexCFD
19 {
20 namespace ClosureModel
21 {
22 //---------------------------------------------------------------------------//
23 // Godunov-Powell source evaluation for full induction MHD
24 //---------------------------------------------------------------------------//
25 template<class EvalType, class Traits, int NumSpaceDim>
26 class GodunovPowellSource : public panzer::EvaluatorWithBaseImpl<Traits>,
27  public PHX::EvaluatorDerived<EvalType, Traits>
28 {
29  public:
30  using scalar_type = typename EvalType::ScalarT;
31  static constexpr int num_space_dim = NumSpaceDim;
32 
34  const panzer::IntegrationRule& ir,
36 
37  void evaluateFields(typename Traits::EvalData workset) override;
38 
39  KOKKOS_INLINE_FUNCTION
40  void operator()(
41  const Kokkos::TeamPolicy<PHX::exec_space>::member_type& team) const;
42 
43  Kokkos::Array<PHX::MDField<scalar_type, panzer::Cell, panzer::Point>,
44  num_space_dim>
45  _godunov_powell_momentum_source;
46 
47  Kokkos::Array<PHX::MDField<scalar_type, panzer::Cell, panzer::Point>,
48  num_space_dim>
49  _godunov_powell_induction_source;
50 
51  private:
52  double _magnetic_permeability;
53 
54  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point>
55  _divergence_total_magnetic_field;
56 
57  Kokkos::Array<PHX::MDField<const scalar_type, panzer::Cell, panzer::Point>,
58  num_space_dim>
59  _velocity;
60  PHX::MDField<const scalar_type, panzer::Cell, panzer::Point, MagneticDim>
61  _total_magnetic_field;
62 };
63 
64 //---------------------------------------------------------------------------//
65 
66 } // end namespace ClosureModel
67 } // end namespace VertexCFD
68 
69 #endif // end VERTEXCFD_CLOSURE_GODUNOVPOWELLSOURCE_HPP
VertexCFD
Definition: tstMethodManufacturedSolutionBC.cpp:23
VertexCFD::MHDProperties::FullInductionMHDProperties
Definition: VertexCFD_FullInductionMHDProperties.hpp:17
VertexCFD::ClosureModel::GodunovPowellSource
Definition: VertexCFD_Closure_GodunovPowellSource.hpp:28