MBDyn-1.7.3
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
point_contact.h
Go to the documentation of this file.
1
/*
2
* MBDyn (C) is a multibody analysis code.
3
* http://www.mbdyn.org
4
*
5
* Copyright (C) 1996-2017
6
*
7
* Pierangelo Masarati <masarati@aero.polimi.it>
8
* Paolo Mantegazza <mantegazza@aero.polimi.it>
9
*
10
* Dipartimento di Ingegneria Aerospaziale - Politecnico di Milano
11
* via La Masa, 34 - 20156 Milano, Italy
12
* http://www.aero.polimi.it
13
*
14
* Changing this copyright notice is forbidden.
15
*
16
* This program is free software; you can redistribute it and/or modify
17
* it under the terms of the GNU General Public License as published by
18
* the Free Software Foundation (version 2 of the License).
19
*
20
*
21
* This program is distributed in the hope that it will be useful,
22
* but WITHOUT ANY WARRANTY; without even the implied warranty of
23
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24
* GNU General Public License for more details.
25
*
26
* You should have received a copy of the GNU General Public License
27
* along with this program; if not, write to the Free Software
28
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29
*/
30
31
/* Point to surface contact */
32
33
34
#ifndef POINT_CONTACT_H
35
#define POINT_CONTACT_H
36
37
#include "
joint.h
"
38
39
40
/* PointSurfaceContact - begin */
41
42
class
PointSurfaceContact
:
43
virtual
public
Elem
,
public
Joint
{
44
private
:
45
protected
:
46
/* Punto di contatto */
47
const
StructNode
*
pNode1
;
48
49
/* Superificie */
50
const
StructNode
*
pSup
;
51
52
/* Posizione e orientazione della superficie */
53
Vec3
SupDirection
;
54
55
/* Distanza tra punto e superficie */
56
doublereal
dDeltaL
;
57
58
/* Elastic "stiffness" */
59
doublereal
ElasticStiffness
;
60
61
/* Output --> forza applicata sul punto */
62
Vec3
FNode1
;
63
64
Vec3
Farm
;
65
/* Output --> reazioni sulla superficie --> forza + momento di trasporto */
66
Vec3
FSup
;
67
Vec3
MSup
;
68
69
Vec3
n
;
70
71
void
AssMat
(
FullSubMatrixHandler
& WM,
doublereal
dCoef);
// costruzione Jacobiano locale
72
void
AssVec
(
SubVectorHandler
& WorkVec,
doublereal
dCoef);
// costruzione residuo locale
73
74
public
:
75
/* Costruttore non banale */
76
PointSurfaceContact
(
unsigned
int
uL,
77
const
DofOwner
* pDO,
78
const
StructNode
* pN1,
79
const
StructNode
* pNs,
80
const
Vec3
& SDir,
const
doublereal
Ek,
81
flag
fOut);
82
83
/* Distruttore */
84
virtual
~PointSurfaceContact
(
void
);
85
86
/* Tipo di joint */
87
virtual
Joint::Type
GetJointType
(
void
)
const
{
88
return
POINT_SURFACE_CONTACT
;
89
};
90
91
/* Contributo al file di Restart */
92
virtual
std::ostream&
Restart
(std::ostream& out)
const
;
93
94
virtual
void
Output
(
OutputHandler
& OH)
const
;
95
96
virtual
unsigned
int
iGetNumDof
(
void
)
const
{
97
return
0;
98
};
99
100
/* virtual DofOrder::Order GetDofType(unsigned int i) const {
101
std::cout << "GetDofType 1" << std::endl;
102
ASSERT(i >= 0 && i < iGetNumDof());
103
std::cout << "GetDofType 2 " << std::endl;
104
return DofOrder::ALGEBRAIC;
105
};
106
107
virtual DofOrder::Order GetEqType(unsigned int i) const {
108
std::cout << "GetEqType 1" << std::endl;
109
ASSERT(i >= 0 && i < iGetNumDof());
110
std::cout << "GetEqType 2" << std::endl;
111
return DofOrder::ALGEBRAIC;
112
};*/
113
114
virtual
void
WorkSpaceDim
(
integer
* piNumRows,
115
integer
* piNumCols)
const
{
116
*piNumRows = 9;
117
*piNumCols = 9;
118
};
119
120
/* assemblaggio jacobiano */
121
virtual
VariableSubMatrixHandler
&
122
AssJac
(
VariableSubMatrixHandler
& WorkMat,
123
doublereal
dCoef,
124
const
VectorHandler
& XCurr,
125
const
VectorHandler
& XPrimeCurr);
126
127
/* assemblaggio residuo */
128
virtual
SubVectorHandler
&
129
AssRes
(
SubVectorHandler
& WorkVec,
130
doublereal
dCoef,
131
const
VectorHandler
& XCurr,
132
const
VectorHandler
& XPrimeCurr);
133
134
virtual
unsigned
int
iGetInitialNumDof
(
void
)
const
{
135
return
0;
136
};
137
138
virtual
void
InitialWorkSpaceDim
(
integer
* piNumRows,
139
integer
* piNumCols)
const
{
140
*piNumRows = 9;
141
*piNumCols = 9;
142
};
143
144
145
146
/* Contributo allo jacobiano durante l'assemblaggio iniziale */
147
virtual
VariableSubMatrixHandler
&
148
InitialAssJac
(
VariableSubMatrixHandler
& WorkMat,
149
const
VectorHandler
& XCurr);
150
151
152
/* Contributo al residuo durante l'assemblaggio iniziale */
153
virtual
SubVectorHandler
&
154
InitialAssRes
(
SubVectorHandler
& WorkVec,
155
const
VectorHandler
& XCurr);
156
157
158
/* Dati privati (aggiungere magari le reazioni vincolari) */
159
/*virtual unsigned int iGetNumPrivData(void) const{};
160
virtual unsigned int iGetPrivDataIdx(const char *s) const{};
161
virtual doublereal dGetPrivData(unsigned int i = 0) const{};*/
162
163
164
/* *******PER IL SOLUTORE PARALLELO******** */
165
/* Fornisce il tipo e la label dei nodi che sono connessi all'elemento
166
utile per l'assemblaggio della matrice di connessione fra i dofs */
167
/* virtual void GetConnectedNodes(std::vector<const Node *>& connectedNodes) const {
168
connectedNodes.resize(2);
169
connectedNodes[0] = pNode1;
170
connectedNodes[1] = pNode2;
171
};
172
*/
/* ************************************************ */
173
};
174
175
/* PointSurfaceContact - end */
176
177
#endif
/* POINT_CONTACT_H */
Joint::Type
Type
Definition:
joint.h:66
PointSurfaceContact::InitialAssJac
virtual VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
Definition:
point_contact.cc:286
flag
long int flag
Definition:
mbdyn.h:43
Vec3
Definition:
matvec3.h:98
SubVectorHandler
Definition:
submat.h:1406
PointSurfaceContact::InitialAssRes
virtual SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)
Definition:
point_contact.cc:256
PointSurfaceContact::GetJointType
virtual Joint::Type GetJointType(void) const
Definition:
point_contact.h:87
PointSurfaceContact::FSup
Vec3 FSup
Definition:
point_contact.h:66
PointSurfaceContact::InitialWorkSpaceDim
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition:
point_contact.h:138
FullSubMatrixHandler
Definition:
submat.h:175
PointSurfaceContact::AssVec
void AssVec(SubVectorHandler &WorkVec, doublereal dCoef)
Definition:
point_contact.cc:122
PointSurfaceContact::iGetNumDof
virtual unsigned int iGetNumDof(void) const
Definition:
point_contact.h:96
PointSurfaceContact::pSup
const StructNode * pSup
Definition:
point_contact.h:50
PointSurfaceContact::Farm
Vec3 Farm
Definition:
point_contact.h:64
DofOwner
Definition:
dofown.h:68
OutputHandler
Definition:
output.h:65
PointSurfaceContact::AssJac
virtual VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition:
point_contact.cc:162
joint.h
PointSurfaceContact::pNode1
const StructNode * pNode1
Definition:
point_contact.h:47
PointSurfaceContact::MSup
Vec3 MSup
Definition:
point_contact.h:67
VectorHandler
Definition:
vh.h:63
PointSurfaceContact
Definition:
point_contact.h:42
PointSurfaceContact::n
Vec3 n
Definition:
point_contact.h:69
PointSurfaceContact::ElasticStiffness
doublereal ElasticStiffness
Definition:
point_contact.h:59
PointSurfaceContact::SupDirection
Vec3 SupDirection
Definition:
point_contact.h:53
PointSurfaceContact::FNode1
Vec3 FNode1
Definition:
point_contact.h:62
Elem
Definition:
elem.h:75
PointSurfaceContact::Restart
virtual std::ostream & Restart(std::ostream &out) const
Definition:
point_contact.cc:76
PointSurfaceContact::iGetInitialNumDof
virtual unsigned int iGetInitialNumDof(void) const
Definition:
point_contact.h:134
PointSurfaceContact::PointSurfaceContact
PointSurfaceContact(unsigned int uL, const DofOwner *pDO, const StructNode *pN1, const StructNode *pNs, const Vec3 &SDir, const doublereal Ek, flag fOut)
Definition:
point_contact.cc:50
VariableSubMatrixHandler
Definition:
submat.h:1113
PointSurfaceContact::AssRes
virtual SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
Definition:
point_contact.cc:93
PointSurfaceContact::~PointSurfaceContact
virtual ~PointSurfaceContact(void)
Definition:
point_contact.cc:69
Joint
Definition:
joint.h:50
PointSurfaceContact::dDeltaL
doublereal dDeltaL
Definition:
point_contact.h:56
PointSurfaceContact::AssMat
void AssMat(FullSubMatrixHandler &WM, doublereal dCoef)
Definition:
point_contact.cc:206
doublereal
double doublereal
Definition:
colamd.c:52
integer
long int integer
Definition:
colamd.c:51
PointSurfaceContact::Output
virtual void Output(OutputHandler &OH) const
Definition:
point_contact.cc:85
Joint::POINT_SURFACE_CONTACT
Definition:
joint.h:108
StructNode
Definition:
strnode.h:705
PointSurfaceContact::WorkSpaceDim
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition:
point_contact.h:114
mbdyn
struct
point_contact.h
Generated on Fri Apr 13 2018 10:19:36 for MBDyn-1.7.3 by
1.8.7