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

Public Member Functions

virtual ConstitutiveLaw< T,
Tder > * 
Read (const DataManager *pDM, MBDynParser &HP, ConstLawType::Type &CLType)
 
- Public Member Functions inherited from ConstitutiveLawRead< T, Tder >
virtual ~ConstitutiveLawRead (void)
 

Detailed Description

template<class T, class Tder>
struct LTVViscoElasticGenericCLR< T, Tder >

Definition at line 944 of file constltp_impl.cc.

Member Function Documentation

template<class T , class Tder >
virtual ConstitutiveLaw<T, Tder>* LTVViscoElasticGenericCLR< T, Tder >::Read ( const DataManager pDM,
MBDynParser HP,
ConstLawType::Type CLType 
)
inlinevirtual

Implements ConstitutiveLawRead< T, Tder >.

Definition at line 946 of file constltp_impl.cc.

References MBDynParser::Get(), MBDynParser::GetDriveCaller(), GetPreStress(), HighParser::GetReal(), HighParser::IsKeyWord(), IsNull(), SAFEDELETE, SAFENEWWITHCONSTRUCTOR, and ConstLawType::VISCOELASTIC.

946  {
947  ConstitutiveLaw<T, Tder>* pCL = 0;
948 
950 
951  Tder S(mb_zero<Tder>());
952  S = HP.Get(S);
953 
954  DriveCaller *pdc = HP.GetDriveCaller();
955 
956  Tder SP(mb_zero<Tder>());
957  if (HP.IsKeyWord("proportional")) {
958  doublereal k = HP.GetReal();
959  SP = S*k;
960 
961  } else {
962  SP = HP.Get(SP);
963  }
964 
965  DriveCaller *pdcp = HP.GetDriveCaller();
966 
967  /* Prestress and prestrain */
968  T PreStress(mb_zero<T>());
969  GetPreStress(HP, PreStress);
970  TplDriveCaller<T>* pTplDC = GetPreStrain<T>(pDM, HP);
971 
972 #if 0 // TODO: implement a "null" constitutive law that does nothing
973  if (IsNull(S) && IsNull(SP)) {
974 
975  } else if (IsNull(S)) {
976  silent_cerr("warning, null stiffness, "
977  "using linear viscous generic constitutive law instead"
978  << std::endl);
979 
980  SAFEDELETE(pdc);
981 
982  typedef LTVViscousGenericConstitutiveLaw<T, Tder> L;
983  SAFENEWWITHCONSTRUCTOR(pCL, L, L(PreStress, SP, pdcp));
984  if (pTplDC) {
985  delete pTplDC;
986  }
987 
988  } else
989  if (IsNull(SP)) {
990  silent_cerr("warning, null stiffness prime, "
991  "using linear elastic generic constitutive law instead"
992  << std::endl);
993 
994  SAFEDELETE(pdcp);
995 
996  typedef LTVElasticGenericConstitutiveLaw<T, Tder> L;
997  SAFENEWWITHCONSTRUCTOR(pCL, L, L(pTplDC, PreStress, S, pdc));
998 
999  } else
1000 #endif
1001  {
1003  SAFENEWWITHCONSTRUCTOR(pCL, L, L(pTplDC, PreStress, S, pdc, SP, pdcp));
1004  }
1005 
1006  return pCL;
1007  };
bool IsNull(const doublereal &d)
Definition: matvec3.cc:1124
virtual bool IsKeyWord(const char *sKeyWord)
Definition: parser.cc:910
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
void GetPreStress(MBDynParser &HP, T &PreStress)
DriveCaller * GetDriveCaller(bool bDeferred=false)
Definition: mbpar.cc:2033
virtual doublereal Get(const doublereal &d)
Definition: mbpar.cc:2213
double doublereal
Definition: colamd.c:52
#define SAFEDELETE(pnt)
Definition: mynewmem.h:710
virtual doublereal GetReal(const doublereal &dDefval=0.0)
Definition: parser.cc:1056

Here is the call graph for this function:


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