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

#include <constltp_impl.h>

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

Public Member Functions

 ElasticConstitutiveLaw (const TplDriveCaller< T > *pDC, const T &PStress)
 
virtual ~ElasticConstitutiveLaw (void)
 
ConstLawType::Type GetConstLawType (void) const
 
void SetValue (DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
 
virtual HintParseHint (DataManager *pDM, const char *s) const
 
- Public Member Functions inherited from ConstitutiveLaw< T, Tder >
 ConstitutiveLaw (void)
 
virtual ~ConstitutiveLaw (void)
 
virtual ConstitutiveLaw< T,
Tder > * 
pCopy (void) const =0
 
virtual std::ostream & Restart (std::ostream &out) const
 
virtual void Update (const T &Eps, const T &EpsPrime=mb_zero< T >())=0
 
virtual void AfterConvergence (const T &Eps, const T &EpsPrime=mb_zero< T >())
 
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 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)
 
- Public Member Functions inherited from TplDriveOwner< T >
 TplDriveOwner (const TplDriveCaller< T > *pDC=0)
 
virtual ~TplDriveOwner (void)
 
void Set (const TplDriveCaller< T > *pDC)
 
TplDriveCaller< T > * pGetDriveCaller (void) const
 
Get (const doublereal &dVar) const
 
Get (void) const
 
virtual bool bIsDifferentiable (void) const
 
virtual T GetP (void) const
 

Protected Member Functions

virtual std::ostream & Restart_int (std::ostream &out) const
 

Protected Attributes

PreStress
 
- 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
 
- Protected Attributes inherited from TplDriveOwner< T >
TplDriveCaller< T > * pTplDriveCaller
 

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
 

Detailed Description

template<class T, class Tder>
class ElasticConstitutiveLaw< T, Tder >

Definition at line 163 of file constltp_impl.h.

Constructor & Destructor Documentation

template<class T, class Tder>
ElasticConstitutiveLaw< T, Tder >::ElasticConstitutiveLaw ( const TplDriveCaller< T > *  pDC,
const T &  PStress 
)
inline

Definition at line 183 of file constltp_impl.h.

184  : TplDriveOwner<T>(pDC), PreStress(PStress)
185  {
186  NO_OP;
187  };
#define NO_OP
Definition: myassert.h:74
template<class T, class Tder>
virtual ElasticConstitutiveLaw< T, Tder >::~ElasticConstitutiveLaw ( void  )
inlinevirtual

Definition at line 189 of file constltp_impl.h.

190  {
191  NO_OP;
192  };
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

template<class T, class Tder>
virtual Hint* ElasticConstitutiveLaw< T, Tder >::ParseHint ( DataManager pDM,
const char *  s 
) const
inlinevirtual

Reimplemented from SimulationEntity.

Definition at line 230 of file constltp_impl.h.

231  {
232  if (strncasecmp(s, "prestress{" /*}*/ , STRLENOF("prestress{" /*}*/ )) == 0) {
233  s += STRLENOF("prestress{" /*}*/ );
234 
235  size_t len = strlen(s);
236 
237  if (s[len - 1] != '}') {
238  return 0;
239  }
240 
241  char *sStr = new char[len + 1];
242  memcpy(sStr, s, len + 1);
243  sStr[len - 1] = ';';
244 
245  return new TplVecHint<T>(sStr);
246 
247  } else if (strncasecmp(s, "prestrain{" /*}*/ , STRLENOF("prestrain{" /*}*/ )) == 0) {
248  s += STRLENOF("prestrain{" /*}*/ );
249 
250  size_t len = strlen(s);
251 
252  if (s[len - 1] != '}') {
253  return 0;
254  }
255 
256  char *sStr = new char[len + 1];
257  memcpy(sStr, s, len + 1);
258  sStr[len - 1] = ';';
259 
260  return new TplDriveHint<T>(sStr);
261  }
262 
263  return 0;
264  };
#define STRLENOF(s)
Definition: mbdyn.h:166
template<class T, class Tder>
virtual std::ostream& ElasticConstitutiveLaw< T, Tder >::Restart_int ( std::ostream &  out) const
inlineprotectedvirtual

Reimplemented in MusclePennestriReflexiveCL, MusclePennestriErgoCL, and MusclePennestriCL.

Definition at line 169 of file constltp_impl.h.

Referenced by GiNaCElasticConstitutiveLaw< T, Tder >::Restart(), HuntCrossleyCL::Restart(), NLPViscoElasticConstitutiveLaw< T, Tder >::Restart(), MusclePennestriCL::Restart(), NLSFViscoElasticConstitutiveLaw< T, Tder >::Restart(), ContContactCL::Restart(), NLSFViscoElasticConstitutiveLaw< doublereal, doublereal >::Restart(), NLPViscoElasticConstitutiveLaw< doublereal, doublereal >::Restart(), GiNaCElasticConstitutiveLaw< doublereal, doublereal >::Restart(), LinearElasticIsotropicConstitutiveLaw< T, Tder >::Restart(), LinearElasticGenericConstitutiveLaw< T, Tder >::Restart(), GiNaCViscousConstitutiveLaw< T, Tder >::Restart(), ContContact3DCL::Restart(), LinearElasticGenericAxialTorsionCouplingConstitutiveLaw< Vec6, Mat6x6 >::Restart(), GiNaCViscousConstitutiveLaw< doublereal, doublereal >::Restart(), GiNaCViscoElasticConstitutiveLaw< T, Tder >::Restart(), LogConstitutiveLaw< doublereal, doublereal >::Restart(), DoubleLinearElasticConstitutiveLaw< doublereal, doublereal >::Restart(), DoubleLinearElasticConstitutiveLaw< Vec3, Mat3x3 >::Restart(), GiNaCViscoElasticConstitutiveLaw< doublereal, doublereal >::Restart(), IsotropicHardeningConstitutiveLaw< T, Tder >::Restart(), ContactConstitutiveLaw< doublereal, doublereal >::Restart(), ContactConstitutiveLaw< Vec3, Mat3x3 >::Restart(), LinearViscousIsotropicConstitutiveLaw< T, Tder >::Restart(), LinearViscousGenericConstitutiveLaw< T, Tder >::Restart(), LinearViscoElasticIsotropicConstitutiveLaw< T, Tder >::Restart(), LinearViscoElasticGenericConstitutiveLaw< T, Tder >::Restart(), LTVViscoElasticGenericConstitutiveLaw< T, Tder >::Restart(), LinearViscoElasticGenericAxialTorsionCouplingConstitutiveLaw< Vec6, Mat6x6 >::Restart(), DoubleLinearViscoElasticConstitutiveLaw< doublereal, doublereal >::Restart(), DoubleLinearViscoElasticConstitutiveLaw< Vec3, Mat3x3 >::Restart(), and TurbulentViscoElasticConstitutiveLaw< doublereal, doublereal >::Restart().

170  {
171  out << ", prestress, ",
172  Write(out, PreStress /* + GetF() */ , ", ");
174  out << ", prestrain, single, ",
175  Write(out, -ConstitutiveLaw<T, Tder>::Epsilon, ", ") << ", one /* ",
176  TplDriveOwner<T>::pGetDriveCaller()->Restart(out) << " */ ";
177  }
178 
179  return out;
180  };
std::ostream & Write(std::ostream &out, const FullMatrixHandler &m, const char *s, const char *s2)
Definition: fullmh.cc:376
TplDriveCaller< T > * pGetDriveCaller(void) const
Definition: tpldrive.h:105
template<class T, class Tder>
void ElasticConstitutiveLaw< T, Tder >::SetValue ( DataManager pDM,
VectorHandler X,
VectorHandler XP,
SimulationEntity::Hints ph = 0 
)
inlinevirtual

Reimplemented from SimulationEntity.

Definition at line 198 of file constltp_impl.h.

201  {
202  if (ph) {
203  for (unsigned i = 0; i < ph->size(); ++i) {
204  TplVecHint<T> *pStressH = dynamic_cast<TplVecHint<T> *>((*ph)[i]);
205 
206  if (pStressH) {
207  PreStress = pStressH->pCreateVec(pDM);
208  continue;
209  }
210 
211  TplDriveHint<T> *pStrainH = dynamic_cast<TplDriveHint<T> *>((*ph)[i]);
212 
213  if (pStrainH) {
214  TplDriveCaller<T> *pDC = pStrainH->pCreateDrive(pDM);
215  if (pDC == 0) {
216  silent_cerr("ElasticConstitutiveLaw: "
217  "unable to create prestrain drive after hint "
218  "#" << i << std::endl);
220  }
222 
223  continue;
224  }
225  }
226  }
227  };
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
void Set(const TplDriveCaller< T > *pDC)
Definition: tpldrive.h:97
TplDriveCaller< T > * pCreateDrive(DataManager *pDM) const
Definition: hint_impl.h:124
T pCreateVec(DataManager *pDM) const
Definition: hint_impl.h:84

Member Data Documentation


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