All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Private Attributes | List of all members
Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node > Class Template Reference

#include <Xpetra_MapExtractor.hpp>

Inheritance diagram for Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >:
Teuchos::Describable Teuchos::LabeledObject

Public Types

typedef Scalar scalar_type
 
typedef LocalOrdinal local_ordinal_type
 
typedef GlobalOrdinal global_ordinal_type
 
typedef Node node_type
 

Public Member Functions

 MapExtractor (const RCP< const Map > &fullmap, const std::vector< RCP< const Map > > &maps, bool bThyraMode=false)
 
 MapExtractor (const std::vector< RCP< const Map > > &maps, const std::vector< RCP< const Map > > &thyramaps)
 Expert constructor for Thyra maps. More...
 
 MapExtractor (const Teuchos::RCP< const BlockedMap > &map)
 
 MapExtractor (const MapExtractor &input)
 copy constructor More...
 
virtual ~MapExtractor ()
 Destructor. More...
 
RCP< VectorgetVector (size_t i, bool bThyraMode=false, bool bZero=true) const
 
RCP< MultiVectorgetVector (size_t i, size_t numvec, bool bThyraMode=false, bool bZero=true) const
 
bool getThyraMode () const
 returns true, if sub maps are stored in Thyra-style numbering More...
 
- Public Member Functions inherited from Teuchos::Describable
virtual std::string description () const
 
virtual void describe (FancyOStream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 
void describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 
virtual ~Describable ()
 
 LabeledObject ()
 
virtual ~LabeledObject ()
 
virtual void setObjectLabel (const std::string &objectLabel)
 
virtual std::string getObjectLabel () const
 
DescribableStreamManipulatorState describe (const Describable &describable, const EVerbosityLevel verbLevel=Describable::verbLevel_default)
 
std::ostream & operator<< (std::ostream &os, const DescribableStreamManipulatorState &d)
 

Private Attributes

Teuchos::RCP< const BlockedMapmap_
 blocked map containing the sub block maps (either thyra or xpetra mode) More...
 

Extract subblocks from full map

void ExtractVector (const Vector &full, size_t block, Vector &partial) const
 
void ExtractVector (const MultiVector &full, size_t block, MultiVector &partial) const
 
void ExtractVector (RCP< const Vector > &full, size_t block, RCP< Vector > &partial) const
 
void ExtractVector (RCP< Vector > &full, size_t block, RCP< Vector > &partial) const
 
void ExtractVector (RCP< const MultiVector > &full, size_t block, RCP< MultiVector > &partial) const
 
void ExtractVector (RCP< MultiVector > &full, size_t block, RCP< MultiVector > &partial) const
 
RCP< VectorExtractVector (RCP< const Vector > &full, size_t block, bool bThyraMode=false) const
 
RCP< VectorExtractVector (RCP< Vector > &full, size_t block, bool bThyraMode=false) const
 
RCP< MultiVectorExtractVector (RCP< const MultiVector > &full, size_t block, bool bThyraMode=false) const
 
RCP< MultiVectorExtractVector (RCP< MultiVector > &full, size_t block, bool bThyraMode=false) const
 
RCP< MultiVectorExtractVector (RCP< const BlockedMultiVector > &full, size_t block, bool bThyraMode=false) const
 
RCP< MultiVectorExtractVector (RCP< Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &full, size_t block, bool bThyraMode=false) const
 

Insert subblocks into full map

void InsertVector (const Vector &partial, size_t block, Vector &full, bool bThyraMode=false) const
 
void InsertVector (const MultiVector &partial, size_t block, MultiVector &full, bool bThyraMode=false) const
 
void InsertVector (RCP< const Vector > partial, size_t block, RCP< Vector > full, bool bThyraMode=false) const
 
void InsertVector (RCP< Vector > partial, size_t block, RCP< Vector > full, bool bThyraMode=false) const
 
void InsertVector (RCP< const MultiVector > partial, size_t block, RCP< MultiVector > full, bool bThyraMode=false) const
 
void InsertVector (RCP< MultiVector > partial, size_t block, RCP< MultiVector > full, bool bThyraMode=false) const
 
void InsertVector (RCP< const MultiVector > partial, size_t block, RCP< Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > full, bool bThyraMode=false) const
 
void InsertVector (RCP< MultiVector > partial, size_t block, RCP< Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > full, bool bThyraMode=false) const
 

Maps

size_t NumMaps () const
 number of partial maps More...
 
const RCP< const MapgetMap (size_t i, bool bThyraMode=false) const
 
const RCP< const MapgetMap () const
 get the underlying BlockedMap object (as Map) More...
 
const RCP< const BlockedMapgetBlockedMap () const
 get the underlying BlockedMap object (as BlockedMap) More...
 
const RCP< const MapgetFullMap () const
 the full map More...
 
size_t getMapIndexForGID (GlobalOrdinal gid) const
 returns map index in map extractor which contains GID More...
 

Additional Inherited Members

- Static Public Attributes inherited from Teuchos::Describable
static const EVerbosityLevel verbLevel_default
 

Detailed Description

template<class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
class Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >

Definition at line 78 of file Xpetra_MapExtractor.hpp.

Member Typedef Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
typedef Scalar Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::scalar_type

Definition at line 80 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
typedef LocalOrdinal Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::local_ordinal_type

Definition at line 81 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
typedef GlobalOrdinal Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::global_ordinal_type

Definition at line 82 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
typedef Node Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::node_type

Definition at line 83 of file Xpetra_MapExtractor.hpp.

Constructor & Destructor Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MapExtractor ( const RCP< const Map > &  fullmap,
const std::vector< RCP< const Map > > &  maps,
bool  bThyraMode = false 
)
inline

MapExtractor basic constructor

Parameters
[in]fullmapFull map containing all GIDs throughout the full vector. This parameter is only important if bThyraMode == false (see below)
[in]mapsVector 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]bThyraModeFlag 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 103 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MapExtractor ( const std::vector< RCP< const Map > > &  maps,
const std::vector< RCP< const Map > > &  thyramaps 
)
inline

Expert constructor for Thyra maps.

Definition at line 108 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MapExtractor ( const Teuchos::RCP< const BlockedMap > &  map)
inline

Constructor which accepts a const version of a blocked map

Parameters
mapBlockedMap defining the block structure of the multi vector

Definition at line 119 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MapExtractor ( const MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  input)
inline

copy constructor

Definition at line 123 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
virtual Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::~MapExtractor ( )
inlinevirtual

Destructor.

Definition at line 128 of file Xpetra_MapExtractor.hpp.

Member Function Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ExtractVector ( const Vector full,
size_t  block,
Vector partial 
) const
inline

Definition at line 134 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ExtractVector ( const MultiVector full,
size_t  block,
MultiVector partial 
) const
inline

Definition at line 141 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ExtractVector ( RCP< const Vector > &  full,
size_t  block,
RCP< Vector > &  partial 
) const
inline

Definition at line 148 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ExtractVector ( RCP< Vector > &  full,
size_t  block,
RCP< Vector > &  partial 
) const
inline

Definition at line 149 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ExtractVector ( RCP< const MultiVector > &  full,
size_t  block,
RCP< MultiVector > &  partial 
) const
inline

Definition at line 150 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ExtractVector ( RCP< MultiVector > &  full,
size_t  block,
RCP< MultiVector > &  partial 
) const
inline

Definition at line 151 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< Vector> Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ExtractVector ( RCP< const Vector > &  full,
size_t  block,
bool  bThyraMode = false 
) const
inline

Definition at line 153 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< Vector> Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ExtractVector ( RCP< Vector > &  full,
size_t  block,
bool  bThyraMode = false 
) const
inline

Definition at line 166 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP<MultiVector> Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ExtractVector ( RCP< const MultiVector > &  full,
size_t  block,
bool  bThyraMode = false 
) const
inline

Definition at line 179 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP<MultiVector> Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ExtractVector ( RCP< MultiVector > &  full,
size_t  block,
bool  bThyraMode = false 
) const
inline

Definition at line 210 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP<MultiVector> Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ExtractVector ( RCP< const BlockedMultiVector > &  full,
size_t  block,
bool  bThyraMode = false 
) const
inline

Definition at line 240 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP<MultiVector> Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::ExtractVector ( RCP< Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &  full,
size_t  block,
bool  bThyraMode = false 
) const
inline

Definition at line 249 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::InsertVector ( const Vector partial,
size_t  block,
Vector full,
bool  bThyraMode = false 
) const
inline

Definition at line 262 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::InsertVector ( const MultiVector partial,
size_t  block,
MultiVector full,
bool  bThyraMode = false 
) const
inline

Definition at line 302 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::InsertVector ( RCP< const Vector partial,
size_t  block,
RCP< Vector full,
bool  bThyraMode = false 
) const
inline

Definition at line 343 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::InsertVector ( RCP< Vector partial,
size_t  block,
RCP< Vector full,
bool  bThyraMode = false 
) const
inline

Definition at line 344 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::InsertVector ( RCP< const MultiVector partial,
size_t  block,
RCP< MultiVector full,
bool  bThyraMode = false 
) const
inline

Definition at line 345 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::InsertVector ( RCP< MultiVector partial,
size_t  block,
RCP< MultiVector full,
bool  bThyraMode = false 
) const
inline

Definition at line 355 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::InsertVector ( RCP< const MultiVector partial,
size_t  block,
RCP< Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > >  full,
bool  bThyraMode = false 
) const
inline

Definition at line 365 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
void Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::InsertVector ( RCP< MultiVector partial,
size_t  block,
RCP< Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > >  full,
bool  bThyraMode = false 
) const
inline

Definition at line 370 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< Vector> Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getVector ( size_t  i,
bool  bThyraMode = false,
bool  bZero = true 
) const
inline

Definition at line 378 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP<MultiVector> Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getVector ( size_t  i,
size_t  numvec,
bool  bThyraMode = false,
bool  bZero = true 
) const
inline

Definition at line 384 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
bool Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getThyraMode ( ) const
inline

returns true, if sub maps are stored in Thyra-style numbering

Definition at line 392 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::NumMaps ( ) const
inline

number of partial maps

Definition at line 398 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
const RCP<const Map> Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getMap ( size_t  i,
bool  bThyraMode = false 
) const
inline

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 MapExtractor is also constructed using Thyra numbering

Definition at line 404 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
const RCP<const Map> Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getMap ( ) const
inline

get the underlying BlockedMap object (as Map)

Definition at line 409 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
const RCP<const BlockedMap> Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getBlockedMap ( ) const
inline

get the underlying BlockedMap object (as BlockedMap)

Definition at line 412 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
const RCP<const Map> Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getFullMap ( ) const
inline

the full map

Definition at line 415 of file Xpetra_MapExtractor.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
size_t Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getMapIndexForGID ( GlobalOrdinal  gid) const
inline

returns map index in map extractor which contains GID

Definition at line 418 of file Xpetra_MapExtractor.hpp.

Member Data Documentation

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Teuchos::RCP<const BlockedMap> Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::map_
private

blocked map containing the sub block maps (either thyra or xpetra mode)

Definition at line 425 of file Xpetra_MapExtractor.hpp.


The documentation for this class was generated from the following file: