DFT-EFE
 
Loading...
Searching...
No Matches
dftefe::linearAlgebra::MultiVectorProductSpaceBlocked< ValueType, memorySpace > Class Template Reference

Type-tag subclass of MultiVectorProductSpace for collinear spin (S=2). More...

#include <MultiVectorProductSpaceBlocked.h>

Inheritance diagram for dftefe::linearAlgebra::MultiVectorProductSpaceBlocked< ValueType, memorySpace >:
Collaboration diagram for dftefe::linearAlgebra::MultiVectorProductSpaceBlocked< ValueType, memorySpace >:

Public Member Functions

 ~MultiVectorProductSpaceBlocked ()=default
 
- Public Member Functions inherited from dftefe::linearAlgebra::MultiVectorProductSpace< ValueType, memorySpace >
 MultiVectorProductSpace (std::shared_ptr< const utils::mpi::MPIPatternP2P< memorySpace > > mpiPatternP2P, std::shared_ptr< LinAlgOpContext< memorySpace > > linAlgOpContext, size_type numSpaces, size_type numVectorsPerSpace, ValueType initVal=utils::Types< ValueType >::zero)
 
 ~MultiVectorProductSpace ()=default
 
size_type numSpaces () const
 
size_type numVectorsPerSpace () const
 
- Public Member Functions inherited from dftefe::linearAlgebra::MultiVector< ValueType, memorySpace >
 MultiVector ()=default
 Default Constructor. More...
 
virtual ~MultiVector ()=default
 Default Destructor. More...
 
 MultiVector (const size_type size, const size_type numVectors, std::shared_ptr< LinAlgOpContext< memorySpace > > linAlgOpContext, const ValueType initVal=utils::Types< ValueType >::zero)
 Constructor for serial MultiVector with vector size, number of vectors and initial value arguments. More...
 
 MultiVector (std::unique_ptr< typename MultiVector< ValueType, memorySpace >::Storage > storage, size_type numVectors, std::shared_ptr< LinAlgOpContext< memorySpace > > linAlgOpContext)
 Constructor for a \serial MultiVector with a predefined MultiVector::Storage (i.e., utils::MemoryStorage). This constructor transfers the ownership of the input Storage to the MultiVector. This is useful when one does not want to allocate new memory and instead use memory allocated in the MultiVector::Storage (i.e., utils::MemoryStorage). The locallyOwnedSize, ghostSize, etc., are automatically set using the size of the input Storage object. More...
 
 MultiVector (std::shared_ptr< const utils::mpi::MPIPatternP2P< memorySpace > > mpiPatternP2P, std::shared_ptr< LinAlgOpContext< memorySpace > > linAlgOpContext, const size_type numVectors, const ValueType initVal=utils::Types< ValueType >::zero)
 Constructor for a distributed MultiVector based on an input MPIPatternP2P. More...
 
 MultiVector (std::shared_ptr< const utils::mpi::MPIPatternP2P< memorySpace > > mpiPatternP2P, std::shared_ptr< LinAlgOpContext< memorySpace > > linAlgOpContext, const size_type numVectors, const ValueType min, const ValueType max)
 Constructor for a distributed random MultiVector based on an input MPIPatternP2P. More...
 
 MultiVector (std::unique_ptr< typename MultiVector< ValueType, memorySpace >::Storage > &storage, std::shared_ptr< const utils::mpi::MPIPatternP2P< memorySpace > > mpiPatternP2P, std::shared_ptr< LinAlgOpContext< memorySpace > > linAlgOpContext, const size_type numVectors)
 Constructor for a distributed MultiVector with a predefined MultiVector::Storage (i.e., utils::MemoryStorage) and MPIPatternP2P. This constructor transfers the ownership of the input Storage to the MultiVector. This is useful when one does not want to allocate new memory and instead use memory allocated in the input MultiVector::Storage (i.e., utils::MemoryStorage). More...
 
 MultiVector (const std::pair< global_size_type, global_size_type > locallyOwnedRange, const std::vector< global_size_type > &ghostIndices, const utils::mpi::MPIComm &mpiComm, std::shared_ptr< LinAlgOpContext< memorySpace > > linAlgOpContext, const size_type numVectors, ValueType initVal=utils::Types< ValueType >::zero)
 Constructor for a \distributed MultiVector based on locally owned and ghost indices. More...
 
 MultiVector (const std::pair< global_size_type, global_size_type > locallyOwnedRange, const utils::mpi::MPIComm &mpiComm, std::shared_ptr< LinAlgOpContext< memorySpace > > linAlgOpContext, const size_type numVectors, const ValueType initVal=utils::Types< ValueType >::zero)
 Constructor for a special case of distributed MultiVector where none none of the processors have any ghost indices. More...
 
 MultiVector (const global_size_type globalSize, const utils::mpi::MPIComm &mpiComm, std::shared_ptr< LinAlgOpContext< memorySpace > > linAlgOpContext, const size_type numVectors, const ValueType initVal=utils::Types< ValueType >::zero)
 Constructor for a distributed MultiVector based on total number of global indices. The resulting MultiVector will not contain any ghost indices on any of the processors. Internally, the vector is divided to ensure as much equitable distribution across all the processors much as possible. More...
 
 MultiVector (const MultiVector &u)
 Copy constructor. More...
 
 MultiVector (const MultiVector &u, const ValueType initVal)
 Copy constructor with reinitialisation. More...
 
 MultiVector (MultiVector &&u) noexcept
 Move constructor. More...
 
MultiVectoroperator= (const MultiVector &u)
 Copy assignment operator. More...
 
MultiVectoroperator= (MultiVector &&u)
 Move assignment operator. More...
 
iterator begin ()
 Return iterator pointing to the beginning of MultiVector data. More...
 
const_iterator begin () const
 Return iterator pointing to the beginning of MultiVector data. More...
 
iterator end ()
 Return iterator pointing to the end of MultiVector data. More...
 
const_iterator end () const
 Return iterator pointing to the end of MultiVector data. More...
 
ValueType * data ()
 Return the raw pointer to the MultiVector data. More...
 
const ValueType * data () const
 Return the constant raw pointer to the MultiVector data. More...
 
void setValue (const ValueType val)
 Set all entries of the MultiVector to a given value. More...
 
std::vector< double > l2Norms () const
 Returns \( l_2 \) norms of all the \(N\) vectors in the MultiVector. More...
 
std::vector< double > lInfNorms () const
 Returns \( l_{\inf} \) norms of all the \(N\) vectors in the MultiVector. More...
 
size_type getNumberComponents () const
 Returns the nunber of vectors in this multi-vector. More...
 
void updateGhostValues (const size_type communicationChannel=0)
 
void accumulateAddLocallyOwned (const size_type communicationChannel=0)
 
void updateGhostValuesBegin (const size_type communicationChannel=0)
 
void updateGhostValuesEnd ()
 
void accumulateAddLocallyOwnedBegin (const size_type communicationChannel=0)
 
void accumulateAddLocallyOwnedEnd ()
 
bool isCompatible (const MultiVector< ValueType, memorySpace > &rhs) const
 
std::shared_ptr< const utils::mpi::MPIPatternP2P< memorySpace > > getMPIPatternP2P () const
 
std::shared_ptr< LinAlgOpContext< memorySpace > > getLinAlgOpContext () const
 
global_size_type globalSize () const
 
size_type localSize () const
 
size_type locallyOwnedSize () const
 
size_type ghostSize () const
 
size_type numVectors () const
 

Additional Inherited Members

- Public Types inherited from dftefe::linearAlgebra::MultiVector< ValueType, memorySpace >
using Storage = dftefe::utils::MemoryStorage< ValueType, memorySpace >
 
using value_type = typename Storage::value_type
 
using pointer = typename Storage::pointer
 
using reference = typename Storage::reference
 
using const_reference = typename Storage::const_reference
 
using iterator = typename Storage::iterator
 
using const_iterator = typename Storage::const_iterator
 
- Protected Attributes inherited from dftefe::linearAlgebra::MultiVector< ValueType, memorySpace >
std::unique_ptr< Storaged_storage
 
std::shared_ptr< LinAlgOpContext< memorySpace > > d_linAlgOpContext
 
VectorAttributes d_vectorAttributes
 
size_type d_localSize
 
global_size_type d_globalSize
 
size_type d_locallyOwnedSize
 
size_type d_ghostSize
 
size_type d_numVectors
 
std::unique_ptr< utils::mpi::MPICommunicatorP2P< ValueType, memorySpace > > d_mpiCommunicatorP2P
 
std::shared_ptr< const utils::mpi::MPIPatternP2P< memorySpace > > d_mpiPatternP2P
 

Detailed Description

template<typename ValueType, utils::MemorySpace memorySpace>
class dftefe::linearAlgebra::MultiVectorProductSpaceBlocked< ValueType, memorySpace >

Type-tag subclass of MultiVectorProductSpace for collinear spin (S=2).

Identical memory layout and interface to MultiVectorProductSpace. The distinct type causes dynamic_cast dispatch in RayleighRitzEigenSolver and OrthonormalizationFunctions to select per-spin-space (blocked) paths instead of the coupled single-ELPA path.

Constructor & Destructor Documentation

◆ ~MultiVectorProductSpaceBlocked()

template<typename ValueType , utils::MemorySpace memorySpace>
dftefe::linearAlgebra::MultiVectorProductSpaceBlocked< ValueType, memorySpace >::~MultiVectorProductSpaceBlocked ( )
default

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