Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_GatherOrientation_decl.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_EVALUATOR_GATHER_ORIENTATION_DECL_HPP
12 #define PANZER_EVALUATOR_GATHER_ORIENTATION_DECL_HPP
13 
14 #include "Phalanx_config.hpp"
15 #include "Phalanx_Evaluator_Macros.hpp"
16 #include "Phalanx_MDField.hpp"
17 
19 
20 #include "Panzer_Dimension.hpp"
21 #include "Panzer_Traits.hpp"
23 
25 
26 namespace panzer {
27 
28 class GlobalIndexer; //forward declaration
29 
33 template<typename EvalT, typename TRAITS,typename LO,typename GO>
35  : public panzer::EvaluatorWithBaseImpl<TRAITS>,
36  public PHX::EvaluatorDerived<EvalT, TRAITS>,
38 
39 public:
40 
42  { indexers_.push_back(indexer); }
43 
45  const Teuchos::ParameterList& p);
46 
48  : indexers_(indexers) {}
49 
50  GatherOrientation(const std::vector<Teuchos::RCP<const GlobalIndexer>> & indexers,
51  const Teuchos::ParameterList& p);
52 
53  void postRegistrationSetup(typename TRAITS::SetupData d,
55 
56  void evaluateFields(typename TRAITS::EvalData d);
57 
60 
61 private:
62 
63  typedef typename EvalT::ScalarT ScalarT;
64 
65  // maps the local (field,element,basis) triplet to a global ID
66  // for scattering
68 
69  std::vector<Teuchos::RCP<const GlobalIndexer>> indexers_;
70 
71  std::vector<int> indexerIds_; // block index
72  std::vector<int> subFieldIds_; // sub field numbers
73 
74  std::vector< PHX::MDField<ScalarT,Cell,NODE> > gatherFieldOrientations_;
75 
77 
79 };
80 
81 }
82 
83 // **************************************************************
84 #endif
Teuchos::RCP< std::vector< std::string > > indexerNames_
Teuchos::RCP< const panzer::GlobalIndexer > globalIndexer_
GatherOrientation(const Teuchos::RCP< const panzer::GlobalIndexer > &indexer)
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
std::vector< Teuchos::RCP< const GlobalIndexer > > indexers_
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
GatherOrientation(const std::vector< Teuchos::RCP< const GlobalIndexer >> &indexers)
std::vector< PHX::MDField< ScalarT, Cell, NODE > > gatherFieldOrientations_
void evaluateFields(typename TRAITS::EvalData d)
Gathers orientations per field from the global indexer and stores them in the field manager...
void postRegistrationSetup(typename TRAITS::SetupData d, PHX::FieldManager< TRAITS > &vm)
Non-templated empty base class for template managers.