Panzer Version of the Day
Loading...
Searching...
No Matches
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
18#include "Teuchos_ParameterList.hpp"
19
20#include "Panzer_Dimension.hpp"
21#include "Panzer_Traits.hpp"
23
25
26namespace panzer {
27
28class GlobalIndexer; //forward declaration
29
33template<typename EvalT, typename TRAITS,typename LO,typename GO>
35 : public panzer::EvaluatorWithBaseImpl<TRAITS>,
36 public PHX::EvaluatorDerived<EvalT, TRAITS>,
38
39public:
40
41 GatherOrientation(const Teuchos::RCP<const panzer::GlobalIndexer> & indexer)
42 { indexers_.push_back(indexer); }
43
44 GatherOrientation(const Teuchos::RCP<const panzer::GlobalIndexer> & indexer,
45 const Teuchos::ParameterList& p);
46
47 GatherOrientation(const std::vector<Teuchos::RCP<const GlobalIndexer>> & indexers)
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
58 virtual Teuchos::RCP<CloneableEvaluator> clone(const Teuchos::ParameterList & pl) const
59 { return Teuchos::rcp(new GatherOrientation<EvalT,TRAITS,LO,GO>(indexers_,pl)); }
60
61private:
62
63 typedef typename EvalT::ScalarT ScalarT;
64
65 // maps the local (field,element,basis) triplet to a global ID
66 // for scattering
67 Teuchos::RCP<const panzer::GlobalIndexer> globalIndexer_;
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
76 Teuchos::RCP<std::vector<std::string> > indexerNames_;
77
79};
80
81}
82
83// **************************************************************
84#endif
Non-templated empty base class for template managers.
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
Gathers orientations per field from the global indexer and stores them in the field manager.
GatherOrientation(const Teuchos::RCP< const panzer::GlobalIndexer > &indexer)
std::vector< PHX::MDField< ScalarT, Cell, NODE > > gatherFieldOrientations_
void postRegistrationSetup(typename TRAITS::SetupData d, PHX::FieldManager< TRAITS > &vm)
void evaluateFields(typename TRAITS::EvalData d)
Teuchos::RCP< const panzer::GlobalIndexer > globalIndexer_
GatherOrientation(const std::vector< Teuchos::RCP< const GlobalIndexer > > &indexers)
std::vector< Teuchos::RCP< const GlobalIndexer > > indexers_
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Teuchos::RCP< std::vector< std::string > > indexerNames_