MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
NLSFViscoElasticConstitutiveLaw< T, Tder > Class Template Reference
Inheritance diagram for NLSFViscoElasticConstitutiveLaw< T, Tder >:
Collaboration diagram for NLSFViscoElasticConstitutiveLaw< T, Tder >:

Public Member Functions

 NLSFViscoElasticConstitutiveLaw (const TplDriveCaller< T > *pDC, const T &PStress, const ConstLawType::Type &cltype, const Tder &fde0, const std::vector< const DifferentiableScalarFunction * > &fdesc, const Tder &fdeprime0, const std::vector< const DifferentiableScalarFunction * > &fdeprimesc)
 
virtual ~NLSFViscoElasticConstitutiveLaw (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=0.)
 
- Public Member Functions inherited from ElasticConstitutiveLaw< T, Tder >
 ElasticConstitutiveLaw (const TplDriveCaller< T > *pDC, const T &PStress)
 
virtual ~ElasticConstitutiveLaw (void)
 
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 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
 

Private Attributes

ConstLawType::Type CLType
 
Tder FDE0
 
Tder FDEPrime0
 
std::vector< const
DifferentiableScalarFunction * > 
FDEsc
 
std::vector< const
DifferentiableScalarFunction * > 
FDEPrimesc
 

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 Member Functions inherited from ElasticConstitutiveLaw< T, Tder >
virtual std::ostream & Restart_int (std::ostream &out) const
 
- Protected Attributes inherited from ElasticConstitutiveLaw< T, Tder >
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
 

Detailed Description

template<class T, class Tder>
class NLSFViscoElasticConstitutiveLaw< T, Tder >

Definition at line 46 of file constltp_nlsf.cc.

Constructor & Destructor Documentation

template<class T , class Tder >
NLSFViscoElasticConstitutiveLaw< T, Tder >::NLSFViscoElasticConstitutiveLaw ( const TplDriveCaller< T > *  pDC,
const T &  PStress,
const ConstLawType::Type cltype,
const Tder &  fde0,
const std::vector< const DifferentiableScalarFunction * > &  fdesc,
const Tder &  fdeprime0,
const std::vector< const DifferentiableScalarFunction * > &  fdeprimesc 
)
inline

Definition at line 56 of file constltp_nlsf.cc.

References NLSFViscoElasticConstitutiveLaw< T, Tder >::FDE0, and NLSFViscoElasticConstitutiveLaw< T, Tder >::FDEPrime0.

63  : ElasticConstitutiveLaw<T, Tder>(pDC, PStress),
64  CLType(cltype),
65  FDE0(fde0), FDEPrime0(fdeprime0),
66  FDEsc(fdesc), FDEPrimesc(fdeprimesc)
67  {
70  };
std::vector< const DifferentiableScalarFunction * > FDEsc
std::vector< const DifferentiableScalarFunction * > FDEPrimesc
template<class T , class Tder >
virtual NLSFViscoElasticConstitutiveLaw< T, Tder >::~NLSFViscoElasticConstitutiveLaw ( void  )
inlinevirtual

Definition at line 72 of file constltp_nlsf.cc.

References NO_OP.

72  {
73  NO_OP;
74  };
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

template<class T , class Tder >
ConstLawType::Type NLSFViscoElasticConstitutiveLaw< T, Tder >::GetConstLawType ( void  ) const
inlinevirtual

Reimplemented from ElasticConstitutiveLaw< T, Tder >.

Definition at line 76 of file constltp_nlsf.cc.

References NLSFViscoElasticConstitutiveLaw< T, Tder >::CLType.

76  {
77  return CLType;
78  };
template<class T , class Tder >
virtual ConstitutiveLaw<T, Tder>* NLSFViscoElasticConstitutiveLaw< T, Tder >::pCopy ( void  ) const
inlinevirtual

Implements ConstitutiveLaw< T, Tder >.

Definition at line 80 of file constltp_nlsf.cc.

References NLSFViscoElasticConstitutiveLaw< T, Tder >::CLType, NLSFViscoElasticConstitutiveLaw< T, Tder >::FDE0, NLSFViscoElasticConstitutiveLaw< T, Tder >::FDEPrime0, NLSFViscoElasticConstitutiveLaw< T, Tder >::FDEPrimesc, NLSFViscoElasticConstitutiveLaw< T, Tder >::FDEsc, and SAFENEWWITHCONSTRUCTOR.

Referenced by NLSFViscoElasticConstitutiveLaw< doublereal, doublereal >::pCopy().

80  {
81  ConstitutiveLaw<T, Tder>* pCL = NULL;
82 
84  SAFENEWWITHCONSTRUCTOR(pCL, cl,
88  return pCL;
89  };
std::vector< const DifferentiableScalarFunction * > FDEsc
std::vector< const DifferentiableScalarFunction * > FDEPrimesc
virtual ConstitutiveLaw< T, Tder > * pCopy(void) const
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
template<class T , class Tder >
virtual std::ostream& NLSFViscoElasticConstitutiveLaw< T, Tder >::Restart ( std::ostream &  out) const
inlinevirtual

Reimplemented from ConstitutiveLaw< T, Tder >.

Definition at line 91 of file constltp_nlsf.cc.

References NLSFViscoElasticConstitutiveLaw< T, Tder >::FDE0, NLSFViscoElasticConstitutiveLaw< T, Tder >::FDEPrime0, NLSFViscoElasticConstitutiveLaw< T, Tder >::FDEPrimesc, NLSFViscoElasticConstitutiveLaw< T, Tder >::FDEsc, MBDYN_EXCEPT_ARGS, and ElasticConstitutiveLaw< T, Tder >::Restart_int().

91  {
92  silent_cerr("NLSFViscoElasticConstitutiveLaw: Restart not implemented"
93  << std::endl);
95 
96 #if 0 /* ScalarFunction restart not implemented yet */
97  out << "nlp viscoelastic, ",
98  FDE0.Write(out, ", ");
99 
100  for (unsigned i = 0; i < FDEsc.size(); i++) {
101  out << ", ";
102  if (FDEsc[i]) {
103  FDEsc[i]->Restart(out);
104 
105  } else {
106  out << "null";
107  }
108  }
109 
110  out << ", ", FDEPrime0.Write(out, ", ");
111 
112  for (unsigned i = 0; i < FDEPrimesc.size(); i++) {
113  out << ", ";
114  if (FDEsc[i]) {
115  FDEPrimesc[i]->Restart(out);
116 
117  } else {
118  out << "null";
119  }
120  }
121 
123 #endif
124  };
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
std::vector< const DifferentiableScalarFunction * > FDEsc
virtual std::ostream & Restart_int(std::ostream &out) const
std::vector< const DifferentiableScalarFunction * > FDEPrimesc

Here is the call graph for this function:

template<class T , class Tder >
virtual void NLSFViscoElasticConstitutiveLaw< T, Tder >::Update ( const T &  Eps,
const T &  EpsPrime = 0. 
)
inlinevirtual

Implements ConstitutiveLaw< T, Tder >.

Definition at line 126 of file constltp_nlsf.cc.

References NLSFViscoElasticConstitutiveLaw< T, Tder >::CLType, ConstLawType::ELASTIC, ConstitutiveLaw< T, Tder >::F, ConstitutiveLaw< T, Tder >::FDE, NLSFViscoElasticConstitutiveLaw< T, Tder >::FDE0, ConstitutiveLaw< T, Tder >::FDEPrime, NLSFViscoElasticConstitutiveLaw< T, Tder >::FDEPrime0, NLSFViscoElasticConstitutiveLaw< T, Tder >::FDEPrimesc, NLSFViscoElasticConstitutiveLaw< T, Tder >::FDEsc, TplDriveOwner< T >::Get(), and ConstLawType::VISCOUS.

126  {
129 
132 
137  }
141  }
142 
143  for (unsigned i = 0; i < FDEsc.size(); i++) {
144 
145  /*
146  * each diagonal coefficient is:
147  *
148  * f = f0'*eps + f'(eps) + f0''*epsPrime + f''(epsPrime)
149  *
150  * so the Jacobian matrix contributions are
151  *
152  * f/eps = f0' + f'/eps
153  * f/epsPrime = f0'' + f''/epsPrime
154  */
155 
156  doublereal f = 0.;
157 
158  if ((CLType & ConstLawType::ELASTIC) && FDEsc[i]) {
159  doublereal dEps = E(i + 1);
160  f += (*FDEsc[i])(dEps);
161  doublereal df1DE = FDEsc[i]->ComputeDiff(dEps);
162  ConstitutiveLaw<T, Tder>::FDE(i + 1, i + 1) += df1DE;
163  }
164 
165  if ((CLType & ConstLawType::ELASTIC) && FDEPrimesc[i]) {
166  doublereal dEpsPrime = EpsPrime(i + 1);
167  f += (*FDEPrimesc[i])(dEpsPrime);
168  doublereal df2DEPrime = FDEPrimesc[i]->ComputeDiff(dEpsPrime);
169  ConstitutiveLaw<T, Tder>::FDEPrime(i + 1, i + 1) += df2DEPrime;
170  }
171 
172  ConstitutiveLaw<T, Tder>::F(i + 1) += f;
173  }
174  };
std::vector< const DifferentiableScalarFunction * > FDEsc
std::vector< const DifferentiableScalarFunction * > FDEPrimesc
double doublereal
Definition: colamd.c:52
T Get(void) const
Definition: tpldrive.h:113

Here is the call graph for this function:

Member Data Documentation


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