46 #ifndef XPETRA_TPETRAEXPORT_DEF_HPP
47 #define XPETRA_TPETRAEXPORT_DEF_HPP
51 #include "Tpetra_Distributor.hpp"
55 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
58 const Teuchos::RCP<const map_type>& target)
59 : export_(Teuchos::rcp(new Tpetra::
Export<LocalOrdinal, GlobalOrdinal, Node>(
toTpetra(source),
toTpetra(target))))
64 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
67 const Teuchos::RCP<const map_type>& target,
68 const Teuchos::RCP<Teuchos::ParameterList>& plist)
69 : export_(Teuchos::rcp(new Tpetra::
Export<LocalOrdinal, GlobalOrdinal, Node>(
toTpetra(source),
toTpetra(target), plist)))
74 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
77 : export_(Teuchos::rcp(new Tpetra::
Export<LocalOrdinal, GlobalOrdinal, Node>(
toTpetra(rhs))))
82 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
89 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
95 return export_->getNumSameIDs();
99 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
105 return export_->getNumPermuteIDs();
109 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
110 ArrayView<const LocalOrdinal>
115 return export_->getPermuteFromLIDs();
119 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
120 ArrayView<const LocalOrdinal>
125 return export_->getPermuteToLIDs();
129 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
135 return export_->getNumRemoteIDs();
139 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
140 ArrayView<const LocalOrdinal>
145 return export_->getRemoteLIDs();
149 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
155 return export_->getNumExportIDs();
159 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
160 ArrayView<const LocalOrdinal>
165 return export_->getExportLIDs();
169 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
175 return export_->getExportPIDs();
179 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
180 Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
185 return toXpetra(export_->getSourceMap());
189 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
190 Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
195 return toXpetra(export_->getTargetMap());
198 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
203 export_->getDistributor().setParameterList(params);
204 auto revDistor = export_->getDistributor().getReverse(
false);
205 if (!revDistor.is_null())
206 revDistor->setParameterList(params);
210 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
220 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
223 const RCP<
const Tpetra::Export<LocalOrdinal, GlobalOrdinal, Node>>& exp)
229 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
230 RCP<const Tpetra::Export<LocalOrdinal, GlobalOrdinal, Node>>
239 #ifdef HAVE_XPETRA_EPETRA
241 #if((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT))) \
242 || (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_INT))))
247 :
public Export<int, int, EpetraNode>
262 TpetraExport(
const Teuchos::RCP<const map_type>& source,
const Teuchos::RCP<const map_type>& target)
273 const Teuchos::RCP<const map_type>& target,
274 const Teuchos::RCP<Teuchos::ParameterList>& plist)
312 ArrayView<const LocalOrdinal>
getPermuteFromLIDs()
const {
return Teuchos::ArrayView<const LocalOrdinal>(); }
316 ArrayView<const LocalOrdinal>
getPermuteToLIDs()
const {
return Teuchos::ArrayView<const LocalOrdinal>(); }
324 ArrayView<const LocalOrdinal>
getRemoteLIDs()
const {
return Teuchos::ArrayView<const LocalOrdinal>(); }
332 ArrayView<const LocalOrdinal>
getExportLIDs()
const {
return Teuchos::ArrayView<const LocalOrdinal>(); }
336 ArrayView<const int>
getExportPIDs()
const {
return Teuchos::ArrayView<const int>(); }
340 Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
getSourceMap()
const {
return Teuchos::null; }
344 Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
getTargetMap()
const {
return Teuchos::null; }
370 TpetraExport(
const RCP<
const Tpetra::Export<LocalOrdinal, GlobalOrdinal, Node>>& exp)
379 RCP<const Tpetra::Export<LocalOrdinal, GlobalOrdinal, Node>>
getTpetra_Export()
const {
return Teuchos::null; }
384 #endif // #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_INT)))
388 #if((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))) \
389 || (!defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_SERIAL) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG))))
394 :
public Export<int, long long, EpetraNode>
410 TpetraExport(
const Teuchos::RCP<const map_type>& source,
const Teuchos::RCP<const map_type>& target)
421 const Teuchos::RCP<const map_type>& target,
422 const Teuchos::RCP<Teuchos::ParameterList>& plist)
460 ArrayView<const LocalOrdinal>
getPermuteFromLIDs()
const {
return Teuchos::ArrayView<const LocalOrdinal>(); }
464 ArrayView<const LocalOrdinal>
getPermuteToLIDs()
const {
return Teuchos::ArrayView<const LocalOrdinal>(); }
472 ArrayView<const LocalOrdinal>
getRemoteLIDs()
const {
return Teuchos::ArrayView<const LocalOrdinal>(); }
480 ArrayView<const LocalOrdinal>
getExportLIDs()
const {
return Teuchos::ArrayView<const LocalOrdinal>(); }
484 ArrayView<const int>
getExportPIDs()
const {
return Teuchos::ArrayView<const int>(); }
488 Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
getSourceMap()
const {
return Teuchos::null; }
492 Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node>>
getTargetMap()
const {
return Teuchos::null; }
516 TpetraExport(
const RCP<
const Tpetra::Export<LocalOrdinal, GlobalOrdinal, Node>>& exp)
525 RCP<const Tpetra::Export<LocalOrdinal, GlobalOrdinal, Node>>
getTpetra_Export()
const {
return Teuchos::null; }
531 #endif // #if ((defined(EPETRA_HAVE_OMP) && (!defined(HAVE_TPETRA_INST_OPENMP) || !defined(HAVE_TPETRA_INST_INT_LONG_LONG)))
534 #endif // HAVE_XPETRA_EPETRA
540 #endif // XPETRA_TPETRAEXPORT_DEF_HPP
size_t getNumSameIDs() const
Number of initial identical IDs.
TpetraExport(const Export< LocalOrdinal, GlobalOrdinal, Node > &rhs)
Copy constructor.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getSourceMap() const
The source Map used to construct this Export.
ArrayView< const LocalOrdinal > getPermuteFromLIDs() const
List of local IDs in the source Map that are permuted.
ArrayView< const LocalOrdinal > getExportLIDs() const
List of entries in the source Map that will be sent to other processes.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getTargetMap() const
The target Map used to construct this Export.
TpetraExport(const RCP< const Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node >> &exp)
TpetraExport constructor to wrap a Tpetra::Export object.
~TpetraExport()
Destructor.
TpetraExport(const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target, const Teuchos::RCP< Teuchos::ParameterList > &plist)
Constructor (with list of parameters).
RCP< const Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Export() const
Map< LocalOrdinal, GlobalOrdinal, Node > map_type
The specialization of Map used by this class.
TpetraExport(const Export< LocalOrdinal, GlobalOrdinal, Node > &rhs)
Copy constructor.
size_t getNumExportIDs() const
Number of entries that must be sent by the calling process to other processes.
size_t getNumRemoteIDs() const
Number of entries not on the calling process.
ArrayView< const LocalOrdinal > getRemoteLIDs() const
List of entries in the target Map to receive from other processes.
RCP< const Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Export() const
#define XPETRA_TPETRA_ETI_EXCEPTION(cl, obj, go, node)
ArrayView< const LocalOrdinal > getRemoteLIDs() const
List of entries in the target Map to receive from other processes.
size_t getNumRemoteIDs() const
Number of entries not on the calling process.
void print(std::ostream &os) const
Print the Export's data to the given output stream.
TpetraExport(const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target)
Construct a Export object from the source and target Map.
size_t getNumSameIDs() const
Number of initial identical IDs.
size_t getNumPermuteIDs() const
Number of IDs to permute but not to communicate.
size_t getNumExportIDs() const
Number of entries that must be sent by the calling process to other processes.
size_t getNumSameIDs() const
Number of initial identical IDs.
~TpetraExport()
Destructor.
~TpetraExport()
Destructor.
TpetraExport(const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target, const Teuchos::RCP< Teuchos::ParameterList > &plist)
Constructor (with list of parameters).
Map< LocalOrdinal, GlobalOrdinal, Node > map_type
The specialization of Map used by this class.
size_t getNumPermuteIDs() const
Number of IDs to permute but not to communicate.
ArrayView< const int > getExportPIDs() const
List of processes to which entries will be sent.
size_t getNumExportIDs() const
Number of entries that must be sent by the calling process to other processes.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getTargetMap() const
The target Map used to construct this Export.
ArrayView< const LocalOrdinal > getPermuteToLIDs() const
List of local IDs in the target Map that are permuted.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getSourceMap() const
The source Map used to construct this Export.
TpetraExport(const RCP< const Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node >> &exp)
TpetraExport constructor to wrap a Tpetra::Export object.
void setDistributorParameters(const Teuchos::RCP< Teuchos::ParameterList > params) const
Set parameters on the underlying object.
void setDistributorParameters(const Teuchos::RCP< Teuchos::ParameterList > params) const
Set parameters on the underlying object.
RCP< const Tpetra::Export< LocalOrdinal, GlobalOrdinal, Node > > getTpetra_Export() const
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getTargetMap() const
The target Map used to construct this Export.
RCP< const Tpetra::CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > toTpetra(const RCP< const CrsGraph< LocalOrdinal, GlobalOrdinal, Node > > &graph)
ArrayView< const LocalOrdinal > getExportLIDs() const
List of entries in the source Map that will be sent to other processes.
RCP< const CrsGraph< int, GlobalOrdinal, Node > > toXpetra(const Epetra_CrsGraph &g)
void print(std::ostream &os) const
Print the Export's data to the given output stream.
TpetraExport(const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target)
Construct a Export object from the source and target Map.
void setDistributorParameters(const Teuchos::RCP< Teuchos::ParameterList > params) const
Set distributor parameters.
#define XPETRA_MONITOR(funcName)
size_t getNumRemoteIDs() const
Number of entries not on the calling process.
size_t getNumPermuteIDs() const
Number of IDs to permute but not to communicate.
ArrayView< const LocalOrdinal > getPermuteFromLIDs() const
List of local IDs in the source Map that are permuted.
TpetraExport(const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target)
Construct a Export object from the source and target Map.
ArrayView< const int > getExportPIDs() const
List of processes to which entries will be sent.
ArrayView< const LocalOrdinal > getPermuteToLIDs() const
List of local IDs in the target Map that are permuted.
ArrayView< const LocalOrdinal > getPermuteToLIDs() const
List of local IDs in the target Map that are permuted.
ArrayView< const LocalOrdinal > getRemoteLIDs() const
List of entries in the target Map to receive from other processes.
ArrayView< const LocalOrdinal > getExportLIDs() const
List of entries in the source Map that will be sent to other processes.
ArrayView< const int > getExportPIDs() const
List of processes to which entries will be sent.
Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > getSourceMap() const
The source Map used to construct this Export.
void print(std::ostream &os) const
Print the Export's data to the given output stream.
ArrayView< const LocalOrdinal > getPermuteFromLIDs() const
List of local IDs in the source Map that are permuted.