DFT-EFE
 
Loading...
Searching...
No Matches
dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim > Class Template Reference

A derived class of linearAlgebra::LinearSolverFunction to encapsulate the Poisson partial differential equation (PDE) discretized in a finite element (FE) basis. The Possion PDE is given as: \(\nabla^2 v(\textbf{r}) = -4 \pi \rho(\textbf{r})$\f with the boundary condition on \)@_fakenlv(\textbf{r})|_{\partial \Omega}=g(\textbf{r})$\f ( \(\\partial Omega$\f denoting the boundary of a domain \)\Omega$\f). Here \(v$\f has the physical notion of a potential (e.g., Hartree potential, nuclear potential, etc.) arising due to a charge distributin \)\rho$\f. More...

#include <PoissonLinearSolverFunctionFE.h>

Inheritance diagram for dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >:
Collaboration diagram for dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >:

Public Types

using ValueType = linearAlgebra::blasLapack::scalar_type< ValueTypeOperator, ValueTypeOperand >
 define ValueType as the superior (bigger set) of the ValueTypeOperator and ValueTypeOperand (e.g., between double and complex<double>, complex<double> is the bigger set) More...
 

Public Member Functions

 PoissonLinearSolverFunctionFE (std::shared_ptr< const basis::FEBasisManager< ValueTypeOperand, ValueTypeOperator, memorySpace, dim > > feBasisManagerField, std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeOperator, memorySpace > > feBasisDataStorageStiffnessMatrix, std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeOperator, memorySpace > > feBasisDataStorageRhs, const quadrature::QuadratureValuesContainer< ValueType, memorySpace > &inpRhs, const linearAlgebra::PreconditionerType pcType, std::shared_ptr< linearAlgebra::LinAlgOpContext< memorySpace > > linAlgOpContext, const size_type maxCellTimesNumVecs)
 This constructor creates an instance of a base LinearSolverFunction called PoissonLinearSolverFE. More...
 
void reinit (std::shared_ptr< const basis::FEBasisManager< ValueTypeOperand, ValueTypeOperator, memorySpace, dim > > feBasisManagerField, std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeOperator, memorySpace > > feBasisDataStorageRhs, const quadrature::QuadratureValuesContainer< ValueType, memorySpace > &inpRhs)
 
 ~PoissonLinearSolverFunctionFE ()=default
 
const linearAlgebra::OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace > & getAxContext () const override
 
const linearAlgebra::OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace > & getPCContext () const override
 
void setSolution (const linearAlgebra::MultiVector< ValueType, memorySpace > &x) override
 
void getSolution (linearAlgebra::MultiVector< ValueType, memorySpace > &solution) override
 
const linearAlgebra::MultiVector< ValueTypeOperand, memorySpace > & getRhs () const override
 
const linearAlgebra::MultiVector< ValueType, memorySpace > & getInitialGuess () const override
 
const utils::mpi::MPICommgetMPIComm () const override
 

Private Attributes

size_type d_numComponents
 
std::shared_ptr< const basis::FEBasisManager< ValueTypeOperand, ValueTypeOperator, memorySpace, dim > > d_feBasisManagerField
 
std::shared_ptr< const basis::FEBasisManager< ValueTypeOperand, ValueTypeOperator, memorySpace, dim > > d_feBasisManagerHomo
 
std::shared_ptr< const linearAlgebra::OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace > > d_AxContext
 
std::shared_ptr< const linearAlgebra::OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace > > d_AxContextNHDB
 
std::shared_ptr< const linearAlgebra::OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace > > d_PCContext
 
linearAlgebra::PreconditionerType d_pcType
 
linearAlgebra::MultiVector< ValueType, memorySpace > d_x
 
linearAlgebra::MultiVector< ValueType, memorySpace > d_b
 
linearAlgebra::MultiVector< ValueType, memorySpace > d_initial
 
linearAlgebra::MultiVector< ValueTypeOperand, memorySpace > d_fieldInHomoDBCVec
 
std::shared_ptr< linearAlgebra::LinAlgOpContext< memorySpace > > d_linAlgOpContext
 
const size_type d_maxCellTimesNumVecs
 
std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeOperator, memorySpace > > d_feBasisDataStorageStiffnessMatrix
 
std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeOperator, memorySpace > > d_feBasisDataStorageRhs
 

Detailed Description

template<typename ValueTypeOperator, typename ValueTypeOperand, utils::MemorySpace memorySpace, size_type dim>
class dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >

A derived class of linearAlgebra::LinearSolverFunction to encapsulate the Poisson partial differential equation (PDE) discretized in a finite element (FE) basis. The Possion PDE is given as: \(\nabla^2 v(\textbf{r}) = -4 \pi \rho(\textbf{r})$\f with the boundary condition on \)@_fakenlv(\textbf{r})|_{\partial \Omega}=g(\textbf{r})$\f ( \(\\partial Omega$\f denoting the boundary of a domain \)\Omega$\f). Here \(v$\f has the physical notion of a potential (e.g., Hartree potential, nuclear potential, etc.) arising due to a charge distributin \)\rho$\f.

Template Parameters
ValueTypeOperatorThe datatype (float, double, complex<double>, etc.) for the underlying operator
ValueTypeOperandThe datatype (float, double, complex<double>, etc.) of the vector, matrices, etc. on which the operator will act
memorySpaceThe meory sapce (HOST, DEVICE, HOST_PINNES, etc.) in which the data of the operator and its operands reside
dimDimension of the Poisson problem

Member Typedef Documentation

◆ ValueType

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
using dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::ValueType = linearAlgebra::blasLapack::scalar_type<ValueTypeOperator, ValueTypeOperand>

define ValueType as the superior (bigger set) of the ValueTypeOperator and ValueTypeOperand (e.g., between double and complex<double>, complex<double> is the bigger set)

Constructor & Destructor Documentation

◆ PoissonLinearSolverFunctionFE()

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::PoissonLinearSolverFunctionFE ( std::shared_ptr< const basis::FEBasisManager< ValueTypeOperand, ValueTypeOperator, memorySpace, dim > >  feBasisManagerField,
std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeOperator, memorySpace > >  feBasisDataStorageStiffnessMatrix,
std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeOperator, memorySpace > >  feBasisDataStorageRhs,
const quadrature::QuadratureValuesContainer< ValueType, memorySpace > &  inpRhs,
const linearAlgebra::PreconditionerType  pcType,
std::shared_ptr< linearAlgebra::LinAlgOpContext< memorySpace > >  linAlgOpContext,
const size_type  maxCellTimesNumVecs 
)

This constructor creates an instance of a base LinearSolverFunction called PoissonLinearSolverFE.

Here is the call graph for this function:

◆ ~PoissonLinearSolverFunctionFE()

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::~PoissonLinearSolverFunctionFE ( )
default

Member Function Documentation

◆ getAxContext()

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
const linearAlgebra::OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace > & dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::getAxContext
override

◆ getInitialGuess()

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
const linearAlgebra::MultiVector< linearAlgebra::blasLapack::scalar_type< ValueTypeOperator, ValueTypeOperand >, memorySpace > & dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::getInitialGuess
override

◆ getMPIComm()

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
const utils::mpi::MPIComm & dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::getMPIComm
override

◆ getPCContext()

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
const linearAlgebra::OperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace > & dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::getPCContext
override

◆ getRhs()

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
const linearAlgebra::MultiVector< ValueTypeOperand, memorySpace > & dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::getRhs
override

◆ getSolution()

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
void dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::getSolution ( linearAlgebra::MultiVector< ValueType, memorySpace > &  solution)
override

◆ reinit()

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
void dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::reinit ( std::shared_ptr< const basis::FEBasisManager< ValueTypeOperand, ValueTypeOperator, memorySpace, dim > >  feBasisManagerField,
std::shared_ptr< const basis::FEBasisDataStorage< ValueTypeOperator, memorySpace > >  feBasisDataStorageRhs,
const quadrature::QuadratureValuesContainer< ValueType, memorySpace > &  inpRhs 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSolution()

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
void dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::setSolution ( const linearAlgebra::MultiVector< ValueType, memorySpace > &  x)
override

Member Data Documentation

◆ d_AxContext

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
std::shared_ptr<const linearAlgebra::OperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace> > dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::d_AxContext
private

◆ d_AxContextNHDB

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
std::shared_ptr<const linearAlgebra::OperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace> > dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::d_AxContextNHDB
private

◆ d_b

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
linearAlgebra::MultiVector<ValueType, memorySpace> dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::d_b
private

◆ d_feBasisDataStorageRhs

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
std::shared_ptr< const basis::FEBasisDataStorage<ValueTypeOperator, memorySpace> > dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::d_feBasisDataStorageRhs
private

◆ d_feBasisDataStorageStiffnessMatrix

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
std::shared_ptr< const basis::FEBasisDataStorage<ValueTypeOperator, memorySpace> > dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::d_feBasisDataStorageStiffnessMatrix
private

◆ d_feBasisManagerField

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
std::shared_ptr< const basis:: FEBasisManager<ValueTypeOperand, ValueTypeOperator, memorySpace, dim> > dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::d_feBasisManagerField
private

◆ d_feBasisManagerHomo

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
std::shared_ptr< const basis:: FEBasisManager<ValueTypeOperand, ValueTypeOperator, memorySpace, dim> > dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::d_feBasisManagerHomo
private

◆ d_fieldInHomoDBCVec

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
linearAlgebra::MultiVector<ValueTypeOperand, memorySpace> dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::d_fieldInHomoDBCVec
private

◆ d_initial

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
linearAlgebra::MultiVector<ValueType, memorySpace> dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::d_initial
private

◆ d_linAlgOpContext

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
std::shared_ptr<linearAlgebra::LinAlgOpContext<memorySpace> > dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::d_linAlgOpContext
private

◆ d_maxCellTimesNumVecs

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
const size_type dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::d_maxCellTimesNumVecs
private

◆ d_numComponents

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
size_type dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::d_numComponents
private

◆ d_PCContext

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
std::shared_ptr<const linearAlgebra::OperatorContext<ValueTypeOperator, ValueTypeOperand, memorySpace> > dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::d_PCContext
private

◆ d_pcType

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
linearAlgebra::PreconditionerType dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::d_pcType
private

◆ d_x

template<typename ValueTypeOperator , typename ValueTypeOperand , utils::MemorySpace memorySpace, size_type dim>
linearAlgebra::MultiVector<ValueType, memorySpace> dftefe::electrostatics::PoissonLinearSolverFunctionFE< ValueTypeOperator, ValueTypeOperand, memorySpace, dim >::d_x
private

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