FEI Package Browser (Single Doxygen Collection)
Version of the Day
|
#include <fei_Vector.hpp>
Classes | |
class | Factory |
Public Member Functions | |
virtual | ~Vector () |
virtual const char * | typeName () const =0 |
virtual int | putScalar (double scalar)=0 |
virtual int | sumIn (int numValues, const int *indices, const double *values, int vectorIndex=0)=0 |
virtual int | copyIn (int numValues, const int *indices, const double *values, int vectorIndex=0)=0 |
virtual int | copyOut (int numValues, const int *indices, double *values, int vectorIndex=0) const =0 |
virtual int | update (double a, const fei::Vector *x, double b)=0 |
virtual int | scatterToOverlap ()=0 |
virtual void | setCommSizes ()=0 |
virtual int | gatherFromOverlap (bool accumulate=true)=0 |
virtual fei::SharedPtr < fei::VectorSpace > | getVectorSpace () const =0 |
virtual void | setVectorSpace (fei::SharedPtr< fei::VectorSpace > vecSpace)=0 |
virtual int | sumInFieldData (int fieldID, int idType, int numIDs, const int *IDs, const double *data, int vectorIndex=0)=0 |
virtual int | copyInFieldData (int fieldID, int idType, int numIDs, const int *IDs, const double *data, int vectorIndex=0)=0 |
virtual int | copyInFieldDataLocalIDs (int fieldID, int idType, int numIDs, const int *localIDs, const double *data, int vectorIndex=0)=0 |
virtual int | copyOutFieldData (int fieldID, int idType, int numIDs, const int *IDs, double *data, int vectorIndex=0)=0 |
virtual int | writeToFile (const char *filename, bool matrixMarketFormat=true)=0 |
virtual int | writeToStream (FEI_OSTREAM &ostrm, bool matrixMarketFormat=true)=0 |
Abstract representation of an algebraic multi-vector. This representation may be used with an overlapping data decomposition. The data distribution is defined by the fei::VectorSpace object returned by the method getVectorSpace(). This representation does not require that data be accessed only on the 'owning' processor. Data for any indices that are either shared or owned by the local processor may be passed to, or accessed from, the vector on the local processor. In most cases the underlying library-specific vector will have a non-overlapping data decomposition (each equation uniquely owned by a single processor). Overlapping data (shared by local processor but the equation is owned by another processor) may be assembled into this abstract vector locally, and will be moved into the underlying non-overlapping vector on the correct processor when the gatherFromOverlap() method is called. Conversely, if the user wants to retrieve overlapping data from the vector locally for an equation that resides on another processor, that data is not guaranteed to be available until the scatterToOverlap() method is called. The scatterToOverlap() method does communication necessary to populate shared-but-not-owned data in the fei::Vector from data in the underlying algebraic vector.
From the point of view of fei::Vector, there are two types of data: owned and shared-but-not-owned.
Data Input (passing user data into the vector):
When locally-owned data is input, fei::Vector relays it immediately to the underlying algebraic vector. When shared-but-not-owned data is input, fei::Vector holds it in temporary storage. When gatherToOverlap() is called, fei::Vector moves it to the owning processor and then relays it to the underlying algebraic vector. At that point the temporary storage is deleted.
Data Access (retrieving data from the vector):
When locally-owned data is accessed, fei::Vector retrieves it from the underlying algebraic vector directly. In order to access shared-but-not-owned data (overlapped data), it is necessary first to call the method scatterToOverlap(). This method does the communication necessary to re-create and populate temporary storage with the shared data by retrieving that data from the underlying algebraic vector on the owning processor and sending it to the sharing processors.
Definition at line 57 of file fei_Vector.hpp.
|
inlinevirtual |
Virtual destructor.
Definition at line 89 of file fei_Vector.hpp.
|
pure virtual |
Return an implementation-dependent name describing the run-time type
of this object.
Implemented in fei::Vector_Impl< T >, fei::VectorReducer, and fei::Vector_Local.
Referenced by fei::VectorReducer::typeName(), and test_Vector::vector_test1().
|
pure virtual |
Set a specified scalar throughout the vector.
Implemented in fei::Vector_Impl< T >, fei::VectorReducer, and fei::Vector_Local.
Referenced by fei::VectorReducer::putScalar(), snl_fei_tester::testLoading(), and test_Vector::vector_test1().
|
pure virtual |
Accumulate values into the vector, adding them to any values that
already exist for the specified indices.
Implemented in fei::Vector_Impl< T >, fei::VectorReducer, and fei::Vector_Local.
Referenced by fei::Reducer::addVectorValues(), fei::Reducer::assembleReducedVector(), load_elem_data(), HexBeam_Functions::load_elem_data(), and snl_fei_tester::loadElemBlocks().
|
pure virtual |
Copy values into the vector overwriting any values that already exist
for the specified indices.
Implemented in fei::Vector_Impl< T >, fei::VectorReducer, and fei::Vector_Local.
Referenced by fei::Reducer::addVectorValues(), snl_fei::LinearSystem_General::setBCValuesOnVector(), and test_Vector::vector_test1().
|
pure virtual |
Retrieve a copy of values from the vector for the specified indices.
Note that if the specified indices are not local in the underlying non-overlapping data decomposition, these values are not guaranteed to be correct until after the scatterToOverlap() method has been called.
Implemented in fei::Vector_Impl< T >, fei::VectorReducer, and fei::Vector_Local.
Referenced by fei::Reducer::copyOutVectorValues(), fei::FEI_Impl::residualNorm(), snl_fei_tester::save_multiplier_soln(), and test_Vector::vector_test1().
|
pure virtual |
Update 'this' = b*'this' + a*x
Implemented in fei::Vector_Impl< T >, fei::VectorReducer, and fei::Vector_Local.
Referenced by fei::FEI_Impl::residualNorm(), and fei::VectorReducer::update().
|
pure virtual |
Scatter data from the underlying non-overlapping data decomposition to
the overlapping data decomposition. In other words, update values for shared indices from underlying uniquely owned data.
Implemented in fei::Vector_Impl< T >, fei::VectorReducer, and fei::Vector_Local.
Referenced by beam_main(), main(), poisson3_main(), fei::VectorReducer::scatterToOverlap(), and snl_fei_tester::testSolve().
|
pure virtual |
perform initial communication to establish message sizes that will be needed for exchanging shared-node data. Called from within gatherFromOverlap usually, doesn't usually need to be explicitly called by client code. (Power users only...)
Implemented in fei::Vector_Impl< T >, fei::VectorReducer, and fei::Vector_Local.
Referenced by fei::VectorReducer::gatherFromOverlap(), and fei::VectorReducer::setCommSizes().
|
pure virtual |
Gather data from the overlapping data decomposition into the underlying
non-overlapping data decomposition.
Implemented in fei::Vector_Impl< T >, fei::VectorReducer, and fei::Vector_Local.
Referenced by fei::VectorReducer::gatherFromOverlap().
|
pure virtual |
Query for the VectorSpace object associated with this vector.
Implemented in fei::Vector_Impl< T >, fei::VectorReducer, and fei::Vector_Local.
Referenced by fei::VectorReducer::copyInFieldData(), fei::VectorReducer::copyInFieldDataLocalIDs(), fei::VectorReducer::copyOutFieldData(), fei::VectorReducer::getVectorSpace(), fei::VectorReducer::sumInFieldData(), test_Vector::vector_test1(), and fei::VectorReducer::VectorReducer().
|
pure virtual |
Set the VectorSpace object associated with this vector.
Implemented in fei::Vector_Impl< T >, fei::VectorReducer, and fei::Vector_Local.
Referenced by fei::VectorReducer::setVectorSpace().
|
pure virtual |
Sum field data into the vector, adding it to any data that may already be present at the specified locations. If the specified fieldID doesn't exist at one or more of the specified IDs, then the corresponding positions in the data array will simply not be used.
Implemented in fei::Vector_Impl< T >, fei::VectorReducer, and fei::Vector_Local.
|
pure virtual |
Copy field data into the vector, overwriting any data that may already be present at the specified locations. If the specified fieldID doesn't exist at one or more of the specified IDs, then the corresponding positions in the data array will simply not be used.
Implemented in fei::Vector_Impl< T >, fei::VectorReducer, and fei::Vector_Local.
Referenced by fei::FEI_Impl::putNodalFieldData().
|
pure virtual |
Implemented in fei::Vector_Impl< T >, fei::VectorReducer, and fei::Vector_Local.
|
pure virtual |
Copy field data out of the vector into the user-allocated data array. If the specified fieldID doesn't exist at one or more of the specified IDs, then the corresponding positions in the data array will simply not be referenced.
Implemented in fei::Vector_Impl< T >, fei::VectorReducer, and fei::Vector_Local.
Referenced by main(), poisson3_main(), snl_fei_tester::save_block_elem_soln(), and snl_fei_tester::save_block_node_soln().
|
pure virtual |
Write the vector's contents into the specified file.
filename | Text name of the file to be created or overwritten. If in a parallel environment, each processor will take turns writing into the file. |
matrixMarketFormat | Optional argument, defaults to true. If true the contents of the file will be MatrixMarket real array format. If not true, the contents of the file will contain the vector's global dimension on the first line, and all following lines will contain a space-separated pair with global index first and coefficient value second. |
Implemented in fei::Vector_Impl< T >, fei::VectorReducer, and fei::Vector_Local.
Referenced by fei::VectorReducer::writeToFile().
|
pure virtual |
Write the vector's contents to the specified ostream.
ostrm | ostream to be written to. |
matrixMarketFormat | Optional argument, defaults to true. If true the contents of the vector will be written in MatrixMarket real array format. If not true, the stream will be given the vector's global dimension on the first line, and all following lines will contain a space-separated pair with global index first and coefficient value second. |
Implemented in fei::Vector_Impl< T >, fei::VectorReducer, and fei::Vector_Local.
Referenced by operator<<(), and fei::VectorReducer::writeToStream().