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

Definition at line 886 of file constltp_impl.cc.

Member Function Documentation

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

Implements ConstitutiveLawRead< T, Tder >.

Definition at line 888 of file constltp_impl.cc.

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

888  {
889  ConstitutiveLaw<T, Tder>* pCL = 0;
890 
892 
893  Tder S(mb_zero<Tder>());
894  S = HP.Get(S);
895 
896  Tder SP(mb_zero<Tder>());
897  if (HP.IsKeyWord("proportional")) {
898  doublereal k = HP.GetReal();
899  SP = S*k;
900 
901  } else {
902  SP = HP.Get(SP);
903  }
904 
905  /* Prestress and prestrain */
906  T PreStress(mb_zero<T>());
907  GetPreStress(HP, PreStress);
908  TplDriveCaller<T>* pTplDC = GetPreStrain<T>(pDM, HP);
909 
910 #if 0 // TODO: implement a "null" constitutive law that does nothing
911  if (IsNull(S) && IsNull(SP)) {
912 
913  } else
914 #endif
915  if (IsNull(S)) {
916  silent_cerr("warning, null stiffness, "
917  "using linear viscous generic constitutive law instead"
918  << std::endl);
919 
921  SAFENEWWITHCONSTRUCTOR(pCL, L, L(PreStress, SP));
922  if (pTplDC) {
923  delete pTplDC;
924  }
925 
926  } else if (IsNull(SP)) {
927  silent_cerr("warning, null stiffness prime, "
928  "using linear elastic generic constitutive law instead"
929  << std::endl);
930 
932  SAFENEWWITHCONSTRUCTOR(pCL, L, L(pTplDC, PreStress, S));
933 
934  } else {
936  SAFENEWWITHCONSTRUCTOR(pCL, L, L(pTplDC, PreStress, S, SP));
937  }
938 
939  return pCL;
940  };
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)
virtual doublereal Get(const doublereal &d)
Definition: mbpar.cc:2213
double doublereal
Definition: colamd.c:52
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: