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
inplcntj.h
Go to the documentation of this file.
1
/* $Header: /var/cvs/mbdyn/mbdyn/mbdyn-1.0/mbdyn/struct/inplcntj.h,v 1.24 2017/01/12 14:46:43 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
/* Vincolo di contatto in un piano */
33
34
#ifndef INPLCNTJ_H
35
#define INPLCNTJ_H
36
37
#include "
joint.h
"
38
39
/* InPlaneContact - begin */
40
41
/* Vincolo di contatto nel piano:
42
* analogo al vincolo di giacenza nel piano per quanto riguarda la struttura,
43
* tuttavia in questo caso i due corpi non sono obbligati ad essere
44
* in contatto. La loro distanza deve essere positiva nella direzione
45
* del vettore v o nulla. Il prodotto della distanza per la reazione vincolare
46
* deve essere nullo sempre. Questo implica che la reazione puo' essere
47
* presente solo quando i due corpi sono in contatto.
48
* Valutare la possibilita' di introdurre anche una forza di attrito per
49
* strisciamento (anche nel caso del semplice contatto) */
50
51
class
InPlaneContactJoint
:
public
Joint
{
52
private
:
53
const
StructNode
*
pNode1
;
54
const
StructNode
*
pNode2
;
55
Vec3
v
;
56
Vec3
p
;
57
doublereal
dF
;
58
59
public
:
60
/* Costruttore banale */
61
InPlaneContactJoint
(
unsigned
int
uL,
const
DofOwner
* pDO);
62
63
/* Costruttore non banale */
64
InPlaneContactJoint
(
unsigned
int
uL,
const
DofOwner
* pDO,
65
const
StructNode
* pN1,
const
StructNode
* pN2,
66
const
Vec3
& vTmp,
const
Vec3
& pTmp);
67
68
~InPlaneContactJoint
(
void
);
69
70
/* Tipo di Joint */
71
virtual
Joint::Type
GetJointType
(
void
)
const
72
{
return
Joint::INPLANECONTACT
; };
73
74
/* Contributo al file di restart */
75
virtual
std::ostream&
Restart
(std::ostream& out)
const
;
76
77
virtual
unsigned
int
iGetNumDof
(
void
)
const
{
78
return
1;
79
};
80
81
virtual
DofOrder::Order
GetDofType
(
unsigned
int
i)
const
{
82
ASSERT
(i >= 0 && i < 1);
83
return
DofOrder::ALGEBRAIC
;
84
};
85
86
virtual
void
WorkSpaceDim
(
integer
* piNumRows,
integer
* piNumCols)
const
{
87
*piNumRows = 13;
88
*piNumCols = 13;
89
};
90
91
VariableSubMatrixHandler
&
AssJac
(
VariableSubMatrixHandler
& WorkMat,
92
doublereal
dCoef,
93
const
VectorHandler
& XCurr,
94
const
VectorHandler
& XPrimeCurr);
95
SubVectorHandler
&
AssRes
(
SubVectorHandler
& WorkVec,
96
doublereal
dCoef,
97
const
VectorHandler
& XCurr,
98
const
VectorHandler
& XPrimeCurr);
99
100
virtual
void
Output
(
OutputHandler
& OH)
const
;
101
102
103
/* funzioni usate nell'assemblaggio iniziale */
104
105
virtual
unsigned
int
iGetInitialNumDof
(
void
)
const
{
return
2; };
106
virtual
void
InitialWorkSpaceDim
(
integer
* piNumRows,
107
integer
* piNumCols)
const
108
{ *piNumRows = 26; *piNumCols = 26; };
109
110
/* Contributo allo jacobiano durante l'assemblaggio iniziale */
111
VariableSubMatrixHandler
&
InitialAssJac
(
VariableSubMatrixHandler
& WorkMat,
112
const
VectorHandler
& XCurr);
113
114
/* Contributo al residuo durante l'assemblaggio iniziale */
115
SubVectorHandler
&
InitialAssRes
(
SubVectorHandler
& WorkVec,
116
const
VectorHandler
& XCurr);
117
118
/* Setta il valore iniziale delle proprie variabili */
119
virtual
void
SetInitialValue
(
VectorHandler
& X);
120
121
/* *******PER IL SOLUTORE PARALLELO******** */
122
/* Fornisce il tipo e la label dei nodi che sono connessi all'elemento
123
utile per l'assemblaggio della matrice di connessione fra i dofs */
124
virtual
void
GetConnectedNodes
(std::vector<const Node *>& connectedNodes)
const
{
125
connectedNodes.resize(2);
126
connectedNodes[0] =
pNode1
;
127
connectedNodes[1] =
pNode2
;
128
};
129
/* ************************************************ */
130
};
131
132
/* InPlaneContactJoint - end */
133
134
#endif
InPlaneContactJoint::GetConnectedNodes
virtual void GetConnectedNodes(std::vector< const Node * > &connectedNodes) const
Definition:
inplcntj.h:124
InPlaneContactJoint::iGetNumDof
virtual unsigned int iGetNumDof(void) const
Definition:
inplcntj.h:77
Joint::Type
Type
Definition:
joint.h:66
InPlaneContactJoint::p
Vec3 p
Definition:
inplcntj.h:56
InPlaneContactJoint::InitialWorkSpaceDim
virtual void InitialWorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition:
inplcntj.h:106
DofOrder::Order
Order
Definition:
dofown.h:45
Vec3
Definition:
matvec3.h:98
SubVectorHandler
Definition:
submat.h:1406
InPlaneContactJoint::GetJointType
virtual Joint::Type GetJointType(void) const
Definition:
inplcntj.h:71
InPlaneContactJoint::AssRes
SubVectorHandler & AssRes(SubVectorHandler &WorkVec, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
DofOrder::ALGEBRAIC
Definition:
dofown.h:47
InPlaneContactJoint::WorkSpaceDim
virtual void WorkSpaceDim(integer *piNumRows, integer *piNumCols) const
Definition:
inplcntj.h:86
Joint::INPLANECONTACT
Definition:
joint.h:84
InPlaneContactJoint::SetInitialValue
virtual void SetInitialValue(VectorHandler &X)
InPlaneContactJoint::InPlaneContactJoint
InPlaneContactJoint(unsigned int uL, const DofOwner *pDO)
DofOwner
Definition:
dofown.h:68
OutputHandler
Definition:
output.h:65
InPlaneContactJoint::v
Vec3 v
Definition:
inplcntj.h:55
InPlaneContactJoint::pNode1
const StructNode * pNode1
Definition:
inplcntj.h:53
joint.h
InPlaneContactJoint::~InPlaneContactJoint
~InPlaneContactJoint(void)
InPlaneContactJoint::GetDofType
virtual DofOrder::Order GetDofType(unsigned int i) const
Definition:
inplcntj.h:81
InPlaneContactJoint::InitialAssRes
SubVectorHandler & InitialAssRes(SubVectorHandler &WorkVec, const VectorHandler &XCurr)
InPlaneContactJoint::InitialAssJac
VariableSubMatrixHandler & InitialAssJac(VariableSubMatrixHandler &WorkMat, const VectorHandler &XCurr)
VectorHandler
Definition:
vh.h:63
ASSERT
#define ASSERT(expression)
Definition:
colamd.c:977
InPlaneContactJoint::iGetInitialNumDof
virtual unsigned int iGetInitialNumDof(void) const
Definition:
inplcntj.h:105
InPlaneContactJoint::dF
doublereal dF
Definition:
inplcntj.h:57
InPlaneContactJoint::pNode2
const StructNode * pNode2
Definition:
inplcntj.h:54
VariableSubMatrixHandler
Definition:
submat.h:1113
InPlaneContactJoint::Restart
virtual std::ostream & Restart(std::ostream &out) const
Joint
Definition:
joint.h:50
InPlaneContactJoint::AssJac
VariableSubMatrixHandler & AssJac(VariableSubMatrixHandler &WorkMat, doublereal dCoef, const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
doublereal
double doublereal
Definition:
colamd.c:52
integer
long int integer
Definition:
colamd.c:51
InPlaneContactJoint
Definition:
inplcntj.h:51
InPlaneContactJoint::Output
virtual void Output(OutputHandler &OH) const
StructNode
Definition:
strnode.h:705
mbdyn
struct
inplcntj.h
Generated on Fri Apr 13 2018 10:19:33 for MBDyn-1.7.3 by
1.8.7