NewtonOptimizer¶
-
class
NewtonOptimizer: public OptimizerBase¶ Subclassed by PartRegularizedNewtonOptimizer, ReducedNewtonOptimizer, RegularizedNewtonOptimizer
Public Functions
-
void
Solve(Vector &alpha, 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 vectormoments: VectorVector to the moment basis evaluated at all quadpointsidx_cell: index of the cell where alpha should be computed (out of u)
-
void
SolveMultiCell(VectorVector &alpha, 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 vectormoments: VectorVector to the moment basis evaluated at all quadpoints
-
double
ComputeObjFunc(Vector &alpha, Vector &sol, const VectorVector &moments)¶ Computes the objective function grad = <eta(alpha*m)> - alpha*sol.
-
void
ComputeHessian(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
-
void
ReconstructMoments(Vector &sol, const Vector &alpha, const VectorVector &moments)¶ Reconstruct the moment sol from the Lagrange multiplier alpha.
- Parameters
sol: moment vectoralpha: Lagrange multipliersmoments: Moment basis
Protected Functions
-
void
ComputeGradient(Vector &alpha, 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.
-
void