OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::LineSearchNM Class Reference

This base class is an abstraction/implementation for numerical method solving line search optimization problem. More...

#include <linesearch.h>

+ Inheritance diagram for oofem::LineSearchNM:
+ Collaboration diagram for oofem::LineSearchNM:

Public Types

enum  LS_status { ls_ok, ls_failed }
 

Public Member Functions

 LineSearchNM (Domain *d, EngngModel *m)
 Constructor. More...
 
virtual NM_Status 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. More...
 
virtual IRResultType initializeFrom (InputRecord *ir)
 
virtual const char * giveClassName () const
 
- Public Member Functions inherited from oofem::NumericalMethod
 NumericalMethod (Domain *d, EngngModel *m)
 Constructor. More...
 
virtual ~NumericalMethod ()
 Destructor. More...
 
EngngModelgiveEngngModel ()
 
virtual void reinitialize ()
 Reinitializes the receiver. More...
 
virtual void setDomain (Domain *d)
 
virtual contextIOResultType saveContext (DataStream &stream, ContextMode mode, void *obj=NULL)
 
virtual contextIOResultType restoreContext (DataStream &stream, ContextMode mode, void *obj=NULL)
 

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
Domaindomain
 Pointer to domain. More...
 
EngngModelengngModel
 Pointer to engineering model. More...
 

Detailed Description

This base class is an abstraction/implementation for numerical method solving line search optimization problem.

Definition at line 60 of file linesearch.h.

Member Enumeration Documentation

Enumerator
ls_ok 
ls_failed 

Definition at line 63 of file linesearch.h.

Constructor & Destructor Documentation

oofem::LineSearchNM::LineSearchNM ( Domain d,
EngngModel m 
)

Constructor.

Definition at line 44 of file linesearch.C.

References amplifFactor, ls_tolerance, max_iter, maxEta, and minEta.

Member Function Documentation

virtual const char* oofem::LineSearchNM::giveClassName ( ) const
inlinevirtual

Definition at line 95 of file linesearch.h.

void oofem::LineSearchNM::search ( int  istep,
FloatArray prod,
FloatArray eta,
double  amp,
double  maxeta,
double  mineta,
int &  status 
)
protected

Definition at line 160 of file linesearch.C.

References oofem::FloatArray::at(), and oofem::max().

Referenced by solve().

NM_Status oofem::LineSearchNM::solve ( FloatArray r,
FloatArray dr,
FloatArray F,
FloatArray R,
FloatArray R0,
IntArray eqnmask,
double  lambda,
double &  etaValue,
LS_status status,
TimeStep tStep 
)
virtual

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.

Parameters
rOld total solution.
drIncrement of solution.
FOld InternalRhs (real internal forces).
RReference incremental Rhs (incremental load).
R0Initial Rhs (initial load).
eqnmaskEquation numbers to mask out from computations.
lambdaScaling of R.
etaValueReached eta value.
statusLinesearch status
tStepTime step.

Definition at line 55 of file linesearch.C.

References oofem::FloatArray::add(), amplifFactor, oofem::FloatArray::at(), 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, NM_NoSuccess, NM_Success, OOFEM_LOG_DEBUG, prod, oofem::FloatArray::resize(), search(), oofem::FloatArray::times(), and oofem::EngngModel::updateComponent().

Referenced by oofem::NRSolver::solve().

Member Data Documentation

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.

Referenced by solve().

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.

Referenced by solve().


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

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:37 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011