JDFTx  1.7.0
LinearSolvable< Vector > Struct Template Referenceabstract

#include <Minimize.h>

Public Member Functions

virtual Vector hessian (const Vector &) const =0
 Return vector multiplied by the hessian of the objective function.
 
virtual Vector precondition (const Vector &v) const
 Override to enable preconditioning: return the preconditioned vector, given a vector.
 
virtual double sync (double x) const
 Override to synchronize scalars over MPI processes (if the same minimization is happening in sync over many processes)
 
int solve (const Vector &rhs, const MinimizeParams &params)
 

Public Attributes

Vector state
 the location of the minimum, obtained by solving hessian * state == rhs
 

Detailed Description

template<typename Vector>
struct LinearSolvable< Vector >

Interface (abstract base class) for linear conjugate gradients template which minimizes (1/2) dot(state, hessian*state) - dot(state, rhs) which is equivalent to the linear solve hessian * state == rhs

Template Parameters
VectorSame requirements as the Vector for Minimizable

Member Function Documentation

◆ solve()

template<typename Vector >
int LinearSolvable< Vector >::solve ( const Vector &  rhs,
const MinimizeParams params 
)

Solve the linear system hessian * state == rhs using conjugate gradients:

Returns
the number of iterations taken to achieve target tolerance

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