Xpetra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node > Class Template Reference

#include <Xpetra_MapExtractor_decl.hpp>

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

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 Xpetra::BlockedMap< LocalOrdinal, GlobalOrdinal, Node > > &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...
 

Private Attributes

Teuchos::RCP< const
Xpetra::BlockedMap
< LocalOrdinal, GlobalOrdinal,
Node > > 
map_
 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 Xpetra::BlockedMultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &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
Xpetra::BlockedMap
< LocalOrdinal, GlobalOrdinal,
Node > > 
getBlockedMap () 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...
 

Detailed Description

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

Definition at line 83 of file Xpetra_MapExtractor_decl.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 87 of file Xpetra_MapExtractor_decl.hpp.

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

Definition at line 88 of file Xpetra_MapExtractor_decl.hpp.

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

Definition at line 89 of file Xpetra_MapExtractor_decl.hpp.

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

Definition at line 90 of file Xpetra_MapExtractor_decl.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 
)

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 60 of file Xpetra_MapExtractor_def.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 
)

Expert constructor for Thyra maps.

Definition at line 67 of file Xpetra_MapExtractor_def.hpp.

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

Constructor which accepts a const version of a blocked map

Parameters
mapBlockedMap defining the block structure of the multi vector
template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::MapExtractor ( const MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node > &  input)

copy constructor

Definition at line 81 of file Xpetra_MapExtractor_def.hpp.

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

Destructor.

Definition at line 89 of file Xpetra_MapExtractor_def.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

Definition at line 98 of file Xpetra_MapExtractor_def.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

Definition at line 112 of file Xpetra_MapExtractor_def.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

Definition at line 128 of file Xpetra_MapExtractor_def.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

Definition at line 137 of file Xpetra_MapExtractor_def.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

Definition at line 146 of file Xpetra_MapExtractor_def.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

Definition at line 155 of file Xpetra_MapExtractor_def.hpp.

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

Definition at line 164 of file Xpetra_MapExtractor_def.hpp.

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

Definition at line 189 of file Xpetra_MapExtractor_def.hpp.

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

Definition at line 215 of file Xpetra_MapExtractor_def.hpp.

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

Definition at line 263 of file Xpetra_MapExtractor_def.hpp.

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

Definition at line 310 of file Xpetra_MapExtractor_def.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
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

Definition at line 352 of file Xpetra_MapExtractor_def.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

Definition at line 410 of file Xpetra_MapExtractor_def.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

Definition at line 469 of file Xpetra_MapExtractor_def.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
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
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
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
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
template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
RCP< Xpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > Xpetra::MapExtractor< Scalar, LocalOrdinal, GlobalOrdinal, Node >::getVector ( size_t  i,
bool  bThyraMode = false,
bool  bZero = true 
) const

Definition at line 564 of file Xpetra_MapExtractor_def.hpp.

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

Definition at line 578 of file Xpetra_MapExtractor_def.hpp.

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

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

Definition at line 592 of file Xpetra_MapExtractor_def.hpp.

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

number of partial maps

Definition at line 601 of file Xpetra_MapExtractor_def.hpp.

template<class Scalar , class LocalOrdinal , class GlobalOrdinal , class Node >
const RCP< const Xpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > Xpetra::MapExtractor< Scalar, 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 MapExtractor is also constructed using Thyra numbering

Definition at line 610 of file Xpetra_MapExtractor_def.hpp.

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

get the underlying BlockedMap object (as Map)

Definition at line 619 of file Xpetra_MapExtractor_def.hpp.

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

get the underlying BlockedMap object (as BlockedMap)

Definition at line 628 of file Xpetra_MapExtractor_def.hpp.

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

the full map

Definition at line 637 of file Xpetra_MapExtractor_def.hpp.

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

returns map index in map extractor which contains GID

Definition at line 646 of file Xpetra_MapExtractor_def.hpp.

Member Data Documentation

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

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

Definition at line 199 of file Xpetra_MapExtractor_decl.hpp.


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