IPPL API Reference
Independent Parallel Particle Layer C++ API
Loading...
Searching...
No Matches
ippl::Poisson< FieldLHS, FieldRHS > Class Template Referenceabstract
+ Inheritance diagram for ippl::Poisson< FieldLHS, FieldRHS >:
+ Collaboration diagram for ippl::Poisson< FieldLHS, FieldRHS >:

Public Types

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

 Poisson ()
 
 Poisson (lhs_type &lhs, rhs_type &rhs)
 
template<typename T >
void updateParameter (const std::string &key, const T &value)
 
void updateParameters (const ParameterList &params)
 
void mergeParameters (const ParameterList &params)
 
virtual void setLhs (lhs_type &lhs)
 
virtual void setRhs (rhs_type &rhs)
 
virtual MField_tgetHessian ()
 
void setGradient (grad_type &grad)
 
virtual void solve ()=0
 

Protected Member Functions

virtual void setDefaultParameters ()
 

Protected Attributes

ParameterList params_m
 
rhs_type * rhs_mp = nullptr
 
lhs_type * lhs_mp = nullptr
 
grad_typegrad_mp
 

Member Enumeration Documentation

◆ OutputType

template<typename FieldLHS , typename FieldRHS >
enum ippl::Poisson::OutputType

Represents the types of fields that should be output by the solver

Constructor & Destructor Documentation

◆ Poisson()

template<typename FieldLHS , typename FieldRHS >
ippl::Poisson< FieldLHS, FieldRHS >::Poisson ( )
inline

Default constructor for electrostatic solvers; desired output type defaults to solution only

Member Function Documentation

◆ getHessian()

template<typename FieldLHS , typename FieldRHS >
virtual MField_t * ippl::Poisson< FieldLHS, FieldRHS >::getHessian ( )
inlinevirtual

Get the Hessian matrix of the solution

Returns
Matrix field containing the Hessian of the lhs

Reimplemented in ippl::FFTOpenPoissonSolver< FieldLHS, FieldRHS >.

◆ mergeParameters()

template<typename FieldLHS , typename FieldRHS >
void ippl::Poisson< FieldLHS, FieldRHS >::mergeParameters ( const ParameterList params)
inline

Merges another parameter set into the solver's parameters, overwriting existing parameters in case of conflict

Parameters
paramsParameter list with desired values

◆ setDefaultParameters()

template<typename FieldLHS , typename FieldRHS >
virtual void ippl::Poisson< FieldLHS, FieldRHS >::setDefaultParameters ( )
inlineprotectedvirtual

◆ setGradient()

template<typename FieldLHS , typename FieldRHS >
void ippl::Poisson< FieldLHS, FieldRHS >::setGradient ( grad_type grad)
inline

Set the field in which the gradient of the computed potential should be stored

Parameters
gradReference to field in which to store the gradient

◆ setLhs()

template<typename FieldLHS , typename FieldRHS >
virtual void ippl::Poisson< FieldLHS, FieldRHS >::setLhs ( lhs_type &  lhs)
inlinevirtual

Set the problem LHS

Parameters
lhsReference to problem LHS field

Reimplemented in ippl::PoissonCG< FieldLHS, FieldRHS >.

◆ setRhs()

template<typename FieldLHS , typename FieldRHS >
virtual void ippl::Poisson< FieldLHS, FieldRHS >::setRhs ( rhs_type &  rhs)
inlinevirtual

◆ solve()

◆ updateParameter()

template<typename FieldLHS , typename FieldRHS >
template<typename T >
void ippl::Poisson< FieldLHS, FieldRHS >::updateParameter ( const std::string &  key,
const T &  value 
)
inline

Update one of the solver's parameters

Parameters
keyThe parameter key
valueThe new value
Exceptions
IpplExceptionFails if there is no existing parameter with the given key

◆ updateParameters()

template<typename FieldLHS , typename FieldRHS >
void ippl::Poisson< FieldLHS, FieldRHS >::updateParameters ( const ParameterList params)
inline

Updates all solver parameters based on values in another parameter set

Parameters
paramsParameter list with updated values
Exceptions
IpplExceptionFails if the provided parameter list includes keys not already present

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