46 #ifndef XPETRA_MAPEXTRACTOR_HPP_ 47 #define XPETRA_MAPEXTRACTOR_HPP_ 54 #include <Teuchos_Describable.hpp> 68 template <class Scalar = MultiVector<>::scalar_type,
80 #undef XPETRA_MAPEXTRACTOR_SHORT 90 for (
unsigned i = 0; i <
maps_.size(); ++i)
94 "logic error. full map and sub maps are inconsistently distributed over the processors.");
101 "ExtractVector: maps_[" << block <<
"] is null");
107 "ExtractVector: maps_[" << block <<
"] is null");
118 "ExtractVector: maps_[" << block <<
"] is null");
125 "ExtractVector: maps_[" << block <<
"] is null");
132 "ExtractVector: maps_[" << block <<
"] is null");
139 "ExtractVector: maps_[" << block <<
"] is null");
150 "InsertVector: maps_[" << block <<
"] is null");
156 "InsertVector: maps_[" << block <<
"] is null");
186 for (
size_t i = 0; i <
NumMaps(); i++)
187 if (
getMap(i)->isNodeGlobalElement(gid) ==
true)
191 "getMapIndexForGID: GID " << gid <<
" is not contained by a map in mapextractor." );
201 for (
size_t i = 0; i <
NumMaps(); i++) {
206 if (fullMap->isNodeGlobalElement(*it) ==
false)
214 std::vector<RCP<const Map > >
maps_;
219 #define XPETRA_MAPEXTRACTOR_SHORT
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.
LocalOrdinal local_ordinal_type
virtual void doExport(const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Export< LocalOrdinal, GlobalOrdinal, Node > &exporter, CombineMode CM)=0
Export data into this object using an Export object ("forward mode").
GlobalOrdinal global_ordinal_type
#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.
virtual void doImport(const DistObject< Packet, LocalOrdinal, GlobalOrdinal, Node > &source, const Import< LocalOrdinal, GlobalOrdinal, Node > &importer, CombineMode CM)=0
Import data into this object using an Import object ("forward mode").
static RCP< Vector > Build(const Teuchos::RCP< const Map > &map, bool zeroOut=true)
Constructor specifying the number of non-zeros for all rows.
static Teuchos::RCP< MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Build(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, size_t NumVectors, bool zeroOut=true)
Constructor specifying the number of non-zeros for all rows.