17 #include "Panzer_TpetraLinearObjFactory.hpp"
20 #ifdef PANZER_HAVE_EPETRA_STACK
48 using Teuchos::rcp_dynamic_cast;
50 using Teuchos::ptr_dynamic_cast;
51 using Teuchos::ptrFromRef;
59 #ifdef PANZER_HAVE_EPETRA_STACK
78 Ptr<const TpetraLOF> tpetra_lof = ptr_dynamic_cast<
const TpetraLOF>(ptrFromRef(lof));
79 if(tpetra_lof!=null) {
80 auto rangeUGI = (rUgi==null ? tpetra_lof->getRangeGlobalIndexer() : rUgi);
81 auto domainUGI = (dUgi==null ? tpetra_lof->getDomainGlobalIndexer() : dUgi);
84 return rcp(
new TpetraLOF(mpiComm,rangeUGI,domainUGI));
87 #ifdef PANZER_HAVE_EPETRA_STACK
88 Ptr<const BlockedEpetraLOF> blk_epetra_lof = ptr_dynamic_cast<
const BlockedEpetraLOF>(ptrFromRef(lof));
89 if(blk_epetra_lof!=null) {
90 auto rangeUGI = (rUgi==null ? blk_epetra_lof->getRangeGlobalIndexer() : rUgi);
91 auto domainUGI = (dUgi==null ? blk_epetra_lof->getDomainGlobalIndexer() : dUgi);
93 return rcp(
new BlockedEpetraLOF(mpiComm,rangeUGI,domainUGI));
97 Ptr<const BlockedTpetraLOF> blk_tpetra_lof = ptr_dynamic_cast<
const BlockedTpetraLOF>(ptrFromRef(lof));
98 if(blk_tpetra_lof!=null) {
100 "panzer::cloneWithNewRangeAndDomain: Blocked Tpetra LOF does not yet support "
101 "different range and domain indexers!");
105 "panzer::cloneWithNewRangeAndDomain: Could not determine the type of LOF, clone not support!");
107 return Teuchos::null;
Teuchos::RCP< const LinearObjFactory< panzer::Traits > > cloneWithNewDomain(const LinearObjFactory< panzer::Traits > &lof, const Teuchos::RCP< const GlobalIndexer > &dUgi)
Clone a linear object factory, but using a different domain.
Teuchos::RCP< const LinearObjFactory< panzer::Traits > > cloneWithNewRangeAndDomain(const LinearObjFactory< panzer::Traits > &lof, const Teuchos::RCP< const GlobalIndexer > &rUgi, const Teuchos::RCP< const GlobalIndexer > &dUgi)
Clone a linear object factory, but using a different range and domain.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Teuchos::RCP< const LinearObjFactory< panzer::Traits > > cloneWithNewRange(const LinearObjFactory< panzer::Traits > &lof, const Teuchos::RCP< const GlobalIndexer > &rUgi)
Clone a linear object factory, but using a different range.