NuTo
Numerics Tool
Public Member Functions | List of all members
NuTo::NewtonRaphson::LineSearchImplementation< TInfo > Class Template Reference

Performs the line search algorithm based on the results of a single newton iteration step. More...

#include <LineSearch.h>

Public Member Functions

constexpr LineSearchImplementation (TInfo info, int maxNumLineSearchSteps)
 ctor More...
 
template<typename TProblem , typename TX >
bool operator() (TProblem &&problem, TX *r, TX *x, TX dx) const
 actual line search implementation More...
 

Detailed Description

template<typename TInfo>
class NuTo::NewtonRaphson::LineSearchImplementation< TInfo >

Performs the line search algorithm based on the results of a single newton iteration step.

Constructor & Destructor Documentation

template<typename TInfo>
constexpr NuTo::NewtonRaphson::LineSearchImplementation< TInfo >::LineSearchImplementation ( TInfo  info,
int  maxNumLineSearchSteps 
)
inline

ctor

Parameters
maxNumLineSearchStepsmaximal number of line search steps

Member Function Documentation

template<typename TInfo>
template<typename TProblem , typename TX >
bool NuTo::NewtonRaphson::LineSearchImplementation< TInfo >::operator() ( TProblem &&  problem,
TX *  r,
TX *  x,
TX  dx 
) const
inline

actual line search implementation

Remarks
several return arguments are used to help inlining everything. A lot of time went into actual benchmarking. Dunno why, but the a previous version that avoids the return arguments and returns various values in a std::tuple was significantly slower (10%) in a benchmark for a scalar function
Parameters
problemclass that implements NormFunction, ResidualFunction and mTolerance
rresidual, return argument, see remark
xvalue of the argument x, return argument, see remark
dxdx from the solver

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