1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/base/symcltp.h,v 1.26 2017/01/12 14:46:10 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 /* Symbolic constitutive law */
33
34
35 #ifndef SYMCLTP_H
36 #define SYMCLTP_H
37
38 #include "constltp.h"
39
40 /* SymbolicElasticConstitutiveLaw - begin */
41
42 template <class T, class Tder>
43 class SymbolicElasticConstitutiveLaw
44 : public ElasticConstitutiveLaw<T, Tder> {
45 public:
46 SymbolicElasticConstitutiveLaw(
47 const TplDriveCaller<T>* pDC,
48 const T& PStress,
49 std::vector<std::string>& epsilon,
50 std::vector<std::string>& expression);
51 virtual ~SymbolicElasticConstitutiveLaw(void);
52 };
53
54 typedef SymbolicElasticConstitutiveLaw<doublereal, doublereal>
55 SymbolicElasticConstitutiveLaw1D;
56 typedef SymbolicElasticConstitutiveLaw<Vec3, Mat3x3>
57 SymbolicElasticConstitutiveLaw3D;
58 typedef SymbolicElasticConstitutiveLaw<Vec6, Mat6x6>
59 SymbolicElasticConstitutiveLaw6D;
60
61 template <class T, class Tder>
SymbolicElasticConstitutiveLaw(const TplDriveCaller<T> * pDC,const T & PStress,std::vector<std::string> & epsilon,std::vector<std::string> & expression)62 SymbolicElasticConstitutiveLaw<T, Tder>::SymbolicElasticConstitutiveLaw(
63 const TplDriveCaller<T>* pDC,
64 const T& PStress,
65 std::vector<std::string>& epsilon,
66 std::vector<std::string>& expression)
67 : ElasticConstitutiveLaw<T, Tder>(pDC, PStress)
68 {
69 NO_OP;
70 }
71
72 template <class T, class Tder>
~SymbolicElasticConstitutiveLaw(void)73 SymbolicElasticConstitutiveLaw<T, Tder>::~SymbolicElasticConstitutiveLaw(void)
74 {
75 NO_OP;
76 }
77
78 /* SymbolicElasticConstitutiveLaw - end */
79
80 /* SymbolicViscousConstitutiveLaw - begin */
81
82 template <class T, class Tder>
83 class SymbolicViscousConstitutiveLaw
84 : public ElasticConstitutiveLaw<T, Tder> {
85 public:
86 SymbolicViscousConstitutiveLaw(
87 const T& PStress,
88 std::vector<std::string>& epsilonPrime,
89 std::vector<std::string>& expression);
90 virtual ~SymbolicViscousConstitutiveLaw(void);
91 virtual ConstLawType::Type GetConstLawType(void) const;
92 };
93
94 typedef SymbolicViscousConstitutiveLaw<doublereal, doublereal>
95 SymbolicViscousConstitutiveLaw1D;
96 typedef SymbolicViscousConstitutiveLaw<Vec3, Mat3x3>
97 SymbolicViscousConstitutiveLaw3D;
98 typedef SymbolicViscousConstitutiveLaw<Vec6, Mat6x6>
99 SymbolicViscousConstitutiveLaw6D;
100
101 template <class T, class Tder>
SymbolicViscousConstitutiveLaw(const T & PStress,std::vector<std::string> & epsilonPrime,std::vector<std::string> & expression)102 SymbolicViscousConstitutiveLaw<T, Tder>::SymbolicViscousConstitutiveLaw(
103 const T& PStress,
104 std::vector<std::string>& epsilonPrime,
105 std::vector<std::string>& expression)
106 : ElasticConstitutiveLaw<T, Tder>(0, PStress)
107 {
108 NO_OP;
109 }
110
111 template <class T, class Tder>
~SymbolicViscousConstitutiveLaw(void)112 SymbolicViscousConstitutiveLaw<T, Tder>::~SymbolicViscousConstitutiveLaw(void)
113 {
114 NO_OP;
115 }
116
117 template <class T, class Tder>
118 ConstLawType::Type
GetConstLawType(void)119 SymbolicViscousConstitutiveLaw<T, Tder>::GetConstLawType(void) const
120 {
121 return ConstLawType::VISCOUS;
122 }
123
124 /* SymbolicViscousConstitutiveLaw - end */
125
126 /* SymbolicViscoElasticConstitutiveLaw - begin */
127
128 template <class T, class Tder>
129 class SymbolicViscoElasticConstitutiveLaw
130 : public ElasticConstitutiveLaw<T, Tder> {
131 public:
132 SymbolicViscoElasticConstitutiveLaw(
133 const TplDriveCaller<T>* pDC,
134 const T& PStress,
135 std::vector<std::string>& epsilon,
136 std::vector<std::string>& epsilonPrime,
137 std::vector<std::string>& expression);
138 virtual ~SymbolicViscoElasticConstitutiveLaw(void);
139 virtual ConstLawType::Type GetConstLawType(void) const;
140 };
141
142 typedef SymbolicViscoElasticConstitutiveLaw<doublereal, doublereal>
143 SymbolicViscoElasticConstitutiveLaw1D;
144 typedef SymbolicViscoElasticConstitutiveLaw<Vec3, Mat3x3>
145 SymbolicViscoElasticConstitutiveLaw3D;
146 typedef SymbolicViscoElasticConstitutiveLaw<Vec6, Mat6x6>
147 SymbolicViscoElasticConstitutiveLaw6D;
148
149 template <class T, class Tder>
SymbolicViscoElasticConstitutiveLaw(const TplDriveCaller<T> * pDC,const T & PStress,std::vector<std::string> & epsilon,std::vector<std::string> & epsilonPrime,std::vector<std::string> & expression)150 SymbolicViscoElasticConstitutiveLaw<T, Tder>::SymbolicViscoElasticConstitutiveLaw(
151 const TplDriveCaller<T>* pDC,
152 const T& PStress,
153 std::vector<std::string>& epsilon,
154 std::vector<std::string>& epsilonPrime,
155 std::vector<std::string>& expression)
156 : ElasticConstitutiveLaw<T, Tder>(pDC, PStress)
157 {
158 NO_OP;
159 }
160
161 template <class T, class Tder>
~SymbolicViscoElasticConstitutiveLaw(void)162 SymbolicViscoElasticConstitutiveLaw<T, Tder>::~SymbolicViscoElasticConstitutiveLaw(void)
163 {
164 NO_OP;
165 }
166
167 template <class T, class Tder>
168 ConstLawType::Type
GetConstLawType(void)169 SymbolicViscoElasticConstitutiveLaw<T, Tder>::GetConstLawType(void) const
170 {
171 return ConstLawType::VISCOELASTIC;
172 }
173
174 /* SymbolicViscoElasticConstitutiveLaw - end */
175
176 #endif /* SYMCLTP_H */
177
178