MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
NonlinearSolverTestMinMax Class Reference

#include <nonlin.h>

Inheritance diagram for NonlinearSolverTestMinMax:
Collaboration diagram for NonlinearSolverTestMinMax:

Public Member Functions

virtual void TestOne (doublereal &dRes, const VectorHandler &Vec, const integer &iIndex, doublereal dCoef) const
 
virtual void TestMerge (doublereal &dResCurr, const doublereal &dResNew) const
 
- Public Member Functions inherited from NonlinearSolverTest
virtual ~NonlinearSolverTest (void)
 
virtual doublereal MakeTest (Solver *pS, const integer &Size, const VectorHandler &Vec, bool bResidual=false, doublereal dScaleAlgEqu=1., doublereal *pTestDiff=0)
 
virtual doublereal TestPost (const doublereal &dRes) const
 
virtual const doublerealdScaleCoef (const integer &iIndex) const
 

Additional Inherited Members

- Public Types inherited from NonlinearSolverTest
enum  Type { NONE, NORM, MINMAX, LASTNONLINEARSOLVERTEST }
 

Detailed Description

Definition at line 127 of file nonlin.h.

Member Function Documentation

void NonlinearSolverTestMinMax::TestMerge ( doublereal dResCurr,
const doublereal dResNew 
) const
virtual

Implements NonlinearSolverTest.

Reimplemented in NonlinearSolverTestScaleMinMax.

Definition at line 251 of file nonlin.cc.

References ASSERT.

Referenced by NonlinearSolverTestScaleMinMax::TestMerge().

253 {
254  ASSERT(dResCurr >= 0.);
255  ASSERT(dResNew >= 0.);
256 
257  if (dResNew > dResCurr) {
258  dResCurr = dResNew;
259  }
260 }
#define ASSERT(expression)
Definition: colamd.c:977
void NonlinearSolverTestMinMax::TestOne ( doublereal dRes,
const VectorHandler Vec,
const integer iIndex,
doublereal  dCoef 
) const
virtual

Implements NonlinearSolverTest.

Reimplemented in NonlinearSolverTestScaleMinMax.

Definition at line 240 of file nonlin.cc.

References grad::fabs().

242 {
243  doublereal d = fabs(Vec(iIndex)) * dCoef;
244 
245  if (!(d < dRes)) { // this will work also if d equal nan
246  dRes = d;
247  }
248 }
GradientExpression< UnaryExpr< FuncFabs, Expr > > fabs(const GradientExpression< Expr > &u)
Definition: gradient.h:2973
double doublereal
Definition: colamd.c:52

Here is the call graph for this function:


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