Xpetra
Version of the Day
|
#include <Xpetra_BlockedMap_decl.hpp>
Public Types | |
typedef LocalOrdinal | local_ordinal_type |
typedef GlobalOrdinal | global_ordinal_type |
typedef Node | node_type |
Public Types inherited from Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > | |
typedef LocalOrdinal | local_ordinal_type |
typedef GlobalOrdinal | global_ordinal_type |
typedef Node | node_type |
Public Member Functions | |
BlockedMap< LocalOrdinal, GlobalOrdinal, Node > & | operator= (const BlockedMap &rhs) |
Assignment operator: Does a deep copy. More... | |
size_t | getNumMaps () const |
number of partial maps More... | |
const RCP< const Xpetra::Map < LocalOrdinal, GlobalOrdinal, Node > > | getMap (size_t i, bool bThyraMode=false) const |
const RCP< Xpetra::Import < LocalOrdinal, GlobalOrdinal, Node > > | getImporter (size_t i) const |
get the importer between full map and partial map More... | |
const RCP< const Xpetra::Map < LocalOrdinal, GlobalOrdinal, Node > > | getFullMap () const |
the full map More... | |
size_t | getMapIndexForGID (GlobalOrdinal gid) const |
returns map index in map extractor which contains GID More... | |
Public Member Functions inherited from Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > | |
virtual | ~Map () |
Destructor. More... | |
virtual RCP< const Map < LocalOrdinal, GlobalOrdinal, Node > > | replaceCommWithSubset (const Teuchos::RCP< const Teuchos::Comm< int > > &newComm) const =0 |
Replace this Map's communicator with a subset communicator. More... | |
Protected Member Functions | |
virtual void | assign (const BlockedMap &input) |
Implementation of the assignment operator (operator=); does a deep copy. More... | |
Static Protected Member Functions | |
static Teuchos::RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > | concatenateMaps (const std::vector< Teuchos::RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >>> &subMaps) |
Helper function to concatenate several maps. More... | |
Private Member Functions | |
bool | CheckConsistency () const |
Private Attributes | |
RCP< const Map > | fullmap_ |
std::vector< RCP< const Map > > | maps_ |
std::vector< RCP< Import > > | importers_ |
bool | bThyraMode_ |
std::vector< RCP< const Map > > | thyraMaps_ |
Constructor/Destructor Methods | |
BlockedMap () | |
Constructor. More... | |
BlockedMap (const RCP< const Map > &fullmap, const std::vector< RCP< const Map >> &maps, bool bThyraMode=false) | |
BlockedMap (const std::vector< RCP< const Map >> &maps, const std::vector< RCP< const Map >> &thyramaps) | |
Expert constructor for Thyra maps. More... | |
BlockedMap (const BlockedMap &input) | |
copy constructor More... | |
virtual | ~BlockedMap () |
Destructor. More... | |
Attributes | |
virtual global_size_t | getGlobalNumElements () const |
The number of elements in this Map. More... | |
virtual size_t | getNodeNumElements () const |
The number of elements belonging to the calling process. More... | |
virtual GlobalOrdinal | getIndexBase () const |
The index base for this Map. More... | |
virtual LocalOrdinal | getMinLocalIndex () const |
The minimum local index. More... | |
virtual LocalOrdinal | getMaxLocalIndex () const |
The maximum local index on the calling process. More... | |
virtual GlobalOrdinal | getMinGlobalIndex () const |
The minimum global index owned by the calling process. More... | |
virtual GlobalOrdinal | getMaxGlobalIndex () const |
The maximum global index owned by the calling process. More... | |
virtual GlobalOrdinal | getMinAllGlobalIndex () const |
The minimum global index over all processes in the communicator. More... | |
virtual GlobalOrdinal | getMaxAllGlobalIndex () const |
The maximum global index over all processes in the communicator. More... | |
virtual LocalOrdinal | getLocalElement (GlobalOrdinal globalIndex) const |
The local index corresponding to the given global index. More... | |
virtual GlobalOrdinal | getGlobalElement (LocalOrdinal localIndex) const |
The global index corresponding to the given local index. More... | |
virtual LookupStatus | getRemoteIndexList (const Teuchos::ArrayView< const GlobalOrdinal > &, const Teuchos::ArrayView< int > &, const Teuchos::ArrayView< LocalOrdinal > &) const |
Return the process ranks and corresponding local indices for the given global indices. More... | |
virtual LookupStatus | getRemoteIndexList (const Teuchos::ArrayView< const GlobalOrdinal > &, const Teuchos::ArrayView< int > &) const |
Return the process ranks for the given global indices. More... | |
virtual Teuchos::ArrayView < const GlobalOrdinal > | getNodeElementList () const |
Return a view of the global indices owned by this process. More... | |
Boolean tests | |
virtual bool | isNodeLocalElement (LocalOrdinal localIndex) const |
Whether the given local index is valid for this Map on this process. More... | |
virtual bool | isNodeGlobalElement (GlobalOrdinal globalIndex) const |
Whether the given global index is valid for this Map on this process. More... | |
virtual bool | isContiguous () const |
True if this Map is distributed contiguously, else false. More... | |
virtual bool | isDistributed () const |
Whether this Map is globally distributed or locally replicated. More... | |
virtual bool | isCompatible (const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > &map) const |
True if and only if map is compatible with this Map. More... | |
virtual bool | isSameAs (const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > &map) const |
True if and only if map is identical to this Map. More... | |
virtual Teuchos::RCP< const Teuchos::Comm< int > > | getComm () const |
Get this Map's Comm object. More... | |
Attribute access functions | |
virtual bool | getThyraMode () const |
Local number of rows on the calling process. More... | |
Maps | |
virtual RCP< const Xpetra::Map < LocalOrdinal, GlobalOrdinal, Node > > | removeEmptyProcesses () const |
Return a new Map with processes with zero elements removed. More... | |
virtual RCP< const Xpetra::Map < LocalOrdinal, GlobalOrdinal, Node > > | replaceCommWithSubset (const Teuchos::RCP< const Teuchos::Comm< int >> &) const |
Replace this Map's communicator with a subset communicator. More... | |
Xpetra specific | |
virtual UnderlyingLib | lib () const |
Get the library used by this object (Tpetra or Epetra?) More... | |
virtual RCP< const Xpetra::Map < LocalOrdinal, GlobalOrdinal, Node > > | getMap () const |
Overridden from Teuchos::Describable | |
virtual std::string | description () const |
A simple one-line description of this object. More... | |
virtual void | describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const |
Print the object with the given verbosity level to a FancyOStream. More... | |
Definition at line 64 of file Xpetra_BlockedMap_decl.hpp.
typedef LocalOrdinal Xpetra::BlockedMap< LocalOrdinal, GlobalOrdinal, Node >::local_ordinal_type |
Definition at line 68 of file Xpetra_BlockedMap_decl.hpp.
typedef GlobalOrdinal Xpetra::BlockedMap< LocalOrdinal, GlobalOrdinal, Node >::global_ordinal_type |
Definition at line 69 of file Xpetra_BlockedMap_decl.hpp.
typedef Node Xpetra::BlockedMap< LocalOrdinal, GlobalOrdinal, Node >::node_type |
Definition at line 70 of file Xpetra_BlockedMap_decl.hpp.
Xpetra::BlockedMap< LocalOrdinal, GlobalOrdinal, Node >::BlockedMap | ( | ) |
Constructor.
Definition at line 64 of file Xpetra_BlockedMap_def.hpp.
Xpetra::BlockedMap< LocalOrdinal, GlobalOrdinal, Node >::BlockedMap | ( | const RCP< const Map > & | fullmap, |
const std::vector< RCP< const Map >> & | maps, | ||
bool | bThyraMode = false |
||
) |
BlockedMap basic constructor
[in] | fullmap | Full map containing all GIDs throughout the full vector. This parameter is only important if bThyraMode == false (see below) |
[in] | maps | Vector containing submaps. The set of all GIDs stored in the submaps should be the same than stored in fullmap, if bThyraMode == false. In Thyra mode, the submaps should contain consecutive GIDs starting with 0 in each submap. |
[in] | bThyraMode | Flag which allows to switch between generating a MapExtractor in Thyra mode or Xpetra mode |
In Thyra mode, fullmap is not important as a fullmap with unique blocked GIDs is automatically generated which map the GIDs of the submaps to uniquely defined GIDs in the fullmap. The user has to provide a fullmap in Thyra mode to specify the underlying linear algebra library (Epetra or Tpetra) and some other map information (e.g. indexBase). This could be fixed.
In Xpetra mode, the fullmap has to be the same as the union of the GIDs stored in the submaps in maps. The intersection of the GIDs of the sub- maps in maps must be empty.
Definition at line 72 of file Xpetra_BlockedMap_def.hpp.
Xpetra::BlockedMap< LocalOrdinal, GlobalOrdinal, Node >::BlockedMap | ( | const std::vector< RCP< const Map >> & | maps, |
const std::vector< RCP< const Map >> & | thyramaps | ||
) |
Expert constructor for Thyra maps.
Definition at line 186 of file Xpetra_BlockedMap_def.hpp.
Xpetra::BlockedMap< LocalOrdinal, GlobalOrdinal, Node >::BlockedMap | ( | const BlockedMap< LocalOrdinal, GlobalOrdinal, Node > & | input | ) |
copy constructor
Definition at line 235 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
Destructor.
Definition at line 247 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
The number of elements in this Map.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 265 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
The number of elements belonging to the calling process.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 273 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
The index base for this Map.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 282 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
The minimum local index.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 291 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
The maximum local index on the calling process.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 300 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
The minimum global index owned by the calling process.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 309 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
The maximum global index owned by the calling process.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 318 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
The minimum global index over all processes in the communicator.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 327 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
The maximum global index over all processes in the communicator.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 336 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
The local index corresponding to the given global index.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 345 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
The global index corresponding to the given local index.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 354 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
Return the process ranks and corresponding local indices for the given global indices.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 363 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
Return the process ranks for the given global indices.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 375 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
Return a view of the global indices owned by this process.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 386 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
Whether the given local index is valid for this Map on this process.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 395 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
Whether the given global index is valid for this Map on this process.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 404 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
True if this Map is distributed contiguously, else false.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 413 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
Whether this Map is globally distributed or locally replicated.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 423 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
True if and only if map is compatible with this Map.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 432 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
True if and only if map is identical to this Map.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 456 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
Get this Map's Comm object.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 496 of file Xpetra_BlockedMap_def.hpp.
BlockedMap< LocalOrdinal, GlobalOrdinal, Node > & Xpetra::BlockedMap< LocalOrdinal, GlobalOrdinal, Node >::operator= | ( | const BlockedMap< LocalOrdinal, GlobalOrdinal, Node > & | rhs | ) |
Assignment operator: Does a deep copy.
The assignment operator does a deep copy, just like subclasses' copy constructors.
*this
and the input argument are instances of the same subclass. Definition at line 507 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
Local number of rows on the calling process.
Global number of rows in the multivector. returns true if internally stored sub maps are in Thyra mode (i.e. start all with GIDs=0)
Definition at line 515 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
Return a new Map with processes with zero elements removed.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 524 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
Replace this Map's communicator with a subset communicator.
Definition at line 533 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
Get the library used by this object (Tpetra or Epetra?)
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 541 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
Reimplemented from Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 550 of file Xpetra_BlockedMap_def.hpp.
size_t Xpetra::BlockedMap< LocalOrdinal, GlobalOrdinal, Node >::getNumMaps | ( | ) | const |
number of partial maps
Definition at line 559 of file Xpetra_BlockedMap_def.hpp.
const RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::BlockedMap< LocalOrdinal, GlobalOrdinal, Node >::getMap | ( | size_t | i, |
bool | bThyraMode = false |
||
) | const |
get the map returns the sub map i from list of sub maps depending on the parameter bThyraMode the sub map that is returned uses Thyra or Xpetra numbering Note: Thyra-numbering is only allowed if the BlockedMap is also constructed using Thyra numbering
Definition at line 568 of file Xpetra_BlockedMap_def.hpp.
const RCP< Xpetra::Import< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::BlockedMap< LocalOrdinal, GlobalOrdinal, Node >::getImporter | ( | size_t | i | ) | const |
get the importer between full map and partial map
Definition at line 592 of file Xpetra_BlockedMap_def.hpp.
const RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::BlockedMap< LocalOrdinal, GlobalOrdinal, Node >::getFullMap | ( | ) | const |
the full map
Definition at line 606 of file Xpetra_BlockedMap_def.hpp.
size_t Xpetra::BlockedMap< LocalOrdinal, GlobalOrdinal, Node >::getMapIndexForGID | ( | GlobalOrdinal | gid | ) | const |
returns map index in map extractor which contains GID
Definition at line 615 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
A simple one-line description of this object.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 630 of file Xpetra_BlockedMap_def.hpp.
|
virtual |
Print the object with the given verbosity level to a FancyOStream.
Implements Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node >.
Definition at line 639 of file Xpetra_BlockedMap_def.hpp.
|
protectedvirtual |
Implementation of the assignment operator (operator=); does a deep copy.
Definition at line 666 of file Xpetra_BlockedMap_def.hpp.
|
staticprotected |
Helper function to concatenate several maps.
subMaps | vector of maps which are concatenated |
The routine builds a global map by concatenating all provided maps in the ordering defined by the vector. The GIDs are just appended in the same ordering as in the subMaps. No reordering or sorting is performed. This routine is supposed to generate the full map in an Xpetra::MapExtractor for a block operator. Note, it should not be used for strided maps since the GIDs are not reordered.
Example: subMap[0] = { 0, 1, 3, 4 }; subMap[1] = { 2, 5 }; concatenated map = { 0, 1, 3, 4, 2 ,5 };
Definition at line 707 of file Xpetra_BlockedMap_def.hpp.
|
private |
Definition at line 744 of file Xpetra_BlockedMap_def.hpp.
|
private |
Definition at line 387 of file Xpetra_BlockedMap_decl.hpp.
|
private |
Definition at line 388 of file Xpetra_BlockedMap_decl.hpp.
|
private |
Definition at line 389 of file Xpetra_BlockedMap_decl.hpp.
|
private |
Definition at line 390 of file Xpetra_BlockedMap_decl.hpp.
|
private |
Definition at line 391 of file Xpetra_BlockedMap_decl.hpp.