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

Definition at line 1349 of file ScalarFunctionsImpl.cc.

Member Function Documentation

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

Implements ConstitutiveLawRead< T, Tder >.

Definition at line 1356 of file ScalarFunctionsImpl.cc.

References ConstLawType::ELASTIC, IncludeParser::GetLineData(), HighParser::IsKeyWord(), MBDYN_EXCEPT_ARGS, ParseScalarFunction(), and SAFENEWWITHCONSTRUCTOR.

1359 {
1360  ConstitutiveLaw<T, Tder>* pCL = 0;
1361 
1362  CLType = ConstLawType::ELASTIC;
1363 
1364  int n = 1;
1365  if (typeid(T) == typeid(Vec3)) {
1366  n = 3;
1367 
1368  } else if (typeid(T) == typeid(Vec6)) {
1369  n = 6;
1370 
1371  } else if (typeid(T) != typeid(doublereal)) {
1372  silent_cerr("ScalarFunctionOrthotropicCL<" << typeid(T).name() << ", " << typeid(Tder).name() << "> not implemented" << std::endl);
1374  }
1375 
1376  std::vector<const DifferentiableScalarFunction *> SF(n);
1377  for (int i = 0; i < n; i++) {
1378  if (HP.IsKeyWord("null")) {
1379  SF[i] = 0;
1380 
1381  } else {
1382  const BasicScalarFunction *pSF = ParseScalarFunction(HP, (DataManager *const)pDM);
1383  SF[i] = dynamic_cast<const DifferentiableScalarFunction *>(pSF);
1384  if (SF[i] == 0) {
1385  silent_cerr("ScalarFunction #" << i + 1 << " must be differentiable "
1386  "at line " << HP.GetLineData() << std::endl);
1388  }
1389  }
1390  }
1391 
1393  SAFENEWWITHCONSTRUCTOR(pCL, L, L(SF));
1394 
1395  return pCL;
1396 }
#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
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
const BasicScalarFunction *const ParseScalarFunction(MBDynParser &HP, DataManager *const pDM)
double doublereal
Definition: colamd.c:52
virtual HighParser::ErrOut GetLineData(void) const
Definition: parsinc.cc:697

Here is the call graph for this function:


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