NewtonOptimizer

class NewtonOptimizer : public OptimizerBase

Subclassed by PartRegularizedNewtonOptimizer, ReducedNewtonOptimizer, RegularizedNewtonOptimizer

Public Functions

virtual void Solve(Vector &alpha, const Vector &sol, const VectorVector &moments, unsigned idx_cell = 0) override

Computes the optimal Lagrange multilpiers for the dual entropy minimization problem.

Parameters:
  • alpha – vector where the solution Lagrange multipliers are saved to.

  • u – moment vector

  • moments – VectorVector to the moment basis evaluated at all quadpoints

  • idx_cell – index of the cell where alpha should be computed (out of u)

virtual void SolveMultiCell(VectorVector &alpha, const VectorVector &sol, const VectorVector &moments, Vector &alpha_norms) override

Computes the optimal Lagrange multilpiers for the dual entropy minimization problem.

Parameters:
  • alpha – vector where the solution Lagrange multipliers are saved to.

  • u – moment vector

  • moments – VectorVector to the moment basis evaluated at all quadpoints

virtual double ComputeObjFunc(const Vector &alpha, const Vector &sol, const VectorVector &moments)

Computes the objective function grad = <eta(alpha*m)> - alpha*sol.

virtual void ComputeHessian(const Vector &alpha, const VectorVector &moments, Matrix &hessian)

Computes hessian of objective function and stores it in hessian grad = <mXm*eta*’(alpha*m)>

void ScaleQuadWeights(double velocityScale)

In 1D, this function scales the quadrature weigths to compute the entropy integrals in arbitrary (bounded) intervals.

Parameters:

velocityScale – :scaling factor of the symmetric velocity intervall with mean 0

virtual void ReconstructMoments(Vector &sol, const Vector &alpha, const VectorVector &moments) override

Reconstruct the moment sol from the Lagrange multiplier alpha.

Parameters:
  • sol – moment vector

  • alpha – Lagrange multipliers

  • moments – Moment basis

Protected Functions

virtual void ComputeGradient(const Vector &alpha, const Vector &sol, const VectorVector &moments, Vector &grad)

Computes gradient of objective function and stores it in grad grad = <m*eta*’(alpha*m)> - sol.

Protected Attributes

QuadratureBase *_quadrature

used quadrature

unsigned _nq

number of quadrature points

Vector _weights

quadrature weights, dim(_weights) = (_nq)

double _epsilon

Termination criterion for newton optimizer.

unsigned short _maxIterations

Max iterations of the newton solver.

double _delta

Newton Step Size.

unsigned short _maxLineSearches

Max amount of line searches for Newton Algo.