Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_Integrator_BasisTimesVector.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_Integerator_BasisTimesVector_decl_hpp__
12 #define __Panzer_Integerator_BasisTimesVector_decl_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 
93  const std::string& resName,
94  const std::string& valName,
95  const panzer::BasisIRLayout& basis,
96  const panzer::IntegrationRule& ir,
97  const double& multiplier = 1,
98  const std::vector<std::string>& fmNames =
99  std::vector<std::string>());
100 
145  const Teuchos::ParameterList& p);
146 
184  const panzer::EvaluatorStyle& evalStyle,
185  const PHX::FieldTag& resTag,
186  const PHX::FieldTag& valTag,
187  const BasisDescriptor& bd,
188  const IntegrationDescriptor& id,
189  const double& multiplier = 1,
190  const std::vector<PHX::FieldTag>& multipliers =
191  std::vector<PHX::FieldTag>());
192 
204  void
206  typename Traits::SetupData sd,
208 
218  void
220  typename Traits::EvalData workset);
221 
226  template<int NUM_FIELD_MULT>
228  {
229  }; // end of struct FieldMultTag
230 
247  template<int NUM_FIELD_MULT>
248  KOKKOS_INLINE_FUNCTION
249  void
250  operator()(
251  const FieldMultTag<NUM_FIELD_MULT>& tag,
252  const typename Kokkos::TeamPolicy<FieldMultTag<NUM_FIELD_MULT>,PHX::exec_space>::member_type& team) const;
253 
254  private:
255 
267  getValidParameters() const;
268 
272  using ScalarT = typename EvalT::ScalarT;
273 
283 
289 
294 
299 
305 
312 
317  double multiplier_;
318 
323  std::vector<PHX::MDField<const ScalarT, panzer::Cell, panzer::IP>>
325 
331  Kokkos::Array<Kokkos::View<const ScalarT**, typename PHX::DevLayout<ScalarT>::type, Kokkos::MemoryUnmanaged>,3> kokkosFieldMults_;
332 
336  int numQP_;
337 
341  int numDim_;
342 
346  std::string basisName_;
347 
352  std::size_t basisIndex_;
353 
359 
360  }; // end of class Integrator_BasisTimesVector
361 
362 } // end of namespace panzer
363 
364 #endif // __Panzer_Integerator_BasisTimesVector_decl_hpp__
IntegrationDescriptor id_
The IntegrationDescriptor for the quadrature to use.
const panzer::EvaluatorStyle evalStyle_
An enum determining the behavior of this Evaluator.
Kokkos::Array< Kokkos::View< const ScalarT **, typename PHX::DevLayout< ScalarT >::type, Kokkos::MemoryUnmanaged >, 3 > kokkosFieldMults_
The PHX::View representation of the (possibly empty) list of fields that are multipliers out in front...
bool useDescriptors_
A flag indicating whether or not to use the descriptor interface.
PHX::MDField< const double, panzer::Cell, panzer::BASIS, panzer::IP, panzer::Dim > basis_
The vector basis information necessary for integration.
BasisDescriptor bd_
The BasisDescriptor for the basis to use.
EvaluatorStyle
An indication of how an Evaluator will behave.
int numQP_
The number of quadrature points for each cell.
std::size_t basisIndex_
The index in the Workset bases for our particular BasisIRLayout name.
double multiplier_
The scalar multiplier out in front of the integral ( ).
std::string basisName_
The name of the basis we&#39;re using.
Teuchos::RCP< Teuchos::ParameterList > getValidParameters() const
Get Valid Parameters.
double multiplier
The scalar multiplier out in front of the integral ( ).
KOKKOS_INLINE_FUNCTION void operator()(const FieldMultTag< NUM_FIELD_MULT > &tag, const typename Kokkos::TeamPolicy< FieldMultTag< NUM_FIELD_MULT >, PHX::exec_space >::member_type &team) const
Perform the integration.
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...
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
void evaluateFields(typename Traits::EvalData workset)
Evaluate Fields.
panzer::EvaluatorStyle evalStyle
The EvaluatorStyle of the parent Integrator_CurlBasisDotVector object.
typename EvalT::ScalarT ScalarT
The scalar type.
This empty struct allows us to optimize operator()() depending on the number of field multipliers...
void postRegistrationSetup(typename Traits::SetupData sd, PHX::FieldManager< Traits > &fm)
Post-Registration Setup.
Integrator_BasisTimesVector(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< const ScalarT, panzer::Cell, panzer::IP, panzer::Dim > vector_
A field representing the vector-valued function we&#39;re integrating ( ).
int numDim_
The dimensionality of our vector-valued fields.
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 ( ...