26#ifndef dftefeElectrostaticLocalFE_h
27#define dftefeElectrostaticLocalFE_h
46 template <
typename ValueTypeBasisData,
47 typename ValueTypeBasisCoeff,
48 typename ValueTypeWaveFnBasisData,
54 ValueTypeWaveFnBasisData,
61 ValueTypeWaveFnBasisData,
66 ValueTypeWaveFnBasisData,
71 ValueTypeWaveFnBasisData,
80 const std::vector<utils::Point> &atomCoordinates,
81 const std::vector<double> & atomCharges,
82 const std::vector<double> & smearedChargeRadius,
84 & electronChargeDensity,
88 dim>> feBMTotalCharge,
91 feBDTotalChargeStiffnessMatrix,
97 feBDElectronicChargeRhs,
100 memorySpace>> feBDHamiltonian,
105 bool useDealiiMatrixFreePoissonSolve =
true);
108 const std::vector<utils::Point> &atomCoordinates,
109 const std::vector<double> & atomCharges,
110 const std::vector<double> & smearedChargeRadius,
112 & electronChargeDensity,
116 dim>> feBMTotalCharge,
119 feBDTotalChargeStiffnessMatrix,
122 feBDNuclearChargeRhs,
125 feBDElectronicChargeRhs,
128 feBDNuclChargeStiffnessMatrixNumSol,
131 feBDNuclChargeRhsNumSol,
134 memorySpace>> feBDHamiltonian,
139 bool useDealiiMatrixFreePoissonSolve =
true);
143 const std::vector<utils::Point> &atomCoordinates,
144 const std::vector<double> & atomCharges,
145 const std::vector<double> & smearedChargeRadius,
147 &atomicElectronChargeDensity,
150 &atomicTotalElecPotNuclearQuad,
153 &atomicTotalElecPotElectronicQuad,
162 feBDTotalChargeStiffnessMatrix,
165 feBDNuclearChargeRhs,
168 feBDElectronicChargeRhs,
171 memorySpace>> feBDHamiltonian,
176 const bool useDealiiMatrixFreePoissonSolve =
true);
183 const std::vector<utils::Point> & atomCoordinates,
187 dim>> feBMTotalCharge,
190 feBDTotalChargeStiffnessMatrix,
193 feBDNuclearChargeRhs,
196 feBDElectronicChargeRhs,
199 memorySpace>> feBDHamiltonian);
203 const std::vector<utils::Point> & atomCoordinates,
207 dim>> feBMTotalCharge,
210 feBDTotalChargeStiffnessMatrix,
213 feBDNuclearChargeRhs,
216 feBDElectronicChargeRhs,
219 feBDNuclChargeStiffnessMatrixNumSol,
222 feBDNuclChargeRhsNumSol,
225 memorySpace>> feBDHamiltonian);
230 const std::vector<utils::Point> &atomCoordinates,
232 &atomicElectronChargeDensity,
235 &atomicTotalElecPotNuclearQuad,
238 &atomicTotalElecPotElectronicQuad,
242 dim>> feBMTotalCharge,
245 feBDTotalChargeStiffnessMatrix,
248 feBDNuclearChargeRhs,
251 feBDElectronicChargeRhs,
254 memorySpace>> feBDHamiltonian);
259 &electronChargeDensity);
281 feBDNuclearChargeStiffnessMatrix,
284 feBDNuclearChargeRhs);
326 std::vector<linearAlgebra::MultiVector<ValueType, memorySpace> *>
346 ValueTypeWaveFnBasisData,
368 std::shared_ptr<linearAlgebra::LinAlgOpContext<memorySpace>>
An abstract class to store and access data for a given basis, such as the basis function values on a ...
Definition: FEBasisDataStorage.h:54
An abstract class to encapsulate the partitioning of a finite element basis across multiple processor...
Definition: FEBasisManager.h:44
Definition: FEBasisOperations.h:57
A derived class of linearAlgebra::LinearSolverFunction to encapsulate the Poisson partial differentia...
Definition: PoissonLinearSolverFunctionFE.h:77
A derived class of linearAlgebra::LinearSolverFunction to encapsulate the Poisson partial differentia...
Definition: PoissonSolverDealiiMatrixFreeFE.h:73
A derived class of linearAlgebra::OperatorContext to encapsulate the action of a discrete operator on...
Definition: ElectrostaticFE.h:65
Definition: ElectrostaticLocalFE.h:57
quadrature::QuadratureValuesContainer< ValueType, memorySpace > * d_correctionPotRhoQuad
Definition: ElectrostaticLocalFE.h:311
void getLocal(Storage &cellWiseStorage) const override
Definition: ElectrostaticLocalFE.t.cpp:1426
std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeBasisData, memorySpace > > d_feBDNuclChargeRhsNumSol
Definition: ElectrostaticLocalFE.h:367
std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeBasisData, memorySpace > > d_feBDElectronicChargeRhs
Definition: ElectrostaticLocalFE.h:361
typename ElectrostaticFE< ValueTypeBasisData, ValueTypeBasisCoeff, ValueTypeWaveFnBasisData, memorySpace, dim >::ValueType ValueType
Definition: ElectrostaticLocalFE.h:63
RealType d_energy
Definition: ElectrostaticLocalFE.h:295
~ElectrostaticLocalFE()
Definition: ElectrostaticLocalFE.t.cpp:371
const size_type d_numAtoms
Definition: ElectrostaticLocalFE.h:292
std::vector< utils::Point > d_atomCoordinates
Definition: ElectrostaticLocalFE.h:291
const quadrature::QuadratureValuesContainer< RealType, memorySpace > * d_electronChargeDensity
Definition: ElectrostaticLocalFE.h:302
void evalEnergy()
Definition: ElectrostaticLocalFE.t.cpp:1666
std::vector< linearAlgebra::MultiVector< ValueType, memorySpace > * > d_nuclearChargesPotential
Definition: ElectrostaticLocalFE.h:327
std::shared_ptr< electrostatics::PoissonSolverDealiiMatrixFreeFE< ValueTypeBasisData, ValueTypeBasisCoeff, memorySpace, dim > > d_poissonSolverDealiiMatFree
Definition: ElectrostaticLocalFE.h:383
utils::ConditionalOStream d_rootCout
Definition: ElectrostaticLocalFE.h:386
const bool d_useDealiiMatrixFreePoissonSolve
Definition: ElectrostaticLocalFE.h:286
std::shared_ptr< electrostatics::PoissonLinearSolverFunctionFE< ValueTypeBasisData, ValueTypeBasisCoeff, memorySpace, dim > > d_linearSolverFunction
Definition: ElectrostaticLocalFE.h:377
quadrature::QuadratureValuesContainer< ValueType, memorySpace > * d_scratchPotHamQuad
Definition: ElectrostaticLocalFE.h:318
std::vector< RealType > d_nuclearChargeQuad
Definition: ElectrostaticLocalFE.h:370
quadrature::QuadratureValuesContainer< RealType, memorySpace > * d_nuclearChargesDensity
Definition: ElectrostaticLocalFE.h:300
const quadrature::QuadratureValuesContainer< ValueType, memorySpace > & getFunctionalDerivative() const override
Definition: ElectrostaticLocalFE.t.cpp:1946
std::shared_ptr< const basis::FEBasisOperations< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > > d_feBasisOpNuclear
Definition: ElectrostaticLocalFE.h:339
const std::vector< double > d_atomCharges
Definition: ElectrostaticLocalFE.h:293
const size_type d_numComponents
Definition: ElectrostaticLocalFE.h:290
const size_type d_maxCellBlock
Definition: ElectrostaticLocalFE.h:289
std::shared_ptr< linearAlgebra::LinAlgOpContext< memorySpace > > d_linAlgOpContext
Definition: ElectrostaticLocalFE.h:369
std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeBasisData, memorySpace > > d_feBDNuclearChargeRhs
Definition: ElectrostaticLocalFE.h:364
typename ElectrostaticFE< ValueTypeBasisData, ValueTypeBasisCoeff, ValueTypeWaveFnBasisData, memorySpace, dim >::RealType RealType
Definition: ElectrostaticLocalFE.h:73
RealType d_totNuclearChargeQuad
Definition: ElectrostaticLocalFE.h:384
const quadrature::QuadratureValuesContainer< ValueTypeBasisCoeff, memorySpace > * d_atomicTotalElecPotNuclearQuad
Definition: ElectrostaticLocalFE.h:305
std::shared_ptr< const basis::FEBasisOperations< ValueTypeBasisCoeff, ValueTypeWaveFnBasisData, memorySpace, dim > > d_feBasisOpHamiltonian
Definition: ElectrostaticLocalFE.h:349
bool d_isNumericalVSelfSolve
Definition: ElectrostaticLocalFE.h:287
quadrature::QuadratureValuesContainer< ValueType, memorySpace > * d_scratchPotNuclearQuad
Definition: ElectrostaticLocalFE.h:322
void reinitField(const quadrature::QuadratureValuesContainer< RealType, memorySpace > &electronChargeDensity)
Definition: ElectrostaticLocalFE.t.cpp:1245
typename ElectrostaticFE< ValueTypeBasisData, ValueTypeBasisCoeff, ValueTypeWaveFnBasisData, memorySpace, dim >::Storage Storage
Definition: ElectrostaticLocalFE.h:68
std::map< std::string, std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeBasisData, memorySpace > > > d_feBasisDataStorageRhsMap
Definition: ElectrostaticLocalFE.h:392
quadrature::QuadratureValuesContainer< ValueType, memorySpace > * d_correctionPotHamQuad
Definition: ElectrostaticLocalFE.h:309
const quadrature::QuadratureValuesContainer< ValueTypeBasisCoeff, memorySpace > * d_atomicTotalElecPotElectronicQuad
Definition: ElectrostaticLocalFE.h:305
quadrature::QuadratureValuesContainer< RealType, memorySpace > * d_scratchDensRhoQuad
Definition: ElectrostaticLocalFE.h:316
size_type d_cellTimesNumVecPoisson
Definition: ElectrostaticLocalFE.h:371
quadrature::QuadratureValuesContainer< RealType, memorySpace > d_atomicElectronChargeDensity
Definition: ElectrostaticLocalFE.h:307
std::shared_ptr< const basis::FEBasisManager< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > > d_feBMTotalCharge
Definition: ElectrostaticLocalFE.h:355
std::vector< std::shared_ptr< basis::FEBasisManager< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > > > d_feBMNuclearCharge
Definition: ElectrostaticLocalFE.h:333
const std::vector< double > d_smearedChargeRadius
Definition: ElectrostaticLocalFE.h:294
std::shared_ptr< const basis::FEBasisOperations< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > > d_feBasisOpElectronic
Definition: ElectrostaticLocalFE.h:344
std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeBasisData, memorySpace > > d_feBDTotalChargeStiffnessMatrix
Definition: ElectrostaticLocalFE.h:358
void reinitBasis(const std::vector< utils::Point > &atomCoordinates, std::shared_ptr< const basis::FEBasisManager< ValueTypeBasisCoeff, ValueTypeBasisData, memorySpace, dim > > feBMTotalCharge, std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeBasisData, memorySpace > > feBDTotalChargeStiffnessMatrix, std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeBasisData, memorySpace > > feBDNuclearChargeRhs, std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeBasisData, memorySpace > > feBDElectronicChargeRhs, std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeWaveFnBasisData, memorySpace > > feBDHamiltonian)
Definition: ElectrostaticLocalFE.t.cpp:746
RealType getEnergy() const override
Definition: ElectrostaticLocalFE.t.cpp:1925
linearAlgebra::MultiVector< ValueTypeBasisCoeff, memorySpace > * d_totalChargePotential
Definition: ElectrostaticLocalFE.h:325
quadrature::QuadratureValuesContainer< ValueType, memorySpace > * d_scratchPotRhoQuad
Definition: ElectrostaticLocalFE.h:320
quadrature::QuadratureValuesContainer< RealType, memorySpace > * d_scratchDensNuclearQuad
Definition: ElectrostaticLocalFE.h:314
const utils::ScalarSpatialFunctionReal & d_externalPotentialFunction
Definition: ElectrostaticLocalFE.h:296
void nuclearPotentialSolve(std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeBasisData, memorySpace > > feBDNuclearChargeStiffnessMatrix, std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeBasisData, memorySpace > > feBDNuclearChargeRhs)
Definition: ElectrostaticLocalFE.t.cpp:1472
bool d_isDeltaRhoSolve
Definition: ElectrostaticLocalFE.h:288
Definition: LinAlgOpContext.h:38
An class template to encapsulate a MultiVector. A MultiVector is a collection of vectors belonging t...
Definition: MultiVector.h:134
Definition: QuadratureValuesContainer.h:39
Provides an interface to print based on whether a certain condition is met or not....
Definition: ConditionalOStream.h:47
Definition: Function.h:10
MemorySpace
Definition: MemorySpaceType.h:37
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8