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

#include <thirdorderstepsol.h>

Inheritance diagram for TunableThirdOrderIntegrator:
Collaboration diagram for TunableThirdOrderIntegrator:

Public Member Functions

 TunableThirdOrderIntegrator (const doublereal dT, const doublereal dSolutionTol, const integer iMaxIt, const DriveCaller *pRho, const bool bmod_res_test)
 
virtual ~TunableThirdOrderIntegrator (void)
 
void SetDriveHandler (const DriveHandler *pDH)
 
- Public Member Functions inherited from ThirdOrderIntegrator
 ThirdOrderIntegrator (const doublereal dT, const doublereal dSolutionTol, const integer iMaxIt, const bool bmod_res_test)
 
virtual ~ThirdOrderIntegrator (void)
 
virtual void Residual (VectorHandler *pRes) const
 
virtual void Jacobian (MatrixHandler *pJac) const
 
virtual void Update (const VectorHandler *pSol) const
 
virtual doublereal Advance (Solver *pS, const doublereal TStep, const doublereal dAlph, const StepChange StType, std::deque< MyVectorHandler * > &qX, std::deque< MyVectorHandler * > &qXPrime, MyVectorHandler *const pX, MyVectorHandler *const pXPrime, integer &EffIter, doublereal &Err, doublereal &SolErr)
 
- Public Member Functions inherited from ImplicitStepIntegrator
 ImplicitStepIntegrator (const integer MaxIt, const doublereal dT, const doublereal dSolutionTol, const integer stp, const integer sts, const bool bmod_res_test)
 
virtual ~ImplicitStepIntegrator (void)
 
virtual void EvalProd (doublereal Tau, const VectorHandler &f0, const VectorHandler &w, VectorHandler &z) const
 
virtual doublereal TestScale (const NonlinearSolverTest *pTest, doublereal &dCoef) const
 
- Public Member Functions inherited from StepIntegrator
 StepIntegrator (const integer MaxIt, const doublereal dT, const doublereal dSolutionTol, const integer stp, const integer sts)
 
virtual ~StepIntegrator (void)
 
void SetDataManager (DataManager *pDatMan)
 
virtual integer GetIntegratorNumPreviousStates (void) const
 
virtual integer GetIntegratorNumUnknownStates (void) const
 
virtual integer GetIntegratorMaxIters (void) const
 
virtual doublereal GetIntegratorDTol (void) const
 
virtual doublereal GetIntegratorDSolTol (void) const
 
virtual void OutputTypes (const bool fpred)
 
- Public Member Functions inherited from NonlinearProblem
virtual ~NonlinearProblem (void)
 

Protected Member Functions

void SetCoef (doublereal dT, doublereal dAlpha, enum StepChange NewStep)
 
- Protected Member Functions inherited from ThirdOrderIntegrator
void PredictDof_for_AfterPredict (const int DCount, const DofOrder::Order Order, const VectorHandler *const pSol=0) const
 
void RealPredictDof (const int DCount, const DofOrder::Order Order, const VectorHandler *const pSol=0) const
 
void UpdateDof (const int DCount, const DofOrder::Order Order, const VectorHandler *const pSol=0) const
 
virtual void Predict (void)
 
- Protected Member Functions inherited from StepIntegrator
template<class T >
void UpdateLoop (const T *const t, void(T::*pUpd)(const int DCount, const DofOrder::Order Order, const VectorHandler *const pSol) const, const VectorHandler *const pSol=0) const
 

Private Attributes

DriveOwner Rho
 

Additional Inherited Members

- Public Types inherited from StepIntegrator
enum  { DIFFERENTIAL = 0, ALGEBRAIC = 1 }
 
enum  StepChange { NEWSTEP, REPEATSTEP }
 
- Protected Attributes inherited from ThirdOrderIntegrator
VectorHandlerpXPrev
 
VectorHandlerpXPrimePrev
 
doublereal dT
 
doublereal rho
 
doublereal theta
 
doublereal w0
 
doublereal w1
 
doublereal w2
 
doublereal jx11
 
doublereal jx12
 
doublereal jx21
 
doublereal jx22
 
doublereal m0
 
doublereal m1
 
doublereal n0
 
doublereal n1
 
bool bAdvanceCalledFirstTime
 
MyVectorHandler Restmp
 
std::vector< boolEqIsAlgebraic
 
std::vector< boolEqIsDifferential
 
SpMapMatrixHandler Jacxi_xp
 
SpMapMatrixHandler Jacxi_x
 
SpMapMatrixHandler Jac_xp
 
SpMapMatrixHandler Jac_x
 
MatrixHandlerpJacxi_xp
 
MatrixHandlerpJacxi_x
 
MatrixHandlerpJac_xp
 
MatrixHandlerpJac_x
 
- Protected Attributes inherited from ImplicitStepIntegrator
VectorHandlerpXCurr
 
VectorHandlerpXPrimeCurr
 
bool bModResTest
 
- Protected Attributes inherited from StepIntegrator
DataManagerpDM
 
const DataManager::DofVecTypepDofs
 
bool outputPred
 
integer MaxIters
 
doublereal dTol
 
doublereal dSolTol
 
integer steps
 
integer unkstates
 

Detailed Description

Definition at line 107 of file thirdorderstepsol.h.

Constructor & Destructor Documentation

TunableThirdOrderIntegrator::TunableThirdOrderIntegrator ( const doublereal  dT,
const doublereal  dSolutionTol,
const integer  iMaxIt,
const DriveCaller pRho,
const bool  bmod_res_test 
)

Definition at line 421 of file thirdorderstepsol.cc.

References NO_OP.

426 : ThirdOrderIntegrator(dT, dSolutionTol, iMaxIt, bmod_res_test),
427 Rho(pRho)
428 {
429  NO_OP;
430 }
#define NO_OP
Definition: myassert.h:74
ThirdOrderIntegrator(const doublereal dT, const doublereal dSolutionTol, const integer iMaxIt, const bool bmod_res_test)
TunableThirdOrderIntegrator::~TunableThirdOrderIntegrator ( void  )
virtual

Definition at line 432 of file thirdorderstepsol.cc.

References NO_OP.

433 {
434  NO_OP;
435 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

void TunableThirdOrderIntegrator::SetCoef ( doublereal  dT,
doublereal  dAlpha,
enum StepChange  NewStep 
)
protectedvirtual

Implements ThirdOrderIntegrator.

Definition at line 438 of file thirdorderstepsol.cc.

References DEBUGCOUT, DriveOwner::dGet(), ThirdOrderIntegrator::dT, ThirdOrderIntegrator::jx11, ThirdOrderIntegrator::jx12, ThirdOrderIntegrator::jx21, ThirdOrderIntegrator::jx22, ThirdOrderIntegrator::m0, ThirdOrderIntegrator::m1, ThirdOrderIntegrator::n0, ThirdOrderIntegrator::n1, grad::pow(), ThirdOrderIntegrator::rho, Rho, ThirdOrderIntegrator::theta, ThirdOrderIntegrator::w0, ThirdOrderIntegrator::w1, and ThirdOrderIntegrator::w2.

441 {
442  dT = dt;
443 
444  /* from "Unconditionally stable multistep integration of ordinary
445  * differential and differential-algebraic equations with
446  * controlled algorithmic dissipation for multibody dynamic
447  * applications", pp 8-9
448  */
449  rho = Rho.dGet();
450  theta = -rho/(1.+rho);
451  w0 = (1.+3*theta)/(6.*theta);
452  w1 = -1./(6.*theta*(1.+theta));
453  w2 = (2.+3.*theta)/(6.*(1.+theta));
454  /* from "Unconditionally stable multistep integration of ordinary
455  * differential and differential-algebraic equations with
456  * controlled algorithmic dissipation for multibody dynamic
457  * applications", pp 3
458  */
459  m0 = 1.-theta*theta*(3.+2.*theta);
460  m1 = theta*theta*(3.+2.*theta);
461  n0 = theta*(1.+theta)*(1.+theta);
462  n1 = theta*theta*(1.+theta);
463 
464  /* Attenzione: a differenza di quanto riportato a p. 16,
465  * "Unconditionally stable multistep integration of ordinary
466  * differential and differential-algebraic equations with
467  * controlled algorithmic dissipation for multibody dynamic
468  * applications"
469  * qui il tempo finale e' in cima, il tempo theta in basso
470  */
471  jx22 = (1.+3.*rho)/(6.*rho*(1.+rho))*dT;
472  jx21 = -1./(6.*rho*std::pow(1.+rho,2.))*dT;
473  jx12 = std::pow(1.+rho,2.)/(6.*rho)*dT;
474  jx11 = (2.*rho-1.)/(6.*rho)*dT;
475 
476  DEBUGCOUT("Tunable Third Order Integrator coefficients:" << std::endl
477  << "\t rho: " << rho << std::endl
478  << "\ttheta: " << theta << std::endl
479  << "\t w0: " << w0 << std::endl
480  << "\t w1: " << w1 << std::endl
481  << "\t w2: " << w2 << std::endl
482  << "\t m0: " << m0 << std::endl
483  << "\t m1: " << m1 << std::endl
484  << "\t n0: " << n0 << std::endl
485  << "\t n1: " << n1 << std::endl);
486 }
GradientExpression< BinaryExpr< FuncPow, LhsExpr, RhsExpr > > pow(const GradientExpression< LhsExpr > &u, const GradientExpression< RhsExpr > &v)
Definition: gradient.h:2961
#define DEBUGCOUT(msg)
Definition: myassert.h:232
doublereal dGet(const doublereal &dVar) const
Definition: drive.cc:664

Here is the call graph for this function:

void TunableThirdOrderIntegrator::SetDriveHandler ( const DriveHandler pDH)
virtual

Reimplemented from StepIntegrator.

Definition at line 489 of file thirdorderstepsol.cc.

References DriveOwner::pGetDriveCaller(), Rho, and DriveCaller::SetDrvHdl().

490 {
491  Rho.pGetDriveCaller()->SetDrvHdl(pDH);
492 }
virtual void SetDrvHdl(const DriveHandler *pDH)
Definition: drive.cc:487
DriveCaller * pGetDriveCaller(void) const
Definition: drive.cc:658

Here is the call graph for this function:

Member Data Documentation

DriveOwner TunableThirdOrderIntegrator::Rho
private

Definition at line 111 of file thirdorderstepsol.h.

Referenced by SetCoef(), and SetDriveHandler().


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