MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
ConstitutiveLawArray< T, Tder > Class Template Reference

#include <constltp_impl.h>

Inheritance diagram for ConstitutiveLawArray< T, Tder >:
Collaboration diagram for ConstitutiveLawArray< T, Tder >:

Public Member Functions

 ConstitutiveLawArray (const std::vector< ConstitutiveLaw< T, Tder > * > &clv)
 
virtual ~ConstitutiveLawArray (void)
 
ConstLawType::Type GetConstLawType (void) const
 
void SetValue (DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *ph=0)
 
virtual ConstitutiveLaw< T,
Tder > * 
pCopy (void) const
 
virtual std::ostream & Restart (std::ostream &out) const
 
virtual void Update (const T &Eps, const T &EpsPrime=::mb_zero< T >())
 
virtual void AfterConvergence (const T &Eps, const T &EpsPrime=mb_zero< T >())
 
virtual std::ostream & OutputAppend (std::ostream &out) const
 
- Public Member Functions inherited from ConstitutiveLaw< T, Tder >
 ConstitutiveLaw (void)
 
virtual ~ConstitutiveLaw (void)
 
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 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 void ReadInitialState (MBDynParser &HP)
 

Protected Attributes

ConstLawType::Type m_type
 
std::vector< ConstitutiveLaw
< T, Tder > * > 
m_clv
 
- 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
 

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
 

Detailed Description

template<class T, class Tder>
class ConstitutiveLawArray< T, Tder >

Definition at line 50 of file constltp_impl.h.

Constructor & Destructor Documentation

template<class T , class Tder >
ConstitutiveLawArray< T, Tder >::ConstitutiveLawArray ( const std::vector< ConstitutiveLaw< T, Tder > * > &  clv)
inline

Definition at line 57 of file constltp_impl.h.

References ConstitutiveLawArray< T, Tder >::m_clv, and ConstitutiveLawArray< T, Tder >::m_type.

58  : m_clv(clv)
59  {
60  unsigned type = 0;
61  for (typename std::vector<ConstitutiveLaw<T, Tder> *>::const_iterator i = m_clv.begin(); i != m_clv.end(); ++i) {
62  type |= (*i)->GetConstLawType();
63  }
64  m_type = ConstLawType::Type(type);
65  };
ConstLawType::Type m_type
Definition: constltp_impl.h:53
struct vector vector
std::vector< ConstitutiveLaw< T, Tder > * > m_clv
Definition: constltp_impl.h:54
template<class T , class Tder >
virtual ConstitutiveLawArray< T, Tder >::~ConstitutiveLawArray ( void  )
inlinevirtual

Definition at line 67 of file constltp_impl.h.

References NO_OP.

68  {
69  NO_OP;
70  };
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

template<class T , class Tder >
virtual void ConstitutiveLawArray< T, Tder >::AfterConvergence ( const T &  Eps,
const T &  EpsPrime = mb_zero<T>() 
)
inlinevirtual

Reimplemented from ConstitutiveLaw< T, Tder >.

Definition at line 140 of file constltp_impl.h.

References ConstitutiveLaw< T, Tder >::AfterConvergence(), and ConstitutiveLawArray< T, Tder >::m_clv.

140  {
143 
144  for (typename std::vector<ConstitutiveLaw<T, Tder> *>::iterator i = m_clv.begin(); i != m_clv.end(); ++i) {
145  (*i)->AfterConvergence(Eps, EpsPrime);
146  }
147  };
struct vector vector
virtual void AfterConvergence(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:113
std::vector< ConstitutiveLaw< T, Tder > * > m_clv
Definition: constltp_impl.h:54

Here is the call graph for this function:

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

Implements ConstitutiveLaw< T, Tder >.

Definition at line 72 of file constltp_impl.h.

References ConstitutiveLawArray< T, Tder >::m_type.

72  {
73  return m_type;
74  };
ConstLawType::Type m_type
Definition: constltp_impl.h:53
template<class T , class Tder >
virtual std::ostream& ConstitutiveLawArray< T, Tder >::OutputAppend ( std::ostream &  out) const
inlinevirtual

Reimplemented from SimulationEntity.

Definition at line 149 of file constltp_impl.h.

References ConstitutiveLawArray< T, Tder >::m_clv.

149  {
150  for (typename std::vector<ConstitutiveLaw<T, Tder> *>::const_iterator i = m_clv.begin(); i != m_clv.end(); ++i) {
151  (*i)->OutputAppend(out);
152  }
153  return out;
154  };
struct vector vector
std::vector< ConstitutiveLaw< T, Tder > * > m_clv
Definition: constltp_impl.h:54
template<class T , class Tder >
virtual ConstitutiveLaw<T, Tder>* ConstitutiveLawArray< T, Tder >::pCopy ( void  ) const
inlinevirtual

Implements ConstitutiveLaw< T, Tder >.

Definition at line 85 of file constltp_impl.h.

References ConstitutiveLawArray< T, Tder >::m_clv, and SAFENEWWITHCONSTRUCTOR.

85  {
86  ConstitutiveLaw<T, Tder>* pCL = 0;
87 
88  std::vector<ConstitutiveLaw<T, Tder> *> clv(m_clv.size());
89  for (unsigned i = 0; i < m_clv.size(); i++) {
90  clv[i] = m_clv[i]->pCopy();
91  }
92 
94  SAFENEWWITHCONSTRUCTOR(pCL, cl, cl(clv));
95  return pCL;
96  };
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
std::vector< ConstitutiveLaw< T, Tder > * > m_clv
Definition: constltp_impl.h:54
template<class T , class Tder >
virtual std::ostream& ConstitutiveLawArray< T, Tder >::Restart ( std::ostream &  out) const
inlinevirtual

Reimplemented from ConstitutiveLaw< T, Tder >.

Definition at line 98 of file constltp_impl.h.

References ConstitutiveLawArray< T, Tder >::m_clv.

98  {
99  out << "array, " << m_clv.size();
100  for (typename std::vector<ConstitutiveLaw<T, Tder> *>::const_iterator i = m_clv.begin(); i != m_clv.end(); ++i) {
101  out << ", ", (*i)->Restart(out);
102  }
103  return out;
104  };
struct vector vector
std::vector< ConstitutiveLaw< T, Tder > * > m_clv
Definition: constltp_impl.h:54
template<class T , class Tder >
void ConstitutiveLawArray< T, Tder >::SetValue ( DataManager pDM,
VectorHandler X,
VectorHandler XP,
SimulationEntity::Hints ph = 0 
)
inlinevirtual

Reimplemented from SimulationEntity.

Definition at line 76 of file constltp_impl.h.

References ConstitutiveLawArray< T, Tder >::m_clv.

79  {
80  for (typename std::vector<ConstitutiveLaw<T, Tder> *>::iterator i = m_clv.begin(); i != m_clv.end(); ++i) {
81  (*i)->SetValue(pDM, X, XP, ph);
82  }
83  };
struct vector vector
std::vector< ConstitutiveLaw< T, Tder > * > m_clv
Definition: constltp_impl.h:54
template<class T , class Tder >
virtual void ConstitutiveLawArray< T, Tder >::Update ( const T &  Eps,
const T &  EpsPrime = ::mb_zero<T>() 
)
inlinevirtual

Implements ConstitutiveLaw< T, Tder >.

Definition at line 106 of file constltp_impl.h.

References ConstLawType::ELASTIC, ConstitutiveLaw< T, Tder >::GetF(), ConstitutiveLaw< T, Tder >::GetFDE(), ConstitutiveLaw< T, Tder >::GetFDEPrime(), ConstitutiveLawArray< T, Tder >::m_clv, ConstitutiveLawArray< T, Tder >::m_type, MBDYN_EXCEPT_ARGS, and ConstLawType::VISCOUS.

106  {
109  ConstitutiveLaw<T, Tder>::F = ::mb_zero<T>();
111  ConstitutiveLaw<T, Tder>::FDE = ::mb_zero<Tder>();
112  }
114  ConstitutiveLaw<T, Tder>::FDEPrime = ::mb_zero<Tder>();
115  }
116 
117  bool bChangeJac(false);
118  for (typename std::vector<ConstitutiveLaw<T, Tder> *>::iterator i = m_clv.begin(); i != m_clv.end(); ++i) {
119  try {
120  (*i)->Update(Eps, EpsPrime);
121  }
122  catch (Elem::ChangedEquationStructure& e) {
123  bChangeJac = true;
124  }
126  if (m_type & ConstLawType::ELASTIC) {
128  }
129 
130  if (m_type & ConstLawType::VISCOUS) {
132  }
133  }
134  if (bChangeJac) {
135  /* if activating, ask for jacobian rigeneration */
137  }
138  };
virtual const T & GetF(void) const
Definition: constltp.h:125
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
ConstLawType::Type m_type
Definition: constltp_impl.h:53
virtual const Tder & GetFDE(void) const
Definition: constltp.h:129
struct vector vector
std::vector< ConstitutiveLaw< T, Tder > * > m_clv
Definition: constltp_impl.h:54
virtual const Tder & GetFDEPrime(void) const
Definition: constltp.h:133

Here is the call graph for this function:

Member Data Documentation


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