MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
ScalarFunctionOrthotropicCL< T, Tder > Class Template Reference
Inheritance diagram for ScalarFunctionOrthotropicCL< T, Tder >:
Collaboration diagram for ScalarFunctionOrthotropicCL< T, Tder >:

Public Member Functions

 ScalarFunctionOrthotropicCL (const std::vector< const DifferentiableScalarFunction * > &sf)
 
virtual ~ScalarFunctionOrthotropicCL (void)
 
ConstLawType::Type GetConstLawType (void) const
 
virtual ConstitutiveLaw< T,
Tder > * 
pCopy (void) const
 
virtual std::ostream & Restart (std::ostream &out) const
 
virtual void Update (const T &Eps, const T &=0.)
 
- Public Member Functions inherited from ConstitutiveLaw< T, Tder >
 ConstitutiveLaw (void)
 
virtual ~ConstitutiveLaw (void)
 
virtual void AfterConvergence (const T &Eps, const T &EpsPrime=mb_zero< T >())
 
virtual const T & GetEpsilon (void) const
 
virtual const T & GetEpsilonPrime (void) const
 
virtual const T & GetF (void) const
 
virtual const Tder & GetFDE (void) const
 
virtual const Tder & GetFDEPrime (void) const
 
virtual unsigned int iGetNumDof (void) const
 
virtual std::ostream & DescribeDof (std::ostream &out, const char *prefix="", bool bInitial=false) const
 
virtual void DescribeDof (std::vector< std::string > &desc, bool bInitial=false, int i=-1) const
 
virtual std::ostream & DescribeEq (std::ostream &out, const char *prefix="", bool bInitial=false) const
 
virtual void DescribeEq (std::vector< std::string > &desc, bool bInitial=false, int i=-1) const
 
virtual DofOrder::Order GetDofType (unsigned int i) const
 
- Public Member Functions inherited from WithLabel
 WithLabel (unsigned int uL=0, const std::string &sN="")
 
virtual ~WithLabel (void)
 
void PutLabel (unsigned int uL)
 
void PutName (const std::string &sN)
 
unsigned int GetLabel (void) const
 
const std::string & GetName (void) const
 
- Public Member Functions inherited from SimulationEntity
 SimulationEntity (void)
 
virtual ~SimulationEntity (void)
 
virtual bool bIsValidIndex (unsigned int i) const
 
virtual DofOrder::Order GetEqType (unsigned int i) const
 
virtual void SetValue (DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *h=0)
 
virtual HintParseHint (DataManager *pDM, const char *s) const
 
virtual void BeforePredict (VectorHandler &, VectorHandler &, VectorHandler &, VectorHandler &) const
 
virtual void AfterPredict (VectorHandler &X, VectorHandler &XP)
 
virtual void Update (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void DerivativesUpdate (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void Update (const VectorHandler &XCurr, InverseDynamics::Order iOrder)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP, const VectorHandler &XPP)
 
virtual unsigned int iGetNumPrivData (void) const
 
virtual unsigned int iGetPrivDataIdx (const char *s) const
 
virtual doublereal dGetPrivData (unsigned int i) const
 
virtual std::ostream & OutputAppend (std::ostream &out) const
 
virtual void ReadInitialState (MBDynParser &HP)
 

Private Attributes

std::vector< const
DifferentiableScalarFunction * > 
SF
 
unsigned n
 

Additional Inherited Members

- Public Types inherited from ConstitutiveLaw< T, Tder >
typedef ConstitutiveLaw< T,
Tder >::ErrNotAvailable 
Err
 
- Public Types inherited from SimulationEntity
typedef std::vector< Hint * > Hints
 
- Protected Attributes inherited from ConstitutiveLaw< T, Tder >
Epsilon
 
EpsilonPrime
 
F
 
Tder FDE
 
Tder FDEPrime
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 

Detailed Description

template<class T, class Tder>
class ScalarFunctionOrthotropicCL< T, Tder >

Definition at line 1281 of file ScalarFunctionsImpl.cc.

Constructor & Destructor Documentation

template<class T , class Tder >
ScalarFunctionOrthotropicCL< T, Tder >::ScalarFunctionOrthotropicCL ( const std::vector< const DifferentiableScalarFunction * > &  sf)
inline

Definition at line 1288 of file ScalarFunctionsImpl.cc.

References ASSERT, MBDYN_EXCEPT_ARGS, ScalarFunctionOrthotropicCL< T, Tder >::n, and ScalarFunctionOrthotropicCL< T, Tder >::SF.

1289  {
1290  if (typeid(T) == typeid(Vec3)) {
1291  n = 3;
1292 
1293  } else if (typeid(T) == typeid(Vec6)) {
1294  n = 6;
1295 
1296  } else {
1297  silent_cerr("ScalarFunctionOrthotropicCL<" << typeid(T).name() << ", " << typeid(Tder).name() << "> not implemented" << std::endl);
1299  }
1300 
1301  ASSERT(sf.size() == n);
1302  SF.resize(n);
1303  for (unsigned i = 0; i < n; i++) {
1304  SF[i] = sf[i];
1305  }
1306  };
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
Definition: matvec3.h:98
Definition: matvec6.h:37
#define ASSERT(expression)
Definition: colamd.c:977
std::vector< const DifferentiableScalarFunction * > SF
template<class T , class Tder >
virtual ScalarFunctionOrthotropicCL< T, Tder >::~ScalarFunctionOrthotropicCL ( void  )
inlinevirtual

Definition at line 1308 of file ScalarFunctionsImpl.cc.

References NO_OP.

1308  {
1309  NO_OP;
1310  };
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

template<class T , class Tder >
ConstLawType::Type ScalarFunctionOrthotropicCL< T, Tder >::GetConstLawType ( void  ) const
inlinevirtual

Implements ConstitutiveLaw< T, Tder >.

Definition at line 1312 of file ScalarFunctionsImpl.cc.

References ConstLawType::ELASTIC.

1312  {
1313  return ConstLawType::ELASTIC;
1314  };
template<class T , class Tder >
virtual ConstitutiveLaw<T, Tder>* ScalarFunctionOrthotropicCL< T, Tder >::pCopy ( void  ) const
inlinevirtual

Implements ConstitutiveLaw< T, Tder >.

Definition at line 1316 of file ScalarFunctionsImpl.cc.

References SAFENEWWITHCONSTRUCTOR, and ScalarFunctionOrthotropicCL< T, Tder >::SF.

1316  {
1317  ConstitutiveLaw<T, Tder>* pCL = NULL;
1318 
1320  SAFENEWWITHCONSTRUCTOR(pCL, cl, cl(SF));
1321  return pCL;
1322  };
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
std::vector< const DifferentiableScalarFunction * > SF
template<class T , class Tder >
virtual std::ostream& ScalarFunctionOrthotropicCL< T, Tder >::Restart ( std::ostream &  out) const
inlinevirtual

Reimplemented from ConstitutiveLaw< T, Tder >.

Definition at line 1324 of file ScalarFunctionsImpl.cc.

1324  {
1325  return out << "# not implemented!";
1326  };
template<class T , class Tder >
virtual void ScalarFunctionOrthotropicCL< T, Tder >::Update ( const T &  Eps,
const T &  = 0. 
)
inlinevirtual

Implements ConstitutiveLaw< T, Tder >.

Definition at line 1328 of file ScalarFunctionsImpl.cc.

References ConstitutiveLaw< T, Tder >::F, ConstitutiveLaw< T, Tder >::FDE, ScalarFunctionOrthotropicCL< T, Tder >::n, and ScalarFunctionOrthotropicCL< T, Tder >::SF.

1328  {
1330  for (unsigned i = 1; i <= n; i++) {
1331  /* skip null scalar functions */
1332  if (SF[i - 1] == 0) {
1333  continue;
1334  }
1335 
1336 #if defined(MBDYN_X_WORKAROUND_GCC_3_2) || defined(MBDYN_X_WORKAROUND_GCC_3_3)
1337  ConstitutiveLaw<T, Tder>::F.Put(i, (*SF[i - 1])(Eps(i)));
1338  ConstitutiveLaw<T, Tder>::FDE.Put(i, i, SF[i - 1]->ComputeDiff(Eps(i)));
1339 #else // !MBDYN_X_WORKAROUND_GCC_3_2 && ! MBDYN_X_WORKAROUND_GCC_3_3
1340  ConstitutiveLaw<T, Tder>::F(i) = (*SF[i - 1])(Eps(i));
1341  ConstitutiveLaw<T, Tder>::FDE(i, i) = SF[i - 1]->ComputeDiff(Eps(i));
1342 #endif // !MBDYN_X_WORKAROUND_GCC_3_2 && ! MBDYN_X_WORKAROUND_GCC_3_3
1343  }
1344  };
std::vector< const DifferentiableScalarFunction * > SF

Member Data Documentation

template<class T , class Tder >
unsigned ScalarFunctionOrthotropicCL< T, Tder >::n
private

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