Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
FEDD::MultiVector< SC, LO, GO, NO > Class Template Reference

Public Types

typedef MultiVector< SC, LO, GO, NO > MultiVector_Type
 
typedef Teuchos::RCP< MultiVector_TypeMultiVectorPtr_Type
 
typedef Teuchos::RCP< const MultiVector_TypeMultiVectorConstPtr_Type
 
typedef BlockMultiVector< SC, LO, GO, NO > BlockMultiVector_Type
 
typedef Teuchos::RCP< BlockMultiVector_TypeBlockMultiVectorPtr_Type
 
typedef Teuchos::RCP< const BlockMultiVector_TypeBlockMultiVectorConstPtr_Type
 
typedef Teuchos::Comm< int > Comm_Type
 
typedef Teuchos::RCP< Comm_Type > CommPtr_Type
 
typedef Teuchos::RCP< const Comm_Type > CommConstPtr_Type
 
typedef Map< LO, GO, NO > Map_Type
 
typedef Teuchos::RCP< Map_TypeMapPtr_Type
 
typedef Teuchos::RCP< const Map_TypeMapConstPtr_Type
 
typedef Tpetra::Map< LO, GO, NO > TpetraMap_Type
 
typedef Teuchos::RCP< TpetraMap_Type > TpetraMapPtr_Type
 
typedef Teuchos::RCP< const TpetraMap_Type > TpetraMapConstPtr_Type
 
typedef const TpetraMapConstPtr_Type TpetraMapConstPtrConst_Type
 
typedef Tpetra::MultiVector< SC, LO, GO, NO > TpetraMultiVector_Type
 
typedef Teuchos::RCP< TpetraMultiVector_Type > TpetraMultiVectorPtr_Type
 
typedef Teuchos::RCP< const TpetraMultiVector_Type > TpetraMultiVectorConstPtr_Type
 
typedef const TpetraMultiVectorConstPtr_Type TpetraMultiVectorConstPtrConst_Type
 
typedef Tpetra::Import< LO, GO, NO > TpetraImport_Type
 
typedef Teuchos::RCP< TpetraImport_Type > TpetraImportPtr_Type
 
typedef Tpetra::Export< LO, GO, NO > TpetraExport_Type
 
typedef Teuchos::RCP< TpetraExport_Type > TpetraExportPtr_Type
 

Public Member Functions

 MultiVector (MapConstPtr_Type map, UN nmbVectors=1)
 Initialize tpetra multivector based on underyling map and number of vectors within. In almost all cases nmbVectors is 1.
 
 MultiVector (TpetraMultiVectorPtr_Type &TpetraMVPtrIn)
 Initialize tpetra multivector based on input multivector. Uses underlying map. !! Probably, this is not a deep copy. Both mv have the same pointer.
 
 MultiVector (MultiVectorConstPtr_Type mvIn)
 Initialize tpetra multivector based on input multivector. Uses underlying map and value information to construct new mv.
 
 ~MultiVector ()
 Destructor.
 
MultiVector_Typeoperator= (const MultiVector_Type &rhs)
 This will replace *this contents with the rhs input. Updated to deep copy, as this is necessary so both this and rhs would NOT have the same pointer.
 
bool is_null () const
 checking whether the multiVector exists
 
MapConstPtr_Type getMap () const
 Return underlying map.
 
MapPtr_Type getMapNonConst ()
 Return non constant version of underlying map.
 
TpetraMapConstPtr_Type getMapTpetra () const
 Return direct tpetra map of underlying map.
 
void replaceGlobalValue (GO globalRow, UN vectorIndex, const SC &value)
 Replace global value in mv.
 
void replaceLocalValue (LO localRow, UN vectorIndex, const SC &value)
 
void sumIntoGlobalValue (GO globalRow, UN vectorIndex, const SC &value)
 Update (+=) a value in host memory, using global row index.
 
LO getLocalLength () const
 
Teuchos::ArrayRCP< const SC > getData (UN i) const
 Get data of multivector.
 
Teuchos::ArrayRCP< SC > getDataNonConst (UN i) const
 Get data of multivector.
 
UN getNumVectors () const
 Get number of multivector (columns)
 
void print (Teuchos::EVerbosityLevel verbLevel=Teuchos::VERB_EXTREME) const
 Printing mv. Depending on verbosity level, output increases.
 
TpetraMultiVectorConstPtr_Type getTpetraMultiVector () const
 
TpetraMultiVectorPtr_Type getTpetraMultiVectorNonConst ()
 
Teuchos::RCP< Thyra::MultiVectorBase< SC > > getThyraMultiVector ()
 
Teuchos::RCP< const Thyra::MultiVectorBase< SC > > getThyraMultiVectorConst () const
 
void fromThyraMultiVector (Teuchos::RCP< Thyra::MultiVectorBase< SC > > thyraMV)
 
void norm2 (const Teuchos::ArrayView< typename Teuchos::ScalarTraits< SC >::magnitudeType > &norms) const
 
void normInf (const Teuchos::ArrayView< typename Teuchos::ScalarTraits< SC >::magnitudeType > &norms) const
 
void dot (MultiVectorConstPtr_Type a, const Teuchos::ArrayView< typename Teuchos::ScalarTraits< SC >::magnitudeType > &dots) const
 
void abs (MultiVectorConstPtr_Type a)
 
void update (const SC &alpha, const MultiVector_Type &A, const SC &beta)
 
void update (const SC &alpha, const MultiVector_Type &A, const SC &beta, const MultiVector_Type &B, const SC &gamma)
 
void multiply (Teuchos::ETransp transA, Teuchos::ETransp transB, const SC &alpha, MultiVectorConstPtr_Type &A, MultiVectorConstPtr_Type &B, const SC &beta)
 
void multiply (Teuchos::ETransp transA, Teuchos::ETransp transB, const SC &alpha, BlockMultiVectorConstPtr_Type &A, BlockMultiVectorConstPtr_Type &B, const SC &beta)
 
void putScalar (const SC &alpha)
 
void scale (const SC &alpha)
 
void importFromVector (MultiVectorConstPtr_Type mvIn, bool reuseImport=false, std::string combineMode="Insert", std::string type="Forward")
 
void exportFromVector (MultiVectorConstPtr_Type mvIn, bool reuseExport=false, std::string combineMode="Insert", std::string type="Forward")
 
void writeMM (std::string fileName="mv.mm") const
 
void readMM (std::string fileName) const
 
MultiVectorConstPtr_Type getVector (int i) const
 
MultiVectorPtr_Type sumColumns () const
 
SC getMax () const
 

Constructor & Destructor Documentation

◆ MultiVector() [1/3]

template<class SC, class LO, class GO, class NO>
FEDD::MultiVector< SC, LO, GO, NO >::MultiVector ( MapConstPtr_Type map,
UN nmbVectors = 1 )

Initialize tpetra multivector based on underyling map and number of vectors within. In almost all cases nmbVectors is 1.

Parameters
mapparallel local to global indexing of row entries
nmbVectorsnumber of vectors in multivector (seen maybe as different columns)

◆ MultiVector() [2/3]

template<class SC, class LO, class GO, class NO>
FEDD::MultiVector< SC, LO, GO, NO >::MultiVector ( TpetraMultiVectorPtr_Type & TpetraMVPtrIn)

Initialize tpetra multivector based on input multivector. Uses underlying map. !! Probably, this is not a deep copy. Both mv have the same pointer.

Parameters
TpetraMVPtrIntpetra multivector used to build new multivector
Here is the call graph for this function:

◆ MultiVector() [3/3]

template<class SC, class LO, class GO, class NO>
FEDD::MultiVector< SC, LO, GO, NO >::MultiVector ( MultiVectorConstPtr_Type mvIn)

Initialize tpetra multivector based on input multivector. Uses underlying map and value information to construct new mv.

Parameters
mvInmultivector used to build new multivector
Here is the call graph for this function:

Member Function Documentation

◆ getData()

template<class SC, class LO, class GO, class NO>
Teuchos::ArrayRCP< const SC > FEDD::MultiVector< SC, LO, GO, NO >::getData ( UN i) const

Get data of multivector.

Parameters
i'column' of multivector
Returns
Array format of const entries (on my processor)

◆ getDataNonConst()

template<class SC, class LO, class GO, class NO>
Teuchos::ArrayRCP< SC > FEDD::MultiVector< SC, LO, GO, NO >::getDataNonConst ( UN i) const

Get data of multivector.

Parameters
i'column' of multivector
Returns
Array format of entries (on my processor)
Here is the caller graph for this function:

◆ getMap()

template<class SC, class LO, class GO, class NO>
MultiVector< SC, LO, GO, NO >::MapConstPtr_Type FEDD::MultiVector< SC, LO, GO, NO >::getMap ( ) const

Return underlying map.

Returns
MapConstPtr_Type
Here is the caller graph for this function:

◆ getMapNonConst()

template<class SC, class LO, class GO, class NO>
MultiVector< SC, LO, GO, NO >::MapPtr_Type FEDD::MultiVector< SC, LO, GO, NO >::getMapNonConst ( )

Return non constant version of underlying map.

Returns
MapPtr_Type

◆ getMapTpetra()

template<class SC, class LO, class GO, class NO>
MultiVector< SC, LO, GO, NO >::TpetraMapConstPtr_Type FEDD::MultiVector< SC, LO, GO, NO >::getMapTpetra ( ) const

Return direct tpetra map of underlying map.

Returns
TpetraMapConstPtr_Type

◆ operator=()

template<class SC = default_sc, class LO = default_lo, class GO = default_go, class NO = default_no>
MultiVector_Type & FEDD::MultiVector< SC, LO, GO, NO >::operator= ( const MultiVector_Type & rhs)
inline

This will replace *this contents with the rhs input. Updated to deep copy, as this is necessary so both this and rhs would NOT have the same pointer.

Parameters
rhssource for copy
Returns
destination/result of copy

◆ replaceGlobalValue()

template<class SC, class LO, class GO, class NO>
void FEDD::MultiVector< SC, LO, GO, NO >::replaceGlobalValue ( GO globalRow,
UN vectorIndex,
const SC & value )

Replace global value in mv.

Parameters
globalRow[in] Global row index of the entry to modify. This must be a valid global row index on the calling process with respect to the MultiVector's Map.
vectorIndex[in] Column index of the entry to modify.
value[in] Incoming value to add to the entry.

◆ replaceLocalValue()

template<class SC, class LO, class GO, class NO>
void FEDD::MultiVector< SC, LO, GO, NO >::replaceLocalValue ( LO localRow,
UN vectorIndex,
const SC & value )
Parameters
lclRow[in] Local row index of the entry to modify. Must be a valid local index in this MultiVector's Map on the calling process.
vectorIndex[in] Column index of the entry to modify.
value[in] Incoming value to add to the entry.

◆ sumIntoGlobalValue()

template<class SC, class LO, class GO, class NO>
void FEDD::MultiVector< SC, LO, GO, NO >::sumIntoGlobalValue ( GO globalRow,
UN vectorIndex,
const SC & value )

Update (+=) a value in host memory, using global row index.

Add the given value to the existing value at row gblRow (a global index) and column col. The column index is zero based.

Parameters
globalRow[in] Global row index of the entry to modify. This must be a valid global row index on the calling process with respect to the MultiVector's Map.
vectorIndex[in] Column index of the entry to modify.
value[in] Incoming value to add to the entry.

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