Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_Integrator_DivBasisTimesScalar.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Panzer: A partial differential equation assembly
4 // engine for strongly coupled complex multiphysics systems
5 //
6 // Copyright 2011 NTESS and the Panzer contributors.
7 // SPDX-License-Identifier: BSD-3-Clause
8 // *****************************************************************************
9 // @HEADER
10 
11 #ifndef __Panzer_Integrator_DivBasisTimesScalar_hpp__
12 #define __Panzer_Integrator_DivBasisTimesScalar_hpp__
13 
15 //
16 // Include Files
17 //
19 
20 // C++
21 #include <string>
22 
23 // Kokkos
24 #include "Kokkos_DynRankView.hpp"
25 
26 // Panzer
29 
30 // Phalanx
31 #include "Phalanx_Evaluator_Derived.hpp"
32 #include "Phalanx_MDField.hpp"
33 
34 namespace panzer
35 {
48  template<typename EvalT, typename Traits>
50  :
51  public panzer::EvaluatorWithBaseImpl<Traits>,
52  public PHX::EvaluatorDerived<EvalT, Traits>
53  {
54  public:
55 
92  const std::string& resName,
93  const std::string& valName,
94  const panzer::BasisIRLayout& basis,
95  const panzer::IntegrationRule& ir,
96  const double& multiplier = 1,
97  const std::vector<std::string>& fmNames =
98  std::vector<std::string>());
99 
144  const Teuchos::ParameterList& p);
145 
156  void
158  typename Traits::SetupData d,
160 
170  void
172  typename Traits::EvalData d);
173 
178  template<int NUM_FIELD_MULT>
180  {
181  }; // end of struct FieldMultTag
182 
187  template<int NUM_FIELD_MULT>
189  {
190  }; // end of struct FieldMultTag
191 
207  template<int NUM_FIELD_MULT>
208  KOKKOS_INLINE_FUNCTION
209  void
210  operator()(
211  const FieldMultTag<NUM_FIELD_MULT>& tag,
212  const Kokkos::TeamPolicy<PHX::exec_space>::member_type& team) const;
213 
229  template<int NUM_FIELD_MULT>
230  KOKKOS_INLINE_FUNCTION
231  void
232  operator()(
234  const Kokkos::TeamPolicy<PHX::exec_space>::member_type& team) const;
235 
236  private:
237 
249 
253  using ScalarT = typename EvalT::ScalarT;
254 
256  using scratch_view = Kokkos::View<ScalarT* ,typename PHX::DevLayout<ScalarT>::type,typename PHX::exec_space::scratch_memory_space,Kokkos::MemoryUnmanaged>;
257 
267 
273 
279 
284  double multiplier_;
285 
290  std::vector<PHX::MDField<const ScalarT, Cell, IP>> fieldMults_;
291 
297  PHX::View<PHX::UnmanagedView<const ScalarT**>*> kokkosFieldMults_;
298 
302  std::size_t numQP_;
303 
307  std::string basisName_;
308 
313  std::size_t basisIndex_;
314 
319 
321  PHX::View<ScalarT*> tmp_;
322 
323  }; // end of class Integrator_DivBasisTimesScalar
324 
325 } // end of namespace panzer
326 
327 #endif // __Panzer_Integrator_DivBasisTimesScalar_hpp__
PHX::View< ScalarT * > tmp_
Temporary for non-shared calculations.
double multiplier_
The scalar multiplier out in front of the integral ( ).
void evaluateFields(typename Traits::EvalData d)
Evaluate Fields.
EvaluatorStyle
An indication of how an Evaluator will behave.
const panzer::EvaluatorStyle evalStyle_
An enum determining the behavior of this Evaluator.
double multiplier
The scalar multiplier out in front of the integral ( ).
std::size_t numQP_
The number of quadrature points for each cell.
PHX::MDField< const ScalarT, Cell, IP > scalar_
A field representing the scalar function we&#39;re integrating ( ).
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
panzer::EvaluatorStyle evalStyle
The EvaluatorStyle of the parent Integrator_CurlBasisDotVector object.
std::size_t basisIndex_
The index in the Workset bases for our particular BasisIRLayout name.
This empty struct allows us to optimize operator()() depending on the number of field multipliers...
KOKKOS_INLINE_FUNCTION void operator()(const FieldMultTag< NUM_FIELD_MULT > &tag, const Kokkos::TeamPolicy< PHX::exec_space >::member_type &team) const
Perform the integration. Main memory version.
PHX::MDField< ScalarT, Cell, BASIS > field_
A field to which we&#39;ll contribute, or in which we&#39;ll store, the result of computing this integral...
Teuchos::RCP< Teuchos::ParameterList > getValidParameters() const
Get Valid Parameters.
void postRegistrationSetup(typename Traits::SetupData d, PHX::FieldManager< Traits > &fm)
Post-Registration Setup.
Integrator_DivBasisTimesScalar(const panzer::EvaluatorStyle &evalStyle, const std::string &resName, const std::string &valName, const panzer::BasisIRLayout &basis, const panzer::IntegrationRule &ir, const double &multiplier=1, const std::vector< std::string > &fmNames=std::vector< std::string >())
Main Constructor.
PHX::MDField< double, panzer::Cell, panzer::BASIS, panzer::IP > basis_
The scalar basis information necessary for integration.
PHX::View< PHX::UnmanagedView< const ScalarT ** > * > kokkosFieldMults_
The PHX::View representation of the (possibly empty) list of fields that are multipliers out in front...
This empty struct allows us to optimize operator()() depending on the number of field multipliers...
std::string basisName_
The name of the basis we&#39;re using.
std::vector< PHX::MDField< const ScalarT, Cell, IP > > fieldMults_
The (possibly empty) list of fields that are multipliers out in front of the integral ( ...