Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_Integrator_BasisTimesScalar.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_BASISTIMESSCALAR_HPP
12 #define PANZER_INTEGRATOR_BASISTIMESSCALAR_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 {
47  template<typename EvalT, typename Traits>
49  :
50  public panzer::EvaluatorWithBaseImpl<Traits>,
51  public PHX::EvaluatorDerived<EvalT, Traits>
52  {
53  public:
54 
91  const std::string& resName,
92  const std::string& valName,
93  const panzer::BasisIRLayout& basis,
94  const panzer::IntegrationRule& ir,
95  const double& multiplier = 1,
96  const std::vector<std::string>& fmNames =
97  std::vector<std::string>());
98 
143  const Teuchos::ParameterList& p);
144 
155  void
157  typename Traits::SetupData sd,
159 
169  void
171  typename Traits::EvalData workset);
172 
177  template<int NUM_FIELD_MULT>
179  {
180  }; // end of struct FieldMultTag
181 
197  template<int NUM_FIELD_MULT>
198  KOKKOS_INLINE_FUNCTION
199  void
200  operator()(
201  const FieldMultTag<NUM_FIELD_MULT>& tag,
202  const std::size_t& cell) const;
203 
204  private:
205 
217  getValidParameters() const;
218 
222  using ScalarT = typename EvalT::ScalarT;
223 
233 
239 
245 
250  double multiplier_;
251 
256  std::vector<PHX::MDField<const ScalarT, panzer::Cell, panzer::IP>> fieldMults_;
257 
263  PHX::View<Kokkos::View<const ScalarT**, typename PHX::DevLayout<ScalarT>::type, Kokkos::MemoryUnmanaged>*> kokkosFieldMults_;
264 
268  int numQP_;
269 
273  std::string basisName_;
274 
279  std::size_t basisIndex_;
280 
285 
287  PHX::View<ScalarT*> tmp_;
289  PHX::View<ScalarT*> tmp2_;
290 
291  }; // end of class Integrator_BasisTimesScalar
292 
293 } // end of namespace panzer
294 
295 #endif // PANZER_INTEGRATOR_BASISTIMESSCALAR_HPP
PHX::View< ScalarT * > tmp2_
For storing temporaries, one value per thread.
int numQP_
The number of quadrature points for each cell.
const panzer::EvaluatorStyle evalStyle_
An enum determining the behavior of this Evaluator.
PHX::MDField< ScalarT, panzer::Cell, panzer::BASIS > field_
A field to which we&#39;ll contribute, or in which we&#39;ll store, the result of computing this integral...
std::string basisName_
The name of the basis we&#39;re using.
This empty struct allows us to optimize operator()() depending on the number of field multipliers...
PHX::View< ScalarT * > tmp_
For storing temporaries, one value per thread.
Integrator_BasisTimesScalar(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.
EvaluatorStyle
An indication of how an Evaluator will behave.
KOKKOS_INLINE_FUNCTION void operator()(const FieldMultTag< NUM_FIELD_MULT > &tag, const std::size_t &cell) const
Perform the integration.
double multiplier
The scalar multiplier out in front of the integral ( ).
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
panzer::EvaluatorStyle evalStyle
The EvaluatorStyle of the parent Integrator_CurlBasisDotVector object.
PHX::MDField< const ScalarT, panzer::Cell, panzer::IP > scalar_
A field representing the scalar function we&#39;re integrating ( ).
typename EvalT::ScalarT ScalarT
The scalar type.
void evaluateFields(typename Traits::EvalData workset)
Evaluate Fields.
std::size_t basisIndex_
The index in the Workset bases for our particular BasisIRLayout name.
PHX::View< Kokkos::View< const ScalarT **, typename PHX::DevLayout< ScalarT >::type, Kokkos::MemoryUnmanaged > * > kokkosFieldMults_
The PHX::View representation of the (possibly empty) list of fields that are multipliers out in front...
double multiplier_
The scalar multiplier out in front of the integral ( ).
void postRegistrationSetup(typename Traits::SetupData sd, PHX::FieldManager< Traits > &fm)
Post-Registration Setup.
std::vector< PHX::MDField< const ScalarT, panzer::Cell, panzer::IP > > fieldMults_
The (possibly empty) list of fields that are multipliers out in front of the integral ( ...
Teuchos::RCP< Teuchos::ParameterList > getValidParameters() const
Get Valid Parameters.
PHX::MDField< double, panzer::Cell, panzer::BASIS, panzer::IP > basis_
The scalar basis information necessary for integration.