Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_BlockedTpetraLinearObjFactory.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_BlockedTpetraLinearObjFactory_hpp__
12#define __Panzer_BlockedTpetraLinearObjFactory_hpp__
13
14#include <map>
15
16// Tpetra includes
17#include "Tpetra_Map.hpp"
18#include "Tpetra_CrsGraph.hpp"
19#include "Tpetra_FECrsGraph.hpp"
20#include "Tpetra_FECrsMatrix.hpp"
21#include "Tpetra_Import.hpp"
22#include "Tpetra_Export.hpp"
23
24#include "PanzerDiscFE_config.hpp"
32#include "Panzer_HashUtils.hpp" // for pair_hash
33
34#include "Panzer_GatherOrientation.hpp"
36#include "Panzer_GatherSolution_Tpetra.hpp"
41
42#include "Thyra_BlockedLinearOpBase.hpp"
43#include "Thyra_ProductVectorBase.hpp"
44
45#include "Teuchos_RCP.hpp"
46#include "Teuchos_DefaultMpiComm.hpp"
47#include "Teuchos_OpaqueWrapper.hpp"
48
49namespace panzer {
50
51template <typename Traits,typename ScalarT,typename LocalOrdinalT,typename GlobalOrdinalT,typename NodeT=panzer::TpetraNodeType>
53 , public ThyraObjFactory<double> {
54public:
56 typedef Tpetra::Vector<ScalarT,LocalOrdinalT,GlobalOrdinalT,NodeT> VectorType;
57 typedef Tpetra::CrsMatrix<ScalarT,LocalOrdinalT,GlobalOrdinalT,NodeT> CrsMatrixType;
58 typedef Tpetra::Operator<ScalarT,LocalOrdinalT,GlobalOrdinalT,NodeT> OperatorType;
59 typedef Tpetra::CrsGraph<LocalOrdinalT,GlobalOrdinalT,NodeT> CrsGraphType;
60 typedef Tpetra::Map<LocalOrdinalT,GlobalOrdinalT,NodeT> MapType;
61 typedef Tpetra::Import<LocalOrdinalT,GlobalOrdinalT,NodeT> ImportType;
62 typedef Tpetra::Export<LocalOrdinalT,GlobalOrdinalT,NodeT> ExportType;
63
64 typedef Tpetra::FECrsGraph<LocalOrdinalT,GlobalOrdinalT,NodeT> FECrsGraphType;
65 typedef Tpetra::FECrsMatrix<ScalarT,LocalOrdinalT,GlobalOrdinalT,NodeT> FECrsMatrixType;
66
67 typedef Thyra::TpetraVector<ScalarT,LocalOrdinalT,GlobalOrdinalT,NodeT> ThyraVector;
68 typedef Thyra::TpetraLinearOp<ScalarT,LocalOrdinalT,GlobalOrdinalT,NodeT> ThyraLinearOp;
69
70
76 BlockedTpetraLinearObjFactory(const Teuchos::RCP<const Teuchos::MpiComm<int> > & comm,
77 const Teuchos::RCP<const BlockedDOFManager> & gidProvider,
78 bool useFEAssembly = false);
79
84 BlockedTpetraLinearObjFactory(const Teuchos::RCP<const Teuchos::MpiComm<int> > & comm,
85 const std::vector<Teuchos::RCP<const panzer::GlobalIndexer>> & gidProviders,
86 bool useFEAssembly = false);
87
95 BlockedTpetraLinearObjFactory(const Teuchos::RCP<const Teuchos::MpiComm<int> > & comm,
96 const Teuchos::RCP<const GlobalIndexer> & rowProvider,
97 const Teuchos::RCP<const GlobalIndexer> & colProvider,
98 bool useFEAssembly = false);
99
101
102/*************** Linear object factory methods *******************/
103
104 virtual void readVector(const std::string & /* identifier */, LinearObjContainer & /* loc */, int /* id */) const
105 { TEUCHOS_ASSERT(false); }
106
107 virtual void writeVector(const std::string & /* identifier */, const LinearObjContainer & /* loc */, int /* id */) const
108 { TEUCHOS_ASSERT(false); }
109
110 virtual Teuchos::RCP<LinearObjContainer> buildLinearObjContainer() const;
111
112 virtual Teuchos::RCP<LinearObjContainer> buildPrimitiveLinearObjContainer() const
113 { return buildLinearObjContainer(); }
114
115 virtual Teuchos::RCP<LinearObjContainer> buildGhostedLinearObjContainer() const;
116
117 virtual Teuchos::RCP<LinearObjContainer> buildPrimitiveGhostedLinearObjContainer() const
119
120 virtual void globalToGhostContainer(const LinearObjContainer & container,
121 LinearObjContainer & ghostContainer,int) const;
122 virtual void ghostToGlobalContainer(const LinearObjContainer & ghostContainer,
123 LinearObjContainer & container,int) const;
124
131 virtual void adjustForDirichletConditions(const LinearObjContainer & localBCRows,
132 const LinearObjContainer & globalBCRows,
133 LinearObjContainer & ghostedObjs,
134 bool zeroVectorRows=false, bool adjustX = false) const;
135
139 virtual void applyDirichletBCs(const LinearObjContainer & counter,
140 LinearObjContainer & result) const;
141
146 virtual Teuchos::RCP<ReadOnlyVector_GlobalEvaluationData> buildReadOnlyDomainContainer() const;
147
148#ifdef PANZER_HAVE_EPETRA_STACK
153 virtual Teuchos::RCP<WriteVector_GlobalEvaluationData> buildWriteDomainContainer() const;
154#endif
155
157
159 template <typename EvalT>
160 Teuchos::RCP<panzer::CloneableEvaluator> buildScatter() const
161 {
162 if(!hasColProvider_)
164
165 // Non-square: the columns carry the derivative components, so the scatter
166 // needs the column indexers to place them.
168 }
169
171 template <typename EvalT>
172 Teuchos::RCP<panzer::CloneableEvaluator > buildGather() const
174
176 template <typename EvalT>
177 Teuchos::RCP<panzer::CloneableEvaluator > buildGatherTangent() const
179
181 template <typename EvalT>
182 Teuchos::RCP<panzer::CloneableEvaluator > buildGatherDomain() const
183 {
184 if(!hasColProvider_)
186
187 // A blocked column side gathers into a product vector; a flat one is a
188 // single vector, which only the non-blocked gather knows how to fill.
189 if(colBlockedDOFManager_!=Teuchos::null)
191
193 }
194
196 template <typename EvalT>
197 Teuchos::RCP<panzer::CloneableEvaluator > buildGatherOrientation() const
198 { return Teuchos::rcp(new GatherOrientation<EvalT,Traits,LocalOrdinalT,GlobalOrdinalT>(nc2c_vector(blockedDOFManager_->getFieldDOFManagers()))); }
199
201 template <typename EvalT>
209
210/*************** Generic helper functions for container setup *******************/
211
217 void initializeContainer(int,LinearObjContainer & loc) const;
218
224 void initializeContainer(int mem,BTLOC & loc) const;
225
232
238 void initializeGhostedContainer(int mem,BTLOC & loc) const;
239
240/*************** Thyra based methods *******************/
241
243 Teuchos::RCP<const Thyra::VectorSpaceBase<ScalarT> > getThyraDomainSpace() const;
244
246 Teuchos::RCP<const Thyra::VectorSpaceBase<ScalarT> > getThyraRangeSpace() const;
247
249 Teuchos::RCP<const Thyra::VectorSpaceBase<ScalarT> > getThyraDomainSpace(int blk) const;
250
252 Teuchos::RCP<const Thyra::VectorSpaceBase<ScalarT> > getThyraRangeSpace(int blk) const;
253
255 Teuchos::RCP<Thyra::VectorBase<ScalarT> > getThyraDomainVector() const;
256
258 Teuchos::RCP<Thyra::VectorBase<ScalarT> > getThyraRangeVector() const;
259
261 Teuchos::RCP<Thyra::LinearOpBase<ScalarT> > getThyraMatrix() const;
262
263 // and now the ghosted versions
264
266 Teuchos::RCP<const Thyra::VectorSpaceBase<ScalarT> > getGhostedThyraDomainSpace() const;
267
269 Teuchos::RCP<const Thyra::VectorSpaceBase<ScalarT> > getGhostedThyraRangeSpace() const;
270
272 Teuchos::RCP<Thyra::VectorBase<ScalarT> > getGhostedThyraDomainVector() const;
273
275 Teuchos::RCP<Thyra::VectorBase<ScalarT> > getGhostedThyraRangeVector() const;
276
278 Teuchos::RCP<Thyra::BlockedLinearOpBase<ScalarT> > getGhostedThyraMatrix() const;
279
280/*************** Tpetra based methods *******************/
281
283 virtual Teuchos::RCP<const MapType> getMap(int i) const;
284
286 virtual Teuchos::RCP<const MapType> getGhostedMap(int i) const;
287
289 virtual Teuchos::RCP<const CrsGraphType> getGraph(int i,int j) const;
290
292 virtual Teuchos::RCP<const CrsGraphType> getGhostedGraph(int i,int j) const;
293
295 virtual Teuchos::RCP<const ImportType> getGhostedImport(int i) const;
296
298 virtual Teuchos::RCP<const ExportType> getGhostedExport(int j) const;
299
304 virtual Teuchos::RCP<const MapType> getColMap(int i) const;
305 virtual Teuchos::RCP<const MapType> getGhostedColMap(int i) const;
306 virtual Teuchos::RCP<const ImportType> getGhostedColImport(int i) const;
307 virtual Teuchos::RCP<const ExportType> getGhostedColExport(int i) const;
308
309 Teuchos::RCP<CrsMatrixType> getTpetraMatrix(int i,int j) const;
310 Teuchos::RCP<CrsMatrixType> getGhostedTpetraMatrix(int i,int j) const;
311
312/*************** FE (finite-element) construction functions *******************/
313
315 bool useFEAssembly() const { return useFEAssembly_; }
316
318 Teuchos::RCP<FECrsGraphType> getFEGraph(int i,int j) const;
319
327 Teuchos::RCP<FECrsMatrixType> getFEMatrix(int i,int j) const;
328
329 Teuchos::RCP<VectorType> getTpetraDomainVector(int i) const;
330 Teuchos::RCP<VectorType> getGhostedTpetraDomainVector(int i) const;
331
332 Teuchos::RCP<VectorType> getTpetraRangeVector(int i) const;
333 Teuchos::RCP<VectorType> getGhostedTpetraRangeVector(int i) const;
334
336 int getBlockRowCount() const;
337
339 int getBlockColCount() const;
340
342 void addExcludedPair(int rowBlock,int colBlock);
343
345 void addExcludedPairs(const std::vector<std::pair<int,int> > & exPairs);
346
347 virtual void beginFill(LinearObjContainer & loc) const;
348
354 virtual void beginFill(LinearObjContainer & ghostContainer,
355 const LinearObjContainer & container) const;
356 virtual void endFill(LinearObjContainer & loc) const;
357
363 virtual void endFill(LinearObjContainer & ghostContainer,
364 const LinearObjContainer & container) const;
365
366 Teuchos::RCP<const panzer::BlockedDOFManager> getGlobalIndexer() const
367 { return blockedDOFManager_; }
368
373 Teuchos::RCP<const panzer::GlobalIndexer> getDomainGlobalIndexer() const
375
377 Teuchos::RCP<const panzer::GlobalIndexer> getRangeGlobalIndexer() const
378 { return blockProvider_; }
379
380protected:
381/*************** Generic methods/members *******************/
382
383 // Get the global indexer associated with a particular block
384 Teuchos::RCP<const GlobalIndexer> getGlobalIndexer(int i) const;
385
386 // Get the column global indexer associated with a particular block
387 Teuchos::RCP<const GlobalIndexer> getColGlobalIndexer(int i) const;
388
392 static void splitIntoBlocks(const Teuchos::RCP<const GlobalIndexer> & ugi,
393 Teuchos::RCP<const BlockedDOFManager> & blocked,
394 std::vector<Teuchos::RCP<const GlobalIndexer> > & blocks);
395
397 void makeRoomForBlocks(std::size_t blockCnt,std::size_t colBlockCnt=0);
398
399 Teuchos::RCP<const GlobalIndexer> blockProvider_;
400 Teuchos::RCP<const BlockedDOFManager> blockedDOFManager_;
401 std::vector<Teuchos::RCP<const GlobalIndexer> > gidProviders_;
402
406 Teuchos::RCP<const GlobalIndexer> colBlockProvider_;
407 Teuchos::RCP<const BlockedDOFManager> colBlockedDOFManager_;
408 std::vector<Teuchos::RCP<const GlobalIndexer> > colGidProviders_;
409
410 // which block entries are ignored
411 std::unordered_set<std::pair<int,int>,panzer::pair_hash> excludedPairs_;
412
413/*************** Thyra based methods/members *******************/
414
415 void ghostToGlobalThyraVector(const Teuchos::RCP<const Thyra::VectorBase<ScalarT> > & in,
416 const Teuchos::RCP<Thyra::VectorBase<ScalarT> > & out,bool col) const;
418 void globalToGhostThyraVector(const Teuchos::RCP<const Thyra::VectorBase<ScalarT> > & in,
419 const Teuchos::RCP<Thyra::VectorBase<ScalarT> > & out,bool col) const;
420
421 mutable Teuchos::RCP<Thyra::ProductVectorSpaceBase<ScalarT> > rangeSpace_;
422 mutable Teuchos::RCP<Thyra::ProductVectorSpaceBase<ScalarT> > ghostedRangeSpace_;
423
428 mutable Teuchos::RCP<const Thyra::VectorSpaceBase<ScalarT> > domainSpace_;
429 mutable Teuchos::RCP<const Thyra::VectorSpaceBase<ScalarT> > ghostedDomainSpace_;
430
431/*************** Tpetra based methods/members *******************/
432
433 void adjustForDirichletConditions(const VectorType & local_bcs,
434 const VectorType & global_bcs,
435 const Teuchos::Ptr<VectorType> & f,
436 const Teuchos::Ptr<CrsMatrixType> & A,
437 bool zeroVectorRows) const;
438
439 void ghostToGlobalTpetraVector(int i,const VectorType & in,VectorType & out,bool col) const;
440 void ghostToGlobalTpetraMatrix(int blockRow,const CrsMatrixType & in,CrsMatrixType & out) const;
441 void globalToGhostTpetraVector(int i,const VectorType & in,VectorType & out,bool col) const;
442
443 // get the map from the matrix
444 virtual Teuchos::RCP<const MapType> buildTpetraMap(int i) const;
445 virtual Teuchos::RCP<const MapType> buildTpetraGhostedMap(int i) const;
446 virtual Teuchos::RCP<const MapType> buildColTpetraMap(int i) const;
447 virtual Teuchos::RCP<const MapType> buildColTpetraGhostedMap(int i) const;
448
449 // get the graph of the crs matrix
450 virtual Teuchos::RCP<const CrsGraphType> buildTpetraGraph(int i,int j) const;
451
452 // build the FE graph for block (i,j) (owned+shared/owned unified via Tpetra::FECrsGraph)
453 virtual Teuchos::RCP<FECrsGraphType> buildFEGraph(int i,int j) const;
454
455
456 public:
457 virtual Teuchos::RCP<const CrsGraphType> buildTpetraGhostedGraph(int i,int j) const;
458 protected:
459
460 // storage for Tpetra graphs and maps
461 Teuchos::RCP<const Teuchos::MpiComm<int> > comm_;
462 mutable std::vector<Teuchos::RCP<const MapType> > maps_;
463 mutable std::vector<Teuchos::RCP<const MapType> > ghostedMaps_;
464 mutable std::unordered_map<std::pair<int,int>,Teuchos::RCP<const CrsGraphType>,panzer::pair_hash> graphs_ ;
465 mutable std::unordered_map<std::pair<int,int>,Teuchos::RCP<const CrsGraphType>,panzer::pair_hash> ghostedGraphs_;
466
467 mutable std::vector<Teuchos::RCP<const ImportType> > importers_;
468 mutable std::vector<Teuchos::RCP<const ExportType> > exporters_;
469
470 // Only populated when hasColProvider_; otherwise the column accessors
471 // forward to the row-side objects above.
472 mutable std::vector<Teuchos::RCP<const MapType> > colMaps_;
473 mutable std::vector<Teuchos::RCP<const MapType> > ghostedColMaps_;
474 mutable std::vector<Teuchos::RCP<const ImportType> > colImporters_;
475 mutable std::vector<Teuchos::RCP<const ExportType> > colExporters_;
476
477/*************** FE based members *******************/
478
480
481 mutable std::unordered_map<std::pair<int,int>,Teuchos::RCP<FECrsGraphType>,panzer::pair_hash> feGraphs_;
482
494 mutable std::unordered_map<std::pair<int,int>,const FECrsMatrixType *,panzer::pair_hash> feAssemblyOpenOn_;
495};
496
497}
498
499#endif
PHX::MDField< ScalarT, panzer::Cell, panzer::IP > result
A field that will be used to build up the result of the integral we're performing.
Teuchos::RCP< const Thyra::VectorSpaceBase< ScalarT > > ghostedDomainSpace_
Teuchos::RCP< panzer::CloneableEvaluator > buildGatherDomain() const
Use preconstructed gather evaluators.
virtual Teuchos::RCP< const MapType > buildColTpetraGhostedMap(int i) const
Teuchos::RCP< const panzer::GlobalIndexer > getRangeGlobalIndexer() const
Get the range unique global indexer this factory was created with.
Teuchos::RCP< FECrsGraphType > getFEGraph(int i, int j) const
Get the (cached) FE graph for block (i,j), built via the Tpetra::FECrsGraph "V2" ctor.
Tpetra::Operator< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT > OperatorType
Teuchos::RCP< FECrsMatrixType > getFEMatrix(int i, int j) const
Get the (cached) FECrsMatrix for block (i,j).
Teuchos::RCP< Thyra::VectorBase< ScalarT > > getThyraRangeVector() const
Get a range vector.
virtual void adjustForDirichletConditions(const LinearObjContainer &localBCRows, const LinearObjContainer &globalBCRows, LinearObjContainer &ghostedObjs, bool zeroVectorRows=false, bool adjustX=false) const
std::vector< Teuchos::RCP< const MapType > > ghostedColMaps_
Teuchos::RCP< panzer::CloneableEvaluator > buildGather() const
Use preconstructed gather evaluators.
virtual void applyDirichletBCs(const LinearObjContainer &counter, LinearObjContainer &result) const
Teuchos::RCP< const panzer::GlobalIndexer > getDomainGlobalIndexer() const
std::vector< Teuchos::RCP< const GlobalIndexer > > gidProviders_
void initializeGhostedContainer(int, LinearObjContainer &loc) const
Teuchos::RCP< Thyra::VectorBase< ScalarT > > getThyraDomainVector() const
Get a domain vector.
std::vector< Teuchos::RCP< const ExportType > > colExporters_
Teuchos::RCP< const Teuchos::MpiComm< int > > comm_
virtual void endFill(LinearObjContainer &loc) const
Close a container after filling. Takes either a ghosted or an owned container.
virtual Teuchos::RCP< FECrsGraphType > buildFEGraph(int i, int j) const
std::vector< Teuchos::RCP< const MapType > > ghostedMaps_
Teuchos::RCP< const Thyra::VectorSpaceBase< ScalarT > > getGhostedThyraDomainSpace() const
Get the domain vector space (x and dxdt)
std::vector< Teuchos::RCP< const GlobalIndexer > > colGidProviders_
Teuchos::RCP< const BlockedDOFManager > blockedDOFManager_
virtual Teuchos::RCP< const CrsGraphType > getGhostedGraph(int i, int j) const
get the ghosted graph of the crs matrix
virtual Teuchos::RCP< const MapType > getMap(int i) const
get the map from the matrix
Teuchos::RCP< const GlobalIndexer > getColGlobalIndexer(int i) const
virtual Teuchos::RCP< const ImportType > getGhostedColImport(int i) const
Teuchos::RCP< panzer::CloneableEvaluator > buildScatterDirichlet() const
Use preconstructed dirichlet scatter evaluators.
virtual void ghostToGlobalContainer(const LinearObjContainer &ghostContainer, LinearObjContainer &container, int) const
virtual void globalToGhostContainer(const LinearObjContainer &container, LinearObjContainer &ghostContainer, int) const
std::vector< Teuchos::RCP< const ExportType > > exporters_
virtual Teuchos::RCP< const MapType > buildTpetraGhostedMap(int i) const
void globalToGhostThyraVector(const Teuchos::RCP< const Thyra::VectorBase< ScalarT > > &in, const Teuchos::RCP< Thyra::VectorBase< ScalarT > > &out, bool col) const
virtual Teuchos::RCP< const MapType > buildTpetraMap(int i) const
virtual Teuchos::RCP< const CrsGraphType > buildTpetraGraph(int i, int j) const
Teuchos::RCP< VectorType > getGhostedTpetraRangeVector(int i) const
Teuchos::RCP< const Thyra::VectorSpaceBase< ScalarT > > getThyraDomainSpace() const
Get the domain vector space (x and dxdt)
virtual Teuchos::RCP< const MapType > getColMap(int i) const
Teuchos::RCP< Thyra::VectorBase< ScalarT > > getGhostedThyraRangeVector() const
Get a range vector.
virtual Teuchos::RCP< ReadOnlyVector_GlobalEvaluationData > buildReadOnlyDomainContainer() const
std::unordered_map< std::pair< int, int >, Teuchos::RCP< const CrsGraphType >, panzer::pair_hash > graphs_
Tpetra::CrsGraph< LocalOrdinalT, GlobalOrdinalT, NodeT > CrsGraphType
Teuchos::RCP< panzer::CloneableEvaluator > buildScatter() const
Use preconstructed scatter evaluators.
Tpetra::Export< LocalOrdinalT, GlobalOrdinalT, NodeT > ExportType
virtual Teuchos::RCP< const CrsGraphType > buildTpetraGhostedGraph(int i, int j) const
virtual Teuchos::RCP< const MapType > getGhostedMap(int i) const
get the ghosted map from the matrix
Teuchos::RCP< panzer::CloneableEvaluator > buildGatherTangent() const
Use preconstructed gather evaluators.
Tpetra::Vector< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT > VectorType
Teuchos::RCP< VectorType > getGhostedTpetraDomainVector(int i) const
Teuchos::RCP< const Thyra::VectorSpaceBase< ScalarT > > getGhostedThyraRangeSpace() const
Get the range vector space (f)
void makeRoomForBlocks(std::size_t blockCnt, std::size_t colBlockCnt=0)
Allocate the space in the std::vector objects so we can fill with appropriate Tpetra data.
bool useFEAssembly() const
True if this factory was constructed with FE assembly enabled.
void ghostToGlobalTpetraVector(int i, const VectorType &in, VectorType &out, bool col) const
std::unordered_map< std::pair< int, int >, Teuchos::RCP< const CrsGraphType >, panzer::pair_hash > ghostedGraphs_
std::vector< Teuchos::RCP< const ImportType > > colImporters_
virtual void writeVector(const std::string &, const LinearObjContainer &, int) const
void globalToGhostTpetraVector(int i, const VectorType &in, VectorType &out, bool col) const
virtual void beginFill(LinearObjContainer &loc) const
Open a container for filling. Takes either a ghosted or an owned container.
Teuchos::RCP< panzer::CloneableEvaluator > buildGatherOrientation() const
Use preconstructed gather evaluators.
Teuchos::RCP< CrsMatrixType > getTpetraMatrix(int i, int j) const
virtual Teuchos::RCP< LinearObjContainer > buildGhostedLinearObjContainer() const
std::vector< Teuchos::RCP< const MapType > > maps_
virtual Teuchos::RCP< LinearObjContainer > buildLinearObjContainer() const
std::unordered_map< std::pair< int, int >, Teuchos::RCP< FECrsGraphType >, panzer::pair_hash > feGraphs_
Tpetra::FECrsGraph< LocalOrdinalT, GlobalOrdinalT, NodeT > FECrsGraphType
std::vector< Teuchos::RCP< const MapType > > colMaps_
virtual void readVector(const std::string &, LinearObjContainer &, int) const
void addExcludedPair(int rowBlock, int colBlock)
exclude a block pair from the matrix
std::vector< Teuchos::RCP< const ImportType > > importers_
void ghostToGlobalThyraMatrix(const Thyra::LinearOpBase< ScalarT > &in, Thyra::LinearOpBase< ScalarT > &out) const
void ghostToGlobalTpetraMatrix(int blockRow, const CrsMatrixType &in, CrsMatrixType &out) const
std::unordered_set< std::pair< int, int >, panzer::pair_hash > excludedPairs_
Tpetra::CrsMatrix< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT > CrsMatrixType
Tpetra::Map< LocalOrdinalT, GlobalOrdinalT, NodeT > MapType
Teuchos::RCP< const Thyra::VectorSpaceBase< ScalarT > > getThyraRangeSpace() const
Get the range vector space (f)
static void splitIntoBlocks(const Teuchos::RCP< const GlobalIndexer > &ugi, Teuchos::RCP< const BlockedDOFManager > &blocked, std::vector< Teuchos::RCP< const GlobalIndexer > > &blocks)
virtual Teuchos::RCP< const MapType > buildColTpetraMap(int i) const
Thyra::TpetraLinearOp< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT > ThyraLinearOp
Teuchos::RCP< CrsMatrixType > getGhostedTpetraMatrix(int i, int j) const
Teuchos::RCP< const Thyra::VectorSpaceBase< ScalarT > > domainSpace_
Teuchos::RCP< Thyra::ProductVectorSpaceBase< ScalarT > > ghostedRangeSpace_
virtual Teuchos::RCP< const ImportType > getGhostedImport(int i) const
get importer for converting an overalapped object to a "normal" object
Teuchos::RCP< Thyra::ProductVectorSpaceBase< ScalarT > > rangeSpace_
Tpetra::Import< LocalOrdinalT, GlobalOrdinalT, NodeT > ImportType
virtual Teuchos::RCP< LinearObjContainer > buildPrimitiveLinearObjContainer() const
Teuchos::RCP< const BlockedDOFManager > colBlockedDOFManager_
BlockedTpetraLinearObjContainer< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT > BTLOC
std::unordered_map< std::pair< int, int >, const FECrsMatrixType *, panzer::pair_hash > feAssemblyOpenOn_
void addExcludedPairs(const std::vector< std::pair< int, int > > &exPairs)
exclude a vector of pairs from the matrix
virtual Teuchos::RCP< const MapType > getGhostedColMap(int i) const
virtual Teuchos::RCP< const ExportType > getGhostedColExport(int i) const
void ghostToGlobalThyraVector(const Teuchos::RCP< const Thyra::VectorBase< ScalarT > > &in, const Teuchos::RCP< Thyra::VectorBase< ScalarT > > &out, bool col) const
Tpetra::FECrsMatrix< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT > FECrsMatrixType
virtual Teuchos::RCP< const ExportType > getGhostedExport(int j) const
get exporter for converting an overalapped object to a "normal" object
Thyra::TpetraVector< ScalarT, LocalOrdinalT, GlobalOrdinalT, NodeT > ThyraVector
Teuchos::RCP< Thyra::LinearOpBase< ScalarT > > getThyraMatrix() const
Get a Thyra operator.
Teuchos::RCP< Thyra::VectorBase< ScalarT > > getGhostedThyraDomainVector() const
Get a domain vector.
virtual Teuchos::RCP< LinearObjContainer > buildPrimitiveGhostedLinearObjContainer() const
virtual Teuchos::RCP< const CrsGraphType > getGraph(int i, int j) const
get the graph of the crs matrix
Teuchos::RCP< const panzer::BlockedDOFManager > getGlobalIndexer() const
Teuchos::RCP< Thyra::BlockedLinearOpBase< ScalarT > > getGhostedThyraMatrix() const
Get a Thyra operator.
Gathers orientations per field from the global indexer and stores them in the field manager.
Gathers solution values from the Newton solution vector into the nodal fields of the field manager.
Gathers solution values from the Newton solution vector into the nodal fields of the field manager.
Gathers tangent vectors dx/dp for computing df/dx*dx/dp + df/dp into the nodal fields of the field ma...
Abstract, linear-algebra-library-agnostic container for the vectors and matrix used in a nonlinear/tr...
Pushes residual values into the residual vector for a Newton-based solve.
Pushes residual values into the residual vector for a Newton-based solve.
std::vector< Teuchos::RCP< const GlobalIndexer > > nc2c_vector(const std::vector< Teuchos::RCP< GlobalIndexer > > &ugis)
A hash functor for std::pair, combining the hashes of both elements via hash_combine()....