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

#include <constltp_ann.h>

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

Public Member Functions

 AnnViscoElasticConstitutiveLaw (const std::string &f, bool b=false)
 
virtual ~AnnViscoElasticConstitutiveLaw (void)
 
ConstLawType::Type GetConstLawType (void) const
 
virtual ConstitutiveLaw< T,
Tder > * 
pCopy (void) const
 
- Public Member Functions inherited from AnnElasticConstitutiveLaw< T, Tder >
 AnnElasticConstitutiveLaw (const std::string &f, bool b=false)
 
virtual ~AnnElasticConstitutiveLaw (void)
 
virtual void AfterConvergence (const T &Eps, const T &EpsPrime=0.)
 
virtual std::ostream & Restart (std::ostream &out) const
 
virtual void Update (const T &Eps, const T &EpsPrime=0.)
 
- 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 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)
 

Protected Member Functions

virtual void AnnSanity (void)
 
virtual void Update (const T &Eps, const T &EpsPrime, int feedback)
 
- Protected Member Functions inherited from AnnElasticConstitutiveLaw< T, Tder >
void AnnInit (void)
 

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 AnnElasticConstitutiveLaw< T, Tder >
bool bUnit
 
unsigned dim
 
ANNnet
 
std::string fname
 
- 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 AnnViscoElasticConstitutiveLaw< T, Tder >

Definition at line 234 of file constltp_ann.h.

Constructor & Destructor Documentation

template<class T , class Tder >
AnnViscoElasticConstitutiveLaw< T, Tder >::AnnViscoElasticConstitutiveLaw ( const std::string &  f,
bool  b = false 
)
inline

Definition at line 277 of file constltp_ann.h.

References NO_OP.

279  {
280  NO_OP;
281  };
#define NO_OP
Definition: myassert.h:74
template<class T , class Tder >
virtual AnnViscoElasticConstitutiveLaw< T, Tder >::~AnnViscoElasticConstitutiveLaw ( void  )
inlinevirtual

Definition at line 283 of file constltp_ann.h.

References NO_OP.

283  {
284  NO_OP;
285  };
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

template<class T , class Tder >
virtual void AnnViscoElasticConstitutiveLaw< T, Tder >::AnnSanity ( void  )
inlineprotectedvirtual

Reimplemented from AnnElasticConstitutiveLaw< T, Tder >.

Definition at line 239 of file constltp_ann.h.

References NO_OP.

240  {
241  /* add sanity checks */
242  NO_OP;
243  }
#define NO_OP
Definition: myassert.h:74
template<class T , class Tder >
ConstLawType::Type AnnViscoElasticConstitutiveLaw< T, Tder >::GetConstLawType ( void  ) const
inlinevirtual

Reimplemented from AnnElasticConstitutiveLaw< T, Tder >.

Definition at line 287 of file constltp_ann.h.

References ConstLawType::VISCOELASTIC.

287  {
289  };
template<class T , class Tder >
virtual ConstitutiveLaw<T, Tder>* AnnViscoElasticConstitutiveLaw< T, Tder >::pCopy ( void  ) const
inlinevirtual

Reimplemented from AnnElasticConstitutiveLaw< T, Tder >.

Definition at line 291 of file constltp_ann.h.

References SAFENEWWITHCONSTRUCTOR.

291  {
292  ConstitutiveLaw<T, Tder>* pCL = NULL;
293 
295  SAFENEWWITHCONSTRUCTOR(pCL, cl, cl(cl::fname));
296  return pCL;
297  };
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
template<class T , class Tder >
virtual void AnnViscoElasticConstitutiveLaw< T, Tder >::Update ( const T &  Eps,
const T &  EpsPrime,
int  feedback 
)
inlineprotectedvirtual

Reimplemented from AnnElasticConstitutiveLaw< T, Tder >.

Definition at line 245 of file constltp_ann.h.

References ANN_jacobian_matrix(), ANN_sim(), c, ConstitutiveLaw< T, Tder >::F, ConstitutiveLaw< T, Tder >::FDE, ANN::input, ANN::jacobian, matrix::mat, MBDYN_EXCEPT_ARGS, AnnElasticConstitutiveLaw< T, Tder >::net, ANN::output, and vector::vec.

245  {
248 
250 
253 
255 
256  /* loop according to dimensions... */
257  for (unsigned r = 0; r < AnnViscoElasticConstitutiveLaw<T, Tder>::dim; r++) {
258  net->input.vec[r] = E(r + 1);
259  net->input.vec[AnnViscoElasticConstitutiveLaw<T, Tder>::dim + r] = EpsPrime(r + 1);
260  }
261  if (ANN_sim(net, &net->input, &net->output, feedback))
262  {
263  silent_cout("AnnViscoElasticConstitutiveLaw: Network simulation error" << std::endl);
265  }
266  ANN_jacobian_matrix(net, &net->jacobian);
267 
268  for (unsigned r = 0; r < AnnViscoElasticConstitutiveLaw<T, Tder>::dim; r++) {
269  ConstitutiveLaw<T, Tder>::F(r + 1) = -net->output.vec[r];
270  for (unsigned c = 0; c < AnnViscoElasticConstitutiveLaw<T, Tder>::dim; c++) {
271  ConstitutiveLaw<T, Tder>::FDE(r + 1, c + 1) = -net->jacobian.mat[r][c];
272  }
273  }
274  };
ann_res_t ANN_sim(ANN *net, vector *input, vector *output, unsigned flags)
Definition: ann.c:425
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
vector input
Definition: ann.h:116
vector output
Definition: ann.h:116
matrix jacobian
Definition: ann.h:98
Definition: ann.h:74
static std::stack< cleanup * > c
Definition: cleanup.cc:59
double ** mat
Definition: matrix.h:62
double * vec
Definition: matrix.h:69
ann_res_t ANN_jacobian_matrix(ANN *net, matrix *jacobian)
Definition: ann.c:921

Here is the call graph for this function:


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