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

Definition at line 818 of file constltp_impl.cc.

Member Function Documentation

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

Implements ConstitutiveLawRead< T, Tder >.

Definition at line 820 of file constltp_impl.cc.

References DEBUGCOUT, dS, IncludeParser::GetLineData(), GetPreStress(), HighParser::GetReal(), HighParser::IsKeyWord(), SAFENEWWITHCONSTRUCTOR, and ConstLawType::VISCOELASTIC.

820  {
821  ConstitutiveLaw<T, Tder>* pCL = 0;
822 
824 
825  doublereal dS = HP.GetReal();
826  DEBUGCOUT("Stiffness = " << dS << std::endl);
827 
828  if (dS <= 0.) {
829  silent_cerr("warning, null or negative stiffness at line "
830  << HP.GetLineData() << std::endl);
831  }
832 
833  doublereal dSP = 0.;
834  if (HP.IsKeyWord("proportional")) {
835  doublereal k = HP.GetReal();
836  dSP = k*dS;
837  } else {
838  dSP = HP.GetReal();
839  }
840  DEBUGCOUT("stiffness prime = " << dSP << std::endl);
841 
842  if (dSP <= 0.) {
843  silent_cerr("warning, null or negative stiffness prime at line "
844  << HP.GetLineData() << std::endl);
845  }
846 
847  /* Prestress and prestrain */
848  T PreStress(mb_zero<T>());
849  GetPreStress(HP, PreStress);
850  TplDriveCaller<T>* pTplDC = GetPreStrain<T>(pDM, HP);
851 
852 #if 0 // TODO: implement a "null" constitutive law that does nothing
853  if (dS == 0. && dSP == 0.) {
854 
855  } else
856 #endif
857  if (dS == 0.) {
858  silent_cerr("warning, null stiffness, "
859  "using linear viscous constitutive law instead"
860  << std::endl);
861 
863  SAFENEWWITHCONSTRUCTOR(pCL, L, L(PreStress, dSP));
864  if (pTplDC) {
865  delete pTplDC;
866  }
867 
868  } else if (dSP == 0.) {
869  silent_cerr("warning, null stiffness prime, "
870  "using linear elastic constitutive law instead"
871  << std::endl);
872 
874  SAFENEWWITHCONSTRUCTOR(pCL, L, L(pTplDC, PreStress, dS));
875 
876  } else {
878  SAFENEWWITHCONSTRUCTOR(pCL, L, L(pTplDC, PreStress, dS, dSP));
879  }
880 
881  return pCL;
882  };
virtual bool IsKeyWord(const char *sKeyWord)
Definition: parser.cc:910
#define DEBUGCOUT(msg)
Definition: myassert.h:232
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
void GetPreStress(MBDynParser &HP, T &PreStress)
const doublereal dS
Definition: beamslider.cc:71
double doublereal
Definition: colamd.c:52
virtual HighParser::ErrOut GetLineData(void) const
Definition: parsinc.cc:697
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: