MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
BiStopCLWrapper< T, Tder > Class Template Reference

#include <constltp_impl.h>

Inheritance diagram for BiStopCLWrapper< T, Tder >:
Collaboration diagram for BiStopCLWrapper< T, Tder >:

Public Member Functions

 BiStopCLWrapper (ConstitutiveLaw< T, Tder > *pCL, bool bInitialStatus, const DriveCaller *pA, const DriveCaller *pD)
 
virtual ~BiStopCLWrapper (void)
 
ConstLawType::Type GetConstLawType (void) const
 
virtual ConstitutiveLaw< T,
Tder > * 
pCopy (void) const
 
virtual std::ostream & Restart (std::ostream &out) const
 
virtual void Update (const T &Eps, const T &EpsPrime=mb_zero< T >())
 
virtual void AfterConvergence (const T &Eps, const T &EpsPrime=mb_zero< T >())
 
- Public Member Functions inherited from ConstitutiveLaw< T, Tder >
 ConstitutiveLaw (void)
 
virtual ~ConstitutiveLaw (void)
 
virtual const T & GetEpsilon (void) const
 
virtual const T & GetEpsilonPrime (void) const
 
virtual const T & GetF (void) const
 
virtual const Tder & GetFDE (void) const
 
virtual const Tder & GetFDEPrime (void) const
 
virtual unsigned int iGetNumDof (void) const
 
virtual std::ostream & DescribeDof (std::ostream &out, const char *prefix="", bool bInitial=false) const
 
virtual void DescribeDof (std::vector< std::string > &desc, bool bInitial=false, int i=-1) const
 
virtual std::ostream & DescribeEq (std::ostream &out, const char *prefix="", bool bInitial=false) const
 
virtual void DescribeEq (std::vector< std::string > &desc, bool bInitial=false, int i=-1) const
 
virtual DofOrder::Order GetDofType (unsigned int i) const
 
- Public Member Functions inherited from WithLabel
 WithLabel (unsigned int uL=0, const std::string &sN="")
 
virtual ~WithLabel (void)
 
void PutLabel (unsigned int uL)
 
void PutName (const std::string &sN)
 
unsigned int GetLabel (void) const
 
const std::string & GetName (void) const
 
- Public Member Functions inherited from SimulationEntity
 SimulationEntity (void)
 
virtual ~SimulationEntity (void)
 
virtual bool bIsValidIndex (unsigned int i) const
 
virtual DofOrder::Order GetEqType (unsigned int i) const
 
virtual void SetValue (DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *h=0)
 
virtual HintParseHint (DataManager *pDM, const char *s) const
 
virtual void BeforePredict (VectorHandler &, VectorHandler &, VectorHandler &, VectorHandler &) const
 
virtual void AfterPredict (VectorHandler &X, VectorHandler &XP)
 
virtual void Update (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void DerivativesUpdate (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void Update (const VectorHandler &XCurr, InverseDynamics::Order iOrder)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP, const VectorHandler &XPP)
 
virtual unsigned int iGetNumPrivData (void) const
 
virtual unsigned int iGetPrivDataIdx (const char *s) const
 
virtual doublereal dGetPrivData (unsigned int i) const
 
virtual std::ostream & OutputAppend (std::ostream &out) const
 
virtual void ReadInitialState (MBDynParser &HP)
 

Private Types

enum  Status { INACTIVE, ACTIVE }
 

Private Attributes

ConstitutiveLaw< T, Tder > * m_pCL
 
enum Status m_status
 
const DriveCallerm_pActivatingCondition
 
const DriveCallerm_pDeactivatingCondition
 
m_EpsRef
 

Additional Inherited Members

- Public Types inherited from ConstitutiveLaw< T, Tder >
typedef ConstitutiveLaw< T,
Tder >::ErrNotAvailable 
Err
 
- Public Types inherited from SimulationEntity
typedef std::vector< Hint * > Hints
 
- Protected Attributes inherited from ConstitutiveLaw< T, Tder >
Epsilon
 
EpsilonPrime
 
F
 
Tder FDE
 
Tder FDEPrime
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 

Detailed Description

template<class T, class Tder>
class BiStopCLWrapper< T, Tder >

Definition at line 2151 of file constltp_impl.h.

Member Enumeration Documentation

template<class T , class Tder >
enum BiStopCLWrapper::Status
private
Enumerator
INACTIVE 
ACTIVE 

Definition at line 2154 of file constltp_impl.h.

Constructor & Destructor Documentation

template<class T , class Tder >
BiStopCLWrapper< T, Tder >::BiStopCLWrapper ( ConstitutiveLaw< T, Tder > *  pCL,
bool  bInitialStatus,
const DriveCaller pA,
const DriveCaller pD 
)
inline

Definition at line 2163 of file constltp_impl.h.

References ASSERT, BiStopCLWrapper< T, Tder >::m_pActivatingCondition, and BiStopCLWrapper< T, Tder >::m_pDeactivatingCondition.

2168  :
2169  m_pCL(pCL), m_status(bInitialStatus ? ACTIVE : INACTIVE),
2171  m_EpsRef(mb_zero<T>()) {
2174  };
const DriveCaller * m_pActivatingCondition
ConstitutiveLaw< T, Tder > * m_pCL
enum Status m_status
const DriveCaller * m_pDeactivatingCondition
#define ASSERT(expression)
Definition: colamd.c:977
template<class T , class Tder >
virtual BiStopCLWrapper< T, Tder >::~BiStopCLWrapper ( void  )
inlinevirtual

Definition at line 2177 of file constltp_impl.h.

References NO_OP.

2177  {
2178  NO_OP;
2179  };
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

template<class T , class Tder >
virtual void BiStopCLWrapper< T, Tder >::AfterConvergence ( const T &  Eps,
const T &  EpsPrime = mb_zero<T>() 
)
inlinevirtual

Reimplemented from ConstitutiveLaw< T, Tder >.

Definition at line 2261 of file constltp_impl.h.

References BiStopCLWrapper< T, Tder >::ACTIVE, BiStopCLWrapper< T, Tder >::m_EpsRef, BiStopCLWrapper< T, Tder >::m_pCL, and BiStopCLWrapper< T, Tder >::m_status.

2261  {
2262  if (m_status == ACTIVE) {
2263  m_pCL->AfterConvergence(Eps - m_EpsRef, EpsPrime);
2264  }
2265  };
ConstitutiveLaw< T, Tder > * m_pCL
enum Status m_status
template<class T , class Tder >
ConstLawType::Type BiStopCLWrapper< T, Tder >::GetConstLawType ( void  ) const
inlinevirtual

Implements ConstitutiveLaw< T, Tder >.

Definition at line 2181 of file constltp_impl.h.

References BiStopCLWrapper< T, Tder >::m_pCL.

2181  {
2182  return m_pCL->GetConstLawType();
2183  };
ConstitutiveLaw< T, Tder > * m_pCL
template<class T , class Tder >
virtual ConstitutiveLaw<T, Tder>* BiStopCLWrapper< T, Tder >::pCopy ( void  ) const
inlinevirtual

Implements ConstitutiveLaw< T, Tder >.

Definition at line 2186 of file constltp_impl.h.

References BiStopCLWrapper< T, Tder >::ACTIVE, BiStopCLWrapper< T, Tder >::m_pActivatingCondition, BiStopCLWrapper< T, Tder >::m_pCL, BiStopCLWrapper< T, Tder >::m_pDeactivatingCondition, BiStopCLWrapper< T, Tder >::m_status, DriveCaller::pCopy(), and SAFENEWWITHCONSTRUCTOR.

2186  {
2187  ConstitutiveLaw<T, Tder>* pCL = 0;
2188 
2189  typedef BiStopCLWrapper<T, Tder> cl;
2191  cl,
2192  cl(m_pCL->pCopy(),
2193  m_status == ACTIVE,
2196 
2197  return pCL;
2198  };
const DriveCaller * m_pActivatingCondition
ConstitutiveLaw< T, Tder > * m_pCL
enum Status m_status
const DriveCaller * m_pDeactivatingCondition
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
virtual DriveCaller * pCopy(void) const =0

Here is the call graph for this function:

template<class T , class Tder >
virtual std::ostream& BiStopCLWrapper< T, Tder >::Restart ( std::ostream &  out) const
inlinevirtual

Reimplemented from ConstitutiveLaw< T, Tder >.

Definition at line 2201 of file constltp_impl.h.

References BiStopCLWrapper< T, Tder >::INACTIVE, BiStopCLWrapper< T, Tder >::m_pActivatingCondition, BiStopCLWrapper< T, Tder >::m_pCL, BiStopCLWrapper< T, Tder >::m_pDeactivatingCondition, BiStopCLWrapper< T, Tder >::m_status, and DriveCaller::Restart().

2201  {
2202  out << "bistop, initial status, ";
2203  if (m_status == INACTIVE) {
2204  out << "inactive";
2205 
2206  } else {
2207  out << "active";
2208  }
2209  out << ", ",
2210  m_pActivatingCondition->Restart(out) << ", ",
2211  m_pDeactivatingCondition->Restart(out) << ", ";
2212  return m_pCL->Restart(out);
2213  };
const DriveCaller * m_pActivatingCondition
ConstitutiveLaw< T, Tder > * m_pCL
virtual std::ostream & Restart(std::ostream &out) const =0
enum Status m_status
const DriveCaller * m_pDeactivatingCondition

Here is the call graph for this function:

template<class T , class Tder >
virtual void BiStopCLWrapper< T, Tder >::Update ( const T &  Eps,
const T &  EpsPrime = mb_zero<T>() 
)
inlinevirtual

Implements ConstitutiveLaw< T, Tder >.

Definition at line 2216 of file constltp_impl.h.

References BiStopCLWrapper< T, Tder >::ACTIVE, DriveCaller::dGet(), BiStopCLWrapper< T, Tder >::INACTIVE, BiStopCLWrapper< T, Tder >::m_EpsRef, BiStopCLWrapper< T, Tder >::m_pActivatingCondition, BiStopCLWrapper< T, Tder >::m_pCL, BiStopCLWrapper< T, Tder >::m_pDeactivatingCondition, BiStopCLWrapper< T, Tder >::m_status, and MBDYN_EXCEPT_ARGS.

2216  {
2219  bool bChangeJac(false);
2220 
2221  switch (m_status) {
2222  case INACTIVE:
2223  if (m_pActivatingCondition->dGet() == 0.) {
2224  /* remains inactive: nothing to do */
2225  break;
2226  }
2227 
2228  /* activates: change data and ask for jacobian rigeneration */
2229  m_status = ACTIVE;
2231  bChangeJac = true;
2232 
2233  case ACTIVE:
2234  if (m_pDeactivatingCondition->dGet() != 0.) {
2235  /* disactivates: reset data and ask for jacobian rigeneration */
2236  m_status = INACTIVE;
2237  ConstitutiveLaw<T, Tder>::F = ::mb_zero<T>();
2238  ConstitutiveLaw<T, Tder>::FDE = ::mb_zero<Tder>();
2239  ConstitutiveLaw<T, Tder>::FDEPrime = ::mb_zero<Tder>();
2241  }
2242 
2243  /* change force as well */
2244  try {
2245  m_pCL->Update(Eps - m_EpsRef, EpsPrime);
2246  }
2247  catch (Elem::ChangedEquationStructure& e) {
2248  bChangeJac = true;
2249  }
2252  ConstitutiveLaw<T, Tder>::FDEPrime = m_pCL->GetFDEPrime();
2253  if (bChangeJac) {
2254  /* if activating, ask for jacobian rigeneration */
2256  }
2257  break;
2258  }
2259  };
const DriveCaller * m_pActivatingCondition
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
ConstitutiveLaw< T, Tder > * m_pCL
enum Status m_status
const DriveCaller * m_pDeactivatingCondition
virtual doublereal dGet(const doublereal &dVar) const =0

Here is the call graph for this function:

Member Data Documentation

template<class T , class Tder >
T BiStopCLWrapper< T, Tder >::m_EpsRef
private
template<class T , class Tder >
const DriveCaller* BiStopCLWrapper< T, Tder >::m_pActivatingCondition
private
template<class T , class Tder >
const DriveCaller* BiStopCLWrapper< T, Tder >::m_pDeactivatingCondition
private

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