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

#include <solverdiagnostics.h>

Inheritance diagram for SolverDiagnostics:
Collaboration diagram for SolverDiagnostics:

Public Member Functions

 SolverDiagnostics (unsigned OF=OUTPUT_DEFAULT, DriveCaller *pOM=0)
 
virtual ~SolverDiagnostics (void)
 
void SetNoOutput (void)
 
void SetOutputMeter (DriveCaller *pOM)
 
void SetOutputDriveHandler (const DriveHandler *pDH)
 
void SetOutputFlags (unsigned OF)
 
void AddOutputFlags (unsigned OF)
 
void DelOutputFlags (unsigned OF)
 
MatrixHandler::Norm_t GetCondMatNorm (void) const
 
bool outputMeter (void) const
 
bool outputIters (void) const
 
bool outputRes (void) const
 
bool outputSol (void) const
 
bool outputJac (void) const
 
bool outputStep (void) const
 
bool outputBailout (void) const
 
bool outputCounter (void) const
 
bool outputMatrixConditionNumber (void) const
 
bool outputSolverConditionNumber (void) const
 
bool outputSolverConditionStat (void) const
 
bool outputCPUTime (void) const
 
bool outputMsg (void) const
 

Protected Types

enum  {
  OUTPUT_NONE = 0x0000, OUTPUT_ITERS = 0x0001, OUTPUT_RES = 0x0002, OUTPUT_SOL = 0x0004,
  OUTPUT_JAC = 0x0008, OUTPUT_BAILOUT = 0x0010, OUTPUT_MSG = 0x0020, OUTPUT_COUNTER = 0x0040,
  OUTPUT_MAT_COND_NUM_1 = 0x0080, OUTPUT_MAT_COND_NUM_INF = 0x0100, OUTPUT_SOLVER_COND_NUM = 0x0200, OUTPUT_SOLVER_COND_STAT = 0x400,
  OUTPUT_CPU_TIME = 0x800, OUTPUT_MAT_COND_NUM = OUTPUT_MAT_COND_NUM_1 | OUTPUT_MAT_COND_NUM_INF, OUTPUT_DEFAULT = OUTPUT_MSG, OUTPUT_STEP = (OUTPUT_ITERS | OUTPUT_RES | OUTPUT_SOL | OUTPUT_JAC | OUTPUT_MAT_COND_NUM | OUTPUT_SOLVER_COND_NUM),
  OUTPUT_MASK = 0x07FF
}
 

Protected Attributes

unsigned OutputFlags
 
DriveCallerpOutputMeter
 

Detailed Description

Definition at line 38 of file solverdiagnostics.h.

Member Enumeration Documentation

anonymous enum
protected
Enumerator
OUTPUT_NONE 
OUTPUT_ITERS 
OUTPUT_RES 
OUTPUT_SOL 
OUTPUT_JAC 
OUTPUT_BAILOUT 
OUTPUT_MSG 
OUTPUT_COUNTER 
OUTPUT_MAT_COND_NUM_1 
OUTPUT_MAT_COND_NUM_INF 
OUTPUT_SOLVER_COND_NUM 
OUTPUT_SOLVER_COND_STAT 
OUTPUT_CPU_TIME 
OUTPUT_MAT_COND_NUM 
OUTPUT_DEFAULT 
OUTPUT_STEP 
OUTPUT_MASK 

Definition at line 43 of file solverdiagnostics.h.

43  {
44  OUTPUT_NONE = 0x0000,
45 
46  OUTPUT_ITERS = 0x0001,
47  OUTPUT_RES = 0x0002,
48  OUTPUT_SOL = 0x0004,
49  OUTPUT_JAC = 0x0008,
50 
51  OUTPUT_BAILOUT = 0x0010,
52  OUTPUT_MSG = 0x0020,
53  OUTPUT_COUNTER = 0x0040,
54  OUTPUT_MAT_COND_NUM_1 = 0x0080,
55  OUTPUT_MAT_COND_NUM_INF = 0x0100,
56  OUTPUT_SOLVER_COND_NUM = 0x0200,
58  OUTPUT_CPU_TIME = 0x800,
62 
63  OUTPUT_MASK = 0x07FF
64  };

Constructor & Destructor Documentation

SolverDiagnostics::SolverDiagnostics ( unsigned  OF = OUTPUT_DEFAULT,
DriveCaller pOM = 0 
)

Definition at line 37 of file solverdiagnostics.cc.

References SetOutputFlags().

38 : pOutputMeter(pOM)
39 {
40  SetOutputFlags(OF);
41 }
void SetOutputFlags(unsigned OF)
DriveCaller * pOutputMeter

Here is the call graph for this function:

SolverDiagnostics::~SolverDiagnostics ( void  )
virtual

Definition at line 43 of file solverdiagnostics.cc.

References SetOutputFlags(), and SetOutputMeter().

44 {
45  SetOutputFlags(0);
46  SetOutputMeter(0);
47 }
void SetOutputMeter(DriveCaller *pOM)
void SetOutputFlags(unsigned OF)

Here is the call graph for this function:

Member Function Documentation

void SolverDiagnostics::AddOutputFlags ( unsigned  OF)

Definition at line 80 of file solverdiagnostics.cc.

References OutputFlags.

Referenced by InverseSolver::ReadData(), and Solver::ReadData().

81 {
82  OutputFlags |= OF;
83 }
void SolverDiagnostics::DelOutputFlags ( unsigned  OF)

Definition at line 86 of file solverdiagnostics.cc.

References OutputFlags.

Referenced by Solver::ReadData().

87 {
88  OutputFlags &= ~OF;
89 }
bool SolverDiagnostics::outputBailout ( void  ) const
inline

Definition at line 104 of file solverdiagnostics.h.

References OUTPUT_BAILOUT, and OutputFlags.

Referenced by BiCGStab::Solve(), NewtonRaphsonSolver::Solve(), Gmres::Solve(), and LineSearchSolver::Solve().

104  {
105  // NOTE: this is NOT conditioned by output meter
106  return (OutputFlags & OUTPUT_BAILOUT);
107  };
bool SolverDiagnostics::outputCounter ( void  ) const
inline
bool SolverDiagnostics::outputCPUTime ( void  ) const
inline
bool SolverDiagnostics::outputIters ( void  ) const
inline
bool SolverDiagnostics::outputJac ( void  ) const
inline

Definition at line 96 of file solverdiagnostics.h.

References OUTPUT_JAC, OutputFlags, and outputMeter().

Referenced by InverseDynamicsStepSolver::Advance(), DataManager::InitialJointAssembly(), LineSearchSolver::Jacobian(), and NewtonRaphsonSolver::Solve().

96  {
97  return outputMeter() && (OutputFlags & OUTPUT_JAC);
98  };
bool outputMeter(void) const

Here is the call graph for this function:

bool SolverDiagnostics::outputMatrixConditionNumber ( void  ) const
inline
bool SolverDiagnostics::outputMeter ( void  ) const
inline

Definition at line 80 of file solverdiagnostics.h.

References DriveCaller::dGet(), and pOutputMeter.

Referenced by outputIters(), outputJac(), outputRes(), outputSol(), and outputStep().

80  {
81  return (!pOutputMeter || pOutputMeter->dGet());
82  };
DriveCaller * pOutputMeter
virtual doublereal dGet(const doublereal &dVar) const =0

Here is the call graph for this function:

bool SolverDiagnostics::outputMsg ( void  ) const
inline
bool SolverDiagnostics::outputRes ( void  ) const
inline
bool SolverDiagnostics::outputSol ( void  ) const
inline
bool SolverDiagnostics::outputSolverConditionNumber ( void  ) const
inline
bool SolverDiagnostics::outputSolverConditionStat ( void  ) const
inline
bool SolverDiagnostics::outputStep ( void  ) const
inline

Definition at line 100 of file solverdiagnostics.h.

References OUTPUT_STEP, OutputFlags, and outputMeter().

Referenced by InverseSolver::Advance(), Solver::Advance(), InverseSolver::Prepare(), Solver::Prepare(), and Solver::Start().

100  {
101  return outputMeter() && (OutputFlags & OUTPUT_STEP);
102  };
bool outputMeter(void) const

Here is the call graph for this function:

void SolverDiagnostics::SetNoOutput ( void  )

Definition at line 50 of file solverdiagnostics.cc.

References OUTPUT_NONE, and OutputFlags.

Referenced by RTSolverBase::Init().

void SolverDiagnostics::SetOutputDriveHandler ( const DriveHandler pDH)

Definition at line 66 of file solverdiagnostics.cc.

References pOutputMeter, and DriveCaller::SetDrvHdl().

Referenced by Solver::Prepare().

67 {
68  if (pOutputMeter) {
69  pOutputMeter->SetDrvHdl(pDH);
70  }
71 }
DriveCaller * pOutputMeter
virtual void SetDrvHdl(const DriveHandler *pDH)
Definition: drive.cc:487

Here is the call graph for this function:

void SolverDiagnostics::SetOutputFlags ( unsigned  OF)
void SolverDiagnostics::SetOutputMeter ( DriveCaller pOM)

Definition at line 56 of file solverdiagnostics.cc.

References pOutputMeter.

Referenced by InverseSolver::Prepare(), Solver::Prepare(), InverseSolver::ReadData(), Solver::ReadData(), and ~SolverDiagnostics().

57 {
58  if (pOutputMeter) {
59  delete pOutputMeter;
60  }
61 
62  pOutputMeter = pOM;
63 }
DriveCaller * pOutputMeter

Member Data Documentation

DriveCaller* SolverDiagnostics::pOutputMeter
protected

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