42 template <
class T,
class Tder>
62 virtual std::ostream&
Restart(std::ostream& out)
const;
64 virtual void Update(
const T& Eps,
const T& EpsPrime = mb_zero<T>());
66 virtual void AfterConvergence(
const T& Eps,
const T& EpsPrime = mb_zero<T>());
67 virtual std::ostream&
OutputAppend(std::ostream& out)
const;
70 template <
class T,
class Tder>
78 : dF(df), dW(dl), dScaleEpsilon(dsd), dScaleForce(dsf),
79 dWCurr(dInitialWork), EpsPrev(
mb_zero<T>()), FPrev(
mb_zero<T>()), pCL(pcl)
84 template <
class T,
class Tder>
92 template <
class T,
class Tder>
96 return pCL->GetConstLawType();
99 template <
class T,
class Tder>
107 cl(dF, dW, dScaleEpsilon, dScaleForce, dWCurr, pCL->pCopy()));
111 template <
class T,
class Tder>
118 <<
", scale deformation, " << dScaleEpsilon
119 <<
", scale force, " << dScaleForce
121 return pCL->Restart(out);
124 template <
class T,
class Tder>
133 pCL->
Update(Eps*dScaleEpsilon, EpsPrime*dScaleEpsilon);
136 doublereal d = dScaleForce*(1. + dF*
exp(-std::min(0., dWCurr)/dW));
147 template <
class T,
class Tder>
151 T EpsCurr = Eps*dScaleEpsilon;
152 pCL->AfterConvergence(EpsCurr, EpsPrime*dScaleEpsilon);
156 dWCurr += ((FCurr + FPrev)*(EpsPrev - EpsCurr))/2.;
162 template <
class T,
class Tder>
166 return pCL->OutputAppend(out) <<
" " << dWCurr;
174 template <
class T,
class Tder>
180 template <
class T,
class Tder>
189 if (HP.
IsKeyWord(
"scale" "deformation")) {
200 silent_cerr(
"Invalid positive or null reference work in TDCLW "
208 if (dInitialWork > 0.) {
209 silent_cerr(
"Invalid positive initial work in TDCLW "
218 }
else if (
typeid(T) ==
typeid(
Vec3)) {
220 }
else if (
typeid(T) ==
typeid(
Vec6)) {
228 L(dF, dW, dScaleEpsilon, dScaleForce, dInitialWork, pCL2));
GradientExpression< UnaryExpr< FuncExp, Expr > > exp(const GradientExpression< Expr > &u)
virtual const T & GetF(void) const
virtual std::ostream & Restart(std::ostream &out) const
#define MBDYN_EXCEPT_ARGS
TDConstitutiveLawWrapper(const doublereal &df, const doublereal &dl, const doublereal &dsd, const doublereal &dsf, const doublereal &dInitialWork, ConstitutiveLaw< T, Tder > *pcl)
ConstitutiveLaw< T, Tder > * pCL
virtual const Tder & GetFDE(void) const
virtual std::ostream & OutputAppend(std::ostream &out) const
ConstLawType::Type GetConstLawType(void) const
virtual void Update(const T &Eps, const T &EpsPrime=mb_zero< T >())
virtual bool IsKeyWord(const char *sKeyWord)
bool SetCL3D(const char *name, ConstitutiveLawRead< Vec3, Mat3x3 > *rf)
ConstitutiveLaw6D * GetConstLaw6D(ConstLawType::Type &clt)
bool SetCL1D(const char *name, ConstitutiveLawRead< doublereal, doublereal > *rf)
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
bool SetCL6D(const char *name, ConstitutiveLawRead< Vec6, Mat6x6 > *rf)
virtual void AfterConvergence(const T &Eps, const T &EpsPrime=mb_zero< T >())
virtual ~TDConstitutiveLawWrapper(void)
virtual const Tder & GetFDEPrime(void) const
virtual ConstitutiveLaw< T, Tder > * pCopy(void) const
virtual void Update(const T &Eps, const T &EpsPrime=mb_zero< T >())=0
ConstitutiveLaw3D * GetConstLaw3D(ConstLawType::Type &clt)
virtual HighParser::ErrOut GetLineData(void) const
virtual ConstitutiveLaw< T, Tder > * Read(const DataManager *pDM, MBDynParser &HP, ConstLawType::Type &CLType)
ConstitutiveLaw1D * GetConstLaw1D(ConstLawType::Type &clt)
virtual doublereal GetReal(const doublereal &dDefval=0.0)