Tpetra parallel linear algebra
Version of the Day
|
Vector for multiple degrees of freedom per mesh point. More...
#include <Tpetra_Experimental_BlockVector_decl.hpp>
Public Types | |
Typedefs to facilitate template metaprogramming. | |
typedef base_type::scalar_type | scalar_type |
The type of entries in the vector. More... | |
typedef base_type::impl_scalar_type | impl_scalar_type |
The implementation type of entries in the vector. More... | |
typedef base_type::local_ordinal_type | local_ordinal_type |
The type of local indices. More... | |
typedef base_type::global_ordinal_type | global_ordinal_type |
The type of global indices. More... | |
typedef base_type::node_type | node_type |
The Kokkos Node type. More... | |
typedef Tpetra::Map< LO, GO, Node > | map_type |
The specialization of Tpetra::Map that this class uses. More... | |
typedef Tpetra::MultiVector< Scalar, LO, GO, Node > | mv_type |
The specialization of Tpetra::MultiVector that this class uses. More... | |
typedef Tpetra::Vector< Scalar, LO, GO, Node > | vec_type |
The specialization of Tpetra::Vector that this class uses. More... | |
typedef LittleVector< impl_scalar_type, LO > | little_vec_type |
"Block view" of all degrees of freedom at a mesh point. More... | |
typedef LittleVector< const impl_scalar_type, LO > | const_little_vec_type |
"Const block view" of all degrees of freedom at a mesh point. More... | |
Typedefs | |
typedef Node::device_type | device_type |
The Kokkos Device type. More... | |
typedef device_type::execution_space | execution_space |
The Kokkos execution space. More... | |
Public Member Functions | |
Constructors | |
BlockVector (const map_type &meshMap, const LO blockSize) | |
Constructor that takes a mesh Map and a block size. More... | |
BlockVector (const map_type &meshMap, const map_type &pointMap, const LO blockSize) | |
Constructor that takes a mesh Map, a point Map, and a block size. More... | |
BlockVector (const mv_type &X_mv, const map_type &meshMap, const LO blockSize) | |
View an existing Vector or MultiVector. More... | |
BlockVector (const BlockVector< Scalar, LO, GO, Node > &X, const map_type &newMeshMap, const map_type &newPointMap, const size_t offset=0) | |
View an existing BlockVector using a different mesh Map, supplying the corresponding point Map. More... | |
BlockVector (const BlockVector< Scalar, LO, GO, Node > &X, const map_type &newMeshMap, const size_t offset=0) | |
View an existing BlockVector using a different mesh Map; compute the new point Map. More... | |
BlockVector () | |
Default constructor. More... | |
Access to Maps, the block size, and a Vector view. | |
vec_type | getVectorView () |
Get a Tpetra::Vector that views this BlockVector's data. More... | |
Fine-grained data access | |
bool | replaceLocalValues (const LO localRowIndex, const Scalar vals[]) const |
Replace all values at the given mesh point, using a local index. More... | |
bool | replaceGlobalValues (const GO globalRowIndex, const Scalar vals[]) const |
Replace all values at the given mesh point, using a global index. More... | |
bool | sumIntoLocalValues (const LO localRowIndex, const Scalar vals[]) const |
Sum into all values at the given mesh point, using a local index. More... | |
bool | sumIntoGlobalValues (const GO globalRowIndex, const Scalar vals[]) const |
Sum into all values at the given mesh point, using a global index. More... | |
bool | getLocalRowView (const LO localRowIndex, Scalar *&vals) const |
Get a writeable view of the entries at the given mesh point, using a local index. More... | |
bool | getGlobalRowView (const GO globalRowIndex, Scalar *&vals) const |
Get a writeable view of the entries at the given mesh point, using a global index. More... | |
little_vec_type | getLocalBlock (const LO localRowIndex) const |
Get a view of the degrees of freedom at the given mesh point, using a local index. More... | |
Coarse-grained operations | |
void | putScalar (const Scalar &val) |
Fill all entries with the given value val . More... | |
void | scale (const Scalar &val) |
Multiply all entries in place by the given value val . More... | |
Fine-grained data access | |
bool | replaceLocalValues (const LO localRowIndex, const LO colIndex, const Scalar vals[]) const |
Replace all values at the given mesh point, using local row and column indices. More... | |
bool | replaceGlobalValues (const GO globalRowIndex, const LO colIndex, const Scalar vals[]) const |
Replace all values at the given mesh point, using a global index. More... | |
bool | sumIntoLocalValues (const LO localRowIndex, const LO colIndex, const Scalar vals[]) const |
Sum into all values at the given mesh point, using a local index. More... | |
bool | sumIntoGlobalValues (const GO globalRowIndex, const LO colIndex, const Scalar vals[]) const |
Sum into all values at the given mesh point, using a global index. More... | |
bool | getLocalRowView (const LO localRowIndex, const LO colIndex, Scalar *&vals) const |
Get a writeable view of the entries at the given mesh point, using a local index. More... | |
bool | getGlobalRowView (const GO globalRowIndex, const LO colIndex, Scalar *&vals) const |
Get a writeable view of the entries at the given mesh point, using a global index. More... | |
little_vec_type | getLocalBlock (const LO localRowIndex, const LO colIndex) const |
Get a view of the degrees of freedom at the given mesh point. More... | |
Public methods for redistributing data | |
void | doImport (const SrcDistObject &source, const Import< LO, GO, Node > &importer, CombineMode CM) |
Import data into this object using an Import object ("forward mode"). More... | |
void | doImport (const SrcDistObject &source, const Export< LO, GO, Node > &exporter, CombineMode CM) |
Import data into this object using an Export object ("reverse mode"). More... | |
void | doExport (const SrcDistObject &source, const Export< LO, GO, Node > &exporter, CombineMode CM) |
Export data into this object using an Export object ("forward mode"). More... | |
void | doExport (const SrcDistObject &source, const Import< LO, GO, Node > &importer, CombineMode CM) |
Export data into this object using an Import object ("reverse mode"). More... | |
Attribute accessor methods | |
bool | isDistributed () const |
Whether this is a globally distributed object. More... | |
virtual Teuchos::RCP< const map_type > | getMap () const |
The Map describing the parallel distribution of this object. More... | |
I/O methods | |
void | print (std::ostream &os) const |
Print this object to the given output stream. More... | |
Implementation of Teuchos::Describable | |
virtual std::string | description () const |
One-line descriptiion of this object. More... | |
virtual void | describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel=Teuchos::Describable::verbLevel_default) const |
Print a descriptiion of this object to the given output stream. More... | |
Methods for use only by experts | |
virtual void | removeEmptyProcessesInPlace (const Teuchos::RCP< const map_type > &newMap) |
Remove processes which contain no elements in this object's Map. More... | |
Protected Member Functions | |
impl_scalar_type * | getRawPtr () const |
Raw pointer to the MultiVector's data. More... | |
size_t | getStrideX () const |
Stride between consecutive local entries in the same column. More... | |
size_t | getStrideY () const |
Stride between consecutive local entries in the same row. More... | |
bool | isValidLocalMeshIndex (const LO meshLocalIndex) const |
True if and only if meshLocalIndex is a valid local index in the mesh Map. More... | |
virtual size_t | constantNumberOfPackets () const |
Whether the implementation's instance promises always to have a constant number of packets per LID, and if so, how many packets per LID there are. More... | |
virtual void | doTransfer (const SrcDistObject &src, CombineMode CM, size_t numSameIDs, const Teuchos::ArrayView< const local_ordinal_type > &permuteToLIDs, const Teuchos::ArrayView< const local_ordinal_type > &permuteFromLIDs, const Teuchos::ArrayView< const local_ordinal_type > &remoteLIDs, const Teuchos::ArrayView< const local_ordinal_type > &exportLIDs, Distributor &distor, ReverseOption revOp) |
Redistribute data across memory images. More... | |
virtual void | createViews () const |
Hook for creating a const view. More... | |
virtual void | createViewsNonConst (KokkosClassic::ReadWriteOption rwo) |
Hook for creating a nonconst view. More... | |
virtual void | releaseViews () const |
Hook for releasing views. More... | |
Implementation of DistObject (or DistObjectKA). | |
The methods here implement Tpetra::DistObject or Tpetra::DistObjectKA, depending on a configure-time option. They let BlockMultiVector participate in Import and Export operations. Users don't have to worry about these methods. | |
virtual bool | checkSizes (const Tpetra::SrcDistObject &source) |
Compare the source and target (this) objects for compatibility. More... | |
virtual void | copyAndPermute (const Tpetra::SrcDistObject &source, size_t numSameIDs, const Teuchos::ArrayView< const LO > &permuteToLIDs, const Teuchos::ArrayView< const LO > &permuteFromLIDs) |
Perform copies and permutations that are local to this process. More... | |
virtual void | packAndPrepare (const Tpetra::SrcDistObject &source, const Teuchos::ArrayView< const LO > &exportLIDs, Teuchos::Array< impl_scalar_type > &exports, const Teuchos::ArrayView< size_t > &numPacketsPerLID, size_t &constantNumPackets, Tpetra::Distributor &distor) |
Perform any packing or preparation required for communication. More... | |
virtual void | unpackAndCombine (const Teuchos::ArrayView< const LO > &importLIDs, const Teuchos::ArrayView< const impl_scalar_type > &imports, const Teuchos::ArrayView< size_t > &numPacketsPerLID, size_t constantNumPackets, Tpetra::Distributor &distor, Tpetra::CombineMode CM) |
Perform any unpacking and combining after communication. More... | |
Methods implemented by subclasses and used by doTransfer(). | |
The doTransfer() method uses the subclass' implementations of these methods to implement data transfer. Subclasses of DistObject must implement these methods. This is an instance of the Template Method Pattern. ("Template" here doesn't mean "C++ template"; it means "pattern with holes that are filled in by the subclass' method implementations.") | |
virtual bool | useNewInterface () |
Whether lass (???) implements old or new interface. More... | |
virtual void | copyAndPermuteNew (const SrcDistObject &source, size_t numSameIDs, const Kokkos::View< const local_ordinal_type *, execution_space > &permuteToLIDs, const Kokkos::View< const local_ordinal_type *, execution_space > &permuteFromLIDs) |
virtual void | packAndPrepareNew (const SrcDistObject &source, const Kokkos::View< const local_ordinal_type *, execution_space > &exportLIDs, Kokkos::View< packet_type *, execution_space > &exports, const Kokkos::View< size_t *, execution_space > &numPacketsPerLID, size_t &constantNumPackets, Distributor &distor) |
virtual void | unpackAndCombineNew (const Kokkos::View< const local_ordinal_type *, execution_space > &importLIDs, const Kokkos::View< const packet_type *, execution_space > &imports, const Kokkos::View< size_t *, execution_space > &numPacketsPerLID, size_t constantNumPackets, Distributor &distor, CombineMode CM) |
Protected Attributes | |
mv_type | mv_ |
The Tpetra::MultiVector used to represent the data. More... | |
Teuchos::RCP< const map_type > | map_ |
The Map over which this object is distributed. More... | |
Access to Maps, the block size, and a MultiVector view. | |
map_type | getPointMap () const |
Get this BlockMultiVector's (previously computed) point Map. More... | |
LO | getBlockSize () const |
Get the number of degrees of freedom per mesh point. More... | |
LO | getNumVectors () const |
Get the number of columns (vectors) in the BlockMultiVector. More... | |
mv_type | getMultiVectorView () |
Get a Tpetra::MultiVector that views this BlockMultiVector's data. More... | |
static map_type | makePointMap (const map_type &meshMap, const LO blockSize) |
Create and return the point Map corresponding to the given mesh Map and block size. More... | |
Vector for multiple degrees of freedom per mesh point.
Scalar | The type of each entry of the block vector. (You can use real-valued or complex-valued types here, unlike in Epetra, where the scalar type is always double .) |
LO | The type of local indices. See the documentation of the first template parameter of Map for requirements. |
GO | The type of global indices. See the documentation of the second template parameter of Map for requirements. |
Node | The Kokkos Node type. See the documentation of the third template parameter of Map for requirements. |
BlockVector is like Tpetra::MultiVector, but its interface supports multiple degrees of freedom per mesh point. You can specify a mesh point by its local or global index, and read or write the values at that point. Every mesh point must have the same number of degrees of freedom. We call the number of degrees of freedom per mesh point the block size.
BlockVector is a special case of BlockMultiVector, for "multivectors" that are not "multi." That is, a BlockVector has a single vector (column). Please refer to the documentation of BlockMultiVector for details.
Definition at line 80 of file Tpetra_Experimental_BlockVector_decl.hpp.
typedef base_type::scalar_type Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::scalar_type |
The type of entries in the vector.
Definition at line 90 of file Tpetra_Experimental_BlockVector_decl.hpp.
typedef base_type::impl_scalar_type Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::impl_scalar_type |
The implementation type of entries in the vector.
Definition at line 92 of file Tpetra_Experimental_BlockVector_decl.hpp.
typedef base_type::local_ordinal_type Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::local_ordinal_type |
The type of local indices.
Definition at line 94 of file Tpetra_Experimental_BlockVector_decl.hpp.
typedef base_type::global_ordinal_type Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::global_ordinal_type |
The type of global indices.
Definition at line 96 of file Tpetra_Experimental_BlockVector_decl.hpp.
typedef base_type::node_type Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::node_type |
The Kokkos Node type.
Definition at line 98 of file Tpetra_Experimental_BlockVector_decl.hpp.
typedef Tpetra::Map<LO, GO, Node> Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::map_type |
The specialization of Tpetra::Map that this class uses.
Definition at line 101 of file Tpetra_Experimental_BlockVector_decl.hpp.
typedef Tpetra::MultiVector<Scalar, LO, GO, Node> Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::mv_type |
The specialization of Tpetra::MultiVector that this class uses.
Definition at line 103 of file Tpetra_Experimental_BlockVector_decl.hpp.
typedef Tpetra::Vector<Scalar, LO, GO, Node> Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::vec_type |
The specialization of Tpetra::Vector that this class uses.
Definition at line 105 of file Tpetra_Experimental_BlockVector_decl.hpp.
typedef LittleVector<impl_scalar_type, LO> Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::little_vec_type |
"Block view" of all degrees of freedom at a mesh point.
A "block view" lets you address all degrees of freedom at a mesh point. You don't have to use this class to access the degrees of freedom. If you do choose to use this class, it implements operator()(LO i), so you can access and modify its entries.
The preferred way to refer to the little_vec_type and const_little_vec_type types, is to get them from the typedefs below. This is because different specializations of BlockVector reserve the right to use different types to implement little_vec_type or const_little_vec_type. This gives us a porting strategy to move from "classic" Tpetra to the Kokkos refactor version.
Definition at line 121 of file Tpetra_Experimental_BlockVector_decl.hpp.
typedef LittleVector<const impl_scalar_type, LO> Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::const_little_vec_type |
"Const block view" of all degrees of freedom at a mesh point.
This is just like little_vec_type, except that you can't modify its entries.
Definition at line 127 of file Tpetra_Experimental_BlockVector_decl.hpp.
|
inherited |
The Kokkos Device type.
Definition at line 211 of file Tpetra_DistObject_decl.hpp.
|
inherited |
The Kokkos execution space.
Definition at line 213 of file Tpetra_DistObject_decl.hpp.
|
protectedinherited |
Whether the data transfer should be performed in forward or reverse mode.
"Reverse mode" means calling doExport() with an Import object, or calling doImport() with an Export object. "Forward mode" means calling doExport() with an Export object, or calling doImport() with an Import object.
Definition at line 449 of file Tpetra_DistObject_decl.hpp.
Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::BlockVector | ( | const map_type & | meshMap, |
const LO | blockSize | ||
) |
Constructor that takes a mesh Map and a block size.
meshMap | [in] Map that describes the distribution of mesh points (rather than the distribution of unknowns for those mesh points). |
blockSize | [in] The number of degrees of freedom per mesh point. We assume that this is the same for all mesh points in the above Map. |
The mesh Map describes the distribution of mesh points. Its corresponding point Map describes the distribution of degrees of freedom corresponding to those mesh points. If you have already computed the point Map corresponding to the above mesh Map, then it is more efficient to call the three-argument constructor below, that takes both the mesh Map and the point Map.
There are two ways to get the point Map corresponding to a given mesh Map and block size. You may either call the class method makePointMap() (inherited from the parent class BlockMultiVector), or you may call this two-argument constructor, and then call getPointMap().
The point Map enables reinterpretation of a BlockVector as a standard Tpetra::Vector, or as a Tpetra::MultiVector with one column. This lets users solve linear systems with Trilinos' solvers and preconditioners, that expect vectors as Tpetra::MultiVector or Tpetra::Vector instances.
Definition at line 52 of file Tpetra_Experimental_BlockVector_def.hpp.
Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::BlockVector | ( | const map_type & | meshMap, |
const map_type & | pointMap, | ||
const LO | blockSize | ||
) |
Constructor that takes a mesh Map, a point Map, and a block size.
See the documentation of the two-argument constructor above.
Definition at line 58 of file Tpetra_Experimental_BlockVector_def.hpp.
Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::BlockVector | ( | const mv_type & | X_mv, |
const map_type & | meshMap, | ||
const LO | blockSize | ||
) |
View an existing Vector or MultiVector.
X_mv | [in/out] The Vector or MultiVector to view. It MUST have view semantics; otherwise this constructor throws. Its Map must be the same (in the sense of isSameAs) as the point Map corresponding to the given mesh Map and block size. If this is a MultiVector, it must have only one column. |
meshMap | [in] The mesh Map to use for interpreting the given MultiVector or Vector (in place) as a BlockVector. |
blockSize | [in] The number of degrees of freedom per mesh point. We assume that this is the same for all mesh points. |
Definition at line 66 of file Tpetra_Experimental_BlockVector_def.hpp.
Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::BlockVector | ( | const BlockVector< Scalar, LO, GO, Node > & | X, |
const map_type & | newMeshMap, | ||
const map_type & | newPointMap, | ||
const size_t | offset = 0 |
||
) |
View an existing BlockVector using a different mesh Map, supplying the corresponding point Map.
This method corresponds to MultiVector's "offset view" constructor.
Definition at line 79 of file Tpetra_Experimental_BlockVector_def.hpp.
Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::BlockVector | ( | const BlockVector< Scalar, LO, GO, Node > & | X, |
const map_type & | newMeshMap, | ||
const size_t | offset = 0 |
||
) |
View an existing BlockVector using a different mesh Map; compute the new point Map.
This method corresponds to MultiVector's "offset view" constructor.
Definition at line 88 of file Tpetra_Experimental_BlockVector_def.hpp.
Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::BlockVector | ( | ) |
Default constructor.
Creates an empty BlockVector. An empty BlockVector has zero rows, and block size zero.
Definition at line 96 of file Tpetra_Experimental_BlockVector_def.hpp.
BlockVector< Scalar, LO, GO, Node >::vec_type Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::getVectorView | ( | ) |
Get a Tpetra::Vector that views this BlockVector's data.
This is how you can give a BlockVector to Trilinos' solvers and preconditioners.
Definition at line 100 of file Tpetra_Experimental_BlockVector_def.hpp.
bool Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::replaceLocalValues | ( | const LO | localRowIndex, |
const Scalar | vals[] | ||
) | const |
Replace all values at the given mesh point, using a local index.
localRowIndex | [in] Local index of the mesh point. |
vals | [in] Input values with which to replace whatever existing values are at the mesh point. |
Definition at line 109 of file Tpetra_Experimental_BlockVector_def.hpp.
bool Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::replaceGlobalValues | ( | const GO | globalRowIndex, |
const Scalar | vals[] | ||
) | const |
Replace all values at the given mesh point, using a global index.
globalRowIndex | [in] Global index of the mesh point. |
vals | [in] Input values with which to sum into whatever existing values are at the mesh point. |
Definition at line 116 of file Tpetra_Experimental_BlockVector_def.hpp.
bool Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::sumIntoLocalValues | ( | const LO | localRowIndex, |
const Scalar | vals[] | ||
) | const |
Sum into all values at the given mesh point, using a local index.
localRowIndex | [in] Local index of the mesh point. |
vals | [in] Input values with which to replace whatever existing values are at the mesh point. |
Definition at line 124 of file Tpetra_Experimental_BlockVector_def.hpp.
bool Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::sumIntoGlobalValues | ( | const GO | globalRowIndex, |
const Scalar | vals[] | ||
) | const |
Sum into all values at the given mesh point, using a global index.
globalRowIndex | [in] Global index of the mesh point. |
vals | [in] Input values with which to replace whatever existing values are at the mesh point. |
Definition at line 131 of file Tpetra_Experimental_BlockVector_def.hpp.
bool Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::getLocalRowView | ( | const LO | localRowIndex, |
Scalar *& | vals | ||
) | const |
Get a writeable view of the entries at the given mesh point, using a local index.
localRowIndex | [in] Local index of the mesh point. |
vals | [in] Input values with which to replace whatever existing values are at the mesh point. |
Definition at line 138 of file Tpetra_Experimental_BlockVector_def.hpp.
bool Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::getGlobalRowView | ( | const GO | globalRowIndex, |
Scalar *& | vals | ||
) | const |
Get a writeable view of the entries at the given mesh point, using a global index.
globalRowIndex | [in] Global index of the mesh point. |
vals | [in] Input values with which to replace whatever existing values are at the mesh point. |
Definition at line 145 of file Tpetra_Experimental_BlockVector_def.hpp.
BlockVector< Scalar, LO, GO, Node >::little_vec_type Tpetra::Experimental::BlockVector< Scalar, LO, GO, Node >::getLocalBlock | ( | const LO | localRowIndex | ) | const |
Get a view of the degrees of freedom at the given mesh point, using a local index.
Get a view of the degrees of freedom at the given mesh point.
The preferred way to refer to little_vec_type is to get it from BlockVector's typedef. This is because different specializations of BlockVector reserve the right to use different types to implement little_vec_type. This gives us a porting strategy to move from "classic" Tpetra to the Kokkos refactor version.
Definition at line 163 of file Tpetra_Experimental_BlockVector_def.hpp.
|
staticinherited |
Create and return the point Map corresponding to the given mesh Map and block size.
This is a class ("static") method so that you can make and reuse a point Map for creating different BlockMultiVector instances, using the more efficient four-argument constructor.
Definition at line 268 of file Tpetra_Experimental_BlockMultiVector_def.hpp.
|
inlineinherited |
Get this BlockMultiVector's (previously computed) point Map.
It is always valid to call this method. A BlockMultiVector always has a point Map. We do not compute the point Map lazily.
Definition at line 310 of file Tpetra_Experimental_BlockMultiVector_decl.hpp.
|
inlineinherited |
Get the number of degrees of freedom per mesh point.
Definition at line 315 of file Tpetra_Experimental_BlockMultiVector_decl.hpp.
|
inlineinherited |
Get the number of columns (vectors) in the BlockMultiVector.
Definition at line 320 of file Tpetra_Experimental_BlockMultiVector_decl.hpp.
|
inherited |
Get a Tpetra::MultiVector that views this BlockMultiVector's data.
This is how you can give a BlockMultiVector to Trilinos' solvers and preconditioners.
Definition at line 106 of file Tpetra_Experimental_BlockMultiVector_def.hpp.
|
inherited |
Fill all entries with the given value val
.
Definition at line 638 of file Tpetra_Experimental_BlockMultiVector_def.hpp.
|
inherited |
Multiply all entries in place by the given value val
.
Definition at line 645 of file Tpetra_Experimental_BlockMultiVector_def.hpp.
|
inherited |
Replace all values at the given mesh point, using local row and column indices.
localRowIndex | [in] Local index of the mesh point. |
colIndex | [in] Column (vector) to modify. |
vals | [in] Input values with which to replace whatever existing values are at the mesh point. |
Definition at line 328 of file Tpetra_Experimental_BlockMultiVector_def.hpp.
|
inherited |
Replace all values at the given mesh point, using a global index.
globalRowIndex | [in] Global index of the mesh point. |
colIndex | [in] Column (vector) to modify. |
vals | [in] Input values with which to sum into whatever existing values are at the mesh point. |
Definition at line 343 of file Tpetra_Experimental_BlockMultiVector_def.hpp.
|
inherited |
Sum into all values at the given mesh point, using a local index.
localRowIndex | [in] Local index of the mesh point. |
colIndex | [in] Column (vector) to modify. |
vals | [in] Input values with which to replace whatever existing values are at the mesh point. |
Definition at line 373 of file Tpetra_Experimental_BlockMultiVector_def.hpp.
|
inherited |
Sum into all values at the given mesh point, using a global index.
globalRowIndex | [in] Global index of the mesh point. |
colIndex | [in] Column (vector) to modify. |
vals | [in] Input values with which to replace whatever existing values are at the mesh point. |
Definition at line 388 of file Tpetra_Experimental_BlockMultiVector_def.hpp.
|
inherited |
Get a writeable view of the entries at the given mesh point, using a local index.
localRowIndex | [in] Local index of the mesh point. |
colIndex | [in] Column (vector) to view. |
vals | [out] View of the entries at the given mesh point. |
Definition at line 404 of file Tpetra_Experimental_BlockMultiVector_def.hpp.
|
inherited |
Get a writeable view of the entries at the given mesh point, using a global index.
globalRowIndex | [in] Global index of the mesh point. |
colIndex | [in] Column (vector) to view. |
vals | [out] View of the entries at the given mesh point. |
Definition at line 418 of file Tpetra_Experimental_BlockMultiVector_def.hpp.
|
inherited |
Get a view of the degrees of freedom at the given mesh point.
The preferred way to refer to little_vec_type is to get it from BlockMultiVector's typedef. This is because different specializations of BlockMultiVector reserve the right to use different types to implement little_vec_type. This gives us a porting strategy to move from "classic" Tpetra to the Kokkos refactor version.
Definition at line 433 of file Tpetra_Experimental_BlockMultiVector_def.hpp.
|
protectedvirtualinherited |
Compare the source and target (this) objects for compatibility.
Implements Tpetra::DistObject< Scalar, LO, GO, Node >.
Definition at line 479 of file Tpetra_Experimental_BlockMultiVector_def.hpp.
|
protectedvirtualinherited |
Perform copies and permutations that are local to this process.
source | [in] On entry, the source object, from which we are distributing. We distribute to the destination object, which is *this object. |
numSameIDs | [in] The umber of elements that are the same on the source and destination (this) objects. These elements are owned by the same process in both the source and destination objects. No permutation occurs. |
numPermuteIDs | [in] The number of elements that are locally permuted between the source and destination objects. |
permuteToLIDs | [in] List of the elements that are permuted. They are listed by their LID in the destination object. |
permuteFromLIDs | [in] List of the elements that are permuted. They are listed by their LID in the source object. |
Reimplemented from Tpetra::DistObject< Scalar, LO, GO, Node >.
Definition at line 486 of file Tpetra_Experimental_BlockMultiVector_def.hpp.
|
protectedvirtualinherited |
Perform any packing or preparation required for communication.
source | [in] Source object for the redistribution. |
exportLIDs | [in] List of the entries (as local IDs in the source object) we will be sending to other images. |
exports | [out] On exit, the buffer for data to send. |
numPacketsPerLID | [out] On exit, the implementation of this method must do one of two things: set numPacketsPerLID[i] to contain the number of packets to be exported for exportLIDs[i] and set constantNumPackets to zero, or set constantNumPackets to a nonzero value. If the latter, the implementation need not fill numPacketsPerLID. |
constantNumPackets | [out] On exit, 0 if numPacketsPerLID has variable contents (different size for each LID). If nonzero, then it is expected that the number of packets per LID is constant, and that constantNumPackets is that value. |
distor | [in] The Distributor object we are using. |
Reimplemented from Tpetra::DistObject< Scalar, LO, GO, Node >.
Definition at line 530 of file Tpetra_Experimental_BlockMultiVector_def.hpp.
|
protectedvirtualinherited |
Perform any unpacking and combining after communication.
importLIDs | [in] List of the entries (as LIDs in the destination object) we received from other images. |
imports | [in] Buffer containing data we received. |
numPacketsPerLID | [in] If constantNumPackets is zero, then numPacketsPerLID[i] contains the number of packets imported for importLIDs[i]. |
constantNumPackets | [in] If nonzero, then numPacketsPerLID is constant (same value in all entries) and constantNumPackets is that value. If zero, then numPacketsPerLID[i] is the number of packets imported for importLIDs[i]. |
distor | [in] The Distributor object we are using. |
CM | [in] The combine mode to use when combining the imported entries with existing entries. |
Reimplemented from Tpetra::DistObject< Scalar, LO, GO, Node >.
Definition at line 584 of file Tpetra_Experimental_BlockMultiVector_def.hpp.
|
inlineprotectedinherited |
Raw pointer to the MultiVector's data.
Definition at line 475 of file Tpetra_Experimental_BlockMultiVector_decl.hpp.
|
inlineprotectedinherited |
Stride between consecutive local entries in the same column.
Definition at line 480 of file Tpetra_Experimental_BlockMultiVector_decl.hpp.
|
inlineprotectedinherited |
Stride between consecutive local entries in the same row.
Definition at line 485 of file Tpetra_Experimental_BlockMultiVector_decl.hpp.
|
inlineprotectedinherited |
True if and only if meshLocalIndex
is a valid local index in the mesh Map.
Definition at line 491 of file Tpetra_Experimental_BlockMultiVector_decl.hpp.
|
inherited |
Import data into this object using an Import object ("forward mode").
The input DistObject is always the source of the data redistribution operation, and the *this
object is always the target.
If you don't know the difference between forward and reverse mode, then you probably want forward mode. Use this method with your precomputed Import object if you want to do an Import, else use doExport() with a precomputed Export object.
source | [in] The "source" object for redistribution. |
importer | [in] Precomputed data redistribution plan. Its source Map must be the same as the input DistObject's Map, and its target Map must be the same as this->getMap() . |
CM | [in] How to combine incoming data with the same global index. |
|
inherited |
Import data into this object using an Export object ("reverse mode").
The input DistObject is always the source of the data redistribution operation, and the *this
object is always the target.
If you don't know the difference between forward and reverse mode, then you probably want forward mode. Use the version of doImport() that takes a precomputed Import object in that case.
source | [in] The "source" object for redistribution. |
exporter | [in] Precomputed data redistribution plan. Its target Map must be the same as the input DistObject's Map, and its source Map must be the same as this->getMap() . (Note the difference from forward mode.) |
CM | [in] How to combine incoming data with the same global index. |
|
inherited |
Export data into this object using an Export object ("forward mode").
The input DistObject is always the source of the data redistribution operation, and the *this
object is always the target.
If you don't know the difference between forward and reverse mode, then you probably want forward mode. Use this method with your precomputed Export object if you want to do an Export, else use doImport() with a precomputed Import object.
source | [in] The "source" object for redistribution. |
exporter | [in] Precomputed data redistribution plan. Its source Map must be the same as the input DistObject's Map, and its target Map must be the same as this->getMap() . |
CM | [in] How to combine incoming data with the same global index. |
|
inherited |
Export data into this object using an Import object ("reverse mode").
The input DistObject is always the source of the data redistribution operation, and the *this
object is always the target.
If you don't know the difference between forward and reverse mode, then you probably want forward mode. Use the version of doExport() that takes a precomputed Export object in that case.
source | [in] The "source" object for redistribution. |
importer | [in] Precomputed data redistribution plan. Its target Map must be the same as the input DistObject's Map, and its source Map must be the same as this->getMap() . (Note the difference from forward mode.) |
CM | [in] How to combine incoming data with the same global index. |
|
inherited |
Whether this is a globally distributed object.
For a definition of "globally distributed" (and its opposite, "locally replicated"), see the documentation of Map's isDistributed() method.
|
inlinevirtualinherited |
The Map describing the parallel distribution of this object.
Note that some Tpetra objects might be distributed using multiple Map objects. For example, CrsMatrix has both a row Map and a column Map. It is up to the subclass to decide which Map to use when invoking the DistObject constructor.
Definition at line 347 of file Tpetra_DistObject_decl.hpp.
|
inherited |
Print this object to the given output stream.
We generally assume that all MPI processes can print to the given stream.
|
virtualinherited |
One-line descriptiion of this object.
We declare this method virtual so that subclasses of DistObject may override it.
Reimplemented in Tpetra::MultiVector< Scalar, LO, GO, Node >.
|
virtualinherited |
Print a descriptiion of this object to the given output stream.
We declare this method virtual so that subclasses of Distobject may override it.
Reimplemented in Tpetra::MultiVector< Scalar, LO, GO, Node >.
|
virtualinherited |
Remove processes which contain no elements in this object's Map.
On input, this object is distributed over the Map returned by getMap() (the "original Map," with its communicator, the "original communicator"). The input newMap
of this method must be the same as the result of calling getMap()->removeEmptyProcesses()
. On processes in the original communicator which contain zero elements ("excluded processes," as opposed to "included processes"), the input newMap
must be Teuchos::null
(which is what getMap()->removeEmptyProcesses()
returns anyway).
On included processes, reassign this object's Map (that would be returned by getMap()) to the input newMap
, and do any work that needs to be done to restore correct semantics. On excluded processes, free any data that needs freeing, and do any other work that needs to be done to restore correct semantics.
This method has collective semantics over the original communicator. On exit, the only method of this object which is safe to call on excluded processes is the destructor. This implies that subclasses' destructors must not contain communication operations.
Reimplemented in Tpetra::MultiVector< Scalar, LO, GO, Node >.
|
protectedvirtualinherited |
Whether the implementation's instance promises always to have a constant number of packets per LID, and if so, how many packets per LID there are.
If this method returns zero, the instance says that it might possibly have a different number of packets for each LID to send or receive. If it returns nonzero, the instance promises that the number of packets is the same for all LIDs, and that the return value is this number of packets per LID.
The default implementation of this method returns zero. This does not affect the behavior of doTransfer() in any way. If a nondefault implementation returns nonzero, doTransfer() will use this information to avoid unnecessary allocation and / or resizing of arrays.
Reimplemented in Tpetra::MultiVector< Scalar, LO, GO, Node >.
|
protectedvirtualinherited |
Redistribute data across memory images.
src | [in] The source object, to redistribute into the target object, which is *this object. |
CM | [in] The combine mode that describes how to combine values that map to the same global ID on the same process. |
permuteToLIDs | [in] See copyAndPermute(). |
permuteFromLIDs | [in] See copyAndPermute(). |
remoteLIDs | [in] List of entries (as local IDs) in the destination object to receive from other processes. |
exportLIDs | [in] See packAndPrepare(). |
distor | [in/out] The Distributor object that knows how to redistribute data. |
revOp | [in] Whether to do a forward or reverse mode redistribution. |
|
inlineprotectedvirtualinherited |
Whether lass (???) implements old or new interface.
Reimplemented in Tpetra::MultiVector< Scalar, LO, GO, Node >.
Definition at line 545 of file Tpetra_DistObject_decl.hpp.
|
protectedvirtualinherited |
Hook for creating a const view.
doTransfer() calls this on the source object. By default, it does nothing, but the source object can use this as a hint to fetch data from a compute buffer on an off-CPU device (such as a GPU) into host memory.
Reimplemented in Tpetra::MultiVector< Scalar, LO, GO, Node >.
|
protectedvirtualinherited |
Hook for creating a nonconst view.
doTransfer() calls this on the destination (*this
) object. By default, it does nothing, but the destination object can use this as a hint to fetch data from a compute buffer on an off-CPU device (such as a GPU) into host memory.
rwo | [in] Whether to create a write-only or a read-and-write view. For Kokkos Node types where compute buffers live in a separate memory space (e.g., in the device memory of a discrete accelerator like a GPU), a write-only view only requires copying from host memory to the compute buffer, whereas a read-and-write view requires copying both ways (once to read, from the compute buffer to host memory, and once to write, back to the compute buffer). |
Reimplemented in Tpetra::MultiVector< Scalar, LO, GO, Node >.
|
protectedvirtualinherited |
Hook for releasing views.
doTransfer() calls this on both the source and destination objects, once it no longer needs to access that object's data. By default, this method does nothing. Implementations may use this as a hint to free host memory which is a view of a compute buffer, once the host memory view is no longer needed. Some implementations may prefer to mirror compute buffers in host memory; for these implementations, releaseViews() may do nothing.
Reimplemented in Tpetra::MultiVector< Scalar, LO, GO, Node >.
|
protectedinherited |
The Tpetra::MultiVector used to represent the data.
Definition at line 513 of file Tpetra_Experimental_BlockMultiVector_decl.hpp.
|
protectedinherited |
The Map over which this object is distributed.
Definition at line 695 of file Tpetra_DistObject_decl.hpp.