7 #include "Panzer_TpetraLinearObjFactory.hpp"
35 using Teuchos::rcp_dynamic_cast;
37 using Teuchos::ptr_dynamic_cast;
38 using Teuchos::ptrFromRef;
64 Ptr<const TpetraLOF> tpetra_lof = ptr_dynamic_cast<const TpetraLOF>(ptrFromRef(lof));
65 if(tpetra_lof!=
null) {
66 auto rangeUGI = rcp_dynamic_cast<const TpetraUGI>(rUgi==
null ? tpetra_lof->getRangeGlobalIndexer() : rUgi,
true);
67 auto domainUGI = rcp_dynamic_cast<const TpetraUGI>(dUgi==
null ? tpetra_lof->getDomainGlobalIndexer() : dUgi,
true);
70 return rcp(
new TpetraLOF(mpiComm,rangeUGI,domainUGI));
73 Ptr<const BlockedEpetraLOF> blk_epetra_lof = ptr_dynamic_cast<const BlockedEpetraLOF>(ptrFromRef(lof));
74 if(blk_epetra_lof!=
null) {
75 auto rangeUGI = (rUgi==
null ? blk_epetra_lof->getRangeGlobalIndexer() : rUgi);
76 auto domainUGI = (dUgi==
null ? blk_epetra_lof->getDomainGlobalIndexer() : dUgi);
78 return rcp(
new BlockedEpetraLOF(mpiComm,rangeUGI,domainUGI));
81 Ptr<const BlockedTpetraLOF> blk_tpetra_lof = ptr_dynamic_cast<const BlockedTpetraLOF>(ptrFromRef(lof));
82 if(blk_tpetra_lof!=
null) {
84 "panzer::cloneWithNewRangeAndDomain: Blocked Tpetra LOF does not yet support "
85 "different range and domain indexers!");
89 "panzer::cloneWithNewRangeAndDomain: Could not determine the type of LOF, clone not support!");