Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_BlockedEpetraLinearObjFactory.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_BlockedEpetraLinearObjFactory_hpp__
12 #define __Panzer_BlockedEpetraLinearObjFactory_hpp__
13 
14 #include <map>
15 
16 // Epetra includes
17 #include "Epetra_Map.h"
18 #include "Epetra_CrsGraph.h"
19 #include "Epetra_Import.h"
20 #include "Epetra_Export.h"
21 
22 #include "PanzerDiscFE_config.hpp"
23 #include "Panzer_GlobalIndexer.hpp"
29 
30 #include "Panzer_GatherOrientation.hpp"
31 #include "Panzer_GatherSolution_BlockedEpetra.hpp"
32 #include "Panzer_GatherTangent_BlockedEpetra.hpp"
33 #include "Panzer_ScatterResidual_BlockedEpetra.hpp"
34 #include "Panzer_ScatterDirichletResidual_BlockedEpetra.hpp"
35 #include "Panzer_ScatterResidual_Epetra.hpp"
36 #include "Panzer_ScatterDirichletResidual_Epetra.hpp"
37 #include "Panzer_GatherSolution_Epetra.hpp"
38 #include "Panzer_GatherTangent_Epetra.hpp"
39 #include "Panzer_GatherOrientation.hpp"
41 #include "Panzer_HashUtils.hpp"
42 
43 #include "Thyra_BlockedLinearOpBase.hpp"
44 #include "Thyra_ProductVectorBase.hpp"
45 
46 #include "Teuchos_RCP.hpp"
48 #include "Teuchos_OpaqueWrapper.hpp"
49 
50 namespace panzer
51 {
52 
53 template <typename Traits,typename LocalOrdinalT>
55  , public ThyraObjFactory<double> {
56 public:
57 
59  const Teuchos::RCP<const GlobalIndexer> & gidProvider,
60  bool useDiscreteAdjoint=false);
61 
63  const Teuchos::RCP<const GlobalIndexer> & gidProvider,
64  const Teuchos::RCP<const GlobalIndexer> & colGidProvider,
65  bool useDiscreteAdjoint=false);
66 
68 
69 /*************** Linear object factory methods *******************/
70 
71  virtual void readVector(const std::string & identifier,LinearObjContainer & loc,int id) const;
72 
73  virtual void writeVector(const std::string & identifier,const LinearObjContainer & loc,int id) const;
74 
76 
78  { return buildLinearObjContainer(); }
79 
81 
83  { return buildGhostedLinearObjContainer(); }
84 
85  virtual void globalToGhostContainer(const LinearObjContainer & container,
86  LinearObjContainer & ghostContainer,int) const;
87  virtual void ghostToGlobalContainer(const LinearObjContainer & ghostContainer,
88  LinearObjContainer & container,int) const;
89 
96  virtual void adjustForDirichletConditions(const LinearObjContainer & localBCRows,
97  const LinearObjContainer & globalBCRows,
98  LinearObjContainer & ghostedObjs,
99  bool zeroVectorRows=false, bool adjustX=false) const;
100 
104  virtual void applyDirichletBCs(const LinearObjContainer & counter,
105  LinearObjContainer & result) const;
106 
112 
118 
119  virtual Teuchos::MpiComm<int> getComm() const;
120 
122  template <typename EvalT>
124  {
125  if(!colDOFManagerContainer_->containsBlockedDOFManager() &&
126  !rowDOFManagerContainer_->containsBlockedDOFManager())
128  colDOFManagerContainer_->getFieldDOFManagers()[0],
130 
132  colDOFManagerContainer_->getFieldDOFManagers(),
134  }
135 
137  template <typename EvalT>
139  {
140  if(!colDOFManagerContainer_->containsBlockedDOFManager() &&
141  !rowDOFManagerContainer_->containsBlockedDOFManager())
144  }
145 
147  template <typename EvalT>
149  {
150  if(!colDOFManagerContainer_->containsBlockedDOFManager() &&
151  !rowDOFManagerContainer_->containsBlockedDOFManager())
154  }
155 
157  template <typename EvalT>
159  {
160  if(!colDOFManagerContainer_->containsBlockedDOFManager())
163  }
164 
166  template <typename EvalT>
169 
171  template <typename EvalT>
173  {
174  if(!colDOFManagerContainer_->containsBlockedDOFManager() &&
175  !rowDOFManagerContainer_->containsBlockedDOFManager())
177  colDOFManagerContainer_->getFieldDOFManagers()[0]));
179  colDOFManagerContainer_->getFieldDOFManagers()));
180  }
181 
182 /*************** Generic helper functions for container setup *******************/
183 
189  void initializeContainer(int,LinearObjContainer & loc) const;
190 
196  void initializeGhostedContainer(int,LinearObjContainer & loc) const;
197 
198 /*************** Thyra based methods *******************/
199 
202 
205 
208 
211 
214 
215  // and now the ghosted versions
216 
219 
233 
236 
239 
242 
245 
246 /*************** Epetra based methods *******************/
247 
249  virtual const Teuchos::RCP<Epetra_Map> getMap(int i) const;
250 
252  virtual const Teuchos::RCP<Epetra_Map> getColMap(int i) const;
253 
255  virtual const Teuchos::RCP<Epetra_Map> getGhostedMap(int i) const;
256 
267  virtual const Teuchos::RCP<Epetra_Map>
269  int i) const;
270 
272  virtual const Teuchos::RCP<Epetra_Map> getGhostedColMap(int i) const;
273 
284  virtual const Teuchos::RCP<Epetra_Map>
286  int i) const;
287 
289  virtual const Teuchos::RCP<Epetra_CrsGraph> getGraph(int i,int j) const;
290 
292  virtual const Teuchos::RCP<Epetra_CrsGraph> getGhostedGraph(int i,int j) const;
293 
295  virtual const Teuchos::RCP<Epetra_Import> getGhostedImport(int i) const;
296 
308  virtual const Teuchos::RCP<Epetra_Import>
310  int i) const;
311 
313  virtual const Teuchos::RCP<Epetra_Import> getGhostedColImport(int i) const;
314 
326  virtual const Teuchos::RCP<Epetra_Import>
328  int i) const;
329 
331  virtual const Teuchos::RCP<Epetra_Export> getGhostedExport(int j) const;
332 
344  virtual const Teuchos::RCP<Epetra_Export>
346  int i) const;
347 
349  virtual const Teuchos::RCP<Epetra_Export> getGhostedColExport(int j) const;
350 
362  virtual const Teuchos::RCP<Epetra_Export>
364  int i) const;
365 
367  virtual const Teuchos::RCP<const Epetra_Comm> getEpetraComm() const;
368 
371 
373  int getBlockRowCount() const;
374 
376  int getBlockColCount() const;
377 
379  { return rowDOFManagerContainer_->getBlockedIndexer(); }
380 
382  { return rowDOFManagerContainer_->getGlobalIndexer(); }
383 
385  { return colDOFManagerContainer_->getGlobalIndexer(); }
386 
388  const std::vector<Teuchos::RCP<const GlobalIndexer> > & getRangeGlobalIndexers() const
389  { return rowDOFManagerContainer_->getFieldDOFManagers(); }
390 
392  const std::vector<Teuchos::RCP<const GlobalIndexer> > & getDomainGlobalIndexers() const
393  { return colDOFManagerContainer_->getFieldDOFManagers(); }
394 
396  void addExcludedPair(int rowBlock,int colBlock);
397 
399  void addExcludedPairs(const std::vector<std::pair<int,int> > & exPairs);
400 
401 protected:
402 
409 
416 
417 /*************** Utility class for handling blocked and nonblocked DOF managers *******************/
418 
423  public:
426  { setGlobalIndexer(ugi); }
427 
429  {
430  using Teuchos::RCP;
431  using Teuchos::rcp_dynamic_cast;
432 
433  auto blockedDOFManager = rcp_dynamic_cast<const BlockedDOFManager>(ugi);
434  auto flatDOFManager = rcp_dynamic_cast<const GlobalIndexer>(ugi);
435 
436  if(blockedDOFManager!=Teuchos::null) {
437  // set BlockedDOFManager
438  blockedDOFManager_ = blockedDOFManager;
439 
440  // get all GID providers
441  auto dofManagers = blockedDOFManager_->getFieldDOFManagers();
442  for(auto itr=dofManagers.begin();itr!=dofManagers.end();++itr)
443  gidProviders_.push_back(*itr);
444  }
445  else if(flatDOFManager!=Teuchos::null) {
446  // for absolute clarity, nullify the blockedDOFManager_
447  blockedDOFManager_ = Teuchos::null;
448 
449  // you have only a single GID provider
450  gidProviders_.push_back(flatDOFManager);
451  }
452  else {
453  TEUCHOS_ASSERT(false);
454  }
455  }
456 
458  int getFieldBlocks() const
459  { return Teuchos::as<int>(gidProviders_.size()); }
460 
466  { return blockedDOFManager_ !=Teuchos::null; }
467 
470  {
472  return blockedDOFManager_;
473  }
474 
477  {
478  if(blockedDOFManager_!=Teuchos::null)
479  return blockedDOFManager_;
480 
481  TEUCHOS_ASSERT(gidProviders_.size()==1);
482  return gidProviders_[0];
483  }
484 
486  const std::vector<Teuchos::RCP<const GlobalIndexer> > & getFieldDOFManagers() const
487  { return gidProviders_; }
488 
489  private:
491  std::vector<Teuchos::RCP<const GlobalIndexer> > gidProviders_;
492  };
493 
494 /*************** Generic methods/members *******************/
495 
496  // Get the global indexer associated with a particular block
498 
500 
502  void makeRoomForBlocks(std::size_t blockCnt,std::size_t colBlockCnt=0);
503 
506 
508 
509  // which block entries are ignored
510  std::unordered_set<std::pair<int,int>,panzer::pair_hash> excludedPairs_;
511 
512 /*************** Thyra based methods/members *******************/
513 
515  const Teuchos::RCP<Thyra::VectorBase<double> > & out,bool col) const;
518  const Teuchos::RCP<Thyra::VectorBase<double> > & out,bool col) const;
519 
522 
525 
526 /*************** Epetra based methods/members *******************/
527 
528  void adjustForDirichletConditions(const Epetra_Vector & local_bcs,
529  const Epetra_Vector & global_bcs,
530  const Teuchos::Ptr<Epetra_Vector> & f,
532  bool zeroVectorRows) const;
533 
534  void ghostToGlobalEpetraVector(int i,const Epetra_Vector & in,Epetra_Vector & out,bool col) const;
535  void globalToGhostEpetraVector(int i,const Epetra_Vector & in,Epetra_Vector & out,bool col) const;
536  void ghostToGlobalEpetraMatrix(int blockRow,const Epetra_CrsMatrix & in,Epetra_CrsMatrix & out) const;
537 
538  // get the map from the matrix
539 
548  virtual const Teuchos::RCP<Epetra_Map>
549  buildMap(
550  int i) const;
551 
560  virtual const Teuchos::RCP<Epetra_Map>
562  int i) const;
563 
572  virtual const Teuchos::RCP<Epetra_Map>
574  int i) const;
575 
576  // get the map from the matrix
577 
586  virtual const Teuchos::RCP<Epetra_Map>
587  buildColMap(
588  int i) const;
589 
598  virtual const Teuchos::RCP<Epetra_Map>
600  int i) const;
601 
610  virtual const Teuchos::RCP<Epetra_Map>
612  int i) const;
613 
614  // get the graph of the crs matrix
615  virtual const Teuchos::RCP<Epetra_CrsGraph> buildGraph(int i,int j) const;
616  virtual const Teuchos::RCP<Epetra_CrsGraph> buildGhostedGraph(int i,int j,bool optimizeStorage) const;
617  virtual const Teuchos::RCP<Epetra_CrsGraph> buildFilteredGhostedGraph(int i,int j) const;
618 
619  // storage for Epetra graphs and maps
623 
628  mutable std::vector<Teuchos::RCP<Epetra_Map>> maps_;
629 
634  mutable std::vector<Teuchos::RCP<Epetra_Map>> ghostedMaps_;
635 
640  mutable std::vector<Teuchos::RCP<Epetra_Map>> ghostedMaps2_;
641 
645  mutable std::vector<Teuchos::RCP<Epetra_Import>> importers_;
646 
650  mutable std::vector<Teuchos::RCP<Epetra_Import>> importers2_;
651 
652  mutable std::vector<Teuchos::RCP<Epetra_Export>> exporters_;
653 
658  mutable std::vector<Teuchos::RCP<Epetra_Map>> colMaps_;
659 
664  mutable std::vector<Teuchos::RCP<Epetra_Map>> colGhostedMaps_;
665 
670  mutable std::vector<Teuchos::RCP<Epetra_Map>> colGhostedMaps2_;
671 
675  mutable std::vector<Teuchos::RCP<Epetra_Import>> colImporters_;
676 
681  mutable std::vector<Teuchos::RCP<Epetra_Import>> colImporters2_;
682 
683  mutable std::vector<Teuchos::RCP<Epetra_Export>> colExporters_;
684 
685  mutable std::unordered_map<std::pair<int,int>,Teuchos::RCP<Epetra_CrsGraph>,panzer::pair_hash> graphs_ ;
686  mutable std::unordered_map<std::pair<int,int>,Teuchos::RCP<Epetra_CrsGraph>,panzer::pair_hash> ghostedGraphs_;
687 
689 };
690 
691 } // end of namespace panzer
692 
693 #endif // __Panzer_BlockedEpetraLinearObjFactory_hpp__
Teuchos::RCP< const panzer::GlobalIndexer > getDomainGlobalIndexer() const
Get the domain global indexer object associated with this factory.
virtual const Teuchos::RCP< Epetra_Map > buildColMap(int i) const
Build the i-th owned column map from the owned indices of the i-th (column) global indexer...
std::vector< Teuchos::RCP< Epetra_Map > > colGhostedMaps_
The list of ghosted column maps corresponding to the owned and ghosted indices of the (column) global...
Teuchos::RCP< Epetra_CrsMatrix > getEpetraMatrix(int i, int j) const
Teuchos::RCP< Thyra::VectorBase< double > > getGhostedThyraDomainVector() const
Get a domain vector.
Gathers solution values from the Newton solution vector into the nodal fields of the field manager...
virtual Teuchos::RCP< LinearObjContainer > buildPrimitiveLinearObjContainer() const
std::vector< Teuchos::RCP< Epetra_Map > > colMaps_
The list of owned column maps corresponding to the owned indices of the (column) global indexers...
virtual const Teuchos::RCP< Epetra_Export > getGhostedColExport(int j) const
get exporter for converting an overalapped object to a &quot;normal&quot; object
virtual const Teuchos::RCP< Epetra_Map > getGhostedColMap(int i) const
get the ghosted map from the matrix
virtual void adjustForDirichletConditions(const LinearObjContainer &localBCRows, const LinearObjContainer &globalBCRows, LinearObjContainer &ghostedObjs, bool zeroVectorRows=false, bool adjustX=false) const
Teuchos::RCP< panzer::CloneableEvaluator > buildGatherDomain() const
Use preconstructed gather evaluators.
Teuchos::RCP< const Thyra::VectorSpaceBase< double > > domainSpace_
std::unordered_set< std::pair< int, int >, panzer::pair_hash > excludedPairs_
Teuchos::RCP< panzer::CloneableEvaluator > buildScatter() const
Use preconstructed scatter evaluators.
virtual void writeVector(const std::string &identifier, const LinearObjContainer &loc, int id) const
Teuchos::RCP< const Thyra::VectorSpaceBase< double > > ghostedRangeSpace_
void initializeContainer_internal(int mem, ThyraObjContainer< double > &loc) const
virtual const Teuchos::RCP< Epetra_Map > buildColGhostedMap2(int i) const
Build the i-th ghosted column map from the ghosted indices of the i-th (column) global indexer...
std::vector< Teuchos::RCP< Epetra_Import > > colImporters2_
The list of ghosted importers corresponding to colGhostedMaps2_.
Teuchos::RCP< Thyra::VectorBase< double > > getThyraDomainVector() const
Get a domain vector.
void ghostToGlobalThyraVector(const Teuchos::RCP< const Thyra::VectorBase< double > > &in, const Teuchos::RCP< Thyra::VectorBase< double > > &out, bool col) const
void initializeContainer(int, LinearObjContainer &loc) const
Teuchos::RCP< const GlobalIndexer > getColGlobalIndexer(int i) const
virtual const Teuchos::RCP< Epetra_Map > buildGhostedMap(int i) const
Build the i-th ghosted map from the owned and ghosted indices of the i-th global indexer.
std::vector< Teuchos::RCP< Epetra_Map > > maps_
The list of owned maps corresponding to the owned indices of the global indexers. ...
Teuchos::RCP< panzer::CloneableEvaluator > buildGather() const
Use preconstructed gather evaluators.
std::unordered_map< std::pair< int, int >, Teuchos::RCP< Epetra_CrsGraph >, panzer::pair_hash > graphs_
Teuchos::RCP< const Thyra::VectorSpaceBase< double > > rangeSpace_
virtual const Teuchos::RCP< const Epetra_Comm > getEpetraComm() const
get exporter for converting an overalapped object to a &quot;normal&quot; object
Teuchos::RCP< Thyra::LinearOpBase< double > > getThyraMatrix() const
Get a Thyra operator.
Teuchos::RCP< const Thyra::VectorSpaceBase< double > > getThyraRangeSpace() const
Get the range vector space (f)
Teuchos::RCP< Thyra::LinearOpBase< double > > getGhostedThyraMatrix() const
Get a Thyra operator.
virtual const Teuchos::RCP< Epetra_CrsGraph > getGhostedGraph(int i, int j) const
get the ghosted graph of the crs matrix
virtual const Teuchos::RCP< Epetra_CrsGraph > buildGraph(int i, int j) const
Teuchos::RCP< Thyra::VectorBase< double > > getGhostedThyraRangeVector() const
Get a range vector.
std::vector< Teuchos::RCP< Epetra_Export > > exporters_
void setGlobalIndexer(const Teuchos::RCP< const GlobalIndexer > &ugi)
Pushes residual values into the residual vector for a Newton-based solve.
std::vector< Teuchos::RCP< Epetra_Import > > importers2_
The list of ghosted importers corresponding to ghostedMaps2_.
Teuchos::RCP< Epetra_CrsMatrix > getGhostedEpetraMatrix(int i, int j) const
PHX::MDField< ScalarT, panzer::Cell, panzer::IP > result
A field that will be used to build up the result of the integral we&#39;re performing.
Teuchos::RCP< const Thyra::VectorSpaceBase< double > > ghostedDomainSpace_
virtual const Teuchos::RCP< Epetra_CrsGraph > buildFilteredGhostedGraph(int i, int j) const
virtual void globalToGhostContainer(const LinearObjContainer &container, LinearObjContainer &ghostContainer, int) const
virtual const Teuchos::RCP< Epetra_Map > getMap(int i) const
get the map from the matrix
virtual const Teuchos::RCP< Epetra_Import > getGhostedImport2(int i) const
Get or create the i-th ghosted importer corresponding to the i-th ghosted map.
Teuchos::RCP< const panzer::BlockedDOFManager > getGlobalIndexer() const
Teuchos::RCP< const DOFManagerContainer > colDOFManagerContainer_
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
virtual const Teuchos::RCP< Epetra_Map > getGhostedMap2(int i) const
Get or create the i-th ghosted map.
void initializeGhostedContainer_internal(int mem, ThyraObjContainer< double > &loc) const
Teuchos::RCP< const Teuchos::OpaqueWrapper< MPI_Comm > > rawMpiComm_
Teuchos::RCP< const panzer::GlobalIndexer > getRangeGlobalIndexer() const
Get the range global indexer object associated with this factory.
virtual const Teuchos::RCP< Epetra_Map > buildColGhostedMap(int i) const
Build the i-th ghosted column map from the owned and ghosted indices of the i-th (column) global inde...
virtual const Teuchos::RCP< Epetra_CrsGraph > buildGhostedGraph(int i, int j, bool optimizeStorage) const
BlockedEpetraLinearObjFactory(const Teuchos::RCP< const Teuchos::MpiComm< int > > &comm, const Teuchos::RCP< const GlobalIndexer > &gidProvider, bool useDiscreteAdjoint=false)
void addExcludedPairs(const std::vector< std::pair< int, int > > &exPairs)
exclude a vector of pairs from the matrix
Teuchos::RCP< const BlockedDOFManager > getBlockedIndexer() const
Get the &quot;parent&quot; global indexer (if containsBlockedDOFManager()==false this will throw) ...
virtual const Teuchos::RCP< Epetra_Import > getGhostedImport(int i) const
get importer for converting an overalapped object to a &quot;normal&quot; object
Pushes residual values into the residual vector for a Newton-based solve.
void ghostToGlobalEpetraMatrix(int blockRow, const Epetra_CrsMatrix &in, Epetra_CrsMatrix &out) const
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 Epetra data...
Teuchos::RCP< panzer::CloneableEvaluator > buildGatherTangent() const
Use preconstructed gather evaluators.
virtual const Teuchos::RCP< Epetra_Import > getGhostedColImport(int i) const
get importer for converting an overalapped object to a &quot;normal&quot; object
void addExcludedPair(int rowBlock, int colBlock)
exclude a block pair from the matrix
void ghostToGlobalEpetraVector(int i, const Epetra_Vector &in, Epetra_Vector &out, bool col) const
virtual const Teuchos::RCP< Epetra_Map > getColMap(int i) const
get the map from the matrix
Teuchos::RCP< const GlobalIndexer > getGlobalIndexer() const
Get the &quot;parent&quot; global indexer (if getFieldBlocks()&gt;1 this will be blocked, otherwise it may be eith...
virtual const Teuchos::RCP< Epetra_Export > getGhostedColExport2(int i) const
Get or create the i-th ghosted column exporter corresponding to the i-th ghosted column map...
Teuchos::RCP< panzer::CloneableEvaluator > buildScatterDirichlet() const
Use preconstructed dirichlet scatter evaluators.
std::vector< Teuchos::RCP< Epetra_Import > > colImporters_
The list of ghosted importers corresponding to colGhostedMaps_.
std::vector< Teuchos::RCP< Epetra_Map > > colGhostedMaps2_
The list of ghosted column maps corresponding to the ghosted indices of the (column) global indexers...
virtual const Teuchos::RCP< Epetra_Map > buildGhostedMap2(int i) const
Build the i-th ghosted map from the ghosted indices of the i-th global indexer.
Teuchos::RCP< const Thyra::VectorSpaceBase< double > > getThyraDomainSpace() const
Get the domain vector space (x and dxdt)
int getFieldBlocks() const
Get the number of global indexers (not including the blocked one) contained.
virtual const Teuchos::RCP< Epetra_CrsGraph > getGraph(int i, int j) const
get the graph of the crs matrix
void initializeGhostedContainer(int, LinearObjContainer &loc) const
void ghostToGlobalThyraMatrix(const Thyra::LinearOpBase< double > &in, Thyra::LinearOpBase< double > &out) const
virtual const Teuchos::RCP< Epetra_Export > getGhostedExport(int j) const
get exporter for converting an overalapped object to a &quot;normal&quot; object
virtual const Teuchos::RCP< Epetra_Map > getGhostedColMap2(int i) const
Get or create the i-th ghosted column map.
Pushes residual values into the residual vector for a Newton-based solve.
virtual const Teuchos::RCP< Epetra_Import > getGhostedColImport2(int i) const
Get or create the i-th ghosted column importer corresponding to the i-th ghosted column map...
Teuchos::RCP< Thyra::VectorBase< double > > getThyraRangeVector() const
Get a range vector.
Gathers solution values from the Newton solution vector into the nodal fields of the field manager...
virtual const Teuchos::RCP< Epetra_Map > getGhostedMap(int i) const
get the ghosted map from the matrix
std::vector< Teuchos::RCP< Epetra_Map > > ghostedMaps_
The list of ghosted maps corresponding to the owned and ghosted indices of the global indexers...
std::vector< Teuchos::RCP< Epetra_Export > > colExporters_
virtual void readVector(const std::string &identifier, LinearObjContainer &loc, int id) const
virtual Teuchos::RCP< ReadOnlyVector_GlobalEvaluationData > buildReadOnlyDomainContainer() const
virtual Teuchos::RCP< LinearObjContainer > buildGhostedLinearObjContainer() const
Gathers orientations per field from the global indexer and stores them in the field manager...
virtual void applyDirichletBCs(const LinearObjContainer &counter, LinearObjContainer &result) const
std::unordered_map< std::pair< int, int >, Teuchos::RCP< Epetra_CrsGraph >, panzer::pair_hash > ghostedGraphs_
#define TEUCHOS_ASSERT(assertion_test)
const std::vector< Teuchos::RCP< const GlobalIndexer > > & getDomainGlobalIndexers() const
Get global indexers associated with the blocks.
std::vector< Teuchos::RCP< Epetra_Map > > ghostedMaps2_
The list of ghosted maps corresponding to the ghosted indices of the global indexers.
void globalToGhostEpetraVector(int i, const Epetra_Vector &in, Epetra_Vector &out, bool col) const
std::vector< Teuchos::RCP< Epetra_Import > > importers_
The list of ghosted importers corresponding to ghostedMaps_.
virtual Teuchos::RCP< WriteVector_GlobalEvaluationData > buildWriteDomainContainer() const
const std::vector< Teuchos::RCP< const GlobalIndexer > > & getFieldDOFManagers() const
Get DOFManagers associated with the blocks.
virtual const Teuchos::RCP< Epetra_Map > buildMap(int i) const
Build the i-th owned map from the owned indices of the i-th global indexer.
virtual Teuchos::RCP< LinearObjContainer > buildLinearObjContainer() const
void globalToGhostThyraVector(const Teuchos::RCP< const Thyra::VectorBase< double > > &in, const Teuchos::RCP< Thyra::VectorBase< double > > &out, bool col) const
virtual Teuchos::RCP< LinearObjContainer > buildPrimitiveGhostedLinearObjContainer() const
virtual void ghostToGlobalContainer(const LinearObjContainer &ghostContainer, LinearObjContainer &container, int) const
Teuchos::RCP< const Thyra::VectorSpaceBase< double > > getGhostedThyraRangeSpace() const
Get the range vector space (f)
Teuchos::RCP< const DOFManagerContainer > rowDOFManagerContainer_
const std::vector< Teuchos::RCP< const GlobalIndexer > > & getRangeGlobalIndexers() const
Get global indexers associated with the blocks.
Teuchos::RCP< const Thyra::VectorSpaceBase< double > > getGhostedThyraDomainSpace() const
Get the domain vector space (x and dxdt)
Teuchos::RCP< const Thyra::VectorSpaceBase< double > > getGhostedThyraDomainSpace2() const
Get or create the ghosted Thyra domain space.
virtual const Teuchos::RCP< Epetra_Export > getGhostedExport2(int i) const
Get or create the i-th ghosted exporter corresponding to the i-th ghosted map.
Pushes residual values into the residual vector for a Newton-based solve.
Teuchos::RCP< panzer::CloneableEvaluator > buildGatherOrientation() const
Use preconstructed gather evaluators.