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

Definition at line 175 of file tdclw.cc.

Member Function Documentation

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

Implements ConstitutiveLawRead< T, Tder >.

Definition at line 182 of file tdclw.cc.

References MBDynParser::GetConstLaw1D(), MBDynParser::GetConstLaw3D(), MBDynParser::GetConstLaw6D(), IncludeParser::GetLineData(), HighParser::GetReal(), HighParser::IsKeyWord(), MBDYN_EXCEPT_ARGS, and SAFENEWWITHCONSTRUCTOR.

183 {
184  ConstitutiveLaw<T, Tder>* pCL = 0;
185 
186  doublereal dF = HP.GetReal();
187 
188  doublereal dScaleEpsilon = 1.;
189  if (HP.IsKeyWord("scale" "deformation")) {
190  dScaleEpsilon = HP.GetReal();
191  }
192 
193  doublereal dScaleForce = 1.;
194  if (HP.IsKeyWord("scale" "force")) {
195  dScaleForce = HP.GetReal();
196  }
197 
198  doublereal dW = HP.GetReal();
199  if (dW >= 0.) {
200  silent_cerr("Invalid positive or null reference work in TDCLW "
201  "at line " << HP.GetLineData() << std::endl);
203  }
204 
205  doublereal dInitialWork = 0.;
206  if (HP.IsKeyWord("initial" "work")) {
207  dInitialWork = HP.GetReal();
208  if (dInitialWork > 0.) {
209  silent_cerr("Invalid positive initial work in TDCLW "
210  "at line " << HP.GetLineData() << std::endl);
212  }
213  }
214 
216  if (typeid(T) == typeid(doublereal)) {
217  pCL2 = dynamic_cast<ConstitutiveLaw<T, Tder> *>(HP.GetConstLaw1D(CLType));
218  } else if (typeid(T) == typeid(Vec3)) {
219  pCL2 = dynamic_cast<ConstitutiveLaw<T, Tder> *>(HP.GetConstLaw3D(CLType));
220  } else if (typeid(T) == typeid(Vec6)) {
221  pCL2 = dynamic_cast<ConstitutiveLaw<T, Tder> *>(HP.GetConstLaw6D(CLType));
222  } else {
224  }
225 
227  SAFENEWWITHCONSTRUCTOR(pCL, L,
228  L(dF, dW, dScaleEpsilon, dScaleForce, dInitialWork, pCL2));
229 
230  return pCL;
231 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
Definition: matvec3.h:98
Definition: matvec6.h:37
virtual bool IsKeyWord(const char *sKeyWord)
Definition: parser.cc:910
ConstitutiveLaw6D * GetConstLaw6D(ConstLawType::Type &clt)
Definition: mbpar.cc:1995
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
double doublereal
Definition: colamd.c:52
ConstitutiveLaw3D * GetConstLaw3D(ConstLawType::Type &clt)
Definition: mbpar.cc:1968
virtual HighParser::ErrOut GetLineData(void) const
Definition: parsinc.cc:697
ConstitutiveLaw1D * GetConstLaw1D(ConstLawType::Type &clt)
Definition: mbpar.cc:1941
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: