Panzer  Version of the Day
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 template <typename Traits,typename LocalOrdinalT>
86  , public ThyraObjFactory<double> {
87 public:
88 
89  BlockedEpetraLinearObjFactory(const Teuchos::RCP<const Teuchos::MpiComm<int> > & comm,
91  bool useDiscreteAdjoint=false);
92 
93  BlockedEpetraLinearObjFactory(const Teuchos::RCP<const Teuchos::MpiComm<int> > & comm,
95  const Teuchos::RCP<const UniqueGlobalIndexerBase> & colGidProvider,
96  bool useDiscreteAdjoint=false);
97 
99 
100 /*************** Linear object factory methods *******************/
101 
102  virtual void readVector(const std::string & identifier,LinearObjContainer & loc,int id) const;
103 
104  virtual void writeVector(const std::string & identifier,const LinearObjContainer & loc,int id) const;
105 
107 
109  { return buildLinearObjContainer(); }
110 
112 
114  { return buildGhostedLinearObjContainer(); }
115 
116  virtual void globalToGhostContainer(const LinearObjContainer & container,
117  LinearObjContainer & ghostContainer,int) const;
118  virtual void ghostToGlobalContainer(const LinearObjContainer & ghostContainer,
119  LinearObjContainer & container,int) const;
120 
127  virtual void adjustForDirichletConditions(const LinearObjContainer & localBCRows,
128  const LinearObjContainer & globalBCRows,
129  LinearObjContainer & ghostedObjs,
130  bool zeroVectorRows=false, bool adjustX=false) const;
131 
135  virtual void applyDirichletBCs(const LinearObjContainer & counter,
136  LinearObjContainer & result) const;
137 
143 
144  virtual Teuchos::MpiComm<int> getComm() const;
145 
147  template <typename EvalT>
149  {
150  if(!colDOFManagerContainer_->containsBlockedDOFManager() &&
151  !rowDOFManagerContainer_->containsBlockedDOFManager())
153  colDOFManagerContainer_->getFieldDOFManagers()[0],
155 
157  colDOFManagerContainer_->getFieldDOFManagers(),
159  }
160 
162  template <typename EvalT>
164  {
165  if(!colDOFManagerContainer_->containsBlockedDOFManager() &&
166  !rowDOFManagerContainer_->containsBlockedDOFManager())
169  }
170 
172  template <typename EvalT>
174  {
175  if(!colDOFManagerContainer_->containsBlockedDOFManager() &&
176  !rowDOFManagerContainer_->containsBlockedDOFManager())
179  }
180 
182  template <typename EvalT>
184  {
185  if(!colDOFManagerContainer_->containsBlockedDOFManager())
188  }
189 
191  template <typename EvalT>
194 
196  template <typename EvalT>
198  {
199  if(!colDOFManagerContainer_->containsBlockedDOFManager() &&
200  !rowDOFManagerContainer_->containsBlockedDOFManager())
202  colDOFManagerContainer_->getFieldDOFManagers()[0]));
204  colDOFManagerContainer_->getFieldDOFManagers()));
205  }
206 
207 /*************** Generic helper functions for container setup *******************/
208 
214  void initializeContainer(int,LinearObjContainer & loc) const;
215 
221  void initializeGhostedContainer(int,LinearObjContainer & loc) const;
222 
223 /*************** Thyra based methods *******************/
224 
227 
230 
233 
236 
239 
240  // and now the ghosted versions
241 
244 
247 
250 
253 
256 
257 /*************** Epetra based methods *******************/
258 
260  virtual const Teuchos::RCP<Epetra_Map> getMap(int i) const;
261 
263  virtual const Teuchos::RCP<Epetra_Map> getColMap(int i) const;
264 
266  virtual const Teuchos::RCP<Epetra_Map> getGhostedMap(int i) const;
267 
269  virtual const Teuchos::RCP<Epetra_Map> getGhostedColMap(int i) const;
270 
272  virtual const Teuchos::RCP<Epetra_CrsGraph> getGraph(int i,int j) const;
273 
275  virtual const Teuchos::RCP<Epetra_CrsGraph> getGhostedGraph(int i,int j) const;
276 
278  virtual const Teuchos::RCP<Epetra_Import> getGhostedImport(int i) const;
279 
281  virtual const Teuchos::RCP<Epetra_Import> getGhostedColImport(int i) const;
282 
284  virtual const Teuchos::RCP<Epetra_Export> getGhostedExport(int j) const;
285 
287  virtual const Teuchos::RCP<Epetra_Export> getGhostedColExport(int j) const;
288 
290  virtual const Teuchos::RCP<const Epetra_Comm> getEpetraComm() const;
291 
294 
296  int getBlockRowCount() const;
297 
299  int getBlockColCount() const;
300 
302  { return rowDOFManagerContainer_->getBlockedIndexer(); }
303 
305  { return rowDOFManagerContainer_->getGlobalIndexer(); }
306 
308  { return colDOFManagerContainer_->getGlobalIndexer(); }
309 
311  const std::vector<Teuchos::RCP<const UniqueGlobalIndexer<LocalOrdinalT,int> > > & getRangeGlobalIndexers() const
312  { return rowDOFManagerContainer_->getFieldDOFManagers(); }
313 
315  const std::vector<Teuchos::RCP<const UniqueGlobalIndexer<LocalOrdinalT,int> > > & getDomainGlobalIndexers() const
316  { return colDOFManagerContainer_->getFieldDOFManagers(); }
317 
319  void addExcludedPair(int rowBlock,int colBlock);
320 
322  void addExcludedPairs(const std::vector<std::pair<int,int> > & exPairs);
323 
324 protected:
325 
332 
339 
340 /*************** Utility class for handling blocked and nonblocked DOF managers *******************/
341 
346  public:
349  { setGlobalIndexer(ugi); }
350 
352  {
353  using Teuchos::RCP;
354  using Teuchos::rcp_dynamic_cast;
355 
356  auto blockedDOFManager = rcp_dynamic_cast<const BlockedDOFManager<LocalOrdinalT,int> >(ugi);
357  auto flatDOFManager = rcp_dynamic_cast<const UniqueGlobalIndexer<LocalOrdinalT,int> >(ugi);
358 
359  if(blockedDOFManager!=Teuchos::null) {
360  // set BlockedDOFManager
361  blockedDOFManager_ = blockedDOFManager;
362 
363  // get all GID providers
364  auto dofManagers = blockedDOFManager_->getFieldDOFManagers();
365  for(auto itr=dofManagers.begin();itr!=dofManagers.end();++itr)
366  gidProviders_.push_back(*itr);
367  }
368  else if(flatDOFManager!=Teuchos::null) {
369  // for absolute clarity, nullify the blockedDOFManager_
370  blockedDOFManager_ = Teuchos::null;
371 
372  // you have only a single GID provider
373  gidProviders_.push_back(flatDOFManager);
374  }
375  else {
376  TEUCHOS_ASSERT(false);
377  }
378  }
379 
381  int getFieldBlocks() const
382  { return Teuchos::as<int>(gidProviders_.size()); }
383 
389  { return blockedDOFManager_ !=Teuchos::null; }
390 
393  {
395  return blockedDOFManager_;
396  }
397 
400  {
401  if(blockedDOFManager_!=Teuchos::null)
402  return blockedDOFManager_;
403 
404  TEUCHOS_ASSERT(gidProviders_.size()==1);
405  return gidProviders_[0];
406  }
407 
409  const std::vector<Teuchos::RCP<const UniqueGlobalIndexer<LocalOrdinalT,int> > > & getFieldDOFManagers() const
410  { return gidProviders_; }
411 
412  private:
414  std::vector<Teuchos::RCP<const UniqueGlobalIndexer<LocalOrdinalT,int> > > gidProviders_;
415  };
416 
417 /*************** Generic methods/members *******************/
418 
419  // Get the global indexer associated with a particular block
421 
423 
425  void makeRoomForBlocks(std::size_t blockCnt,std::size_t colBlockCnt=0);
426 
429 
431 
432  // which block entries are ignored
433  std::unordered_set<std::pair<int,int>,panzer::pair_hash> excludedPairs_;
434 
435 /*************** Thyra based methods/members *******************/
436 
438  const Teuchos::RCP<Thyra::VectorBase<double> > & out,bool col) const;
441  const Teuchos::RCP<Thyra::VectorBase<double> > & out,bool col) const;
442 
445 
448 
449 /*************** Epetra based methods/members *******************/
450 
451  void adjustForDirichletConditions(const Epetra_Vector & local_bcs,
452  const Epetra_Vector & global_bcs,
453  const Teuchos::Ptr<Epetra_Vector> & f,
455  bool zeroVectorRows) const;
456 
457  void ghostToGlobalEpetraVector(int i,const Epetra_Vector & in,Epetra_Vector & out,bool col) const;
458  void globalToGhostEpetraVector(int i,const Epetra_Vector & in,Epetra_Vector & out,bool col) const;
459  void ghostToGlobalEpetraMatrix(int blockRow,const Epetra_CrsMatrix & in,Epetra_CrsMatrix & out) const;
460 
461  // get the map from the matrix
462  virtual const Teuchos::RCP<Epetra_Map> buildMap(int i) const;
463  virtual const Teuchos::RCP<Epetra_Map> buildGhostedMap(int i) const;
464 
465  // get the map from the matrix
466  virtual const Teuchos::RCP<Epetra_Map> buildColMap(int i) const;
467  virtual const Teuchos::RCP<Epetra_Map> buildColGhostedMap(int i) const;
468 
469  // get the graph of the crs matrix
470  virtual const Teuchos::RCP<Epetra_CrsGraph> buildGraph(int i,int j) const;
471  virtual const Teuchos::RCP<Epetra_CrsGraph> buildGhostedGraph(int i,int j,bool optimizeStorage) const;
472  virtual const Teuchos::RCP<Epetra_CrsGraph> buildFilteredGhostedGraph(int i,int j) const;
473 
474  // storage for Epetra graphs and maps
478 
479  mutable std::vector<Teuchos::RCP<Epetra_Map> > maps_;
480  mutable std::vector<Teuchos::RCP<Epetra_Map> > ghostedMaps_;
481  mutable std::vector<Teuchos::RCP<Epetra_Import> > importers_;
482  mutable std::vector<Teuchos::RCP<Epetra_Export> > exporters_;
483 
484  mutable std::vector<Teuchos::RCP<Epetra_Map> > colMaps_;
485  mutable std::vector<Teuchos::RCP<Epetra_Map> > colGhostedMaps_;
486  mutable std::vector<Teuchos::RCP<Epetra_Import> > colImporters_;
487  mutable std::vector<Teuchos::RCP<Epetra_Export> > colExporters_;
488 
489  mutable std::unordered_map<std::pair<int,int>,Teuchos::RCP<Epetra_CrsGraph>,panzer::pair_hash> graphs_ ;
490  mutable std::unordered_map<std::pair<int,int>,Teuchos::RCP<Epetra_CrsGraph>,panzer::pair_hash> ghostedGraphs_;
491 
493 };
494 
495 }
496 
497 #endif
Teuchos::RCP< Thyra::VectorBase< double > > getGhostedThyraRangeVector() const
Get a range vector.
void ghostToGlobalEpetraVector(int i, const Epetra_Vector &in, Epetra_Vector &out, bool col) const
std::vector< Teuchos::RCP< Epetra_Map > > colGhostedMaps_
virtual Teuchos::RCP< LinearObjContainer > buildGhostedLinearObjContainer() const
Gathers solution values from the Newton solution vector into the nodal fields of the field manager...
std::vector< Teuchos::RCP< Epetra_Map > > colMaps_
virtual const Teuchos::RCP< Epetra_Map > buildMap(int i) const
Teuchos::RCP< Epetra_CrsMatrix > getGhostedEpetraMatrix(int i, int j) const
virtual const Teuchos::RCP< Epetra_Export > getGhostedExport(int j) const
get exporter for converting an overalapped object to a "normal" object
Teuchos::RCP< Thyra::LinearOpBase< double > > getThyraMatrix() const
Get a Thyra operator.
Teuchos::RCP< const BlockedDOFManager< LocalOrdinalT, int > > getBlockedIndexer() const
Get the "parent" global indexer (if containsBlockedDOFManager()==false this will throw) ...
virtual void readVector(const std::string &identifier, LinearObjContainer &loc, int id) const
Teuchos::RCP< const Thyra::VectorSpaceBase< double > > domainSpace_
std::unordered_set< std::pair< int, int >, panzer::pair_hash > excludedPairs_
Teuchos::RCP< const Thyra::VectorSpaceBase< double > > ghostedRangeSpace_
virtual void ghostToGlobalContainer(const LinearObjContainer &ghostContainer, LinearObjContainer &container, int) const
Teuchos::RCP< Thyra::VectorBase< double > > getThyraDomainVector() const
Get a domain vector.
virtual const Teuchos::RCP< Epetra_Map > buildColMap(int i) const
void globalToGhostEpetraVector(int i, const Epetra_Vector &in, Epetra_Vector &out, bool col) const
void globalToGhostThyraVector(const Teuchos::RCP< const Thyra::VectorBase< double > > &in, const Teuchos::RCP< Thyra::VectorBase< double > > &out, bool col) const
Gathers tangent vectors dx/dp for computing df/dx*dx/dp + df/dp into the nodal fields of the field ma...
Teuchos::RCP< const UniqueGlobalIndexer< LocalOrdinalT, int > > getColGlobalIndexer(int i) const
virtual Teuchos::RCP< LinearObjContainer > buildPrimitiveLinearObjContainer() const
virtual const Teuchos::RCP< Epetra_CrsGraph > buildGhostedGraph(int i, int j, bool optimizeStorage) const
virtual Teuchos::RCP< ReadOnlyVector_GlobalEvaluationData > buildDomainContainer() const
Teuchos::RCP< const Thyra::VectorSpaceBase< double > > getThyraRangeSpace() const
Get the range vector space (f)
Teuchos::RCP< const Thyra::VectorSpaceBase< double > > getGhostedThyraRangeSpace() const
Get the range vector space (f)
void setGlobalIndexer(const Teuchos::RCP< const UniqueGlobalIndexerBase > &ugi)
virtual const Teuchos::RCP< Epetra_Map > getMap(int i) const
get the map from the matrix
Teuchos::RCP< Thyra::VectorBase< double > > getThyraRangeVector() const
Get a range vector.
void ghostToGlobalEpetraMatrix(int blockRow, const Epetra_CrsMatrix &in, Epetra_CrsMatrix &out) const
std::vector< Teuchos::RCP< Epetra_Map > > maps_
virtual const Teuchos::RCP< Epetra_Import > getGhostedImport(int i) const
get importer for converting an overalapped object to a "normal" object
std::unordered_map< std::pair< int, int >, Teuchos::RCP< Epetra_CrsGraph >, panzer::pair_hash > graphs_
Teuchos::RCP< const Thyra::VectorSpaceBase< double > > rangeSpace_
PHX::MDField< ScalarT > vector
void ghostToGlobalThyraVector(const Teuchos::RCP< const Thyra::VectorBase< double > > &in, const Teuchos::RCP< Thyra::VectorBase< double > > &out, bool col) const
void ghostToGlobalThyraMatrix(const Thyra::LinearOpBase< double > &in, Thyra::LinearOpBase< double > &out) const
const std::vector< Teuchos::RCP< const UniqueGlobalIndexer< LocalOrdinalT, int > > > & getDomainGlobalIndexers() const
Get global indexers associated with the blocks.
std::vector< Teuchos::RCP< Epetra_Export > > exporters_
virtual const Teuchos::RCP< Epetra_CrsGraph > getGhostedGraph(int i, int j) const
get the ghosted graph of the crs matrix
Pushes residual values into the residual vector for a Newton-based solve.
Teuchos::RCP< const panzer::UniqueGlobalIndexerBase > getDomainGlobalIndexer() const
Get the domain global indexer object associated with this factory.
virtual const Teuchos::RCP< Epetra_CrsGraph > buildFilteredGhostedGraph(int i, int j) const
virtual const Teuchos::RCP< Epetra_Map > getColMap(int i) const
get the map from the matrix
const std::vector< Teuchos::RCP< const UniqueGlobalIndexer< LocalOrdinalT, int > > > & getRangeGlobalIndexers() const
Get global indexers associated with the blocks.
Teuchos::RCP< const Thyra::VectorSpaceBase< double > > ghostedDomainSpace_
virtual void applyDirichletBCs(const LinearObjContainer &counter, LinearObjContainer &result) const
Teuchos::RCP< const panzer::UniqueGlobalIndexerBase > getRangeGlobalIndexer() const
Get the range global indexer object associated with this factory.
virtual Teuchos::RCP< LinearObjContainer > buildLinearObjContainer() const
Teuchos::RCP< panzer::CloneableEvaluator > buildGatherTangent() const
Use preconstructed gather evaluators.
Teuchos::RCP< const DOFManagerContainer > colDOFManagerContainer_
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Teuchos::RCP< const Teuchos::OpaqueWrapper< MPI_Comm > > rawMpiComm_
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 void adjustForDirichletConditions(const LinearObjContainer &localBCRows, const LinearObjContainer &globalBCRows, LinearObjContainer &ghostedObjs, bool zeroVectorRows=false, bool adjustX=false) const
Teuchos::RCP< Thyra::VectorBase< double > > getGhostedThyraDomainVector() const
Get a domain vector.
Pushes residual values into the residual vector for a Newton-based solve.
Teuchos::RCP< const BlockedDOFManager< LocalOrdinalT, int > > blockedDOFManager_
virtual const Teuchos::RCP< const Epetra_Comm > getEpetraComm() const
get exporter for converting an overalapped object to a "normal" object
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 > buildScatterDirichlet() const
Use preconstructed dirichlet scatter evaluators.
void addExcludedPair(int rowBlock, int colBlock)
exclude a block pair from the matrix
void initializeGhostedContainer(int, LinearObjContainer &loc) const
virtual const Teuchos::RCP< Epetra_Map > getGhostedMap(int i) const
get the ghosted map from the matrix
Teuchos::RCP< Epetra_CrsMatrix > getEpetraMatrix(int i, int j) const
std::vector< Teuchos::RCP< Epetra_Import > > colImporters_
Teuchos::RCP< panzer::CloneableEvaluator > buildScatter() const
Use preconstructed scatter evaluators.
virtual const Teuchos::RCP< Epetra_CrsGraph > buildGraph(int i, int j) const
Teuchos::RCP< const UniqueGlobalIndexerBase > getGlobalIndexer() const
Get the "parent" global indexer (if getFieldBlocks()>1 this will be blocked, otherwise it may be eith...
void initializeContainer(int, LinearObjContainer &loc) const
virtual const Teuchos::RCP< Epetra_Map > buildColGhostedMap(int i) const
virtual const Teuchos::RCP< Epetra_Map > buildGhostedMap(int i) const
Teuchos::RCP< panzer::CloneableEvaluator > buildGatherOrientation() const
Use preconstructed gather evaluators.
Pushes residual values into the residual vector for a Newton-based solve.
Teuchos::RCP< const Thyra::VectorSpaceBase< double > > getThyraDomainSpace() const
Get the domain vector space (x and dxdt)
void initializeGhostedContainer_internal(int mem, ThyraObjContainer< double > &loc) const
Gathers solution values from the Newton solution vector into the nodal fields of the field manager...
Teuchos::RCP< const Teuchos::Comm< int > > comm
std::vector< Teuchos::RCP< const UniqueGlobalIndexer< LocalOrdinalT, int > > > gidProviders_
virtual const Teuchos::RCP< Epetra_Import > getGhostedColImport(int i) const
get importer for converting an overalapped object to a "normal" object
virtual const Teuchos::RCP< Epetra_CrsGraph > getGraph(int i, int j) const
get the graph of the crs matrix
virtual void writeVector(const std::string &identifier, const LinearObjContainer &loc, int id) const
std::vector< Teuchos::RCP< Epetra_Map > > ghostedMaps_
virtual void globalToGhostContainer(const LinearObjContainer &container, LinearObjContainer &ghostContainer, int) const
Teuchos::RCP< panzer::CloneableEvaluator > buildGatherDomain() const
Use preconstructed gather evaluators.
std::vector< Teuchos::RCP< Epetra_Export > > colExporters_
Gathers tangent vectors dx/dp for computing df/dx*dx/dp + df/dp into the nodal fields of the field ma...
Teuchos::RCP< Thyra::LinearOpBase< double > > getGhostedThyraMatrix() const
Get a Thyra operator.
virtual const Teuchos::RCP< Epetra_Map > getGhostedColMap(int i) const
get the ghosted map from the matrix
Teuchos::RCP< const panzer::BlockedDOFManager< int, int > > getGlobalIndexer() const
Gathers orientations per field from the global indexer and stores them in the field manager...
std::unordered_map< std::pair< int, int >, Teuchos::RCP< Epetra_CrsGraph >, panzer::pair_hash > ghostedGraphs_
#define TEUCHOS_ASSERT(assertion_test)
virtual Teuchos::RCP< LinearObjContainer > buildPrimitiveGhostedLinearObjContainer() const
void initializeContainer_internal(int mem, ThyraObjContainer< double > &loc) const
std::vector< Teuchos::RCP< Epetra_Import > > importers_
const std::vector< Teuchos::RCP< const UniqueGlobalIndexer< LocalOrdinalT, int > > > & getFieldDOFManagers() const
Get DOFManagers associated with the blocks.
int getFieldBlocks() const
Get the number of global indexers (not including the blocked one) contained.
Teuchos::RCP< panzer::CloneableEvaluator > buildGather() const
Use preconstructed gather evaluators.
Teuchos::RCP< const DOFManagerContainer > rowDOFManagerContainer_
virtual const Teuchos::RCP< Epetra_Export > getGhostedColExport(int j) const
get exporter for converting an overalapped object to a "normal" object
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)
Pushes residual values into the residual vector for a Newton-based solve.