Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_GatherTangent_BlockedTpetra.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_TANGENT_BLOCKEDTPETRA_DECL_HPP
12 #define PANZER_EVALUATOR_GATHER_TANGENT_BLOCKEDTPETRA_DECL_HPP
13 
14 #include "Phalanx_config.hpp"
15 #include "Phalanx_Evaluator_Macros.hpp"
16 #include "Phalanx_MDField.hpp"
17 
19 
20 #include "PanzerDiscFE_config.hpp"
21 #include "Panzer_Dimension.hpp"
22 #include "Panzer_Traits.hpp"
24 
26 
27 namespace panzer {
28 
29 template <typename ScalarT,typename LocalOrdinalT,typename GlobalOrdinalT,typename NodeT>
30 class BlockedTpetraLinearObjContainer;
31 
32 class GlobalIndexer;
33 class BlockedDOFManager;
34 
46 template <typename EvalT,typename TRAITS,typename S,typename LO,typename GO,typename NodeT=panzer::TpetraNodeType>
48  : public panzer::EvaluatorWithBaseImpl<TRAITS>,
49  public PHX::EvaluatorDerived<EvalT, TRAITS>,
51 public:
52 
54  : gidIndexer_(indexer) {}
55 
57  const Teuchos::ParameterList& p);
58 
59  void postRegistrationSetup(typename TRAITS::SetupData d,
61 
62  void preEvaluate(typename TRAITS::PreEvalData d);
63 
64  void evaluateFields(typename TRAITS::EvalData d);
65 
68 
69 private:
70 
71  // We always use RealType for gathering as we never compute derivatives for this evaluator
72  //typedef typename panzer::Traits::RealType ScalarT;
73  typedef typename EvalT::ScalarT ScalarT;
74 
76  typedef Tpetra::Vector<S,LO,GO,NodeT> VectorType;
77  typedef Tpetra::CrsMatrix<S,LO,GO,NodeT> CrsMatrixType;
78  typedef Tpetra::CrsGraph<LO,GO,NodeT> CrsGraphType;
79  typedef Tpetra::Map<LO,GO,NodeT> MapType;
80  typedef Tpetra::Import<LO,GO,NodeT> ImportType;
81  typedef Tpetra::Export<LO,GO,NodeT> ExportType;
82 
83  // maps the local (field,element,basis) triplet to a global ID
84  // for scattering
86 
87  std::vector<int> fieldIds_; // field IDs needing mapping
88 
89  std::vector< PHX::MDField<ScalarT,Cell,NODE> > gatherFields_;
90 
93  std::string globalDataKey_; // what global data does this fill?
94 
96 
98 };
99 
100 }
101 
103 
104 // **************************************************************
105 #endif
Teuchos::RCP< std::vector< std::string > > indexerNames_
BlockedTpetraLinearObjContainer< S, LO, GO, NodeT > ContainerType
GatherTangent_BlockedTpetra(const Teuchos::RCP< const BlockedDOFManager > &indexer)
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Tpetra::CrsMatrix< S, LO, GO, NodeT > CrsMatrixType
void postRegistrationSetup(typename TRAITS::SetupData d, PHX::FieldManager< TRAITS > &vm)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Teuchos::RCP< const BlockedDOFManager > gidIndexer_
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
std::vector< PHX::MDField< ScalarT, Cell, NODE > > gatherFields_
Teuchos::RCP< const BlockedTpetraLinearObjContainer< S, LO, GO, NodeT > > blockedContainer_
Gathers tangent vectors dx/dp for computing df/dx*dx/dp + df/dp into the nodal fields of the field ma...
Non-templated empty base class for template managers.