DFT-FE 1.1.0-pre
Density Functional Theory With Finite-Elements
|
poisson solver problem class template. template parameter FEOrderElectro is the finite element polynomial order. FEOrder template parameter is used in conjunction with FEOrderElectro to determine the order of the Gauss quadrature rule More...
#include <poissonSolverProblem.h>
Public Member Functions | |
poissonSolverProblem (const MPI_Comm &mpi_comm) | |
Constructor. | |
void | clear () |
clears all datamembers and reset to original state. | |
void | reinit (const std::shared_ptr< dftfe::basis::FEBasisOperations< double, double, dftfe::utils::MemorySpace::HOST > > &basisOperationsPtr, distributedCPUVec< double > &x, const dealii::AffineConstraints< double > &constraintMatrix, const unsigned int matrixFreeVectorComponent, const unsigned int matrixFreeQuadratureComponentRhsDensity, const unsigned int matrixFreeQuadratureComponentAX, const std::map< dealii::types::global_dof_index, double > &atoms, const std::map< dealii::CellId, std::vector< double > > &smearedChargeValues, const unsigned int smearedChargeQuadratureId, const dftfe::utils::MemoryStorage< double, dftfe::utils::MemorySpace::HOST > &rhoValues, const bool isComputeDiagonalA=true, const bool isComputeMeanValueConstraints=false, const bool smearedNuclearCharges=false, const bool isRhoValues=true, const bool isGradSmearedChargeRhs=false, const unsigned int smearedChargeGradientComponentId=0, const bool storeSmearedChargeRhs=false, const bool reuseSmearedChargeRhs=false, const bool reinitializeFastConstraints=false) |
reinitialize data structures for total electrostatic potential solve. | |
distributedCPUVec< double > & | getX () |
get the reference to x field | |
void | vmult (distributedCPUVec< double > &Ax, distributedCPUVec< double > &x) |
Compute A matrix multipled by x. | |
void | computeRhs (distributedCPUVec< double > &rhs) |
Compute right hand side vector for the problem Ax = rhs. | |
void | precondition_Jacobi (distributedCPUVec< double > &dst, const distributedCPUVec< double > &src, const double omega) const |
Jacobi preconditioning. | |
void | distributeX () |
distribute x to the constrained nodes. | |
void | subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const |
void | unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const |
bool | operator!= (double val) const |
function needed by dealii to mimic SparseMatrix | |
![]() | |
dealiiLinearSolverProblem () | |
Constructor. | |
Private Member Functions | |
void | AX (const dealii::MatrixFree< 3, double > &matrixFreeData, distributedCPUVec< double > &dst, const distributedCPUVec< double > &src, const std::pair< unsigned int, unsigned int > &cell_range) const |
required for the cell_loop operation in dealii's MatrixFree class | |
void | computeDiagonalA () |
Compute the diagonal of A. | |
void | computeMeanValueConstraint () |
Compute mean value constraint which is required in case of fully periodic boundary conditions. | |
void | meanValueConstraintDistribute (distributedCPUVec< double > &vec) const |
Mean value constraint distibute. | |
void | meanValueConstraintDistributeSlaveToMaster (distributedCPUVec< double > &vec) const |
Mean value constraint distibute slave to master. | |
void | meanValueConstraintSetZero (distributedCPUVec< double > &vec) const |
Mean value constraint set zero. | |
Private Attributes | |
distributedCPUVec< double > | d_diagonalA |
storage for diagonal of the A matrix | |
distributedCPUVec< double > | d_rhsSmearedCharge |
const dealii::MatrixFree< 3, double > * | d_matrixFreeDataPtr |
pointer to dealii MatrixFree object | |
distributedCPUVec< double > * | d_xPtr |
pointer to the x vector being solved for | |
const dealii::AffineConstraints< double > * | d_constraintMatrixPtr |
pointer to dealii dealii::AffineConstraints<double> object | |
unsigned int | d_matrixFreeVectorComponent |
unsigned int | d_matrixFreeQuadratureComponentRhsDensity |
matrix free quadrature index | |
unsigned int | d_matrixFreeQuadratureComponentAX |
matrix free quadrature index | |
const dftfe::utils::MemoryStorage< double, dftfe::utils::MemorySpace::HOST > * | d_rhoValuesPtr |
pointer to electron density cell quadrature data | |
const std::map< dealii::CellId, std::vector< double > > * | d_smearedChargeValuesPtr |
pointer to smeared charge cell quadrature data | |
unsigned int | d_smearedChargeQuadratureId |
const std::map< dealii::types::global_dof_index, double > * | d_atomsPtr |
std::vector< double > | d_cellShapeFunctionGradientIntegralFlattened |
shape function gradient integral storage | |
distributedCPUVec< double > | d_meanValueConstraintVec |
storage for mean value constraint vector | |
bool | d_isMeanValueConstraintComputed |
bool | d_isGradSmearedChargeRhs |
bool | d_isStoreSmearedChargeRhs |
bool | d_isReuseSmearedChargeRhs |
unsigned int | d_smearedChargeGradientComponentId |
dealii::types::global_dof_index | d_meanValueConstraintNodeId |
mean value constraints: mean value constrained node | |
unsigned int | d_meanValueConstraintProcId |
dftUtils::constraintMatrixInfo< dftfe::utils::MemorySpace::HOST > | d_constraintsInfo |
duplicate constraints object with flattened maps for faster access | |
std::shared_ptr< dftfe::basis::FEBasisOperations< double, double, dftfe::utils::MemorySpace::HOST > > | d_basisOperationsPtr |
bool | d_isFastConstraintsInitialized |
const MPI_Comm | mpi_communicator |
const unsigned int | n_mpi_processes |
const unsigned int | this_mpi_process |
dealii::ConditionalOStream | pcout |
Additional Inherited Members | |
![]() | |
typedef dealii::types::global_dof_index | size_type |
typedef declaration needed by dealii | |
poisson solver problem class template. template parameter FEOrderElectro is the finite element polynomial order. FEOrder template parameter is used in conjunction with FEOrderElectro to determine the order of the Gauss quadrature rule
dftfe::poissonSolverProblem< FEOrder, FEOrderElectro >::poissonSolverProblem | ( | const MPI_Comm & | mpi_comm | ) |
Constructor.
|
private |
required for the cell_loop operation in dealii's MatrixFree class
void dftfe::poissonSolverProblem< FEOrder, FEOrderElectro >::clear | ( | ) |
clears all datamembers and reset to original state.
|
private |
Compute the diagonal of A.
|
private |
Compute mean value constraint which is required in case of fully periodic boundary conditions.
|
virtual |
Compute right hand side vector for the problem Ax = rhs.
rhs | vector for the right hand side values |
Implements dftfe::dealiiLinearSolverProblem.
|
virtual |
distribute x to the constrained nodes.
Implements dftfe::dealiiLinearSolverProblem.
|
virtual |
get the reference to x field
Implements dftfe::dealiiLinearSolverProblem.
|
private |
Mean value constraint distibute.
|
private |
Mean value constraint distibute slave to master.
|
private |
Mean value constraint set zero.
|
inlinevirtual |
function needed by dealii to mimic SparseMatrix
Implements dftfe::dealiiLinearSolverProblem.
|
virtual |
Jacobi preconditioning.
Implements dftfe::dealiiLinearSolverProblem.
void dftfe::poissonSolverProblem< FEOrder, FEOrderElectro >::reinit | ( | const std::shared_ptr< dftfe::basis::FEBasisOperations< double, double, dftfe::utils::MemorySpace::HOST > > & | basisOperationsPtr, |
distributedCPUVec< double > & | x, | ||
const dealii::AffineConstraints< double > & | constraintMatrix, | ||
const unsigned int | matrixFreeVectorComponent, | ||
const unsigned int | matrixFreeQuadratureComponentRhsDensity, | ||
const unsigned int | matrixFreeQuadratureComponentAX, | ||
const std::map< dealii::types::global_dof_index, double > & | atoms, | ||
const std::map< dealii::CellId, std::vector< double > > & | smearedChargeValues, | ||
const unsigned int | smearedChargeQuadratureId, | ||
const dftfe::utils::MemoryStorage< double, dftfe::utils::MemorySpace::HOST > & | rhoValues, | ||
const bool | isComputeDiagonalA = true, | ||
const bool | isComputeMeanValueConstraints = false, | ||
const bool | smearedNuclearCharges = false, | ||
const bool | isRhoValues = true, | ||
const bool | isGradSmearedChargeRhs = false, | ||
const unsigned int | smearedChargeGradientComponentId = 0, | ||
const bool | storeSmearedChargeRhs = false, | ||
const bool | reuseSmearedChargeRhs = false, | ||
const bool | reinitializeFastConstraints = false ) |
reinitialize data structures for total electrostatic potential solve.
For Hartree electrostatic potential solve give an empty map to the atoms parameter.
|
inlinevirtual |
function needed by dealii to mimic SparseMatrix for Jacobi preconditioning
Implements dftfe::dealiiLinearSolverProblem.
|
inlinevirtual |
function needed by dealii to mimic SparseMatrix for Jacobi preconditioning
Implements dftfe::dealiiLinearSolverProblem.
|
virtual |
Compute A matrix multipled by x.
Implements dftfe::dealiiLinearSolverProblem.
|
private |
pointer to map between global dof index in current processor and the atomic charge on that dof
|
private |
|
private |
shape function gradient integral storage
|
private |
pointer to dealii dealii::AffineConstraints<double> object
|
private |
duplicate constraints object with flattened maps for faster access
|
private |
storage for diagonal of the A matrix
|
private |
|
private |
|
private |
boolean flag to query if mean value constraint datastructures are precomputed
|
private |
|
private |
|
private |
pointer to dealii MatrixFree object
|
private |
matrix free quadrature index
|
private |
matrix free quadrature index
|
private |
matrix free index required to access the DofHandler and dealii::AffineConstraints<double> objects corresponding to the problem
|
private |
mean value constraints: mean value constrained node
|
private |
mean value constraints: constrained proc id containing the mean value constrained node
|
private |
storage for mean value constraint vector
|
private |
pointer to electron density cell quadrature data
|
private |
storage for smeared charge rhs in case of total potential solve (doesn't change every scf)
|
private |
|
private |
|
private |
pointer to smeared charge cell quadrature data
|
private |
pointer to the x vector being solved for
|
private |
|
private |
|
private |
|
private |