MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
constltp_axw.h
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/base/constltp_axw.h,v 1.4 2017/01/12 14:46:09 masarati Exp $ */
2 /*
3  * MBDyn (C) is a multibody analysis code.
4  * http://www.mbdyn.org
5  *
6  * Copyright (C) 1996-2017
7  *
8  * Pierangelo Masarati <masarati@aero.polimi.it>
9  * Paolo Mantegazza <mantegazza@aero.polimi.it>
10  *
11  * Dipartimento di Ingegneria Aerospaziale - Politecnico di Milano
12  * via La Masa, 34 - 20156 Milano, Italy
13  * http://www.aero.polimi.it
14  *
15  * Changing this copyright notice is forbidden.
16  *
17  * This program is free software; you can redistribute it and/or modify
18  * it under the terms of the GNU General Public License as published by
19  * the Free Software Foundation (version 2 of the License).
20  *
21  *
22  * This program is distributed in the hope that it will be useful,
23  * but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25  * GNU General Public License for more details.
26  *
27  * You should have received a copy of the GNU General Public License
28  * along with this program; if not, write to the Free Software
29  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30  */
31 
32 /* Legami costitutivi */
33 
34 #ifndef CONSTLTP_AXW_H
35 #define CONSTLTP_AXW_H
36 
37 #include "constltp_impl.h"
38 
39 /* AxialCLWrapper - begin */
40 
42 : public ConstitutiveLaw<Vec3, Mat3x3> {
43 private:
45  const Vec3 m_v;
48 
49 public:
51  : m_pCL(pCL), m_v(v), m_F_0(v), m_FDE_0(v.Tens())
52  {
53  NO_OP;
54  };
55 
56  virtual
58  NO_OP;
59  };
60 
62  return m_pCL->GetConstLawType();
63  };
64 
65  virtual
68 
72 
73  return pCL;
74  };
75 
76  virtual std::ostream&
77  Restart(std::ostream& out) const {
78  out << "axial wrap, " << m_v << ", ";
79  return m_pCL->Restart(out);
80  };
81 
82  virtual void
83  Update(const Vec3& Eps, const Vec3& EpsPrime = mb_zero<Vec3>()) {
86 
87  m_pCL->Update(m_v*Eps, m_v*EpsPrime);
88 
90 
93  }
94 
97  }
98  };
99 
100  virtual void AfterConvergence(const Vec3& Eps, const Vec3& EpsPrime = mb_zero<Vec3>()) {
101  m_pCL->AfterConvergence(m_v*Eps, m_v*EpsPrime);
102  };
103 };
104 
105 struct AxialCLR : public ConstitutiveLawRead<Vec3, Mat3x3> {
107  Read(const DataManager* pDM, MBDynParser& HP, ConstLawType::Type& CLType) {
108  Vec3 v(HP.GetVec3());
109  doublereal d = v.Norm();
110  v /= d;
111 
115  AxialCLWrapper(HP.GetConstLaw1D(CLType), v));
116 
117  return pCL;
118  };
119 };
120 
121 /* AxialCLWrapper - end */
122 
123 #endif // CONSTLTP_IMPL_H
virtual const T & GetF(void) const
Definition: constltp.h:125
virtual void Update(const Vec3 &Eps, const Vec3 &EpsPrime=mb_zero< Vec3 >())
Definition: constltp_axw.h:83
Definition: matvec3.h:98
doublereal Norm(void) const
Definition: matvec3.h:263
virtual ConstitutiveLaw< Vec3, Mat3x3 > * Read(const DataManager *pDM, MBDynParser &HP, ConstLawType::Type &CLType)
Definition: constltp_axw.h:107
virtual const Tder & GetFDE(void) const
Definition: constltp.h:129
const Vec3 & mb_zero< Vec3 >(void)
Definition: matvec3.h:1560
const Vec3 m_v
Definition: constltp_axw.h:45
#define NO_OP
Definition: myassert.h:74
ConstitutiveLaw< doublereal, doublereal > * m_pCL
Definition: constltp_axw.h:44
virtual ~AxialCLWrapper(void)
Definition: constltp_axw.h:57
virtual std::ostream & Restart(std::ostream &out) const
Definition: constltp.h:107
virtual ConstLawType::Type GetConstLawType(void) const =0
virtual ConstitutiveLaw< T, Tder > * pCopy(void) const =0
virtual ConstitutiveLaw< Vec3, Mat3x3 > * pCopy(void) const
Definition: constltp_axw.h:66
virtual std::ostream & Restart(std::ostream &out) const
Definition: constltp_axw.h:77
AxialCLWrapper(ConstitutiveLaw< doublereal, doublereal > *pCL, const Vec3 &v)
Definition: constltp_axw.h:50
#define SAFENEWWITHCONSTRUCTOR(pnt, item, constructor)
Definition: mynewmem.h:698
virtual void AfterConvergence(const T &Eps, const T &EpsPrime=mb_zero< T >())
Definition: constltp.h:113
ConstLawType::Type GetConstLawType(void) const
Definition: constltp_axw.h:61
virtual const Tder & GetFDEPrime(void) const
Definition: constltp.h:133
virtual void AfterConvergence(const Vec3 &Eps, const Vec3 &EpsPrime=mb_zero< Vec3 >())
Definition: constltp_axw.h:100
virtual void Update(const T &Eps, const T &EpsPrime=mb_zero< T >())=0
double doublereal
Definition: colamd.c:52
ConstitutiveLaw1D * GetConstLaw1D(ConstLawType::Type &clt)
Definition: mbpar.cc:1941
virtual Vec3 GetVec3(void)
Definition: mbpar.cc:2220