|
IPPL API Reference
Independent Parallel Particle Layer C++ API
|
A solver for the poisson equation using finite element methods and Conjugate Gradient (CG) More...
#include <PreconditionedFEMPoissonSolver.h>
Inheritance diagram for ippl::PreconditionedFEMPoissonSolver< FieldLHS, FieldRHS >:
Collaboration diagram for ippl::PreconditionedFEMPoissonSolver< FieldLHS, FieldRHS >:Public Types | |
| using | Base = Poisson< FieldLHS, FieldRHS > |
| using | MeshType = typename FieldRHS::Mesh_t |
| using | PCGSolverAlgorithm_t = PCG< lhs_type, lhs_type, lhs_type, lhs_type, lhs_type, FieldLHS, FieldRHS > |
| using | ElementType = std::conditional_t< Dim==1, ippl::EdgeElement< Tlhs >, std::conditional_t< Dim==2, ippl::QuadrilateralElement< Tlhs >, ippl::HexahedralElement< Tlhs > > > |
| using | QuadratureType = GaussJacobiQuadrature< Tlhs, 5, ElementType > |
| using | LagrangeType = LagrangeSpace< Tlhs, Dim, 1, ElementType, QuadratureType, FieldLHS, FieldRHS > |
| using | lhs_type = FieldLHS |
| using | rhs_type = FieldRHS |
Public Types inherited from ippl::Poisson< FieldLHS, FieldRHS > | |
| enum | OutputType { SOL = 0b01 , GRAD = 0b10 , SOL_AND_GRAD = 0b11 } |
| using | lhs_type = FieldLHS |
| using | rhs_type = FieldRHS |
| using | Tlhs = typename FieldLHS::value_type |
| using | Trhs = typename FieldRHS::value_type |
| using | grad_type = Field< Vector< Tlhs, Dim >, Dim, Mesh, Centering > |
Public Member Functions | |
| PreconditionedFEMPoissonSolver (lhs_type &lhs, rhs_type &rhs) | |
| void | setRhs (rhs_type &rhs) override |
| LagrangeType & | getSpace () |
| Return the LagrangeSpace object. | |
| void | solve () override |
| Solve the poisson equation using finite element methods. The problem is described by -laplace(lhs) = rhs. | |
| int | getIterationCount () |
| Tlhs | getResidue () const |
| template<typename F > | |
| Tlhs | getL2Error (const F &analytic) |
| Tlhs | getAvg (bool Vol=false) |
Public Member Functions inherited from ippl::Poisson< FieldLHS, FieldRHS > | |
| Poisson () | |
| Poisson (lhs_type &lhs, rhs_type &rhs) | |
| template<typename T > | |
| void | updateParameter (const std::string &key, const T &value) |
| void | updateParameters (const ParameterList ¶ms) |
| void | mergeParameters (const ParameterList ¶ms) |
| virtual void | setLhs (lhs_type &lhs) |
| virtual MField_t * | getHessian () |
| void | setGradient (grad_type &grad) |
Protected Member Functions | |
| virtual void | setDefaultParameters () override |
Protected Attributes | |
| PCGSolverAlgorithm_t | pcg_algo_m |
| ElementType | refElement_m |
| QuadratureType | quadrature_m |
| LagrangeType | lagrangeSpace_m |
Protected Attributes inherited from ippl::Poisson< FieldLHS, FieldRHS > | |
| ParameterList | params_m |
| rhs_type * | rhs_mp = nullptr |
| lhs_type * | lhs_mp = nullptr |
| grad_type * | grad_mp |
A solver for the poisson equation using finite element methods and Conjugate Gradient (CG)
| FieldLHS | field type for the left hand side |
| FieldRHS | field type for the right hand side |
|
inline |
Query the average of the solution
| Vol | Boolean indicating whether we divide by volume or not |
|
inline |
Query how many iterations were required to obtain the solution the last time this solver was used
|
inline |
Query the L2-norm error compared to a given (analytical) sol
|
inline |
Query the residue
|
inlineoverrideprotectedvirtual |
Utility function for initializing a solver's default parameters (to be overridden for each base class)
Reimplemented from ippl::Poisson< FieldLHS, FieldRHS >.
|
inlineoverridevirtual |
Set the problem RHS
| rhs | Reference to problem RHS field |
Reimplemented from ippl::Poisson< FieldLHS, FieldRHS >.
|
inlineoverridevirtual |
Solve the poisson equation using finite element methods. The problem is described by -laplace(lhs) = rhs.
Implements ippl::Poisson< FieldLHS, FieldRHS >.