|
IPPL (Independent Parallel Particle Layer)
IPPL
|
A solver for the poisson equation using finite element methods and Conjugate Gradient (CG). More...
#include <FEMPoissonSolver.h>
Public Types | |
| using | Base = Poisson<FieldLHS, FieldRHS> |
| using | MeshType = typename FieldRHS::Mesh_t |
| using | PCGSolverAlgorithm_t |
| using | ElementType |
| using | QuadratureType = GaussJacobiQuadrature<Tlhs, QuadNumNodes, ElementType> |
| using | LagrangeType = LagrangeSpace<Tlhs, Dim, Order, ElementType, QuadratureType, FieldLHS, FieldRHS> |
| using | lhs_type |
| using | rhs_type |
| enum | OutputType |
| using | Trhs |
| using | grad_type |
Public Member Functions | |
| FEMPoissonSolver () | |
| FEMPoissonSolver (lhs_type &lhs, rhs_type &rhs) | |
| void | setRhs (rhs_type &rhs) override |
| 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) |
| void | updateParameter (const std::string &key, const T &value) |
| void | updateParameters (const ParameterList ¶ms) |
| void | mergeParameters (const ParameterList ¶ms) |
| void | setLhs (lhs_type &lhs) |
| virtual void | setRhs (rhs_type &rhs) |
| virtual MField_t * | getHessian () |
| void | setGradient (grad_type &grad) |
Protected Member Functions | |
| virtual void | setDefaultParameters () override |
Private Types | |
| using | Tlhs = typename FieldLHS::value_type |
| typedef FieldLHS::Mesh_t | Mesh |
| typedef FieldLHS::Centering_t | Centering |
| typedef Mesh::matrix_type | Matrix_t |
| typedef Field< Matrix_t, Dim, Mesh, CenteringCentering > | MField_t |
Static Private Attributes | |
| static constexpr unsigned | Dim = FieldLHS::dim |
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 |
Definition at line 37 of file FEMPoissonSolver.h.
| using ippl::FEMPoissonSolver< FieldLHS, FieldRHS, Order, QuadNumNodes >::Base = Poisson<FieldLHS, FieldRHS> |
Definition at line 42 of file FEMPoissonSolver.h.
|
privateinherited |
| using ippl::FEMPoissonSolver< FieldLHS, FieldRHS, Order, QuadNumNodes >::ElementType |
Definition at line 51 of file FEMPoissonSolver.h.
|
inherited |
| using ippl::FEMPoissonSolver< FieldLHS, FieldRHS, Order, QuadNumNodes >::LagrangeType = LagrangeSpace<Tlhs, Dim, Order, ElementType, QuadratureType, FieldLHS, FieldRHS> |
Definition at line 58 of file FEMPoissonSolver.h.
| using ippl::Poisson< FieldLHS, FieldRHS >::lhs_type |
|
privateinherited |
|
privateinherited |
| using ippl::FEMPoissonSolver< FieldLHS, FieldRHS, Order, QuadNumNodes >::MeshType = typename FieldRHS::Mesh_t |
Definition at line 44 of file FEMPoissonSolver.h.
| using ippl::FEMPoissonSolver< FieldLHS, FieldRHS, Order, QuadNumNodes >::PCGSolverAlgorithm_t |
Definition at line 47 of file FEMPoissonSolver.h.
| using ippl::FEMPoissonSolver< FieldLHS, FieldRHS, Order, QuadNumNodes >::QuadratureType = GaussJacobiQuadrature<Tlhs, QuadNumNodes, ElementType> |
Definition at line 56 of file FEMPoissonSolver.h.
| using ippl::Poisson< FieldLHS, FieldRHS >::rhs_type |
|
private |
Definition at line 39 of file FEMPoissonSolver.h.
|
inherited |
|
inherited |
|
inline |
Definition at line 61 of file FEMPoissonSolver.h.
References Dim, lagrangeSpace_m, quadrature_m, and refElement_m.
|
inline |
Definition at line 69 of file FEMPoissonSolver.h.
References IpplTimings::getTimer(), lagrangeSpace_m, quadrature_m, refElement_m, setDefaultParameters(), IpplTimings::startTimer(), and IpplTimings::stopTimer().
|
inline |
Query the average of the solution
| vol | Boolean indicating whether we divide by volume or not |
Definition at line 199 of file FEMPoissonSolver.h.
References lagrangeSpace_m, and ippl::Poisson< FieldLHS, FieldLHS >::lhs_mp.
|
inlinevirtualinherited |
|
inline |
Query how many iterations were required to obtain the solution the last time this solver was used
Definition at line 176 of file FEMPoissonSolver.h.
References pcg_algo_m.
|
inline |
Query the L2-norm error compared to a given (analytical) sol
Definition at line 189 of file FEMPoissonSolver.h.
References lagrangeSpace_m, and ippl::Poisson< FieldLHS, FieldLHS >::lhs_mp.
|
inline |
Query the residue
Definition at line 182 of file FEMPoissonSolver.h.
References pcg_algo_m.
|
inlineinherited |
|
inlineoverrideprotectedvirtual |
Utility function for initializing a solver's default parameters (to be overridden for each base class)
Reimplemented from ippl::Poisson< FieldLHS, FieldLHS >.
Definition at line 214 of file FEMPoissonSolver.h.
References ippl::Poisson< FieldLHS, FieldLHS >::params_m.
Referenced by FEMPoissonSolver().
|
inlineinherited |
|
inlineinherited |
|
inlineoverride |
Definition at line 90 of file FEMPoissonSolver.h.
References lagrangeSpace_m, and ippl::Poisson< FieldLHS, FieldRHS >::setRhs().
|
inlinevirtualinherited |
|
inlineoverridevirtual |
Solve the poisson equation using finite element methods. The problem is described by -laplace(lhs) = rhs.
Implements ippl::Poisson< FieldLHS, FieldLHS >.
Definition at line 106 of file FEMPoissonSolver.h.
References ippl::CONSTANT_FACE, ippl::get(), IpplTimings::getTimer(), ippl::Poisson< FieldLHS, FieldRHS >::GRAD, ippl::grad(), ippl::Poisson< FieldLHS, FieldLHS >::grad_mp, lagrangeSpace_m, ippl::Poisson< FieldLHS, FieldLHS >::lhs_mp, ippl::Poisson< FieldLHS, FieldLHS >::params_m, pcg_algo_m, refElement_m, ippl::Poisson< FieldLHS, FieldLHS >::rhs_mp, solve(), IpplTimings::startTimer(), and IpplTimings::stopTimer().
Referenced by solve().
|
inlineinherited |
Update one of the solver's parameters
| key | The parameter key |
| value | The new value |
| IpplException | Fails if there is no existing parameter with the given key |
|
inlineinherited |
Updates all solver parameters based on values in another parameter set
| params | Parameter list with updated values |
| IpplException | Fails if the provided parameter list includes keys not already present |
|
staticconstexprprivate |
Definition at line 38 of file FEMPoissonSolver.h.
Referenced by FEMPoissonSolver().
|
protectedinherited |
Definition at line 125 of file Poisson.h.
Referenced by ippl::FEMPoissonSolver< FieldLHS, FieldRHS, Order, QuadNumNodes >::solve(), and ippl::PreconditionedFEMPoissonSolver< FieldLHS, FieldRHS >::solve().
|
protected |
Definition at line 221 of file FEMPoissonSolver.h.
Referenced by FEMPoissonSolver(), FEMPoissonSolver(), getAvg(), getL2Error(), setRhs(), and solve().
|
protectedinherited |
Definition at line 123 of file Poisson.h.
Referenced by ippl::FEMPoissonSolver< FieldLHS, FieldRHS, Order, QuadNumNodes >::getAvg(), ippl::PreconditionedFEMPoissonSolver< FieldLHS, FieldRHS >::getAvg(), ippl::FEMPoissonSolver< FieldLHS, FieldRHS, Order, QuadNumNodes >::getL2Error(), ippl::PreconditionedFEMPoissonSolver< FieldLHS, FieldRHS >::getL2Error(), ippl::FEMPoissonSolver< FieldLHS, FieldRHS, Order, QuadNumNodes >::solve(), and ippl::PreconditionedFEMPoissonSolver< FieldLHS, FieldRHS >::solve().
|
protectedinherited |
Definition at line 120 of file Poisson.h.
Referenced by ippl::FEMPoissonSolver< FieldLHS, FieldRHS, Order, QuadNumNodes >::setDefaultParameters(), ippl::PreconditionedFEMPoissonSolver< FieldLHS, FieldRHS >::setDefaultParameters(), ippl::FEMPoissonSolver< FieldLHS, FieldRHS, Order, QuadNumNodes >::solve(), and ippl::PreconditionedFEMPoissonSolver< FieldLHS, FieldRHS >::solve().
|
protected |
Definition at line 212 of file FEMPoissonSolver.h.
Referenced by getIterationCount(), getResidue(), and solve().
|
protected |
Definition at line 220 of file FEMPoissonSolver.h.
Referenced by FEMPoissonSolver(), and FEMPoissonSolver().
|
protected |
Definition at line 219 of file FEMPoissonSolver.h.
Referenced by FEMPoissonSolver(), FEMPoissonSolver(), and solve().
|
protectedinherited |
Definition at line 122 of file Poisson.h.
Referenced by ippl::FEMPoissonSolver< FieldLHS, FieldRHS, Order, QuadNumNodes >::solve(), and ippl::PreconditionedFEMPoissonSolver< FieldLHS, FieldRHS >::solve().