A collection of AMP Vectors that appear as one vector. More...
#include <MultiVector.h>

Public Types | |
| typedef std::shared_ptr< const Vector > | const_shared_ptr |
| typedef std::shared_ptr< Vector > | shared_ptr |
| Shorthand for shared pointer to Vector. | |
Public Member Functions | |
| void | abs (const Vector &x) |
| Set this to the component-wise absolute value of a vector. \(\mathit{this}_i = |x_i|\). | |
| void | add (const Vector &x, const Vector &y) |
| Adds two vectors. For Vectors, \(\mathit{this}_i = x_i + y_i\). | |
| template<typename TYPE > | |
| void | addGhostValuesByGlobalID (int num, const size_t *indices, const TYPE *vals) |
| void | addScalar (const Vector &x, const Scalar &alpha) |
| set vector to \(x + \alpha \bar{1}\). | |
| template<typename TYPE > | |
| void | addValuesByGlobalID (int num, const size_t *indices, const TYPE *vals) |
| template<class TYPE > | |
| void | addValuesByLocalID (int num, size_t *indices, const TYPE *vals) |
| virtual void | addVector (std::vector< Vector::shared_ptr > vec) |
| Add vector(s) to a MultiVector. Note: This is a collective operation, vec may be different sizes on different processors. | |
| virtual void | addVector (Vector::shared_ptr vec) |
| Add a vector to a MultiVector. Note: this is a collective operation, vec may be NULL on some processors. | |
| void | axpby (const Scalar &alpha, const Scalar &beta, const Vector &x) |
| Set this vector alpha * x + this. \(\mathit{this}_i = \alpha x_i + \beta \mathit{this}_i \). | |
| void | axpy (const Scalar &alpha, const Vector &x, const Vector &y) |
| Set this vector to alpha * x + y. \(\mathit{this}_i = \alpha x_i + y_i\). | |
| auto | begin () |
| Return the first vector in the MultiVector. | |
| auto | begin () const |
| Return the first vector in the MultiVector. | |
| std::shared_ptr< Vector > | clone () const |
| Allocate space in the same fashion as this | |
| std::shared_ptr< Vector > | clone (const std::shared_ptr< Variable > name) const |
| Allocate space in the same fashion as this | |
| std::shared_ptr< Vector > | clone (const std::string &name) const |
| Allocate space in the same fashion as this | |
| std::shared_ptr< VectorData > | cloneData () const |
| template<class TYPE = double> | |
| VectorDataIterator< const TYPE > | constBegin () const |
| Return an iterator to the beginning of the data. | |
| template<class TYPE = double> | |
| VectorDataIterator< const TYPE > | constEnd () const |
| Return an iterator to the end of the data. | |
| bool | containsGlobalElement (size_t id) |
| bool | containsPointer (const Vector::shared_ptr p) const |
| Determine if a Vector is a constituent. | |
| void | copy (const Vector &x) |
| Set vector equal to x For Vectors, \(\mathit{this}_i = x_i\). | |
| void | copyCast (std::shared_ptr< const Vector > x) |
| Copy up/down-casting this | |
| virtual void | copyVector (std::shared_ptr< const Vector > x) |
| void | dataChanged () |
| void | divide (const Vector &x, const Vector &y) |
| Component-wise divide one vector by another. For Vectors, \(\mathit{this}_i = x_i / y_i\). | |
| Scalar | dot (const Vector &x) const |
| Return the dot product of this vector with the argument vector. | |
| void | dumpGhostedData (std::ostream &out, size_t offset=0) const |
| void | dumpOwnedData (std::ostream &out, size_t GIDoffset=0, size_t LIDoffset=0) const |
| auto | end () |
| Return one past the last vector in the MultiVector. | |
| auto | end () const |
| Return one past the last vector in the MultiVector. | |
| bool | equals (const Vector &x, const Scalar &tol=1e-6) const |
| Check if two vectors are equal. | |
| virtual void | eraseVector (Vector::shared_ptr vec) |
| Remove a vector from a MultiVector. | |
| const AMP_MPI & | getComm () const |
| std::shared_ptr< CommunicationList > | getCommunicationList () const |
| Get the CommunicationList for this Vector. | |
| uint64_t | getDataID () const |
| std::shared_ptr< AMP::Discretization::DOFManager > | getDOFManager () const |
| Get the DOFManager for this Vector. | |
| size_t | getGhostSize () const |
| template<typename TYPE = double> | |
| TYPE | getGhostValueByGlobalID (size_t i) const |
| Return a ghost value from the vector. | |
| template<typename TYPE > | |
| void | getGhostValuesByGlobalID (int num, const size_t *indices, TYPE *vals) const |
| size_t | getGlobalSize () const |
| uint64_t | getID () const |
| Get a unique id hash for the vector. | |
| size_t | getLocalSize () const |
| size_t | getLocalStartID () const |
| template<typename TYPE = double> | |
| TYPE | getLocalValueByGlobalID (size_t i) const |
| Return a local value from the vector. | |
| AMP::Utilities::MemoryType | getMemoryLocation () const |
| returns the memory location for data | |
| std::string | getName () const |
| Return the vector name. | |
| size_t | getNumberOfComponents () const |
| Return integer number of patch data components in vector. | |
| size_t | getNumberOfSubvectors () const |
| Obtain the number of Vector objects in this MultiVector. | |
| template<class TYPE > | |
| void | getRawData (TYPE *buf) const |
| template<typename RETURN_TYPE > | |
| RETURN_TYPE * | getRawDataBlock (size_t i=0) |
| Obtain a particular contiguous block of data cast to RETURN_TYPE. | |
| template<typename RETURN_TYPE > | |
| const RETURN_TYPE * | getRawDataBlock (size_t i=0) const |
| Obtain a particular contiguous block of data cast to RETURN_TYPE. | |
| void * | getRawDataBlockAsVoid (size_t i) |
| const void * | getRawDataBlockAsVoid (size_t i) const |
| auto & | getUnits () const |
| Get the units for this Vector. | |
| AMP::LinearAlgebra::UpdateState | getUpdateStatus () const |
| template<typename TYPE = double> | |
| TYPE | getValueByGlobalID (size_t i) const |
| Return a value from the vector. | |
| template<typename TYPE = double> | |
| TYPE | getValueByLocalID (size_t i) const |
| Return a local value from the vector. | |
| template<typename TYPE > | |
| void | getValuesByGlobalID (int num, const size_t *indices, TYPE *vals) const |
| template<typename TYPE > | |
| void | getValuesByLocalID (int num, const size_t *indices, TYPE *vals) const |
| std::shared_ptr< Variable > | getVariable () |
| Get the variable associated with this vector. | |
| const std::shared_ptr< Variable > | getVariable () const |
| Get the variable associated with this vector. | |
| const std::vector< std::shared_ptr< Vector > > & | getVecs () |
| Return one past the last vector in the MultiVector. | |
| std::vector< std::shared_ptr< const Vector > > | getVecs () const |
| Return one past the last vector in the MultiVector. | |
| virtual Vector::shared_ptr | getVector (size_t i) |
| Return the i-th Vector in this MultiVector. | |
| virtual Vector::const_shared_ptr | getVector (size_t i) const |
| Return the i-th Vector in this MultiVector. | |
| std::shared_ptr< VectorData > | getVectorData () |
| Return the pointer to the VectorData. | |
| std::shared_ptr< const VectorData > | getVectorData () const |
| Return the pointer to the VectorData. | |
| std::shared_ptr< VectorOperations > | getVectorOperations () |
| Return the pointer to the VectorOperation. | |
| std::shared_ptr< const VectorOperations > | getVectorOperations () const |
| Return the pointer to the VectorOperation. | |
| template<typename VIEW_TYPE > | |
| std::shared_ptr< VIEW_TYPE > | getView () const |
| If a particular type of view of this Vector has been created, return it. | |
| bool | hasComm () const |
| template<typename VIEW_TYPE > | |
| bool | hasView () const |
| If a particular type of view of this Vector has been created, return true. | |
| template<typename TYPE > | |
| bool | isType (size_t block) const |
| Scalar | L1Norm () const |
| Return discrete \( L_1 \) -norm of this vector. | |
| Scalar | L2Norm () const |
| Return discrete \( L_2 \) -norm of this vector. | |
| std::pair< Scalar, Scalar > | L2NormAndDot (const Vector &x) const |
| Return the L2 norm of this vector and the dot product with the argument vector. | |
| void | linearSum (const Scalar &alpha, const Vector &x, const Scalar &beta, const Vector &y) |
| Set a vector to be a linear combination of two vectors. \(\mathit{this}_i = \alpha x_i + \beta y_i\). | |
| void | makeConsistent () |
| void | makeConsistent (AMP::LinearAlgebra::ScatterType t) |
| Scalar | max () const |
| Return the maximum value of the vector. \(\max_i \mathit{this}_i\). | |
| Scalar | maxNorm () const |
| Return the \( L_\infty \) -norm of this vector. | |
| Scalar | mean () const |
| Return the maximum value of the vector. \(\max_i \mathit{this}_i\). | |
| Scalar | min () const |
| Return the minimum value of the vector. \(\min_i \mathit{this}_i\). | |
| Scalar | minQuotient (const Vector &x) const |
| Returns the minimum of the quotient of two vectors: | |
| void | multiply (const Vector &x, const Vector &y) |
| Component-wise multiply one vector with another. For Vectors, \(\mathit{this}_i = x_i y_i\). | |
| MultiVector ()=default | |
| MultiVector (const MultiVector &)=delete | |
| MultiVector (const std::string &name, const AMP_MPI &comm) | |
| MultiVector (const std::string &name, const AMP_MPI &comm, const std::vector< Vector::shared_ptr > &vecs) | |
| MultiVector (int64_t fid, AMP::IO::RestartManager *manager) | |
| Read restart data to file. | |
| MultiVector (MultiVector &&)=delete | |
| MultiVector (std::shared_ptr< Vector > vec) | |
| size_t | numberOfDataBlocks () const |
| MultiVector & | operator= (const MultiVector &)=delete |
| MultiVector & | operator= (MultiVector &&)=delete |
| template<class TYPE > | |
| void | putRawData (const TYPE *buf) |
| std::unique_ptr< Vector > | rawClone () const override |
| Allocate space in the same fashion as this | |
| void | reciprocal (const Vector &x) |
| Set this to the component-wise reciprocal of a vector. \(\mathit{this}_i =
1/x_i\). | |
| void | registerChildObjects (AMP::IO::RestartManager *manager) const override |
| Register any child objects. | |
| template<typename VIEW_TYPE > | |
| void | registerView (std::shared_ptr< VIEW_TYPE > v) const |
| Add a view of this vector to an internal queue. | |
| virtual void | rename (const std::string &src, const std::string &dst) |
| Renames. | |
| virtual void | replaceSubVector (Vector::shared_ptr oldVec, Vector::shared_ptr newVec) |
| Replace a vector in a MultiVector. | |
| void | reset () override |
| Reset. | |
| void | scale (const Scalar &alpha) |
| Scale a vector. For Vectors, \(\mathit{this}_i = \alpha\mathit{this}_i\). | |
| void | scale (const Scalar &alpha, const Vector &x) |
| Set vector equal to scaled input. For Vectors, \(\mathit{this}_i = \alpha x_i\). | |
| shared_ptr | select (const VectorSelector &criterion) |
| Selects a portion of this vector and creates a view. | |
| const_shared_ptr | select (const VectorSelector &criterion) const |
| Selects a portion of this vector and creates a view. | |
| void | setCommunicationList (std::shared_ptr< CommunicationList > comm) |
| template<typename TYPE > | |
| void | setGhostValuesByGlobalID (int num, const size_t *indices, const TYPE *vals) |
| void | setMax (const Scalar &val) |
| modify vector to have max value 'val' specified | |
| void | setMin (const Scalar &val) |
| modify vector to have min value 'val' specified | |
| void | setName (const std::string &name) |
| Set the vector name. | |
| void | setNoGhosts () |
| Ensure this vector has no ghosts. | |
| void | setRandomValues () |
| Set data in this vector to random values on [0,1). | |
| void | setToScalar (const Scalar &alpha) |
| Set all compenents of a vector to a scalar. For Vectors, the components of this are set to \(\alpha\). | |
| virtual void | setUnits (AMP::Units) |
| Get the units for this Vector. | |
| void | setUpdateStatus (AMP::LinearAlgebra::UpdateState state) |
| template<typename TYPE > | |
| void | setValueByGlobalID (size_t i, TYPE v) |
| Set a value in the vector. | |
| template<typename TYPE > | |
| void | setValuesByGlobalID (int num, const size_t *indices, const TYPE *vals) |
| template<class TYPE > | |
| void | setValuesByLocalID (int num, size_t *indices, const TYPE *vals) |
| void | setVariable (const std::shared_ptr< Variable > name) |
| Change the variable associated with this vector. | |
| std::shared_ptr< Vector > | shared_from_this () |
| std::shared_ptr< const Vector > | shared_from_this () const |
| size_t | sizeOfDataBlock (size_t i=0) const |
| size_t | sizeofDataBlockType (size_t i) const |
| Vector::shared_ptr | subsetVectorForComponent (size_t index) |
| Retrieve ith subvector. | |
| Vector::const_shared_ptr | subsetVectorForComponent (size_t index) const |
| Retrieve ith subvector. | |
| Vector::shared_ptr | subsetVectorForVariable (const std::string &name) |
| Retrieve a sub-vector associated with a particular Variable. | |
| Vector::const_shared_ptr | subsetVectorForVariable (const std::string &name) const |
| Retrieve a sub-vector associated with a particular Variable. | |
| Vector::shared_ptr | subsetVectorForVariable (std::shared_ptr< const Variable > var) |
| Retrieve a sub-vector associated with a particular Variable. | |
| Vector::const_shared_ptr | subsetVectorForVariable (std::shared_ptr< const Variable > var) const |
| Retrieve a sub-vector associated with a particular Variable. | |
| void | subtract (const Vector &x, const Vector &y) |
| Subtracts one vector from another. For Vectors, \(\mathit{this}_i = x_i - y_i\). | |
| Scalar | sum () const |
| Return the maximum value of the vector. \(\max_i \mathit{this}_i\). | |
| void | swapData (VectorData &rhs) |
| void | swapVectors (Vector &other) override |
| Swap the data in this Vector for another. | |
| void | swapVectors (Vector::shared_ptr other) |
| Swap the data in this Vector for another. | |
| std::string | type () const override |
| Return the name of the vector. | |
| std::string | VectorDataName () const |
| void | writeRestart (int64_t fid) const override |
| Write restart data to file. | |
| Scalar | wrmsNorm (const Vector &x, const Vector &y) const |
| Return a weighted norm of a vector. | |
| Scalar | wrmsNormMask (const Vector &x, const Vector &mask, const Vector &y) const |
| Return a weighted norm of a subset of a vector. | |
| void | zero () |
| Set vector entries (including ghosts) to zero. | |
| virtual | ~MultiVector () |
Static Public Member Functions | |
| static std::shared_ptr< const MultiVector > | const_create (const std::string &name, const AMP_MPI &comm, const std::vector< Vector::const_shared_ptr > &vecs) |
| Create a new multivector in parallel. | |
| static std::shared_ptr< const MultiVector > | const_create (std::shared_ptr< Variable > name, const AMP_MPI &comm, const std::vector< Vector::const_shared_ptr > &vecs) |
| Create a new multivector in parallel. | |
| static std::shared_ptr< const MultiVector > | constView (Vector::const_shared_ptr vec, const AMP_MPI &comm=AMP_COMM_NULL) |
| Create a multivector view of a vector. | |
| static std::shared_ptr< MultiVector > | create (const std::string &name, const AMP_MPI &comm) |
| Create a new (empty) multivector. | |
| static std::shared_ptr< MultiVector > | create (const std::string &name, const AMP_MPI &comm, const std::vector< Vector::shared_ptr > &vecs) |
| Create a new multivector in parallel. | |
| static std::shared_ptr< MultiVector > | create (std::shared_ptr< Variable > name, const AMP_MPI &comm) |
| Create a new (empty) multivector. | |
| static std::shared_ptr< MultiVector > | create (std::shared_ptr< Variable > name, const AMP_MPI &comm, const std::vector< Vector::shared_ptr > &vecs) |
| Create a new multivector in parallel. | |
| static std::shared_ptr< MultiVector > | view (Vector::shared_ptr vec, const AMP_MPI &comm=AMP_COMM_NULL) |
| Create a multivector view of a vector. | |
Protected Member Functions | |
| const Vector::shared_ptr & | getVector (const Vector &vec, size_t which) const |
| A convenience method for extracting vectors from a base class. | |
| Vector::shared_ptr & | getVector (Vector &vec, size_t which) const |
| A convenience method for extracting vectors from a base class. | |
| Vector::shared_ptr | selectInto (const VectorSelector &) override |
| Selects a portion of this vector and puts a view into a vector. | |
| Vector::const_shared_ptr | selectInto (const VectorSelector &criterion) const override |
Protected Attributes | |
| std::shared_ptr< AMP::Discretization::DOFManager > | d_DOFManager |
| AMP::Units | d_units |
| std::shared_ptr< Variable > | d_Variable |
| std::shared_ptr< VectorData > | d_VectorData |
| std::shared_ptr< VectorOperations > | d_VectorOps |
| std::shared_ptr< std::vector< std::any > > | d_Views |
| std::vector< Vector::shared_ptr > | d_vVectors |
| The list of AMP Vectors that comprise this Vector. | |
| std::weak_ptr< Vector > | weak_ptr_ |
Private Member Functions | |
| void | addVectorHelper (Vector::shared_ptr vec) |
| void | resetVectorData () |
| void | resetVectorOperations () |
A collection of AMP Vectors that appear as one vector.
Given a set of vectors, they can be collected into a singlevector. This class accomplishes this task.
Definition at line 16 of file MultiVector.h.
|
inherited |
|
inherited |
| AMP::LinearAlgebra::MultiVector::MultiVector | ( | int64_t | fid, |
| AMP::IO::RestartManager * | manager | ||
| ) |
Read restart data to file.
This function will create a variable from the restart file
| fid | File identifier to write |
| manager | Restart manager |
|
explicit |
Constructor: create an empty MultiVector
| [in] | name | The name of the multivector |
| [in] | comm | The communicator over which the vector exists |
|
explicit |
Constructor: create a MultiVector
| [in] | name | The name of the multivector |
| [in] | comm | The communicator over which the vector exists |
| [in] | vecs | The list of vectors in the multvector |
|
explicit |
Constructor: create a multivector containing a single vector only
| [in] | vec | The input vector |
|
default |
|
delete |
|
delete |
|
virtual |
Set this to the component-wise absolute value of a vector. \(\mathit{this}_i = |x_i|\).
| [in] | x | a vector |
Adds two vectors. For Vectors, \(\mathit{this}_i = x_i + y_i\).
| [in] | x | Input vector x |
| [in] | y | Input vector y |
|
inlineinherited |
Definition at line 728 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
set vector to \(x + \alpha \bar{1}\).
| [in] | x | a vector |
| [in] | alpha | a scalar |
for vectors, \(\mathit{this}_i = x_i + \alpha\).
|
inlineinherited |
Definition at line 738 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
inlineinherited |
Definition at line 672 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
virtual |
Add vector(s) to a MultiVector. Note: This is a collective operation, vec may be different sizes on different processors.
| [in] | vec | The Vector to add to the MultiVector |
|
virtual |
Add a vector to a MultiVector. Note: this is a collective operation, vec may be NULL on some processors.
| [in] | vec | The Vector to add to the MultiVector |
|
private |
|
inherited |
Set this vector alpha * x + this. \(\mathit{this}_i = \alpha x_i + \beta \mathit{this}_i \).
| [in] | alpha | a scalar |
| [in] | beta | a scalar |
| [in] | x | a vector |
|
inherited |
Set this vector to alpha * x + y. \(\mathit{this}_i = \alpha x_i + y_i\).
| [in] | alpha | a scalar |
| [in] | x | a vector |
| [in] | y | a vector |
|
inline |
Return the first vector in the MultiVector.
Definition at line 93 of file MultiVector.h.
References d_vVectors.
|
inline |
Return the first vector in the MultiVector.
Definition at line 96 of file MultiVector.h.
References d_vVectors.
|
inherited |
|
inherited |
Allocate space in the same fashion as this
This will allocate new space with identical layout as this. It will have the same number of blocks, each with the same engines and same number of entries.
| [in] | name | The variable to associate with the new vector |
|
inherited |
Allocate space in the same fashion as this
This will allocate new space with identical layout as this. It will have the same number of blocks, each with the same engines and same number of entries. The vector will be associated with a clone of the same Variable with the given name.
| [in] | name | Name to give the variable associated with this vector |
|
inlineinherited |
Definition at line 696 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
static |
Create a new multivector in parallel.
| [in] | name | Name of the new vector |
| [in] | comm | Communicator to build the MultiVector on |
| [in] | vecs | List of vectors in the MultiVector (may be empty on some ranks) |
|
static |
Create a new multivector in parallel.
| [in] | name | Variable describing the new vector |
| [in] | comm | Communicator to build the MultiVector on |
| [in] | vecs | List of vectors in the MultiVector (may be empty on some ranks) |
|
inlineinherited |
Return an iterator to the beginning of the data.
Since the Vector presents an interface to a contiguous block of data, it is natural for it to provide a random access iterator.
Definition at line 586 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
inlineinherited |
Return an iterator to the end of the data.
Since the Vector presents an interface to a contiguous block of data, it is natural for it to provide a random access iterator.
Definition at line 616 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
static |
Create a multivector view of a vector.
| [in] | vec | The vector to view |
| [in] | comm | Communicator to create the MultiVector on |
If vec is a MultiVector, it is returned. Otherwise, a MultiVector is created and vec is added to it. If vec is not a parallel vector(such as a SimpleVector), comm must be specified.
Definition at line 758 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
| bool AMP::LinearAlgebra::MultiVector::containsPointer | ( | const Vector::shared_ptr | p | ) | const |
Determine if a Vector is a constituent.
| [in] | p | The vector to look for |
Set vector equal to x For Vectors, \(\mathit{this}_i = x_i\).
| [in] | x | a vector |
Copy up/down-casting this
The vector will be associated with the same Variable, and will contain a copy of the data in x after up/down-casting it.
| [in] | x | a vector |
|
inlinevirtualinherited |
Definition at line 134 of file Vector.h.
References AMP_ASSERT, AMP::LinearAlgebra::Vector::d_VectorData, and AMP::LinearAlgebra::Vector::d_VectorOps.
|
static |
Create a new (empty) multivector.
| [in] | name | Name of the new vector |
| [in] | comm | Communicator to build the MultiVector on |
|
static |
Create a new multivector in parallel.
| [in] | name | Name of the new vector |
| [in] | comm | Communicator to build the MultiVector on |
| [in] | vecs | List of vectors in the MultiVector (may be empty on some ranks) |
|
static |
Create a new (empty) multivector.
| [in] | name | Variable describing the new vector |
| [in] | comm | Communicator to build the MultiVector on |
|
static |
Create a new multivector in parallel.
| [in] | name | Variable describing the new vector |
| [in] | comm | Communicator to build the MultiVector on |
| [in] | vecs | List of vectors in the MultiVector (may be empty on some ranks) |
|
inlineinherited |
Definition at line 719 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
Component-wise divide one vector by another. For Vectors, \(\mathit{this}_i = x_i / y_i\).
| [in] | x | Input vector x |
| [in] | y | Input vector y |
Return the dot product of this vector with the argument vector.
Returns
\[\sum_i x_i\mathit{this}_i\]
| [in] | x | a vector |
|
inlineinherited |
Definition at line 767 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
inlineinherited |
Definition at line 763 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
inline |
Return one past the last vector in the MultiVector.
Definition at line 99 of file MultiVector.h.
References d_vVectors.
|
inline |
Return one past the last vector in the MultiVector.
Definition at line 102 of file MultiVector.h.
References d_vVectors.
|
inherited |
Check if two vectors are equal.
Returns true if each vaue is within tol of the corresponding vaue in the other vector
| [in] | x | a vector |
| [in] | tol | tolerance to use |
|
virtual |
Remove a vector from a MultiVector.
| [in] | vec | The Vector to remove from the MultiVector |
Definition at line 646 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
inlineinherited |
Get the CommunicationList for this Vector.
Definition at line 711 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
inlineinherited |
Definition at line 676 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
inlineinherited |
Get the DOFManager for this Vector.
|
inlineinherited |
Definition at line 721 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
Return a ghost value from the vector.
| [in] | i | The global index into the vector |
This uses getGhostValuesByGlobalID to get the value
|
inlineinherited |
Definition at line 748 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
Referenced by AMP::Solver::AMG::csr_view< LinearAlgebra::CSRMatrix< Config > >::getGhostValues().
|
inlineinherited |
Definition at line 664 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
inherited |
Get a unique id hash for the vector.
|
inlineinherited |
Definition at line 663 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
inlineinherited |
Definition at line 665 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
Return a local value from the vector.
| [in] | i | The global index into the vector |
This uses getValuesByGlobalID to get the value
|
inlineinherited |
returns the memory location for data
Definition at line 779 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
inherited |
Return the vector name.
|
inherited |
Return integer number of patch data components in vector.
| size_t AMP::LinearAlgebra::MultiVector::getNumberOfSubvectors | ( | ) | const |
Obtain the number of Vector objects in this MultiVector.
Definition at line 659 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
inlineinherited |
Obtain a particular contiguous block of data cast to RETURN_TYPE.
| RETURN_TYPE | The pointer type of the return |
| [in] | i | Which block |
Definition at line 627 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
inlineinherited |
Obtain a particular contiguous block of data cast to RETURN_TYPE.
| RETURN_TYPE | The pointer type of the return |
| [in] | i | Which block |
Definition at line 638 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
Definition at line 677 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
Definition at line 681 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
inlineinherited |
Get the units for this Vector.
Definition at line 403 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_units.
|
inlineinherited |
Definition at line 697 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
Return a value from the vector.
| [in] | i | The global index into the vector |
This uses getValuesByGlobalID to get the value
Return a local value from the vector.
| [in] | i | The global index into the vector |
This uses getValuesByGlobalID to get the value
|
inlineinherited |
Definition at line 743 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
inlineinherited |
Definition at line 753 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
inherited |
|
inline |
Return one past the last vector in the MultiVector.
Definition at line 105 of file MultiVector.h.
References d_vVectors.
Return one past the last vector in the MultiVector.
|
protected |
A convenience method for extracting vectors from a base class.
| [in] | vec | The vector to extract a vector from |
| [in] | which | Which vector to get |
|
virtual |
Return the i-th Vector in this MultiVector.
| [in] | i | Which vector to return |
|
virtual |
Return the i-th Vector in this MultiVector.
| [in] | i | Which vector to return |
|
protected |
A convenience method for extracting vectors from a base class.
| [in] | vec | The vector to extract a vector from |
| [in] | which | Which vector to get |
|
inlineinherited |
Return the pointer to the VectorData.
Definition at line 412 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
inlineinherited |
Return the pointer to the VectorData.
Definition at line 415 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
inlineinherited |
Return the pointer to the VectorOperation.
Definition at line 418 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorOps.
|
inlineinherited |
Return the pointer to the VectorOperation.
Definition at line 421 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorOps.
|
inherited |
If a particular type of view of this Vector has been created, return it.
| VIEW_TYPE | The type of view to look for |
|
inlineinherited |
Definition at line 645 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
If a particular type of view of this Vector has been created, return true.
| VIEW_TYPE | The type of view to look for |
Definition at line 690 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData, and AMP::LinearAlgebra::Vector::type().
|
inherited |
Return discrete \( L_1 \) -norm of this vector.
Returns
\[\sum_i |\mathit{this}_i|\]
|
inherited |
Return discrete \( L_2 \) -norm of this vector.
Returns
\[\sqrt{\sum_i \mathit{this}_i^2}\]
|
inherited |
Return the L2 norm of this vector and the dot product with the argument vector.
Returns
\[\sum_i this_i^2 \]
and
\[\sum_i x_i\mathit{this}_i\]
. Note that this is an unoptimized version purely meant to provide functionality
| [in] | x | a vector |
|
inherited |
Set a vector to be a linear combination of two vectors. \(\mathit{this}_i = \alpha x_i + \beta y_i\).
| [in] | alpha | a scalar |
| [in] | x | a vector |
| [in] | beta | a scalar |
| [in] | y | a vector |
|
inlineinherited |
Definition at line 705 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
inlineinherited |
Definition at line 706 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
inherited |
Return the maximum value of the vector. \(\max_i \mathit{this}_i\).
|
inherited |
Return the \( L_\infty \) -norm of this vector.
Returns
\[\max_i |\mathit{this}_i|\]
|
inherited |
Return the maximum value of the vector. \(\max_i \mathit{this}_i\).
|
inherited |
Return the minimum value of the vector. \(\min_i \mathit{this}_i\).
Returns the minimum of the quotient of two vectors:
\[\min_{i,y_i\neq0} x_i/\mathit{this}_i\]
| [in] | x | a vector |
\[\min_{i,y_i\neq0} x_i/\mathit{this}_i\]
Component-wise multiply one vector with another. For Vectors, \(\mathit{this}_i = x_i y_i\).
| [in] | x | Input vector x |
| [in] | y | Input vector y |
|
inlineinherited |
Definition at line 648 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
delete |
|
delete |
Definition at line 654 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
overridevirtual |
Allocate space in the same fashion as this
This will allocate new space with identical layout as this.
Reimplemented from AMP::LinearAlgebra::Vector.
Set this to the component-wise reciprocal of a vector. \(\mathit{this}_i = 1/x_i\).
| x | a vector |
|
overridevirtual |
Register any child objects.
This function will register child objects with the manager
| manager | Restart manager |
Reimplemented from AMP::LinearAlgebra::Vector.
Add a view of this vector to an internal queue.
| [in] | v | The view to add |
|
virtualinherited |
Renames.
Renames the vector and any components matching src to dst.
| [in] | src | The original variable name |
| [in] | dst | The new variable name |
|
virtual |
Replace a vector in a MultiVector.
This function will replace a given vector in the multivector with a different vector. The original and new vectors must share the same DOFManager. This is a purly local operation and does not require communication, but should be called by all processors that own the vectors.
| [in] | oldVec | The original vector to replace |
| [in] | newVec | The new vector to use |
|
overridevirtual |
Reset.
Reimplemented from AMP::LinearAlgebra::Vector.
|
inlineprivate |
|
inlineprivate |
Scale a vector. For Vectors, \(\mathit{this}_i = \alpha\mathit{this}_i\).
| [in] | alpha | a scalar |
Set vector equal to scaled input. For Vectors, \(\mathit{this}_i = \alpha x_i\).
| [in] | alpha | a scalar |
| [in] | x | a vector |
|
inherited |
Selects a portion of this vector and creates a view.
Selects a portion of this vector and creates a view. This function does NOT always return a multivector. To use: auto disp = data->select( VS_ByVariableName( "displacement" ), "displacement view" );
| [in] | criterion | The method for deciding inclusion in the view |
|
inherited |
Selects a portion of this vector and creates a view.
Selects a portion of this vector and creates a view. This function does NOT always return a multivector. To use: auto disp = data->select( VS_ByVariableName( "displacement" ), "displacement view" );
| [in] | criterion | The method for deciding inclusion in the view |
|
overrideprotectedvirtual |
Selects a portion of this vector and puts a view into a vector.
| [in] | criterion | The method for deciding inclusion in the view |
Reimplemented from AMP::LinearAlgebra::Vector.
|
overrideprotectedvirtual |
Reimplemented from AMP::LinearAlgebra::Vector.
|
inlineinherited |
Definition at line 715 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
inlineinherited |
Definition at line 723 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
modify vector to have max value 'val' specified
modify vector to have min value 'val' specified
|
inlineinherited |
Ensure this vector has no ghosts.
Calls clearBuffer for the communication list and removes any storage for ghosts
Definition at line 775 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
inherited |
Set data in this vector to random values on [0,1).
Set all compenents of a vector to a scalar. For Vectors, the components of this are set to \(\alpha\).
| [in] | alpha | scalar value |
|
virtualinherited |
Get the units for this Vector.
|
inlineinherited |
Definition at line 701 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
Set a value in the vector.
| [in] | i | The global index into the vector |
| [in] | v | The value to set |
This uses setValuesByGlobalID to set the value
|
inlineinherited |
Definition at line 733 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
inlineinherited |
Definition at line 667 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
Change the variable associated with this vector.
| [in] | name | The new variable |
|
inlineinherited |
Definition at line 28 of file enable_shared_from_this.h.
|
inlineinherited |
Definition at line 46 of file enable_shared_from_this.h.
Definition at line 649 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
Definition at line 685 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
inherited |
Retrieve ith subvector.
Returns the ith subvector based on teh number of components.
| [in] | index | Index to retrieve |
|
inherited |
Retrieve ith subvector.
Returns the ith subvector based on teh number of components.
| [in] | index | Index to retrieve |
|
inherited |
Retrieve a sub-vector associated with a particular Variable.
| [in] | name | Variable by which to retrieve a subvector |
|
inherited |
Retrieve a sub-vector associated with a particular Variable.
| [in] | name | Variable by which to retrieve a subvector |
A null pointer will be returned if the vector does not contain a sub-vector associated with the Variable
|
inherited |
Retrieve a sub-vector associated with a particular Variable.
| [in] | var | Variable by which to retrieve a subvector |
A null pointer will be returned if the vector does not contain a sub-vector associated with the Variable
|
inherited |
Retrieve a sub-vector associated with a particular Variable.
| [in] | var | Variable by which to retrieve a subvector |
A null pointer will be returned if the vector does not contain a sub-vector associated with the Variable
Subtracts one vector from another. For Vectors, \(\mathit{this}_i = x_i - y_i\).
| [in] | x | Input vector x |
| [in] | y | Input vector y |
|
inherited |
Return the maximum value of the vector. \(\max_i \mathit{this}_i\).
|
inlineinherited |
Definition at line 695 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
Swap the data in this Vector for another.
| [in] | other | Vector to swap data with |
Effectively, this is
without a and b exchanging pointers.
Reimplemented from AMP::LinearAlgebra::Vector.
|
inherited |
|
overridevirtual |
Return the name of the vector.
Reimplemented from AMP::LinearAlgebra::Vector.
|
inlineinherited |
Definition at line 647 of file Vector.h.
References AMP::LinearAlgebra::Vector::d_VectorData.
|
static |
Create a multivector view of a vector.
| [in] | vec | The vector to view |
| [in] | comm | Communicator to create the MultiVector on |
If vec is a MultiVector, it is returned. Otherwise, a MultiVector is created and vec is added to it. If vec is not a parallel vector(such as a SimpleVector), comm must be specified.
Write restart data to file.
This function will write the mesh to an HDF5 file
| fid | File identifier to write |
Reimplemented from AMP::LinearAlgebra::Vector.
Return a weighted norm of a vector.
| [in] | x | a vector |
| [in] | y | a vector |
\[\sqrt{\frac{\displaystyle \sum_i x^2_iy^2_i}{n}}\]
|
inherited |
Return a weighted norm of a subset of a vector.
| [in] | x | a vector |
| [in] | y | a vector |
| [in] | mask | a vector |
\[\sqrt{\frac{\displaystyle \sum_{i,\mathit{mask}_i>0} x^2_iy^2_i}{n}}\]
|
inherited |
Set vector entries (including ghosts) to zero.
This is equivalent (but more efficient) to calling setToScalar ( 0.0 ) followed by a makeConsistent(SET)
|
protectedinherited |
|
protectedinherited |
Definition at line 863 of file Vector.h.
Referenced by AMP::LinearAlgebra::Vector::getUnits().
|
protectedinherited |
|
protectedinherited |
Definition at line 866 of file Vector.h.
Referenced by AMP::LinearAlgebra::Vector::addGhostValuesByGlobalID(), AMP::LinearAlgebra::Vector::addValuesByGlobalID(), AMP::LinearAlgebra::Vector::addValuesByLocalID(), AMP::LinearAlgebra::Vector::begin(), AMP::LinearAlgebra::Vector::begin(), AMP::LinearAlgebra::Vector::cloneData(), AMP::LinearAlgebra::Vector::constBegin(), AMP::LinearAlgebra::Vector::constEnd(), AMP::LinearAlgebra::Vector::containsGlobalElement(), AMP::LinearAlgebra::Vector::copyVector(), AMP::LinearAlgebra::Vector::dataChanged(), AMP::LinearAlgebra::Vector::dumpGhostedData(), AMP::LinearAlgebra::Vector::dumpOwnedData(), AMP::LinearAlgebra::Vector::end(), AMP::LinearAlgebra::Vector::end(), AMP::LinearAlgebra::Vector::getComm(), AMP::LinearAlgebra::Vector::getCommunicationList(), AMP::LinearAlgebra::Vector::getDataID(), AMP::LinearAlgebra::Vector::getGhostSize(), AMP::LinearAlgebra::Vector::getGhostValuesByGlobalID(), AMP::LinearAlgebra::Vector::getGlobalSize(), AMP::LinearAlgebra::Vector::getLocalSize(), AMP::LinearAlgebra::Vector::getLocalStartID(), AMP::LinearAlgebra::Vector::getMemoryLocation(), AMP::LinearAlgebra::Vector::getRawData(), AMP::LinearAlgebra::Vector::getRawDataBlock(), AMP::LinearAlgebra::Vector::getRawDataBlock(), AMP::LinearAlgebra::Vector::getRawDataBlockAsVoid(), AMP::LinearAlgebra::Vector::getRawDataBlockAsVoid(), AMP::LinearAlgebra::Vector::getUpdateStatus(), AMP::LinearAlgebra::Vector::getValuesByGlobalID(), AMP::LinearAlgebra::Vector::getValuesByLocalID(), AMP::LinearAlgebra::Vector::getVectorData(), AMP::LinearAlgebra::Vector::getVectorData(), AMP::LinearAlgebra::Vector::hasComm(), AMP::LinearAlgebra::Vector::isType(), AMP::LinearAlgebra::Vector::makeConsistent(), AMP::LinearAlgebra::Vector::makeConsistent(), AMP::LinearAlgebra::Vector::numberOfDataBlocks(), AMP::LinearAlgebra::Vector::putRawData(), AMP::LinearAlgebra::Vector::setCommunicationList(), AMP::LinearAlgebra::Vector::setGhostValuesByGlobalID(), AMP::LinearAlgebra::Vector::setNoGhosts(), AMP::LinearAlgebra::Vector::setUpdateStatus(), AMP::LinearAlgebra::Vector::setValuesByGlobalID(), AMP::LinearAlgebra::Vector::setValuesByLocalID(), AMP::LinearAlgebra::Vector::sizeOfDataBlock(), AMP::LinearAlgebra::Vector::sizeofDataBlockType(), AMP::LinearAlgebra::Vector::swapData(), and AMP::LinearAlgebra::Vector::VectorDataName().
|
protectedinherited |
Definition at line 867 of file Vector.h.
Referenced by AMP::LinearAlgebra::Vector::copyVector(), AMP::LinearAlgebra::Vector::getVectorOperations(), and AMP::LinearAlgebra::Vector::getVectorOperations().
|
protectedinherited |
|
protected |
|
mutableprotectedinherited |
Definition at line 69 of file enable_shared_from_this.h.
|
Advanced Multi-Physics (AMP) Oak Ridge National Laboratory Idaho National Laboratory Los Alamos National Laboratory |
This page automatically produced from the source code by Last updated: Tue Mar 10 2026 13:06:42. Comments on this page |