DFT-FE 1.1.0-pre
Density Functional Theory With Finite-Elements
|
#include <AtomicCenteredNonLocalOperator.h>
Public Member Functions | |
AtomicCenteredNonLocalOperator (std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< memorySpace > > BLASWrapperPtr, std::shared_ptr< dftfe::basis::FEBasisOperations< dataTypes::number, double, memorySpace > > basisOperatorPtr, std::shared_ptr< AtomCenteredSphericalFunctionContainer > atomCenteredSphericalFunctionContainer, const MPI_Comm &mpi_comm_parent, const bool memOptMode=false, const bool computeSphericalFnTimesX=true, const bool useGlobalCMatrix=false) | |
void | initialiseOperatorActionOnX (unsigned int kPointIndex) |
Resizes various internal data members and selects the kpoint of interest. | |
void | initialiseFlattenedDataStructure (unsigned int waveFunctionBlockSize, dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > &sphericalFunctionKetTimesVectorParFlattened) |
initialises the multivector object, waveFunctionBlockSize and resizes various internal data members. | |
void | intitialisePartitionerKPointsAndComputeCMatrixEntries (const bool updateSparsity, const std::vector< double > &kPointWeights, const std::vector< double > &kPointCoordinates, std::shared_ptr< dftfe::basis::FEBasisOperations< dataTypes::number, double, dftfe::utils::MemorySpace::HOST > > basisOperationsPtr, std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > > BLASWrapperHostPtr, const unsigned int quadratureIndex) |
calls internal function: initialisePartitioner, initialiseKpoint and computeCMatrixEntries | |
template<typename ValueTypeSrc> | |
void | copyPartitionerKPointsAndComputeCMatrixEntries (const bool updateSparsity, const std::vector< double > &kPointWeights, const std::vector< double > &kPointCoordinates, std::shared_ptr< dftfe::basis::FEBasisOperations< dataTypes::number, double, dftfe::utils::MemorySpace::HOST > > basisOperationsPtr, std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > > BLASWrapperHostPtr, const unsigned int quadratureIndex, const std::shared_ptr< AtomicCenteredNonLocalOperator< ValueTypeSrc, memorySpace > > nonLocalOperatorSrc) |
calls internal function: initialisePartitioner, initialiseKpoint and computeCMatrixEntries | |
const std::vector< unsigned int > & | getNonlocalElementToCellIdVector () const |
unsigned int | getTotalAtomInCurrentProcessor () const |
const dftfe::utils::MemoryStorage< dftfe::global_size_type, memorySpace > & | getFlattenedNonLocalCellDofIndexToProcessDofIndexMap () const |
unsigned int | getTotalNonLocalElementsInCurrentProcessor () const |
unsigned int | getTotalNonLocalEntriesCurrentProcessor () const |
unsigned int | getMaxSingleAtomEntries () const |
bool | atomSupportInElement (unsigned int iElem) const |
unsigned int | getGlobalDofAtomIdSphericalFnPair (const unsigned int atomId, const unsigned int alpha) const |
unsigned int | getLocalIdOfDistributedVec (const unsigned int globalId) const |
std::vector< unsigned int > & | getNonLocalElemIdToLocalElemIdMap () const |
std::vector< unsigned int > & | getAtomWiseNumberCellsInCompactSupport () const |
std::vector< unsigned int > & | getAtomWiseNumberCellsAccumulated () const |
const std::vector< ValueType > & | getAtomCenteredKpointIndexedSphericalFnQuadValues () const |
const std::vector< ValueType > & | getAtomCenteredKpointTimesSphericalFnTimesDistFromAtomQuadValues () const |
const std::map< unsigned int, std::vector< unsigned int > > & | getCellIdToAtomIdsLocalCompactSupportMap () const |
const std::vector< unsigned int > & | getNonTrivialSphericalFnsPerCell () const |
const std::vector< unsigned int > & | getNonTrivialSphericalFnsCellStartIndex () const |
const unsigned int | getTotalNonTrivialSphericalFnsOverAllCells () const |
const std::vector< unsigned int > & | getNonTrivialAllCellsSphericalFnAlphaToElemIdMap () const |
const std::map< unsigned int, std::vector< unsigned int > > & | getAtomIdToNonTrivialSphericalFnCellStartIndex () const |
Required in configurational forces. Cummulative sphercial Fn Id. The size is numCells in processor. | |
const std::vector< unsigned int > & | getSphericalFnTimesVectorFlattenedVectorLocalIds () const |
Returns the Flattened vector of sphericalFunctionIDs in order of atomIDs of atoms in processor. | |
const std::vector< unsigned int > & | getOwnedAtomIdsInCurrentProcessor () const |
void | computeCconjtransCMatrix (const unsigned int atomId, std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > > BLASWrapperPtr, const dftfe::utils::MemoryStorage< double, dftfe::utils::MemorySpace::HOST > &Dinverse, dftfe::utils::MemoryStorage< ValueType, dftfe::utils::MemorySpace::HOST > PconjtransposePmatrix) |
Computes C^{T}D^{-1}C at the global level for atomId. This is required in PAW. | |
void | applyVOnCconjtransX (const CouplingStructure couplingtype, const dftfe::utils::MemoryStorage< ValueType, memorySpace > &couplingMatrix, dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > &sphericalFunctionKetTimesVectorParFlattened, const bool flagCopyResultsToMatrix=true, const unsigned int kPointIndex=0) |
compute the action of coupling matrix on sphericalFunctionKetTimesVectorParFlattened. | |
void | copyBackFromDistributedVectorToLocalDataStructure (dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > &sphericalFunctionKetTimesVectorParFlattened, const dftfe::utils::MemoryStorage< double, memorySpace > &scalingVector) |
After AllReduce function is called this will copy to the nonLocalOperatorClassDatastructure. | |
void | applyAllReduceOnCconjtransX (dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > &sphericalFunctionKetTimesVectorParFlattened, const bool skipComm=false) |
copies the results from internal member to sphericalFunctionKetTimesVectorParFlattened, on which ghost values are called. crucial operation for completion of the full CconjtranX on all cells | |
void | applyCconjtransOnX (const ValueType *X, const std::pair< unsigned int, unsigned int > cellRange) |
computes the results of CconjtransX on the cells of interst specied by cellRange | |
void | applyCconjtransOnX (const dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > &X) |
computes the results of CconjtransX on nodal X vector | |
const ValueType * | getCconjtansXLocalDataStructure (const unsigned int iAtom) const |
Returns the pointer of CTX stored in HOST memory. | |
void | applyVCconjtransOnX (const dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > &src, const unsigned int kPointIndex, const CouplingStructure couplingtype, const dftfe::utils::MemoryStorage< ValueType, memorySpace > &couplingMatrix, dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > &sphericalFunctionKetTimesVectorParFlattened, const bool flagScaleInternalMatrix=false) |
completes the VCconjX on nodal vector src. The src vector must have all ghost nodes and constraint nodes updated. | |
void | applyCVCconjtransOnX (const dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > &src, const unsigned int kPointIndex, const CouplingStructure couplingtype, const dftfe::utils::MemoryStorage< ValueType, memorySpace > &couplingMatrix, dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > &sphericalFunctionKetTimesVectorParFlattened, dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > &dst) |
completes the action of CVCconjtranspose on nodal vector src. The src vector must have all ghost nodes and contraint nodes updated. | |
void | applyCOnVCconjtransX (ValueType *Xout, const std::pair< unsigned int, unsigned int > cellRange) |
adds the result of CVCtX onto Xout for both CPU and GPU calls | |
void | applyCOnVCconjtransX (dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > &Xout) |
adds the result of CVCtX onto Xout for both CPU and GPU calls | |
std::vector< ValueType > | getCmatrixEntries (int kPointIndex, unsigned int atomId, int iElem) const |
bool | atomPresentInCellRange (const std::pair< unsigned int, unsigned int > cellRange) const |
void | paddingCouplingMatrix (const std::vector< ValueType > &entries, std::vector< ValueType > &entriesPadded, const CouplingStructure couplingtype) |
Called only for GPU runs where the coupling matrix has to be padded. | |
const std::vector< ValueType > & | getCmatrixEntriesConjugate (const unsigned int chargeId, const unsigned int iElemComp) const |
Returns C matrix entries for chargeId and it compact support element Id. | |
const std::vector< ValueType > & | getCmatrixEntriesTranspose (const unsigned int chargeId, const unsigned int iElemComp) const |
Returns C conj matrix entries for chargeId and it compact support element Id. | |
const std::vector< std::vector< dftfe::utils::MemoryStorage< ValueType, memorySpace > > > & | getGlobalCMatrix () const |
Returns global C matrix of all atoms. | |
Protected Member Functions | |
void | applyVCconjtransOnXCellLevel (const dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > &src, const unsigned int kPointIndex, const CouplingStructure couplingtype, const dftfe::utils::MemoryStorage< ValueType, memorySpace > &couplingMatrix, dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > &sphericalFunctionKetTimesVectorParFlattened, const bool flagScaleInternalMatrix=false) |
completes the VCconjX on nodal vector src. The src vector must have all ghost nodes and constraint nodes updated. | |
void | applyVCconjtransOnXUsingGlobalC (const dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > &src, const unsigned int kPointIndex, const CouplingStructure couplingtype, const dftfe::utils::MemoryStorage< ValueType, memorySpace > &couplingMatrix, dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > &sphericalFunctionKetTimesVectorParFlattened, const bool flagScaleInternalMatrix=false) |
completes the VCconjX on nodal vector src using global C matrix. The global C matrix mush have been computed before. The src vector must have all ghost nodes and constraint nodes updated. | |
Private Member Functions | |
void | initKpoints (const std::vector< double > &kPointWeights, const std::vector< double > &kPointCoordinates) |
stores the d_kpointWeights, d_kpointCoordinates. Other data members regarding are computed from container data object | |
void | initialisePartitioner () |
creates the partitioner for the distributed vector based on sparsity patten from sphericalFn container. | |
void | computeCMatrixEntries (std::shared_ptr< dftfe::basis::FEBasisOperations< dataTypes::number, double, dftfe::utils::MemorySpace::HOST > > basisOperationsPtr, const unsigned int quadratureIndex) |
computes the entries in C matrix for CPUs and GPUs. On GPUs the entries are copied to a flattened vector on device memory. Further on GPUs, various maps are created crucial for accessing and padding entries in Cmatrix flattened device. | |
template<typename ValueTypeSrc> | |
void | copyCMatrixEntries (const std::shared_ptr< AtomicCenteredNonLocalOperator< ValueTypeSrc, memorySpace > > nonLocalOperatorSrc, std::shared_ptr< dftfe::basis::FEBasisOperations< dataTypes::number, double, dftfe::utils::MemorySpace::HOST > > basisOperationsPtr, const unsigned int quadratureIndex) |
template<typename ValueTypeSrc> | |
void | copyGlobalCMatrix (const std::shared_ptr< AtomicCenteredNonLocalOperator< ValueTypeSrc, memorySpace > > nonLocalOperatorSrc, std::shared_ptr< dftfe::basis::FEBasisOperations< dataTypes::number, double, dftfe::utils::MemorySpace::HOST > > basisOperationsPtr, const unsigned int quadratureIndex) |
void | computeGlobalCMatrixVector (std::shared_ptr< dftfe::basis::FEBasisOperations< dataTypes::number, double, dftfe::utils::MemorySpace::HOST > > basisOperationsPtr, std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > > BLASWrapperHostPtr) |
computes Global Cmatrix on HOST. | |
dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::AtomicCenteredNonLocalOperator | ( | std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< memorySpace > > | BLASWrapperPtr, |
std::shared_ptr< dftfe::basis::FEBasisOperations< dataTypes::number, double, memorySpace > > | basisOperatorPtr, | ||
std::shared_ptr< AtomCenteredSphericalFunctionContainer > | atomCenteredSphericalFunctionContainer, | ||
const MPI_Comm & | mpi_comm_parent, | ||
const bool | memOptMode = false, | ||
const bool | computeSphericalFnTimesX = true, | ||
const bool | useGlobalCMatrix = false ) |
void dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::applyAllReduceOnCconjtransX | ( | dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > & | sphericalFunctionKetTimesVectorParFlattened, |
const bool | skipComm = false ) |
copies the results from internal member to sphericalFunctionKetTimesVectorParFlattened, on which ghost values are called. crucial operation for completion of the full CconjtranX on all cells
[in] | sphericalFunctionKetTimesVectorParFlattened | multivector to store results of CconjtransX which is initiliased using initialiseFlattenedVector call |
[in] | skip1 | flag for compute-communication overlap in ChFSI on GPUs |
[in] | skip2 | flag for compute-communication overlap in ChFSI on GPUs |
void dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::applyCconjtransOnX | ( | const dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > & | X | ) |
computes the results of CconjtransX on nodal X vector
[in] | X | input X nodal vector elements |
void dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::applyCconjtransOnX | ( | const ValueType * | X, |
const std::pair< unsigned int, unsigned int > | cellRange ) |
computes the results of CconjtransX on the cells of interst specied by cellRange
[in] | X | input cell level vector |
[in] | cellRange | start and end element id in list of nonlocal elements |
void dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::applyCOnVCconjtransX | ( | dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > & | Xout | ) |
adds the result of CVCtX onto Xout for both CPU and GPU calls
[out] | Xout | memoryStorage object of size cells*numberOfNodex*BlockSize. Typical case holds the results of H_{loc}X |
[in] | cellRange | start and end element id in list of nonlocal elements |
void dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::applyCOnVCconjtransX | ( | ValueType * | Xout, |
const std::pair< unsigned int, unsigned int > | cellRange ) |
adds the result of CVCtX onto Xout for both CPU and GPU calls
[out] | Xout | memoryStorage object of size cells*numberOfNodex*BlockSize. Typical case holds the results of H_{loc}X |
[in] | cellRange | start and end element id in list of nonlocal elements |
void dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::applyCVCconjtransOnX | ( | const dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > & | src, |
const unsigned int | kPointIndex, | ||
const CouplingStructure | couplingtype, | ||
const dftfe::utils::MemoryStorage< ValueType, memorySpace > & | couplingMatrix, | ||
dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > & | sphericalFunctionKetTimesVectorParFlattened, | ||
dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > & | dst ) |
completes the action of CVCconjtranspose on nodal vector src. The src vector must have all ghost nodes and contraint nodes updated.
[in] | src | input nodal vector on which operator acts on. |
[in] | kPointIndex | kPoint of interst for current operation |
[in] | couplingtype | structure of coupling matrix |
[in] | couplingMatrix | entires of the coupling matrix V in CVCconjtrans |
[in] | sphericalFunctionKetTimesVectorParFlattened | multivector to store results of CconjtransX which is initiliased using initialiseFlattenedVector call |
[out] | dst | output nodal vector where the results of the operator is copied into. |
void dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::applyVCconjtransOnX | ( | const dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > & | src, |
const unsigned int | kPointIndex, | ||
const CouplingStructure | couplingtype, | ||
const dftfe::utils::MemoryStorage< ValueType, memorySpace > & | couplingMatrix, | ||
dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > & | sphericalFunctionKetTimesVectorParFlattened, | ||
const bool | flagScaleInternalMatrix = false ) |
completes the VCconjX on nodal vector src. The src vector must have all ghost nodes and constraint nodes updated.
[in] | src | input nodal vector on which operator acts on. |
[in] | kPointIndex | kPoint of interest for current operation |
[in] | couplingtype | structure of coupling matrix |
[in] | couplingMatrix | entries of the coupling matrix V in CVCconjtrans. Ensure the coupling matrix is padded |
[out] | sphericalFunctionKetTimesVectorParFlattened | multivector to store results of CconjtransX which is initiliased using initialiseFlattenedVector call |
|
protected |
completes the VCconjX on nodal vector src. The src vector must have all ghost nodes and constraint nodes updated.
[in] | src | input nodal vector on which operator acts on. |
[in] | kPointIndex | kPoint of interest for current operation |
[in] | couplingtype | structure of coupling matrix |
[in] | couplingMatrix | entries of the coupling matrix V in CVCconjtrans. Ensure the coupling matrix is padded |
[out] | sphericalFunctionKetTimesVectorParFlattened | multivector to store results of CconjtransX which is initiliased using initialiseFlattenedVector call |
|
protected |
completes the VCconjX on nodal vector src using global C matrix. The global C matrix mush have been computed before. The src vector must have all ghost nodes and constraint nodes updated.
[in] | src | input nodal vector on which operator acts on. |
[in] | kPointIndex | kPoint of interest for current operation |
[in] | couplingtype | structure of coupling matrix |
[in] | couplingMatrix | entries of the coupling matrix V in CVCconjtrans. Ensure the coupling matrix is padded |
[out] | sphericalFunctionKetTimesVectorParFlattened | multivector to store results of CconjtransX which is initiliased using initialiseFlattenedVector call |
void dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::applyVOnCconjtransX | ( | const CouplingStructure | couplingtype, |
const dftfe::utils::MemoryStorage< ValueType, memorySpace > & | couplingMatrix, | ||
dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > & | sphericalFunctionKetTimesVectorParFlattened, | ||
const bool | flagCopyResultsToMatrix = true, | ||
const unsigned int | kPointIndex = 0 ) |
compute the action of coupling matrix on sphericalFunctionKetTimesVectorParFlattened.
[in] | couplingtype | structure of coupling matrix |
[in] | couplingMatrix | entires of the coupling matrix V in CVCconjtrans. Ensure that the coupling matrix is padded. Refer to ONCVclass for template |
[out] | sphericalFunctionKetTimesVectorParFlattened | multivector to store results of CconjtransX which is initiliased using initialiseFlattenedVector call. The results are stored in sphericalFunctionKetTimesVectorParFlattened or internal data member based on flagCopyResultsToMatrix. |
[in] | flagCopyResultsToMatrix | flag to confirm whether to scal the multivector sphericalFunctionKetTimesVectorParFlattened or store results in internal data member. |
bool dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::atomPresentInCellRange | ( | const std::pair< unsigned int, unsigned int > | cellRange | ) | const |
bool dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::atomSupportInElement | ( | unsigned int | iElem | ) | const |
void dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::computeCconjtransCMatrix | ( | const unsigned int | atomId, |
std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > > | BLASWrapperPtr, | ||
const dftfe::utils::MemoryStorage< double, dftfe::utils::MemorySpace::HOST > & | Dinverse, | ||
dftfe::utils::MemoryStorage< ValueType, dftfe::utils::MemorySpace::HOST > | PconjtransposePmatrix ) |
Computes C^{T}D^{-1}C at the global level for atomId. This is required in PAW.
|
private |
computes the entries in C matrix for CPUs and GPUs. On GPUs the entries are copied to a flattened vector on device memory. Further on GPUs, various maps are created crucial for accessing and padding entries in Cmatrix flattened device.
[in] | basisOperationsPtr | HOST FEBasisOperations shared_ptr required to indetify the element ids and quad points |
[in] | quadratureIndex | quadrature index for sampling the spherical function. Quadrature Index is used to reinit basisOperationsPtr |
|
private |
computes Global Cmatrix on HOST.
[in] | basisOperationsPtr | HOST FEBasisOperations shared_ptr required to indetify the element ids and quad points |
[in] | BLASWrapperHostPtr | HOST BLASWrapper |
void dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::copyBackFromDistributedVectorToLocalDataStructure | ( | dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > & | sphericalFunctionKetTimesVectorParFlattened, |
const dftfe::utils::MemoryStorage< double, memorySpace > & | scalingVector ) |
After AllReduce function is called this will copy to the nonLocalOperatorClassDatastructure.
|
private |
|
private |
void dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::copyPartitionerKPointsAndComputeCMatrixEntries | ( | const bool | updateSparsity, |
const std::vector< double > & | kPointWeights, | ||
const std::vector< double > & | kPointCoordinates, | ||
std::shared_ptr< dftfe::basis::FEBasisOperations< dataTypes::number, double, dftfe::utils::MemorySpace::HOST > > | basisOperationsPtr, | ||
std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > > | BLASWrapperHostPtr, | ||
const unsigned int | quadratureIndex, | ||
const std::shared_ptr< AtomicCenteredNonLocalOperator< ValueTypeSrc, memorySpace > > | nonLocalOperatorSrc ) |
calls internal function: initialisePartitioner, initialiseKpoint and computeCMatrixEntries
[in] | updateSparsity | flag on whether the sparstiy patten was updated, hence the partitioner is updated. |
[in] | kPointWeights | std::vector<double> of size number of kPoints |
[out] | kPointCoordinates | std::vector<double> of kPoint coordinates |
[in] | basisOperationsPtr | HOST FEBasisOperations shared_ptr required to indetify the element ids and quad points |
[in] | BLASWrapperHostPtr | CPU blasWrapperPtr, used for xcopy calls |
[in] | quadratureIndex | quadrature index for sampling the spherical function. Quadrature Index is used to reinit basisOperationsPtr |
[in] | nonLocalOperatorSrc | The source nonLocalOpertor from where the CMatrix and partitioner is copied. Generally, it is of higher precision. |
const std::vector< ValueType > & dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getAtomCenteredKpointIndexedSphericalFnQuadValues | ( | ) | const |
const std::vector< ValueType > & dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getAtomCenteredKpointTimesSphericalFnTimesDistFromAtomQuadValues | ( | ) | const |
const std::map< unsigned int, std::vector< unsigned int > > & dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getAtomIdToNonTrivialSphericalFnCellStartIndex | ( | ) | const |
Required in configurational forces. Cummulative sphercial Fn Id. The size is numCells in processor.
std::vector< unsigned int > & dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getAtomWiseNumberCellsAccumulated | ( | ) | const |
std::vector< unsigned int > & dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getAtomWiseNumberCellsInCompactSupport | ( | ) | const |
const ValueType * dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getCconjtansXLocalDataStructure | ( | const unsigned int | iAtom | ) | const |
Returns the pointer of CTX stored in HOST memory.
[in] | iAtom | atomIndex in the list of atoms with support in the current processor. NOTE!! One must be careful here |
const std::map< unsigned int, std::vector< unsigned int > > & dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getCellIdToAtomIdsLocalCompactSupportMap | ( | ) | const |
std::vector< ValueType > dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getCmatrixEntries | ( | int | kPointIndex, |
unsigned int | atomId, | ||
int | iElem ) const |
const std::vector< ValueType > & dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getCmatrixEntriesConjugate | ( | const unsigned int | chargeId, |
const unsigned int | iElemComp ) const |
Returns C matrix entries for chargeId and it compact support element Id.
const std::vector< ValueType > & dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getCmatrixEntriesTranspose | ( | const unsigned int | chargeId, |
const unsigned int | iElemComp ) const |
Returns C conj matrix entries for chargeId and it compact support element Id.
const dftfe::utils::MemoryStorage< dftfe::global_size_type, memorySpace > & dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getFlattenedNonLocalCellDofIndexToProcessDofIndexMap | ( | ) | const |
const std::vector< std::vector< dftfe::utils::MemoryStorage< ValueType, memorySpace > > > & dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getGlobalCMatrix | ( | ) | const |
Returns global C matrix of all atoms.
unsigned int dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getGlobalDofAtomIdSphericalFnPair | ( | const unsigned int | atomId, |
const unsigned int | alpha ) const |
unsigned int dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getLocalIdOfDistributedVec | ( | const unsigned int | globalId | ) | const |
unsigned int dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getMaxSingleAtomEntries | ( | ) | const |
const std::vector< unsigned int > & dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getNonlocalElementToCellIdVector | ( | ) | const |
std::vector< unsigned int > & dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getNonLocalElemIdToLocalElemIdMap | ( | ) | const |
const std::vector< unsigned int > & dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getNonTrivialAllCellsSphericalFnAlphaToElemIdMap | ( | ) | const |
const std::vector< unsigned int > & dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getNonTrivialSphericalFnsCellStartIndex | ( | ) | const |
const std::vector< unsigned int > & dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getNonTrivialSphericalFnsPerCell | ( | ) | const |
const std::vector< unsigned int > & dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getOwnedAtomIdsInCurrentProcessor | ( | ) | const |
const std::vector< unsigned int > & dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getSphericalFnTimesVectorFlattenedVectorLocalIds | ( | ) | const |
Returns the Flattened vector of sphericalFunctionIDs in order of atomIDs of atoms in processor.
unsigned int dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getTotalAtomInCurrentProcessor | ( | ) | const |
unsigned int dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getTotalNonLocalElementsInCurrentProcessor | ( | ) | const |
unsigned int dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getTotalNonLocalEntriesCurrentProcessor | ( | ) | const |
const unsigned int dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::getTotalNonTrivialSphericalFnsOverAllCells | ( | ) | const |
void dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::initialiseFlattenedDataStructure | ( | unsigned int | waveFunctionBlockSize, |
dftfe::linearAlgebra::MultiVector< ValueType, memorySpace > & | sphericalFunctionKetTimesVectorParFlattened ) |
initialises the multivector object, waveFunctionBlockSize and resizes various internal data members.
[in] | waveFunctionBlockSize | sets the wavefunction block size for the action of the nonlocal operator. |
[out] | sphericalFunctionKetTimesVectorParFlattened,the | multivector that is initialised based on blocksize and partitioner. |
void dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::initialiseOperatorActionOnX | ( | unsigned int | kPointIndex | ) |
Resizes various internal data members and selects the kpoint of interest.
[in] | kPointIndex | specifies the k-point of interest |
|
private |
creates the partitioner for the distributed vector based on sparsity patten from sphericalFn container.
[in] | basisOperationsPtr | HOST FEBasisOperations shared_ptr required to indetify the element ids and quad points. |
|
private |
stores the d_kpointWeights, d_kpointCoordinates. Other data members regarding are computed from container data object
[in] | kPointWeights | std::vector<double> of size number of kPoints |
[out] | kPointCoordinates | std::vector<double> of kPoint coordinates |
void dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::intitialisePartitionerKPointsAndComputeCMatrixEntries | ( | const bool | updateSparsity, |
const std::vector< double > & | kPointWeights, | ||
const std::vector< double > & | kPointCoordinates, | ||
std::shared_ptr< dftfe::basis::FEBasisOperations< dataTypes::number, double, dftfe::utils::MemorySpace::HOST > > | basisOperationsPtr, | ||
std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > > | BLASWrapperHostPtr, | ||
const unsigned int | quadratureIndex ) |
calls internal function: initialisePartitioner, initialiseKpoint and computeCMatrixEntries
[in] | updateSparsity | flag on whether the sparstiy patten was updated, hence the partitioner is updated. |
[in] | kPointWeights | std::vector<double> of size number of kPoints |
[out] | kPointCoordinates | std::vector<double> of kPoint coordinates |
[in] | basisOperationsPtr | HOST FEBasisOperations shared_ptr required to indetify the element ids and quad points |
[in] | quadratureIndex | quadrature index for sampling the spherical function. Quadrature Index is used to reinit basisOperationsPtr |
void dftfe::AtomicCenteredNonLocalOperator< ValueType, memorySpace >::paddingCouplingMatrix | ( | const std::vector< ValueType > & | entries, |
std::vector< ValueType > & | entriesPadded, | ||
const CouplingStructure | couplingtype ) |
Called only for GPU runs where the coupling matrix has to be padded.
[in] | entries | COupling matrix entries without padding in the atomId order |
[out] | entriesPadded | Padding of coupling matrix entries |
[in] | couplingtype | Determines the dimension of entriesPadded and the padding mechanism elements |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
map from local nonlocal atomid to vector over cells
|
private |
|
protected |
|
protected |
|
protected |
map from cell number to set of non local atom ids (local numbering)
|
protected |
|
protected |
|
protected |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
|
protected |
|
protected |
|
protected |
|
private |
|
private |
|
private |
|
private |
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
|
protected |
|
protected |
vector of size num physical cells
|
protected |
vector of size num physical cell with starting index for each cell for the above array
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
|
protected |
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
private |
|
protected |
|
protected |
|
private |
|
private |
|
protected |