DFT-FE 1.1.0-pre
Density Functional Theory With Finite-Elements
Loading...
Searching...
No Matches
dftfe::AtomCenteredSphericalFunctionContainer Class Reference

#include <AtomCenteredSphericalFunctionContainer.h>

Public Member Functions

void init (const std::vector< dftfe::uInt > &atomicNumbers, const std::map< std::pair< dftfe::uInt, dftfe::uInt >, std::shared_ptr< AtomCenteredSphericalFunctionBase > > &listOfSphericalFunctions)
 Initialises the class with the atomicNumbers of various atoms and the AtomCenteredSphericalFn of various spherical functions. This function is only called once per run.
 
void initaliseCoordinates (const std::vector< double > &atomCoords, const std::vector< std::vector< double > > &periodicCoords, const std::vector< dftfe::Int > &imageIds)
 Initialises the position of atoms, the image posisiton and image ids after every update of atom positions.
 
dftfe::uInt getNumAtomCentersSize ()
 Returns the number of atoms present in domain.
 
const std::vector< double > & getAtomCoordinates () const
 Returns the cooridnates of atom present in domain.
 
const std::map< dftfe::uInt, std::vector< double > > & getPeriodicImageCoordinatesList () const
 Returns the map of atomId vs vector of image coordinates.
 
dftfe::uInt getTotalNumberOfSphericalFunctionsPerAtom (dftfe::uInt atomicNumber)
 Returns the he number of total spherical functions indexed by {ilm} associated with an atomic number. If the atomic number does not exist, it returns a zero.
 
dftfe::uInt getTotalNumberOfRadialSphericalFunctionsPerAtom (dftfe::uInt atomicNumber)
 Returns the he number of radial spherical functions indexed by {i} associated with an atomic number. If the atomic number does not exist, it returns a zero.
 
dftfe::uInt getTotalNumberOfSphericalFunctionsInCurrentProcessor ()
 Returns the total number of total spherical functions indexed by {ilm} present in the current processor. If the atomic number does not exist, it returns a zero.
 
dftfe::uInt getMaximumNumberOfSphericalFunctions ()
 Returns the maximum number of total spherical functions indexed by {ilm} across all atom Types present in atomNumbers vector.
 
void getTotalAtomsAndNonLocalElementsInCurrentProcessor (dftfe::uInt &totalAtomsInCurrentProcessor, dftfe::uInt &totalNonLocalElements, std::vector< dftfe::uInt > &numberCellsForEachAtom, std::vector< dftfe::uInt > &numberCellsAccumNonLocalAtoms, std::vector< dftfe::uInt > &iElemNonLocalToElemIndexMap)
 
dftfe::uInt getTotalNumberOfRadialSphericalFunctions ()
 Returns the total number of total radial-spherical functions indexed by {i} present in atomicNumbers list.
 
const std::map< std::pair< dftfe::uInt, dftfe::uInt >, std::shared_ptr< AtomCenteredSphericalFunctionBase > > & getSphericalFunctions () const
 Returns the shared_ptr of AtomCenteredSphericalFunctionBase associated with std::pair(atomic Number and lQuantumNo)
 
const std::vector< dftfe::uInt > & getAtomicNumbers () const
 Returns the vector of size Natoms of all atoms in system.
 
const std::vector< dftfe::uInt > & getAtomIdsInCurrentProcess () const
 Returns the atomIds of atoms present in current processor.
 
const dftfe::uInt getTotalSphericalFunctionIndexStart (dftfe::uInt Znum, dftfe::uInt alpha)
 Returns the startIndex of spherical Function alpha associated with atomic number Znum.
 
template<typename NumberType>
void computeSparseStructure (std::shared_ptr< dftfe::basis::FEBasisOperations< NumberType, double, dftfe::utils::MemorySpace::HOST > > &basisOperationsPtr, const dftfe::uInt quadratureIndex, const double cutOffVal=1.0E-8, const dftfe::uInt cutOffType=0)
 
void setImageCoordinates (const std::vector< dftfe::Int > &imageIds, const std::vector< std::vector< double > > &periodicCoords)
 
const std::vector< dftfe::Int > & getAtomIdsInElement (dftfe::uInt iElem)
 
const std::map< dftfe::uInt, std::vector< dftfe::Int > > & getSparsityPattern ()
 
bool atomSupportInElement (dftfe::uInt iElem)
 
void getDataForSparseStructure (const std::map< dftfe::uInt, std::vector< dftfe::Int > > &sparsityPattern, const std::vector< std::vector< dealii::CellId > > &elementIdsInAtomCompactSupport, const std::vector< std::vector< dftfe::uInt > > &elementIndexesInAtomCompactSupport, const std::vector< dftfe::uInt > &atomIdsInCurrentProcess, dftfe::uInt numberElements)
 
const dftfe::uInt getOffsetLocation (const dftfe::uInt iAtom)
 

Public Attributes

std::vector< std::vector< dftfe::uInt > > d_elementIndexesInAtomCompactSupport
 

Private Attributes

std::vector< double > d_atomCoords
 
std::vector< dftfe::uIntd_atomicNumbers
 
std::map< dftfe::uInt, std::vector< double > > d_periodicImageCoord
 
std::map< std::pair< dftfe::uInt, dftfe::uInt >, std::shared_ptr< AtomCenteredSphericalFunctionBase > > d_sphericalFunctionsContainer
 
std::map< dftfe::uInt, dftfe::uIntd_numRadialSphericalFunctions
 
std::map< dftfe::uInt, dftfe::uIntd_numSphericalFunctions
 
std::map< dftfe::uInt, std::vector< dftfe::Int > > d_sparsityPattern
 
std::vector< std::vector< dealii::CellId > > d_elementIdsInAtomCompactSupport
 
std::vector< std::vector< dealii::DoFHandler< 3 >::active_cell_iterator > > d_elementOneFieldIteratorsInAtomCompactSupport
 
std::vector< dftfe::uIntd_AtomIdsInCurrentProcess
 
std::vector< dftfe::uIntd_offsetLocation
 
std::vector< std::vector< dftfe::Int > > d_AtomIdsInElement
 
std::map< dftfe::uInt, std::vector< dftfe::uInt > > d_totalSphericalFunctionIndexStart
 

Member Function Documentation

◆ atomSupportInElement()

bool dftfe::AtomCenteredSphericalFunctionContainer::atomSupportInElement ( dftfe::uInt iElem)

◆ computeSparseStructure()

template<typename NumberType>
void dftfe::AtomCenteredSphericalFunctionContainer::computeSparseStructure ( std::shared_ptr< dftfe::basis::FEBasisOperations< NumberType, double, dftfe::utils::MemorySpace::HOST > > & basisOperationsPtr,
const dftfe::uInt quadratureIndex,
const double cutOffVal = 1.0E-8,
const dftfe::uInt cutOffType = 0 )

◆ getAtomCoordinates()

const std::vector< double > & dftfe::AtomCenteredSphericalFunctionContainer::getAtomCoordinates ( ) const

Returns the cooridnates of atom present in domain.

Returns
Returns atomCoords vector

◆ getAtomicNumbers()

const std::vector< dftfe::uInt > & dftfe::AtomCenteredSphericalFunctionContainer::getAtomicNumbers ( ) const

Returns the vector of size Natoms of all atoms in system.

◆ getAtomIdsInCurrentProcess()

const std::vector< dftfe::uInt > & dftfe::AtomCenteredSphericalFunctionContainer::getAtomIdsInCurrentProcess ( ) const

Returns the atomIds of atoms present in current processor.

◆ getAtomIdsInElement()

const std::vector< dftfe::Int > & dftfe::AtomCenteredSphericalFunctionContainer::getAtomIdsInElement ( dftfe::uInt iElem)

◆ getDataForSparseStructure()

void dftfe::AtomCenteredSphericalFunctionContainer::getDataForSparseStructure ( const std::map< dftfe::uInt, std::vector< dftfe::Int > > & sparsityPattern,
const std::vector< std::vector< dealii::CellId > > & elementIdsInAtomCompactSupport,
const std::vector< std::vector< dftfe::uInt > > & elementIndexesInAtomCompactSupport,
const std::vector< dftfe::uInt > & atomIdsInCurrentProcess,
dftfe::uInt numberElements )

◆ getMaximumNumberOfSphericalFunctions()

dftfe::uInt dftfe::AtomCenteredSphericalFunctionContainer::getMaximumNumberOfSphericalFunctions ( )

Returns the maximum number of total spherical functions indexed by {ilm} across all atom Types present in atomNumbers vector.

◆ getNumAtomCentersSize()

dftfe::uInt dftfe::AtomCenteredSphericalFunctionContainer::getNumAtomCentersSize ( )

Returns the number of atoms present in domain.

Returns
Returns size of atomicNumbers vector

◆ getOffsetLocation()

const dftfe::uInt dftfe::AtomCenteredSphericalFunctionContainer::getOffsetLocation ( const dftfe::uInt iAtom)

◆ getPeriodicImageCoordinatesList()

const std::map< dftfe::uInt, std::vector< double > > & dftfe::AtomCenteredSphericalFunctionContainer::getPeriodicImageCoordinatesList ( ) const

Returns the map of atomId vs vector of image coordinates.

Returns
Returns d_periodicImageCoord

◆ getSparsityPattern()

const std::map< dftfe::uInt, std::vector< dftfe::Int > > & dftfe::AtomCenteredSphericalFunctionContainer::getSparsityPattern ( )

◆ getSphericalFunctions()

const std::map< std::pair< dftfe::uInt, dftfe::uInt >, std::shared_ptr< AtomCenteredSphericalFunctionBase > > & dftfe::AtomCenteredSphericalFunctionContainer::getSphericalFunctions ( ) const

Returns the shared_ptr of AtomCenteredSphericalFunctionBase associated with std::pair(atomic Number and lQuantumNo)

◆ getTotalAtomsAndNonLocalElementsInCurrentProcessor()

void dftfe::AtomCenteredSphericalFunctionContainer::getTotalAtomsAndNonLocalElementsInCurrentProcessor ( dftfe::uInt & totalAtomsInCurrentProcessor,
dftfe::uInt & totalNonLocalElements,
std::vector< dftfe::uInt > & numberCellsForEachAtom,
std::vector< dftfe::uInt > & numberCellsAccumNonLocalAtoms,
std::vector< dftfe::uInt > & iElemNonLocalToElemIndexMap )
Parameters
[out]totalAtomsInCurrentProcessornumber of atoms in current processor based on compact support
[out]totalNonLocalElementsnumber of nonLocal elements in current processor
[out]numberCellsForEachAtomnumber of cells associated which each atom in the current processor. vecot of size totalAtomsInCurrentProcessor
[out]numberCellsAccumNonLocalAtomsnumber of cells accumulated till iatom in current processor. vector of size totalAtomsInCurrentProcessor

◆ getTotalNumberOfRadialSphericalFunctions()

dftfe::uInt dftfe::AtomCenteredSphericalFunctionContainer::getTotalNumberOfRadialSphericalFunctions ( )

Returns the total number of total radial-spherical functions indexed by {i} present in atomicNumbers list.

◆ getTotalNumberOfRadialSphericalFunctionsPerAtom()

dftfe::uInt dftfe::AtomCenteredSphericalFunctionContainer::getTotalNumberOfRadialSphericalFunctionsPerAtom ( dftfe::uInt atomicNumber)

Returns the he number of radial spherical functions indexed by {i} associated with an atomic number. If the atomic number does not exist, it returns a zero.

Returns
d_numRadialSphericalFunctions.find(atomicNumber)->size()

◆ getTotalNumberOfSphericalFunctionsInCurrentProcessor()

dftfe::uInt dftfe::AtomCenteredSphericalFunctionContainer::getTotalNumberOfSphericalFunctionsInCurrentProcessor ( )

Returns the total number of total spherical functions indexed by {ilm} present in the current processor. If the atomic number does not exist, it returns a zero.

◆ getTotalNumberOfSphericalFunctionsPerAtom()

dftfe::uInt dftfe::AtomCenteredSphericalFunctionContainer::getTotalNumberOfSphericalFunctionsPerAtom ( dftfe::uInt atomicNumber)

Returns the he number of total spherical functions indexed by {ilm} associated with an atomic number. If the atomic number does not exist, it returns a zero.

Returns
d_numSphericalFunctions.find(atomicNumber)->size()

◆ getTotalSphericalFunctionIndexStart()

const dftfe::uInt dftfe::AtomCenteredSphericalFunctionContainer::getTotalSphericalFunctionIndexStart ( dftfe::uInt Znum,
dftfe::uInt alpha )

Returns the startIndex of spherical Function alpha associated with atomic number Znum.

◆ init()

void dftfe::AtomCenteredSphericalFunctionContainer::init ( const std::vector< dftfe::uInt > & atomicNumbers,
const std::map< std::pair< dftfe::uInt, dftfe::uInt >, std::shared_ptr< AtomCenteredSphericalFunctionBase > > & listOfSphericalFunctions )

Initialises the class with the atomicNumbers of various atoms and the AtomCenteredSphericalFn of various spherical functions. This function is only called once per run.

Parameters
[in]atomicNumbersvector of size Natoms storing the Znumbers of various atoms present
[in]listOfSphericalFunctionsmap of std::pain (Znum, l) to the sphericalFUnction class shared pointer.

◆ initaliseCoordinates()

void dftfe::AtomCenteredSphericalFunctionContainer::initaliseCoordinates ( const std::vector< double > & atomCoords,
const std::vector< std::vector< double > > & periodicCoords,
const std::vector< dftfe::Int > & imageIds )

Initialises the position of atoms, the image posisiton and image ids after every update of atom positions.

Parameters
[in]atomCoordsvector of size 3*Natoms storing the X,Y,Z coordiantes of atom in cell.
[in]periodicCoordsvector of vector storing the image coordinates
[in]imageIdsthe image Id of image atoms present in periodicCoords input

◆ setImageCoordinates()

void dftfe::AtomCenteredSphericalFunctionContainer::setImageCoordinates ( const std::vector< dftfe::Int > & imageIds,
const std::vector< std::vector< double > > & periodicCoords )

Member Data Documentation

◆ d_atomCoords

std::vector<double> dftfe::AtomCenteredSphericalFunctionContainer::d_atomCoords
private

◆ d_atomicNumbers

std::vector<dftfe::uInt> dftfe::AtomCenteredSphericalFunctionContainer::d_atomicNumbers
private

◆ d_AtomIdsInCurrentProcess

std::vector<dftfe::uInt> dftfe::AtomCenteredSphericalFunctionContainer::d_AtomIdsInCurrentProcess
private

◆ d_AtomIdsInElement

std::vector<std::vector<dftfe::Int> > dftfe::AtomCenteredSphericalFunctionContainer::d_AtomIdsInElement
private

◆ d_elementIdsInAtomCompactSupport

std::vector<std::vector<dealii::CellId> > dftfe::AtomCenteredSphericalFunctionContainer::d_elementIdsInAtomCompactSupport
private

◆ d_elementIndexesInAtomCompactSupport

std::vector<std::vector<dftfe::uInt> > dftfe::AtomCenteredSphericalFunctionContainer::d_elementIndexesInAtomCompactSupport

◆ d_elementOneFieldIteratorsInAtomCompactSupport

std::vector<std::vector<dealii::DoFHandler<3>::active_cell_iterator> > dftfe::AtomCenteredSphericalFunctionContainer::d_elementOneFieldIteratorsInAtomCompactSupport
private

◆ d_numRadialSphericalFunctions

std::map<dftfe::uInt, dftfe::uInt> dftfe::AtomCenteredSphericalFunctionContainer::d_numRadialSphericalFunctions
private

◆ d_numSphericalFunctions

std::map<dftfe::uInt, dftfe::uInt> dftfe::AtomCenteredSphericalFunctionContainer::d_numSphericalFunctions
private

◆ d_offsetLocation

std::vector<dftfe::uInt> dftfe::AtomCenteredSphericalFunctionContainer::d_offsetLocation
private

◆ d_periodicImageCoord

std::map<dftfe::uInt, std::vector<double> > dftfe::AtomCenteredSphericalFunctionContainer::d_periodicImageCoord
private

◆ d_sparsityPattern

std::map<dftfe::uInt, std::vector<dftfe::Int> > dftfe::AtomCenteredSphericalFunctionContainer::d_sparsityPattern
private

◆ d_sphericalFunctionsContainer

std::map<std::pair<dftfe::uInt, dftfe::uInt>, std::shared_ptr<AtomCenteredSphericalFunctionBase> > dftfe::AtomCenteredSphericalFunctionContainer::d_sphericalFunctionsContainer
private

◆ d_totalSphericalFunctionIndexStart

std::map<dftfe::uInt, std::vector<dftfe::uInt> > dftfe::AtomCenteredSphericalFunctionContainer::d_totalSphericalFunctionIndexStart
private

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