MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
shape_impl.h
Go to the documentation of this file.
1 /* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/base/shape_impl.h,v 1.8 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 /* Classe di forme pluridimensionali */
33 
34 #ifndef SHAPE_IMPL_H
35 #define SHAPE_IMPL_H
36 
37 #include "shape.h"
38 
39 /* Esempi sono:
40  * - la forma costante
41  * - la forma lineare
42  * - la forma parabolica
43  */
44 
46 protected:
47  int nPoints;
50 
51 public:
53 
55 
56  doublereal dGet(doublereal d, doublereal = 0.) const;
57 
58  std::ostream& Restart(std::ostream& out) const;
59 };
60 
61 class LinearShape1D : public Shape1D {
62 protected:
65 
66 public:
68 
69  ~LinearShape1D(void);
70 
71  doublereal dGet(doublereal d, doublereal = 0.) const;
72 
73  std::ostream& Restart(std::ostream& out) const;
74 };
75 
77 protected:
78  int nPoints;
81 
82 public:
84 
86 
87  doublereal dGet(doublereal d, doublereal = 0.) const;
88 
89  std::ostream& Restart(std::ostream& out) const;
90 };
91 
92 class ParabolicShape1D : public Shape1D {
93 protected:
97 
98 public:
100 
101  ~ParabolicShape1D(void);
102 
103  doublereal dGet(doublereal d, doublereal = 0.) const;
104 
105  std::ostream& Restart(std::ostream& out) const;
106 };
107 
108 /* Esempi sono:
109  * - la forma costante
110  * - la forma bilineare
111  */
112 
113 class ConstShape2D : public Shape2D {
114 protected:
116 
117 public:
119 
120  ~ConstShape2D(void);
121 
122  doublereal dGet(doublereal /* d */ , doublereal = 0.) const;
123 
124  std::ostream& Restart(std::ostream& out) const;
125 };
126 
127 class BilinearShape2D : public Shape2D {
128 protected:
133 
134 public:
136  doublereal d1y, doublereal d1xy);
137 
138  ~BilinearShape2D(void);
139 
140  doublereal dGet(doublereal dx, doublereal dy) const;
141 
142  std::ostream& Restart(std::ostream& out) const;
143 };
144 
145 #endif // SHAPE_IMPL_H
146 
PiecewiseLinearShape1D(int n, doublereal *x, doublereal *v)
Definition: shape.cc:171
~ParabolicShape1D(void)
Definition: shape.cc:223
doublereal dGet(doublereal d, doublereal=0.) const
Definition: shape.cc:229
doublereal * pdV
Definition: shape_impl.h:80
~PiecewiseConstShape1D(void)
Definition: shape.cc:114
std::ostream & Restart(std::ostream &out) const
Definition: shape.cc:206
BilinearShape2D(doublereal d0, doublereal d1x, doublereal d1y, doublereal d1xy)
Definition: shape.cc:269
doublereal dConst
Definition: shape_impl.h:115
std::ostream & Restart(std::ostream &out) const
Definition: shape.cc:137
ParabolicShape1D(doublereal d0, doublereal d1, doublereal d2)
Definition: shape.cc:217
doublereal dGet(doublereal dx, doublereal dy) const
Definition: shape.cc:282
~BilinearShape2D(void)
Definition: shape.cc:276
std::ostream & Restart(std::ostream &out) const
Definition: shape.cc:264
doublereal dGet(doublereal d, doublereal=0.) const
Definition: shape.cc:121
doublereal da0
Definition: shape_impl.h:94
Definition: shape.h:87
LinearShape1D(doublereal d0, doublereal d1)
Definition: shape.cc:148
doublereal dSlope
Definition: shape_impl.h:64
doublereal da0
Definition: shape_impl.h:129
doublereal da1x
Definition: shape_impl.h:130
std::ostream & Restart(std::ostream &out) const
Definition: shape.cc:166
doublereal * pdX
Definition: shape_impl.h:48
std::ostream & Restart(std::ostream &out) const
Definition: shape.cc:235
PiecewiseConstShape1D(int n, doublereal *x, doublereal *v)
Definition: shape.cc:105
doublereal dGet(doublereal, doublereal=0.) const
Definition: shape.cc:258
~LinearShape1D(void)
Definition: shape.cc:154
~ConstShape2D(void)
Definition: shape.cc:252
doublereal dShift
Definition: shape_impl.h:63
doublereal dGet(doublereal d, doublereal=0.) const
Definition: shape.cc:160
~PiecewiseLinearShape1D(void)
Definition: shape.cc:180
doublereal da1y
Definition: shape_impl.h:131
doublereal * pdV
Definition: shape_impl.h:49
Definition: shape.h:112
doublereal dGet(doublereal d, doublereal=0.) const
Definition: shape.cc:187
double doublereal
Definition: colamd.c:52
ConstShape2D(doublereal d)
Definition: shape.cc:246
doublereal da1xy
Definition: shape_impl.h:132
doublereal da1
Definition: shape_impl.h:95
std::ostream & Restart(std::ostream &out) const
Definition: shape.cc:288
doublereal da2
Definition: shape_impl.h:96
doublereal * pdX
Definition: shape_impl.h:79