55 #ifndef XPETRA_TPETRAMAPEXTRACTOR_HPP_
56 #define XPETRA_TPETRAMAPEXTRACTOR_HPP_
62 template <
class Scalar,
class LocalOrdinal =
int,
class GlobalOrdinal = LocalOrdinal,
class Node = Kokkos::DefaultNode::DefaultNodeType>
82 unsigned int numMaps = maps.size();
85 for (
unsigned i=0; i<numMaps; ++i)
87 if (maps[i]!=Teuchos::null)
90 maps_.push_back(tmapi);
106 for (
unsigned i=0; i<
importer_.size(); ++i)
108 if (
maps_[i]!=Teuchos::null)
111 if (tImport == Teuchos::null) std::cout <<
"no TpetraImportFactory?" << std::endl;
124 if (
maps_[block] == Teuchos::null)
125 std::cout <<
"null map at block" << block << std::endl;
148 if (
maps_[block] == Teuchos::null)
149 std::cout <<
"null map at block" << block << std::endl;
172 if (
maps_[block] == Teuchos::null)
173 std::cout <<
"null map at block " << block << std::endl;
189 "ExtractVector: maps_[" << block <<
"]=Teuchos::null" );
199 "ExtractVector: maps_[" << block <<
"]=Teuchos::null" );
215 if (
maps_[block] == Teuchos::null)
216 std::cout <<
"null map at block " << block << std::endl;
240 "ExtractVector: maps_[" << block <<
"]=Teuchos::null" );
250 "ExtractVector: maps_[" << block <<
"]=Teuchos::null" );
281 for(
size_t i = 0; i <
NumMaps(); i++) {
282 if(
getMap(i)->isNodeGlobalElement(gid) ==
true)
286 "getMapIndexForGID: GID " << gid <<
" is not contained by a map in mapextractor." );
296 for(
size_t i = 0; i<
NumMaps(); i++) {
301 for(it = mapGids.
begin(); it!=mapGids.
end(); it++) {
309 std::vector<Teuchos::RCP<const TpetraMapClass > >
maps_;
311 std::vector<Teuchos::RCP<TpetraImportClass > >
importer_;
static RCP< Import< LocalOrdinal, GlobalOrdinal, Node > > Build(const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &source, const RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &target)
Constructor specifying the number of non-zeros for all rows.
virtual Teuchos::ArrayView< const GlobalOrdinal > getNodeElementList() const =0
Return a view of the global indices owned by this node.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
const_pointer const_iterator
Exception throws to report errors in the internal logical of the program.
void doImport(const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Import data into this object using an Import object ("forward mode").
virtual bool isNodeGlobalElement(GlobalOrdinal globalIndex) const =0
True if the global index is found in this Map on this node, else false.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
#define XPETRA_RCP_DYNAMIC_CAST(type, obj, newObj, exceptionMsg)
void doExport(const DistObject< Scalar, LocalOrdinal, GlobalOrdinal, Node > &dest, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)
Export data into this object using an Import object ("reverse mode").
virtual size_t getNumVectors() const =0
Number of columns in the multivector.