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 //
4 // Panzer: A partial differential equation assembly
5 // engine for strongly coupled complex multiphysics systems
6 // Copyright (2011) Sandia Corporation
7 //
8 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9 // the U.S. Government retains certain rights in this software.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 //
15 // 1. Redistributions of source code must retain the above copyright
16 // notice, this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright
19 // notice, this list of conditions and the following disclaimer in the
20 // documentation and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of the Corporation nor the names of the
23 // contributors may be used to endorse or promote products derived from
24 // this software without specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 // Questions? Contact Roger P. Pawlowski (rppawlo@sandia.gov) and
39 // Eric C. Cyr (eccyr@sandia.gov)
40 // ***********************************************************************
41 // @HEADER
42 
43 #ifndef __Panzer_BlockedEpetraLinearObjFactory_hpp__
44 #define __Panzer_BlockedEpetraLinearObjFactory_hpp__
45 
46 #include <map>
47 
48 // Epetra includes
49 #include "Epetra_Map.h"
50 #include "Epetra_CrsGraph.h"
51 #include "Epetra_Import.h"
52 #include "Epetra_Export.h"
53 
54 #include "PanzerDiscFE_config.hpp"
61 
62 #include "Panzer_GatherOrientation.hpp"
63 #include "Panzer_GatherSolution_BlockedEpetra.hpp"
64 #include "Panzer_GatherTangent_BlockedEpetra.hpp"
65 #include "Panzer_ScatterResidual_BlockedEpetra.hpp"
66 #include "Panzer_ScatterDirichletResidual_BlockedEpetra.hpp"
67 #include "Panzer_ScatterResidual_Epetra.hpp"
68 #include "Panzer_ScatterDirichletResidual_Epetra.hpp"
69 #include "Panzer_GatherSolution_Epetra.hpp"
70 #include "Panzer_GatherTangent_Epetra.hpp"
71 #include "Panzer_GatherOrientation.hpp"
73 #include "Panzer_HashUtils.hpp"
74 
75 #include "Thyra_BlockedLinearOpBase.hpp"
76 #include "Thyra_ProductVectorBase.hpp"
77 
78 #include "Teuchos_RCP.hpp"
80 #include "Teuchos_OpaqueWrapper.hpp"
81 
82 namespace panzer
83 {
84 
85 template <typename Traits,typename LocalOrdinalT>
87  , public ThyraObjFactory<double> {
88 public:
89 
92  bool useDiscreteAdjoint=false);
93 
96  const Teuchos::RCP<const UniqueGlobalIndexerBase> & colGidProvider,
97  bool useDiscreteAdjoint=false);
98 
100 
101 /*************** Linear object factory methods *******************/
102 
103  virtual void readVector(const std::string & identifier,LinearObjContainer & loc,int id) const;
104 
105  virtual void writeVector(const std::string & identifier,const LinearObjContainer & loc,int id) const;
106 
108 
110  { return buildLinearObjContainer(); }
111 
113 
115  { return buildGhostedLinearObjContainer(); }
116 
117  virtual void globalToGhostContainer(const LinearObjContainer & container,
118  LinearObjContainer & ghostContainer,int) const;
119  virtual void ghostToGlobalContainer(const LinearObjContainer & ghostContainer,
120  LinearObjContainer & container,int) const;
121 
128  virtual void adjustForDirichletConditions(const LinearObjContainer & localBCRows,
129  const LinearObjContainer & globalBCRows,
130  LinearObjContainer & ghostedObjs,
131  bool zeroVectorRows=false, bool adjustX=false) const;
132 
136  virtual void applyDirichletBCs(const LinearObjContainer & counter,
137  LinearObjContainer & result) const;
138 
144 
150 
151  virtual Teuchos::MpiComm<int> getComm() const;
152 
154  template <typename EvalT>
156  {
157  if(!colDOFManagerContainer_->containsBlockedDOFManager() &&
158  !rowDOFManagerContainer_->containsBlockedDOFManager())
160  colDOFManagerContainer_->getFieldDOFManagers()[0],
162 
164  colDOFManagerContainer_->getFieldDOFManagers(),
166  }
167 
169  template <typename EvalT>
171  {
172  if(!colDOFManagerContainer_->containsBlockedDOFManager() &&
173  !rowDOFManagerContainer_->containsBlockedDOFManager())
176  }
177 
179  template <typename EvalT>
181  {
182  if(!colDOFManagerContainer_->containsBlockedDOFManager() &&
183  !rowDOFManagerContainer_->containsBlockedDOFManager())
186  }
187 
189  template <typename EvalT>
191  {
192  if(!colDOFManagerContainer_->containsBlockedDOFManager())
195  }
196 
198  template <typename EvalT>
201 
203  template <typename EvalT>
205  {
206  if(!colDOFManagerContainer_->containsBlockedDOFManager() &&
207  !rowDOFManagerContainer_->containsBlockedDOFManager())
209  colDOFManagerContainer_->getFieldDOFManagers()[0]));
211  colDOFManagerContainer_->getFieldDOFManagers()));
212  }
213 
214 /*************** Generic helper functions for container setup *******************/
215 
221  void initializeContainer(int,LinearObjContainer & loc) const;
222 
228  void initializeGhostedContainer(int,LinearObjContainer & loc) const;
229 
230 /*************** Thyra based methods *******************/
231 
234 
237 
240 
243 
246 
247  // and now the ghosted versions
248 
251 
265 
268 
271 
274 
277 
278 /*************** Epetra based methods *******************/
279 
281  virtual const Teuchos::RCP<Epetra_Map> getMap(int i) const;
282 
284  virtual const Teuchos::RCP<Epetra_Map> getColMap(int i) const;
285 
287  virtual const Teuchos::RCP<Epetra_Map> getGhostedMap(int i) const;
288 
299  virtual const Teuchos::RCP<Epetra_Map>
301  int i) const;
302 
304  virtual const Teuchos::RCP<Epetra_Map> getGhostedColMap(int i) const;
305 
316  virtual const Teuchos::RCP<Epetra_Map>
318  int i) const;
319 
321  virtual const Teuchos::RCP<Epetra_CrsGraph> getGraph(int i,int j) const;
322 
324  virtual const Teuchos::RCP<Epetra_CrsGraph> getGhostedGraph(int i,int j) const;
325 
327  virtual const Teuchos::RCP<Epetra_Import> getGhostedImport(int i) const;
328 
340  virtual const Teuchos::RCP<Epetra_Import>
342  int i) const;
343 
345  virtual const Teuchos::RCP<Epetra_Import> getGhostedColImport(int i) const;
346 
358  virtual const Teuchos::RCP<Epetra_Import>
360  int i) const;
361 
363  virtual const Teuchos::RCP<Epetra_Export> getGhostedExport(int j) const;
364 
376  virtual const Teuchos::RCP<Epetra_Export>
378  int i) const;
379 
381  virtual const Teuchos::RCP<Epetra_Export> getGhostedColExport(int j) const;
382 
394  virtual const Teuchos::RCP<Epetra_Export>
396  int i) const;
397 
399  virtual const Teuchos::RCP<const Epetra_Comm> getEpetraComm() const;
400 
403 
405  int getBlockRowCount() const;
406 
408  int getBlockColCount() const;
409 
411  { return rowDOFManagerContainer_->getBlockedIndexer(); }
412 
414  { return rowDOFManagerContainer_->getGlobalIndexer(); }
415 
417  { return colDOFManagerContainer_->getGlobalIndexer(); }
418 
420  const std::vector<Teuchos::RCP<const UniqueGlobalIndexer<LocalOrdinalT,int> > > & getRangeGlobalIndexers() const
421  { return rowDOFManagerContainer_->getFieldDOFManagers(); }
422 
424  const std::vector<Teuchos::RCP<const UniqueGlobalIndexer<LocalOrdinalT,int> > > & getDomainGlobalIndexers() const
425  { return colDOFManagerContainer_->getFieldDOFManagers(); }
426 
428  void addExcludedPair(int rowBlock,int colBlock);
429 
431  void addExcludedPairs(const std::vector<std::pair<int,int> > & exPairs);
432 
433 protected:
434 
441 
448 
449 /*************** Utility class for handling blocked and nonblocked DOF managers *******************/
450 
455  public:
458  { setGlobalIndexer(ugi); }
459 
461  {
462  using Teuchos::RCP;
463  using Teuchos::rcp_dynamic_cast;
464 
465  auto blockedDOFManager = rcp_dynamic_cast<const BlockedDOFManager<LocalOrdinalT,int> >(ugi);
466  auto flatDOFManager = rcp_dynamic_cast<const UniqueGlobalIndexer<LocalOrdinalT,int> >(ugi);
467 
468  if(blockedDOFManager!=Teuchos::null) {
469  // set BlockedDOFManager
470  blockedDOFManager_ = blockedDOFManager;
471 
472  // get all GID providers
473  auto dofManagers = blockedDOFManager_->getFieldDOFManagers();
474  for(auto itr=dofManagers.begin();itr!=dofManagers.end();++itr)
475  gidProviders_.push_back(*itr);
476  }
477  else if(flatDOFManager!=Teuchos::null) {
478  // for absolute clarity, nullify the blockedDOFManager_
479  blockedDOFManager_ = Teuchos::null;
480 
481  // you have only a single GID provider
482  gidProviders_.push_back(flatDOFManager);
483  }
484  else {
485  TEUCHOS_ASSERT(false);
486  }
487  }
488 
490  int getFieldBlocks() const
491  { return Teuchos::as<int>(gidProviders_.size()); }
492 
498  { return blockedDOFManager_ !=Teuchos::null; }
499 
502  {
504  return blockedDOFManager_;
505  }
506 
509  {
510  if(blockedDOFManager_!=Teuchos::null)
511  return blockedDOFManager_;
512 
513  TEUCHOS_ASSERT(gidProviders_.size()==1);
514  return gidProviders_[0];
515  }
516 
518  const std::vector<Teuchos::RCP<const UniqueGlobalIndexer<LocalOrdinalT,int> > > & getFieldDOFManagers() const
519  { return gidProviders_; }
520 
521  private:
523  std::vector<Teuchos::RCP<const UniqueGlobalIndexer<LocalOrdinalT,int> > > gidProviders_;
524  };
525 
526 /*************** Generic methods/members *******************/
527 
528  // Get the global indexer associated with a particular block
530 
532 
534  void makeRoomForBlocks(std::size_t blockCnt,std::size_t colBlockCnt=0);
535 
538 
540 
541  // which block entries are ignored
542  std::unordered_set<std::pair<int,int>,panzer::pair_hash> excludedPairs_;
543 
544 /*************** Thyra based methods/members *******************/
545 
547  const Teuchos::RCP<Thyra::VectorBase<double> > & out,bool col) const;
550  const Teuchos::RCP<Thyra::VectorBase<double> > & out,bool col) const;
551 
554 
557 
558 /*************** Epetra based methods/members *******************/
559 
560  void adjustForDirichletConditions(const Epetra_Vector & local_bcs,
561  const Epetra_Vector & global_bcs,
562  const Teuchos::Ptr<Epetra_Vector> & f,
564  bool zeroVectorRows) const;
565 
566  void ghostToGlobalEpetraVector(int i,const Epetra_Vector & in,Epetra_Vector & out,bool col) const;
567  void globalToGhostEpetraVector(int i,const Epetra_Vector & in,Epetra_Vector & out,bool col) const;
568  void ghostToGlobalEpetraMatrix(int blockRow,const Epetra_CrsMatrix & in,Epetra_CrsMatrix & out) const;
569 
570  // get the map from the matrix
571 
580  virtual const Teuchos::RCP<Epetra_Map>
581  buildMap(
582  int i) const;
583 
592  virtual const Teuchos::RCP<Epetra_Map>
594  int i) const;
595 
604  virtual const Teuchos::RCP<Epetra_Map>
606  int i) const;
607 
608  // get the map from the matrix
609 
618  virtual const Teuchos::RCP<Epetra_Map>
619  buildColMap(
620  int i) const;
621 
630  virtual const Teuchos::RCP<Epetra_Map>
632  int i) const;
633 
642  virtual const Teuchos::RCP<Epetra_Map>
644  int i) const;
645 
646  // get the graph of the crs matrix
647  virtual const Teuchos::RCP<Epetra_CrsGraph> buildGraph(int i,int j) const;
648  virtual const Teuchos::RCP<Epetra_CrsGraph> buildGhostedGraph(int i,int j,bool optimizeStorage) const;
649  virtual const Teuchos::RCP<Epetra_CrsGraph> buildFilteredGhostedGraph(int i,int j) const;
650 
651  // storage for Epetra graphs and maps
655 
660  mutable std::vector<Teuchos::RCP<Epetra_Map>> maps_;
661 
666  mutable std::vector<Teuchos::RCP<Epetra_Map>> ghostedMaps_;
667 
672  mutable std::vector<Teuchos::RCP<Epetra_Map>> ghostedMaps2_;
673 
677  mutable std::vector<Teuchos::RCP<Epetra_Import>> importers_;
678 
682  mutable std::vector<Teuchos::RCP<Epetra_Import>> importers2_;
683 
684  mutable std::vector<Teuchos::RCP<Epetra_Export>> exporters_;
685 
690  mutable std::vector<Teuchos::RCP<Epetra_Map>> colMaps_;
691 
696  mutable std::vector<Teuchos::RCP<Epetra_Map>> colGhostedMaps_;
697 
702  mutable std::vector<Teuchos::RCP<Epetra_Map>> colGhostedMaps2_;
703 
707  mutable std::vector<Teuchos::RCP<Epetra_Import>> colImporters_;
708 
713  mutable std::vector<Teuchos::RCP<Epetra_Import>> colImporters2_;
714 
715  mutable std::vector<Teuchos::RCP<Epetra_Export>> colExporters_;
716 
717  mutable std::unordered_map<std::pair<int,int>,Teuchos::RCP<Epetra_CrsGraph>,panzer::pair_hash> graphs_ ;
718  mutable std::unordered_map<std::pair<int,int>,Teuchos::RCP<Epetra_CrsGraph>,panzer::pair_hash> ghostedGraphs_;
719 
721 };
722 
723 } // end of namespace panzer
724 
725 #endif // __Panzer_BlockedEpetraLinearObjFactory_hpp__
Teuchos::RCP< const panzer::UniqueGlobalIndexerBase > 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
const std::vector< Teuchos::RCP< const UniqueGlobalIndexer< LocalOrdinalT, int > > > & getRangeGlobalIndexers() const
Get global indexers associated with the blocks.
void setGlobalIndexer(const Teuchos::RCP< const UniqueGlobalIndexerBase > &ugi)
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.
const std::vector< Teuchos::RCP< const UniqueGlobalIndexer< LocalOrdinalT, int > > > & getFieldDOFManagers() const
Get DOFManagers associated with the blocks.
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.
Teuchos::RCP< const panzer::UniqueGlobalIndexerBase > getRangeGlobalIndexer() const
Get the range global indexer object associated with this factory.
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_
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 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_
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
DOFManagerContainer(const Teuchos::RCP< const UniqueGlobalIndexerBase > &ugi)
void addExcludedPairs(const std::vector< std::pair< int, int > > &exPairs)
exclude a vector of pairs from the matrix
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
Teuchos::RCP< const BlockedDOFManager< LocalOrdinalT, int > > blockedDOFManager_
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
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.
Teuchos::RCP< const panzer::BlockedDOFManager< int, int > > getGlobalIndexer() const
Teuchos::RCP< const BlockedDOFManager< LocalOrdinalT, int > > getBlockedIndexer() const
Get the &quot;parent&quot; global indexer (if containsBlockedDOFManager()==false this will throw) ...
Gathers solution values from the Newton solution vector into the nodal fields of the field manager...
std::vector< Teuchos::RCP< const UniqueGlobalIndexer< LocalOrdinalT, int > > > gidProviders_
virtual const Teuchos::RCP< Epetra_Map > getGhostedMap(int i) const
get the ghosted map from the matrix
const std::vector< Teuchos::RCP< const UniqueGlobalIndexer< LocalOrdinalT, int > > > & getDomainGlobalIndexers() const
Get global indexers associated with the blocks.
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)
Teuchos::RCP< const UniqueGlobalIndexer< LocalOrdinalT, int > > getColGlobalIndexer(int i) const
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
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 UniqueGlobalIndexerBase > getGlobalIndexer() const
Get the &quot;parent&quot; global indexer (if getFieldBlocks()&gt;1 this will be blocked, otherwise it may be eith...
Teuchos::RCP< const Thyra::VectorSpaceBase< double > > getGhostedThyraRangeSpace() const
Get the range vector space (f)
Teuchos::RCP< const DOFManagerContainer > rowDOFManagerContainer_
BlockedEpetraLinearObjFactory(const Teuchos::RCP< const Teuchos::MpiComm< int > > &comm, const Teuchos::RCP< const UniqueGlobalIndexerBase > &gidProvider, bool useDiscreteAdjoint=false)
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.