MBDyn-1.7.3
|
#include <invsolver.h>
Public Member Functions | |
InverseSolver (MBDynParser &HP, const std::string &sInputFileName, const std::string &sOutputFileName, unsigned int nThreads, bool bParallel=false) | |
virtual | ~InverseSolver (void) |
virtual bool | Prepare (void) |
virtual bool | Start (void) |
virtual bool | Advance (void) |
std::ostream & | Restart (std::ostream &out, DataManager::eRestart type) const |
InverseDynamics::Type | GetProblemType (void) const |
void | GetWeight (InverseDynamics::Order iOrder, doublereal &dw1, doublereal &dw2) const |
Public Member Functions inherited from Solver | |
Solver (MBDynParser &HP, const std::string &sInputFileName, const std::string &sOutputFileName, unsigned int nThreads, bool bParallel=false) | |
virtual | ~Solver (void) |
void | Run (void) |
std::ostream & | Restart (std::ostream &out, DataManager::eRestart type) const |
virtual DataManager * | pGetDataManager (void) const |
virtual SolutionManager * | pGetSolutionManager (void) const |
virtual const LinSol & | GetLinearSolver (void) const |
virtual NonlinearSolver * | pGetNonlinearSolver (void) const |
virtual StepIntegrator * | pGetStepIntegrator (void) const |
virtual doublereal | dGetFinalTime (void) const |
virtual doublereal | dGetInitialTimeStep (void) const |
virtual clock_t | GetCPUTime (void) const |
virtual void | PrintResidual (const VectorHandler &Res, integer iIterCnt) const |
virtual void | PrintSolution (const VectorHandler &Sol, integer iIterCnt) const |
virtual void | CheckTimeStepLimit (doublereal dErr, doublereal dErrDiff) const throw (NonlinearSolver::TimeStepLimitExceeded, NonlinearSolver::MaxResidualExceeded) |
Public Member Functions inherited from SolverDiagnostics | |
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 Member Functions | |
void | ReadData (MBDynParser &HP) |
Protected Member Functions inherited from Solver | |
void | Eig (bool bNewLine=false) |
void | Flip (void) |
void | ReadData (MBDynParser &HP) |
SolutionManager *const | AllocateSolman (integer iNLD, integer iLWS=0) |
SolutionManager *const | AllocateSchurSolman (integer iStates) |
NonlinearSolver *const | AllocateNonlinearSolver () |
void | SetupSolmans (integer iStates, bool bCanBeParallel=false) |
doublereal | dGetInitialMaxTimeStep () const |
Protected Member Functions inherited from NonlinearSolverOptions | |
NonlinearSolverOptions (bool bHonorJacRequest=false, enum ScaleFlags eScaleFlags=SCALE_ALGEBRAIC_EQUATIONS_NO, doublereal dScaleAlgebraic=1.) | |
Definition at line 67 of file invsolver.h.
InverseSolver::InverseSolver | ( | MBDynParser & | HP, |
const std::string & | sInputFileName, | ||
const std::string & | sOutputFileName, | ||
unsigned int | nThreads, | ||
bool | bParallel = false |
||
) |
Definition at line 79 of file invsolver.cc.
References DEBUGCOUTFNAME.
|
virtual |
Definition at line 759 of file invsolver.cc.
References DEBUGCOUTFNAME, Solver::pDM, Solver::pdWorkSpace, pLambda, Solver::pNLS, Solver::pRegularSteps, Solver::pSM, Solver::pX, Solver::pXPrime, pXPrimePrime, SAFEDELETE, and SAFEDELETEARR.
|
virtual |
Reimplemented from Solver.
Definition at line 538 of file invsolver.cc.
References Solver::bOut, Solver::bOutputCounter, Solver::bSolConv, Solver::CurrStep, Solver::dCurrTimeStep, DEBUGCOUT, DEBUGCOUTFNAME, Solver::dFinalTime, TimeStepControl::dGetNewStepTime(), Solver::dMinTimeStep, Solver::dRefTimeStep, Solver::dSolTest, Solver::dTest, Solver::dTime, Solver::dTotErr, Solver::eStatus, StepIntegrator::GetIntegratorMaxIters(), DataManager::GetOutFile(), RTSolverBase::IsStopCommanded(), Solver::iStIter, Solver::iTotIter, RTSolverBase::Log(), Solver::lStep, MBDYN_EXCEPT_ARGS, mbdyn_set_stop_at_end_of_time_step(), mbdyn_stop_at_end_of_time_step(), StepIntegrator::NEWSTEP, DataManager::Output(), Solver::outputCounterPostfix, Solver::outputCounterPrefix, SolverDiagnostics::outputMsg(), SolverDiagnostics::outputStep(), Solver::pDM, pLambda, Solver::pNLS, Solver::pRegularSteps, Solver::pRTSolver, Solver::pTSC, Solver::pX, Solver::pXPrime, pXPrimePrime, StepIntegrator::REPEATSTEP, DataManager::SetTime(), Solver::SOLVER_STATUS_STARTED, Solver::sOutputFileName, RTSolverBase::StopCommanded(), NonlinearSolver::TotalAssembledJacobian(), RTSolverBase::Wait(), and MBDynErrBase::what().
Referenced by Start().
InverseDynamics::Type InverseSolver::GetProblemType | ( | void | ) | const |
Definition at line 889 of file invsolver.cc.
References ProblemType.
Referenced by DataManager::AssConstrJac(), DataManager::AssConstrRes(), and Prepare().
void InverseSolver::GetWeight | ( | InverseDynamics::Order | iOrder, |
doublereal & | dw1, | ||
doublereal & | dw2 | ||
) | const |
Definition at line 895 of file invsolver.cc.
References InverseDynamics::ACCELERATION, MBDYN_EXCEPT_ARGS, InverseDynamics::POSITION, and InverseDynamics::VELOCITY.
Referenced by DataManager::AssConstrJac(), and DataManager::AssConstrRes().
|
virtual |
Reimplemented from Solver.
Definition at line 93 of file invsolver.cc.
References LinSol::AddSolverFlags(), Solver::AFTER_INPUT, Solver::AllocateNonlinearSolver(), ASSERT, bFullResTest, Solver::bOutputCounter, Solver::bParallel, Solver::bScale, Solver::bSolConv, IncludeParser::Close(), SchurDataManager::CreatePartition(), Solver::CurrLinearSolver, Solver::dCurrTimeStep, DEBUG_LEVEL_MATCH, DEBUGCOUT, DEBUGCOUTFNAME, DEBUGLCOUT, Solver::dInitialTime, Solver::dInitialTimeStep, Solver::dMinTimeStep, Solver::dRefTimeStep, Solver::dTime, Solver::eAbortAfter, EMPTY, Solver::eStatus, SchurDataManager::GetDofsList(), StepIntegrator::GetIntegratorNumPreviousStates(), StepIntegrator::GetIntegratorNumUnknownStates(), DataManager::GetLogFile(), HighParser::GetMathParser(), DataManager::GetOutFile(), GetProblemType(), LinSol::GetSolverFlags(), LinSol::GetSolverName(), MathParser::GetSymbolTable(), SchurDataManager::HowManyDofs(), Solver::HP, DataManager::IDSetTest(), DataManager::iGetNumDofs(), Solver::iMaxIterations, TimeStepControl::Init(), RTSolverBase::Init(), SchurDataManager::INTERNAL, Solver::iNumDofs, Solver::iNumIntDofs, Solver::iNumLocDofs, Solver::iNumPreviousVectors, Solver::iUnkStates, DataManager::LinkToSolution(), SchurDataManager::LOCAL, Solver::lStep, Solver::MaxTimeStep, MBDYN_EXCEPT_ARGS, mbdyn_signal_init(), mbdyn_stop_at_end_of_time_step(), NonlinearSolverTest::MINMAX, MYDEBUG_JAC, MYDEBUG_MEM, MYDEBUG_PRED, MYDEBUG_RESIDUAL, MYDEBUG_SOL, NonlinearSolverTest::NONE, NonlinearSolverTest::NORM, SolverDiagnostics::OUTPUT_JAC, SolverDiagnostics::OUTPUT_RES, SolverDiagnostics::OUTPUT_SOL, SolverDiagnostics::outputCounter(), Solver::outputCounterPostfix, Solver::outputCounterPrefix, SolverDiagnostics::OutputFlags, DataManager::OutputPrepare(), SolverDiagnostics::outputStep(), StepIntegrator::OutputTypes(), DriveCaller::pCopy(), Solver::pCurrStepIntegrator, Solver::pDM, Solver::pDofs, Solver::pdWorkSpace, SchurDataManager::pGetDofsList(), DataManager::pGetDrvHdl(), Solver::pIntDofs, pLambda, Solver::pLocDofs, Solver::pNLS, SolverDiagnostics::pOutputMeter, Solver::pRegularSteps, Solver::pRTSolver, Solver::pSDM, Solver::pTSC, Solver::pX, Solver::pXPrime, pXPrimePrime, Solver::qX, Solver::qXPrime, ReadData(), MyVectorHandler::Reset(), Solver::ResTest, SAFENEW, SAFENEWARR, SAFENEWWITHCONSTRUCTOR, Solver::Scale, StepIntegrator::SetDataManager(), TimeStepControl::SetDriveHandler(), StepIntegrator::SetDriveHandler(), DriveCaller::SetDrvHdl(), SolverDiagnostics::SetOutputFlags(), SolverDiagnostics::SetOutputMeter(), NonlinearSolverTestScale::SetScale(), DataManager::SetScale(), LinSol::SetSolver(), NonlinearSolver::SetTest(), DataManager::SetTime(), RTSolverBase::Setup(), Solver::SetupSolmans(), DataManager::SetValue(), Solver::sInputFileName, Solver::SolTest, LinSol::SOLVER_FLAGS_ALLOWS_MT_ASS, Solver::SOLVER_STATUS_PREPARED, Solver::SOLVER_STATUS_UNINITIALIZED, Solver::sOutputFileName, SchurDataManager::TOTAL, LinSol::UMFPACK_SOLVER, InverseDynamics::UNDERDETERMINED_FULLY_ACTUATED, InverseDynamics::UNDERDETERMINED_UNDERACTUATED_COLLOCATED, and LinSol::Y12_SOLVER.
|
protected |
Definition at line 924 of file invsolver.cc.
References InverseDynamics::ACCELERATION, SolverDiagnostics::AddOutputFlags(), Solver::AFTER_ASSEMBLY, Solver::AFTER_DERIVATIVES, Solver::AFTER_DUMMY_STEPS, Solver::AFTER_INPUT, ASSERT, bFullResTest, NonlinearSolverOptions::bHonorJacRequest, MatrixFreeSolver::BICGSTAB, Solver::bKeepJac, Solver::bParallel, Solver::bScale, Solver::bTrueNewtonRaphson, Solver::CurrIntSolver, Solver::CurrLinearSolver, dDefaultMaxTimeStep, dDefaultTol, DEBUGCOUTFNAME, DEBUGLCOUT, MatrixFreeSolver::DEFAULT, NonlinearSolver::DEFAULT, Solver::dFinalTime, DriveOwner::dGet(), Solver::dGetInitialMaxTimeStep(), Solver::dInitialTime, Solver::dInitialTimeStep, Solver::dIterertiveEtaMax, Solver::dIterertiveTau, Solver::dIterTol, Solver::dMinTimeStep, dw1, dw2, Solver::eAbortAfter, END, Preconditioner::FULLJACOBIANMATRIX, InverseDynamics::FULLY_ACTUATED_COLLOCATED, InverseDynamics::FULLY_ACTUATED_NON_COLLOCATED, get_nprocs(), HighParser::GetDescription(), MBDynParser::GetDriveCaller(), HighParser::GetInt(), IncludeParser::GetLineData(), HighParser::GetReal(), LinSol::GetSolverName(), HighParser::GetWord(), HighParser::GetYesNoOrBool(), MatrixFreeSolver::GMRES, iDefaultIterationsBeforeAssembly, iDefaultMaxIterations, Solver::iIterationsBeforeAssembly, Solver::iIterativeMaxSteps, Solver::iMaxIterations, Solver::iPrecondSteps, HighParser::IsArg(), HighParser::IsKeyWord(), LASTKEYWORD, NonlinearSolver::MATRIXFREE, Solver::MaxTimeStep, MBDYN_EXCEPT_ARGS, Solver::MFSolverType, NonlinearSolverTest::MINMAX, MYDEBUG_INPUT, NonlinearSolver::NEWTONRAPHSON, NonlinearSolverTest::NONE, Solver::NonlinearSolverType, NonlinearSolverTest::NORM, OUTPUT, SolverDiagnostics::OUTPUT_BAILOUT, SolverDiagnostics::OUTPUT_DEFAULT, SolverDiagnostics::OUTPUT_ITERS, SolverDiagnostics::OUTPUT_JAC, SolverDiagnostics::OUTPUT_MSG, SolverDiagnostics::OUTPUT_NONE, SolverDiagnostics::OUTPUT_RES, SolverDiagnostics::OUTPUT_SOL, Solver::PcType, DriveOwner::pGetDriveCaller(), Solver::pRegularSteps, ProblemType, Solver::pRTSolver, Solver::pTSC, ReadLinSol(), ReadRTSolver(), ReadTimeStepData(), Solver::ResTest, SAFENEWWITHCONSTRUCTOR, DriveOwner::Set(), LinSol::SetNumThreads(), SolverDiagnostics::SetOutputFlags(), SolverDiagnostics::SetOutputMeter(), Solver::SolTest, InverseDynamics::UNDERDETERMINED_FULLY_ACTUATED, InverseDynamics::UNDERDETERMINED_UNDERACTUATED_COLLOCATED, and InverseDynamics::VELOCITY.
Referenced by Prepare().
std::ostream & InverseSolver::Restart | ( | std::ostream & | out, |
DataManager::eRestart | type | ||
) | const |
Definition at line 791 of file invsolver.cc.
References ASSERT, DataManager::ATEND, NonlinearSolverOptions::bHonorJacRequest, Solver::bKeepJac, Solver::bScale, Solver::bTrueNewtonRaphson, Solver::CurrLinearSolver, Solver::dDerivativesCoef, Solver::dDummyStepsRatio, Solver::dFinalTime, DataManager::dGetTime(), Solver::dInitialTimeStep, StepIntegrator::GetIntegratorDSolTol(), StepIntegrator::GetIntegratorDTol(), StepIntegrator::GetIntegratorMaxIters(), Solver::iDummyStepsNumber, Solver::iIterationsBeforeAssembly, DataManager::ITERATIONS, NonlinearSolver::MATRIXFREE, MBDYN_EXCEPT_ARGS, NonlinearSolverTest::MINMAX, NonlinearSolver::NEWTONRAPHSON, NO_OP, NonlinearSolverTest::NONE, Solver::NonlinearSolverType, NonlinearSolverTest::NORM, Solver::pDerivativeSteps, Solver::pDM, Solver::pDummySteps, Solver::pRegularSteps, RestartLinSol(), Solver::ResTest, Solver::SolTest, DataManager::TIME, and DataManager::TIMES.
|
virtual |
Reimplemented from Solver.
Definition at line 517 of file invsolver.cc.
References Advance(), DEBUGCOUTFNAME, Solver::eStatus, MBDYN_EXCEPT_ARGS, Solver::SOLVER_STATUS_PREPARED, and Solver::SOLVER_STATUS_STARTED.
|
protected |
Definition at line 75 of file invsolver.h.
Referenced by Prepare(), and ReadData().
|
protected |
Definition at line 70 of file invsolver.h.
Referenced by ReadData().
|
protected |
Definition at line 71 of file invsolver.h.
Referenced by ReadData().
|
protected |
Definition at line 73 of file invsolver.h.
Referenced by Advance(), Prepare(), and ~InverseSolver().
|
protected |
Definition at line 69 of file invsolver.h.
Referenced by GetProblemType(), and ReadData().
|
protected |
Definition at line 72 of file invsolver.h.
Referenced by Advance(), Prepare(), and ~InverseSolver().