Panzer Version of the Day
Loading...
Searching...
No Matches
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
18#include "Teuchos_ParameterList.hpp"
19
20#include "PanzerDiscFE_config.hpp"
21#include "Panzer_Dimension.hpp"
22#include "Panzer_Traits.hpp"
24
26
27namespace panzer {
28
29template <typename ScalarT,typename LocalOrdinalT,typename GlobalOrdinalT,typename NodeT>
30class BlockedTpetraLinearObjContainer;
31
32class GlobalIndexer;
33class BlockedDOFManager;
34
46template <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>,
51public:
52
53 GatherTangent_BlockedTpetra(const Teuchos::RCP<const BlockedDOFManager> & indexer)
54 : globalIndexer_(indexer) {}
55
56 GatherTangent_BlockedTpetra(const Teuchos::RCP<const BlockedDOFManager> & indexer,
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
66 virtual Teuchos::RCP<CloneableEvaluator> clone(const Teuchos::ParameterList & pl) const
68
69private:
70
71 // We always use RealType for gathering as we never compute derivatives for this evaluator
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
85 Teuchos::RCP<const BlockedDOFManager> globalIndexer_;
86
87 std::vector<int> fieldIds_; // field IDs needing mapping
88
90 std::vector<Teuchos::RCP<const panzer::GlobalIndexer>> fieldGlobalIndexers_;
91
94 std::vector<int> productVectorBlockIndex_;
95
96 std::vector< PHX::MDField<ScalarT,Cell,NODE> > gatherFields_;
97
98 Teuchos::RCP<std::vector<std::string> > indexerNames_;
100 std::string globalDataKey_; // what global data does this fill?
101
102 Teuchos::RCP<const BlockedTpetraLinearObjContainer<S,LO,GO,NodeT> > blockedContainer_;
103
105 PHX::View<LO**> worksetLIDs_;
106
108 std::vector<PHX::View<int*>> fieldOffsets_;
109
111};
112
113}
114
116
117// **************************************************************
118#endif
Non-templated empty base class for template managers.
Wrapper to PHX::EvaluatorWithBaseImpl that implements Panzer-specific helpers.
Gathers tangent vectors dx/dp for computing df/dx*dx/dp + df/dp into the nodal fields of the field ma...
Tpetra::CrsMatrix< S, LO, GO, NodeT > CrsMatrixType
std::vector< PHX::MDField< ScalarT, Cell, NODE > > gatherFields_
std::vector< Teuchos::RCP< const panzer::GlobalIndexer > > fieldGlobalIndexers_
Vector of global indexers, one for each field to gather, respectively.
Teuchos::RCP< const BlockedDOFManager > globalIndexer_
Teuchos::RCP< std::vector< std::string > > indexerNames_
void postRegistrationSetup(typename TRAITS::SetupData d, PHX::FieldManager< TRAITS > &vm)
std::vector< PHX::View< int * > > fieldOffsets_
Offset into the cell lids for each field.
GatherTangent_BlockedTpetra(const Teuchos::RCP< const BlockedDOFManager > &indexer)
PHX::View< LO ** > worksetLIDs_
Local indices for unknowns.
virtual Teuchos::RCP< CloneableEvaluator > clone(const Teuchos::ParameterList &pl) const
Teuchos::RCP< const BlockedTpetraLinearObjContainer< S, LO, GO, NodeT > > blockedContainer_
BlockedTpetraLinearObjContainer< S, LO, GO, NodeT > ContainerType