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

Definition at line 1206 of file constltp_impl.cc.

Member Function Documentation

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

Implements ConstitutiveLawRead< T, Tder >.

Reimplemented in LinearViscoElasticBiStopCLR< T, Tder >, and LinearElasticBiStopCLR< T, Tder >.

Definition at line 1208 of file constltp_impl.cc.

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

Referenced by LinearElasticBiStopCLR< T, Tder >::Read(), and LinearViscoElasticBiStopCLR< T, Tder >::Read().

1208  {
1209  ConstitutiveLaw<T, Tder>* pCL = 0;
1210 
1211  typedef BiStopCLWrapper<T, Tder> L;
1214 
1215  DEBUGCOUT("Linear Viscoelastic Bi Stop Constitutive Law" << std::endl);
1216  doublereal dS = HP.GetReal();
1217  if (dS <= 0.) {
1218  silent_cerr("warning, null or negative stiffness at line "
1219  << HP.GetLineData() << std::endl);
1220  }
1221 
1222  doublereal dSp = 0.;
1223  if (CLType == ConstLawType::VISCOELASTIC) {
1224  dSp = HP.GetReal();
1225  if (dSp <= 0.) {
1226  silent_cerr("warning, null or negative stiffness prime at line "
1227  << HP.GetLineData() << std::endl);
1228  }
1229  }
1230 
1231  bool s(false);
1232  if (HP.IsKeyWord("initial" "status")) {
1233  if (HP.IsKeyWord("active")) {
1234  s = true;
1235 
1236  } else if (HP.IsKeyWord("inactive")) {
1237  s = false;
1238 
1239  } else {
1240  s = HP.GetBool();
1241  }
1242  }
1243 
1244  const DriveCaller *pA = HP.GetDriveCaller();
1245  const DriveCaller *pD = HP.GetDriveCaller();
1246 
1247  /* Prestress and prestrain */
1248  T PreStress(mb_zero<T>());
1249  GetPreStress(HP, PreStress);
1250  TplDriveCaller<T>* pTplDC = GetPreStrain<T>(pDM, HP);
1251 
1252  ConstitutiveLaw<T, Tder> *pWrappedCL = 0;
1253  if (CLType == ConstLawType::VISCOELASTIC && dSp != 0.) {
1254  SAFENEWWITHCONSTRUCTOR(pWrappedCL, LVECL, LVECL(pTplDC, PreStress, dS, dSp));
1255 
1256  } else {
1257  SAFENEWWITHCONSTRUCTOR(pWrappedCL, LECL, LECL(pTplDC, PreStress, dS));
1258  }
1259 
1260  SAFENEWWITHCONSTRUCTOR(pCL, L, L(pWrappedCL, s, pA, pD));
1261 
1262  return pCL;
1263  };
virtual bool GetBool(bool bDefval=false)
Definition: parser.cc:1010
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
DriveCaller * GetDriveCaller(bool bDeferred=false)
Definition: mbpar.cc:2033
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: