42 #ifndef TPETRA_EXPORT_DECL_HPP
43 #define TPETRA_EXPORT_DECL_HPP
45 #include <Tpetra_ConfigDefs.hpp>
46 #include <Kokkos_DefaultNode.hpp>
47 #include <Teuchos_Describable.hpp>
55 #ifndef DOXYGEN_SHOULD_SKIP_THIS
58 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
59 class ImportExportData;
61 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
64 template<
class LocalOrdinal,
class GlobalOrdinal,
class Node>
66 #endif // DOXYGEN_SHOULD_SKIP_THIS
121 template <
class LocalOrdinal,
122 class GlobalOrdinal = LocalOrdinal,
123 class Node = Kokkos::DefaultNode::DefaultNodeType>
124 class Export:
public Teuchos::Describable {
125 friend class Import<LocalOrdinal,GlobalOrdinal,Node>;
140 Export (
const Teuchos::RCP<const map_type>& source,
141 const Teuchos::RCP<const map_type>& target);
153 Export (
const Teuchos::RCP<const map_type>& source,
154 const Teuchos::RCP<const map_type>& target,
155 const RCP<Teuchos::FancyOStream>& out);
169 Export (
const Teuchos::RCP<const map_type>& source,
170 const Teuchos::RCP<const map_type>& target,
171 const Teuchos::RCP<Teuchos::ParameterList>& plist);
188 Export (
const Teuchos::RCP<const map_type>& source,
189 const Teuchos::RCP<const map_type>& target,
190 const RCP<Teuchos::FancyOStream>& out,
191 const Teuchos::RCP<Teuchos::ParameterList>& plist);
259 const RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > &
getSourceMap()
const;
262 const RCP<const Map<LocalOrdinal,GlobalOrdinal,Node> > &
getTargetMap()
const;
290 virtual void print (std::ostream& os)
const;
296 RCP<ImportExportData<LocalOrdinal,GlobalOrdinal,Node> > ExportData_;
298 Teuchos::RCP<Teuchos::FancyOStream> out_;
309 void setupSamePermuteExport(Teuchos::Array<GlobalOrdinal> & exportGIDs);
310 void setupRemote(Teuchos::Array<GlobalOrdinal> & exportGIDs);
324 template <
class LocalOrdinal,
class GlobalOrdinal,
class Node>
325 Teuchos::RCP<const Export<LocalOrdinal, GlobalOrdinal, Node> >
330 return Teuchos::null;
332 #ifdef HAVE_TPETRA_DEBUG
333 TEUCHOS_TEST_FOR_EXCEPTION(
334 src == null || tgt == null, std::runtime_error,
335 "Tpetra::createExport(): neither source nor target map may be null:"
336 << std::endl <<
"source: " << src << std::endl <<
"target: " << tgt
338 #endif // HAVE_TPETRA_DEBUG
343 #endif // TPETRA_EXPORT_DECL_HPP
Communication plan for data redistribution from a uniquely-owned to a (possibly) multiply-owned distr...
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.
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & getSourceMap() const
The source Map used to construct this Export.
virtual void print(std::ostream &os) const
Print the Export's data to the given output stream.
size_t getNumSameIDs() const
Number of initial identical IDs.
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.
ArrayView< const LocalOrdinal > getPermuteToLIDs() const
List of local IDs in the target Map that are permuted.
Export(const Teuchos::RCP< const map_type > &source, const Teuchos::RCP< const map_type > &target)
Construct a Export object from the source and target Map.
Export< LocalOrdinal, GlobalOrdinal, Node > & operator=(const Export< LocalOrdinal, GlobalOrdinal, Node > &rhs)
Assignment operator.
Communication plan for data redistribution from a (possibly) multiply-owned to a uniquely-owned distr...
Teuchos::RCP< const Export< LocalOrdinal, GlobalOrdinal, Node > > createExport(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &src, const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &tgt)
Non-member constructor for Export objects.
size_t getNumExportIDs() const
Number of entries that must be sent by the calling process to other processes.
Sets up and executes a communication plan for a Tpetra DistObject.
size_t getNumRemoteIDs() const
Number of entries not on the calling process.
Describes a parallel distribution of objects over processes.
ArrayView< const LocalOrdinal > getRemoteLIDs() const
List of entries in the target Map to receive from other processes.
const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > & getTargetMap() const
The target Map used to construct this Export.
Distributor & getDistributor() const
The Distributor that this Export object uses to move data.
Map< LocalOrdinal, GlobalOrdinal, Node > map_type
The specialization of Map used by this class.
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &plist)
Set parameters.