|
OOFEM 3.0
|
#include <linesearch.h>
Public Types | |
| enum | LS_status { ls_ok , ls_failed } |
Public Member Functions | |
| LineSearchNM (Domain *d, EngngModel *m) | |
| Constructor. | |
| ConvergedReason | solve (FloatArray &r, FloatArray &dr, FloatArray &F, FloatArray &R, FloatArray *R0, IntArray &eqnmask, double lambda, double &etaValue, LS_status &status, TimeStep *tStep) |
| void | initializeFrom (InputRecord &ir) override |
| const char * | giveClassName () const |
| Public Member Functions inherited from oofem::NumericalMethod | |
| NumericalMethod (Domain *d, EngngModel *m) | |
| virtual | ~NumericalMethod () |
| Destructor. | |
| EngngModel * | giveEngngModel () |
| virtual void | reinitialize () |
| virtual void | setDomain (Domain *d) |
| virtual void | saveContext (DataStream &stream, ContextMode mode) |
| virtual void | restoreContext (DataStream &stream, ContextMode mode) |
Public Attributes | |
| int | max_iter |
| double | ls_tolerance |
| double | amplifFactor |
| double | maxEta |
| double | minEta |
| FloatArray | eta |
| FloatArray | prod |
Protected Member Functions | |
| void | search (int istep, FloatArray &prod, FloatArray &eta, double amp, double maxeta, double mineta, int &status) |
Additional Inherited Members | |
| Protected Attributes inherited from oofem::NumericalMethod | |
| Domain * | domain |
| Pointer to domain. | |
| EngngModel * | engngModel |
| Pointer to engineering model. | |
This base class is an abstraction/implementation for numerical method solving line search optimization problem.
Definition at line 60 of file linesearch.h.
| Enumerator | |
|---|---|
| ls_ok | |
| ls_failed | |
Definition at line 63 of file linesearch.h.
| oofem::LineSearchNM::LineSearchNM | ( | Domain * | d, |
| EngngModel * | m ) |
Constructor.
Definition at line 44 of file linesearch.C.
References amplifFactor, ls_tolerance, max_iter, maxEta, minEta, and oofem::NumericalMethod::NumericalMethod().
|
inline |
Definition at line 95 of file linesearch.h.
|
overridevirtual |
Reimplemented from oofem::NumericalMethod.
Definition at line 247 of file linesearch.C.
References _IFT_LineSearchNM_lsearchamp, _IFT_LineSearchNM_lsearchmaxeta, _IFT_LineSearchNM_lsearchtol, amplifFactor, IR_GIVE_OPTIONAL_FIELD, ls_tolerance, and maxEta.
|
protected |
Definition at line 160 of file linesearch.C.
References eta, oofem::max(), and prod.
Referenced by solve().
| ConvergedReason oofem::LineSearchNM::solve | ( | FloatArray & | r, |
| FloatArray & | dr, | ||
| FloatArray & | F, | ||
| FloatArray & | R, | ||
| FloatArray * | R0, | ||
| IntArray & | eqnmask, | ||
| double | lambda, | ||
| double & | etaValue, | ||
| LS_status & | status, | ||
| TimeStep * | tStep ) |
Solves the line search optimization problem in the form of \( g(r)=0; r_{new}=r_{old}+\eta\delta r; 0 < \eta < 1 \), The aim is to find \( \eta \) so that the \( g(r) \) has decreased sufficiently. The total solution vector is updated at exit as well as InternalRhs vector.
| r | Old total solution. |
| dr | Increment of solution. |
| F | Old InternalRhs (real internal forces). |
| R | Reference incremental Rhs (incremental load). |
| R0 | Initial Rhs (initial load). |
| eqnmask | Equation numbers to mask out from computations. |
| lambda | Scaling of R. |
| etaValue | Reached eta value. |
| status | Linesearch status |
| tStep | Time step. |
Definition at line 55 of file linesearch.C.
References oofem::FloatArray::add(), amplifFactor, oofem::CR_CONVERGED, oofem::CR_DIVERGED_ITS, oofem::NumericalMethod::domain, oofem::NumericalMethod::engngModel, eta, oofem::FloatArray::giveSize(), oofem::TimeStep::incrementStateCounter(), oofem::InternalRhs, ls_failed, ls_ok, ls_tolerance, max_iter, maxEta, minEta, OOFEM_LOG_DEBUG, prod, search(), and oofem::FloatArray::times().
| double oofem::LineSearchNM::amplifFactor |
Definition at line 67 of file linesearch.h.
Referenced by initializeFrom(), LineSearchNM(), and solve().
| FloatArray oofem::LineSearchNM::eta |
Definition at line 69 of file linesearch.h.
| double oofem::LineSearchNM::ls_tolerance |
Definition at line 66 of file linesearch.h.
Referenced by initializeFrom(), LineSearchNM(), and solve().
| int oofem::LineSearchNM::max_iter |
Definition at line 65 of file linesearch.h.
Referenced by LineSearchNM(), and solve().
| double oofem::LineSearchNM::maxEta |
Definition at line 68 of file linesearch.h.
Referenced by initializeFrom(), LineSearchNM(), and solve().
| double oofem::LineSearchNM::minEta |
Definition at line 68 of file linesearch.h.
Referenced by LineSearchNM(), and solve().
| FloatArray oofem::LineSearchNM::prod |
Definition at line 70 of file linesearch.h.