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 for electrostatics More...
#include <kerkerSolverProblem.h>
Public Member Functions | |
kerkerSolverProblem (const MPI_Comm &mpi_comm_parent, const MPI_Comm &mpi_comm_domain) | |
Constructor. | |
void | init (std::shared_ptr< dftfe::basis::FEBasisOperations< double, double, dftfe::utils::MemorySpace::HOST > > &basisOperationsPtr, dealii::AffineConstraints< double > &constraintMatrix, distributedCPUVec< double > &x, double kerkerMixingParameter, const unsigned int matrixFreeVectorComponent, const unsigned int matrixFreeQuadratureComponent) |
initialize the matrix-free data structures | |
void | reinit (distributedCPUVec< double > &x, const dftfe::utils::MemoryStorage< double, dftfe::utils::MemorySpace::HOST > &quadPointValues) |
reinitialize data structures . | |
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. | |
Private Attributes | |
distributedCPUVec< double > | d_diagonalA |
storage for diagonal of the A matrix | |
distributedCPUVec< double > * | d_xPtr |
pointer to the x vector being solved for | |
double | d_gamma |
unsigned int | d_matrixFreeVectorComponent |
unsigned int | d_matrixFreeQuadratureComponent |
matrix free quadrature index | |
const dftfe::utils::MemoryStorage< double, dftfe::utils::MemorySpace::HOST > * | d_residualQuadValuesPtr |
pointer to electron density cell and grad residual data | |
const dealii::DoFHandler< 3 > * | d_dofHandlerPRefinedPtr |
const dealii::AffineConstraints< double > * | d_constraintMatrixPRefinedPtr |
const dealii::MatrixFree< 3, double > * | d_matrixFreeDataPRefinedPtr |
std::shared_ptr< dftfe::basis::FEBasisOperations< double, double, dftfe::utils::MemorySpace::HOST > > | d_basisOperationsPtr |
const MPI_Comm | d_mpiCommParent |
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 for electrostatics
dftfe::kerkerSolverProblem< FEOrderElectro >::kerkerSolverProblem | ( | const MPI_Comm & | mpi_comm_parent, |
const MPI_Comm & | mpi_comm_domain ) |
Constructor.
|
private |
required for the cell_loop operation in dealii's MatrixFree class
|
private |
Compute the diagonal of A.
|
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.
void dftfe::kerkerSolverProblem< FEOrderElectro >::init | ( | std::shared_ptr< dftfe::basis::FEBasisOperations< double, double, dftfe::utils::MemorySpace::HOST > > & | basisOperationsPtr, |
dealii::AffineConstraints< double > & | constraintMatrix, | ||
distributedCPUVec< double > & | x, | ||
double | kerkerMixingParameter, | ||
const unsigned int | matrixFreeVectorComponent, | ||
const unsigned int | matrixFreeQuadratureComponent ) |
initialize the matrix-free data structures
matrixFreeData | structure to hold quadrature rule, constraints vector and appropriate dofHandler |
constraintMatrix | to hold constraints in the given problem |
x | vector to be initialized using matrix-free object |
|
inlinevirtual |
function needed by dealii to mimic SparseMatrix
Implements dftfe::dealiiLinearSolverProblem.
|
virtual |
Jacobi preconditioning.
Implements dftfe::dealiiLinearSolverProblem.
void dftfe::kerkerSolverProblem< FEOrderElectro >::reinit | ( | distributedCPUVec< double > & | x, |
const dftfe::utils::MemoryStorage< double, dftfe::utils::MemorySpace::HOST > & | quadPointValues ) |
reinitialize data structures .
x | vector to store initial guess and solution |
gradResidualValues | stores the gradient of difference of input electron-density and output electron-density |
kerkerMixingParameter | used in Kerker mixing scheme which usually represents Thomas Fermi wavevector (k_{TF}**2). |
|
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 |
|
private |
|
private |
storage for diagonal of the A matrix
|
private |
|
private |
|
private |
|
private |
matrix free quadrature index
|
private |
matrix free index required to access the DofHandler and dealii::AffineConstraints<double> objects corresponding to the problem
|
private |
|
private |
pointer to electron density cell and grad residual data
|
private |
pointer to the x vector being solved for
|
private |
|
private |
|
private |
|
private |