OOFEM
3.0
Loading...
Searching...
No Matches
src
core
Contact
contactpoint.h
Go to the documentation of this file.
1
/*
2
*
3
* ##### ##### ###### ###### ### ###
4
* ## ## ## ## ## ## ## ### ##
5
* ## ## ## ## #### #### ## # ##
6
* ## ## ## ## ## ## ## ##
7
* ## ## ## ## ## ## ## ##
8
* ##### ##### ## ###### ## ##
9
*
10
*
11
* OOFEM : Object Oriented Finite Element Code
12
*
13
* Copyright (C) 1993 - 2025 Borek Patzak
14
*
15
*
16
*
17
* Czech Technical University, Faculty of Civil Engineering,
18
* Department of Structural Mechanics, 166 29 Prague, Czech Republic
19
*
20
* This library is free software; you can redistribute it and/or
21
* modify it under the terms of the GNU Lesser General Public
22
* License as published by the Free Software Foundation; either
23
* version 2.1 of the License, or (at your option) any later version.
24
*
25
* This program is distributed in the hope that it will be useful,
26
* but WITHOUT ANY WARRANTY; without even the implied warranty of
27
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28
* Lesser General Public License for more details.
29
*
30
* You should have received a copy of the GNU Lesser General Public
31
* License along with this library; if not, write to the Free Software
32
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33
*/
34
35
#ifndef contactpoint_h
36
#define contactpoint_h
37
38
#include "
gausspoint.h
"
39
#include "
fecontactsurface.h
"
40
#include "
feinterpol.h
"
41
42
namespace
oofem
{
43
class
IntArray
;
44
class
FloatArray
;
45
66
67
68
class
ContactPoint
69
{
70
protected
:
71
int
surface_dimension
;
72
public
:
73
ContactPoint
() {}
74
~ContactPoint
(){;}
82
virtual
void
computeNmatrix
(
FloatMatrix
&answer) = 0;
89
virtual
void
compute_dNdxi_matrix
(
FloatMatrix
&Bs,
int
i) = 0;
97
virtual
void
computeCurvature
(
FloatMatrix
&G,
const
FloatArray
&normal,
TimeStep
*tStep) = 0;
105
virtual
const
FloatArray
&
giveLocalCoordinates
() = 0;
111
virtual
FloatArray
giveGlobalCoordinates
() = 0;
120
virtual
bool
giveLocationArray
(
IntArray
&locationArray,
const
IntArray
&dofIDArry,
121
const
UnknownNumberingScheme
&s)
const
= 0;
134
virtual
void
giveUnknownVector
(
FloatArray
&answer,
const
IntArray
&dofMask, ValueModeType mode,
TimeStep
*tStep,
bool
padding =
false
) = 0;
140
virtual
FloatArray
giveNormalVector
() = 0;
148
virtual
void
updateYourself
(
TimeStep
*tStep){;}
155
virtual
void
init
(){;}
161
virtual
bool
inContact
() = 0;
171
virtual
void
computeVectorOf
(ValueModeType u,
TimeStep
*tStep,
FloatArray
&answer) = 0;
178
virtual
void
giveUpdatedCoordinates
(
FloatArray
&coords,
TimeStep
* tStep) = 0;
184
int
giveSurfaceDimension
(){
return
surface_dimension
;}
185
186
};
187
188
189
class
FEContactPoint
:
public
ContactPoint
190
{
191
protected
:
192
int
contactElementId
;
193
std::unique_ptr<FEContactSurface>
contactSurface
;
194
195
public
:
196
FEContactPoint
(
FEContactSurface
*cs,
int
ceId,
int
sd) :
ContactPoint
(),
contactElementId
(ceId),
contactSurface
(std::move(cs)){this->
surface_dimension
= sd;}
197
~FEContactPoint
(){;}
198
//
199
void
computeNmatrix
(
FloatMatrix
&answer)
override
;
200
//
201
void
compute_dNdxi_matrix
(
FloatMatrix
&Bs,
int
i)
override
;
202
//
203
FloatArray
giveNormalVector
()
override
;
204
//
205
void
computeVectorOf
(ValueModeType mode,
TimeStep
*tStep,
FloatArray
&answer)
override
;
206
//
207
void
computeCurvature
(
FloatMatrix
&G,
const
FloatArray
&normal,
TimeStep
*tStep)
override
;
208
//
209
bool
giveLocationArray
(
IntArray
&locationArray,
const
IntArray
&dofIDArry,
210
const
UnknownNumberingScheme
&s)
const override
;
211
//
212
void
giveUnknownVector
(
FloatArray
&answer,
const
IntArray
&dofMask, ValueModeType mode,
TimeStep
*tStep,
bool
padding =
false
)
override
;
213
void
giveUpdatedCoordinates
(
FloatArray
&coords,
TimeStep
* tStep)
override
;
215
bool
inContact
()
override
{
return
(
contactElementId
< 0 ?
false
:
true
);}
216
//
217
const
FloatArray
&
giveLocalCoordinates
()
override
= 0;
218
FloatArray
giveGlobalCoordinates
()
override
= 0;
219
//
220
FEInterpolation
*
giveInterpolation
();
221
int
giveContactElementId
(){
return
contactElementId
;}
222
void
setContactElementId
(
int
ceId){
contactElementId
= ceId;}
224
};
225
226
227
class
FEContactPoint_Slave
:
public
FEContactPoint
228
{
229
protected
:
230
std::unique_ptr<GaussPoint>
slave_point
;
231
232
public
:
233
FEContactPoint_Slave
(
FEContactSurface
*cs,
int
ceId,
int
sd,
GaussPoint
*gp) :
FEContactPoint
(cs, ceId, sd),
slave_point
(std::move(gp)){;}
234
~FEContactPoint_Slave
(){;}
235
//
236
const
FloatArray
&
giveLocalCoordinates
()
override
{
return
slave_point
->giveNaturalCoordinates();}
237
FloatArray
giveGlobalCoordinates
()
override
{
return
slave_point
->giveGlobalCoordinates();}
238
};
239
240
241
242
class
FEContactPoint_Master
:
public
FEContactPoint
243
{
244
protected
:
245
FloatArray
localCoordinates
;
246
247
public
:
248
FEContactPoint_Master
(
FEContactSurface
*cs,
int
ceId,
int
sd,
FloatArray
lc) :
FEContactPoint
(cs, ceId, sd),
localCoordinates
(lc){;}
249
~FEContactPoint_Master
(){;}
250
//
251
const
FloatArray
&
giveLocalCoordinates
()
override
{
return
this->localCoordinates;}
252
FloatArray
giveGlobalCoordinates
()
override
;
253
};
254
255
256
}
// end namespace oofem
257
#endif
//contactpoint_h
oofem::ContactPoint::giveSurfaceDimension
int giveSurfaceDimension()
Returns the surface dimension associated with this contact point.
Definition
contactpoint.h:184
oofem::ContactPoint::giveUpdatedCoordinates
virtual void giveUpdatedCoordinates(FloatArray &coords, TimeStep *tStep)=0
Returns updated coordinates of the contact point for the given time step.
oofem::ContactPoint::computeVectorOf
virtual void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)=0
Computes a vector quantity of the contact point for a given value mode.
oofem::ContactPoint::updateYourself
virtual void updateYourself(TimeStep *tStep)
Called to update internal state of the contact point for the time step.
Definition
contactpoint.h:148
oofem::ContactPoint::giveUnknownVector
virtual void giveUnknownVector(FloatArray &answer, const IntArray &dofMask, ValueModeType mode, TimeStep *tStep, bool padding=false)=0
Extracts the unknown vector associated with this contact point.
oofem::ContactPoint::giveLocalCoordinates
virtual const FloatArray & giveLocalCoordinates()=0
Returns the local (parametric) coordinates of the contact point.
oofem::ContactPoint::~ContactPoint
~ContactPoint()
Definition
contactpoint.h:74
oofem::ContactPoint::compute_dNdxi_matrix
virtual void compute_dNdxi_matrix(FloatMatrix &Bs, int i)=0
Computes derivative of shape functions w.r.t. the i-th local surface parameter.
oofem::ContactPoint::ContactPoint
ContactPoint()
Definition
contactpoint.h:73
oofem::ContactPoint::giveGlobalCoordinates
virtual FloatArray giveGlobalCoordinates()=0
Returns the current global coordinates of the contact point.
oofem::ContactPoint::inContact
virtual bool inContact()=0
Returns whether this contact point is currently in contact.
oofem::ContactPoint::giveNormalVector
virtual FloatArray giveNormalVector()=0
Returns the surface normal vector at the contact point.
oofem::ContactPoint::computeCurvature
virtual void computeCurvature(FloatMatrix &G, const FloatArray &normal, TimeStep *tStep)=0
Computes curvature-related surface quantities at this contact point.
oofem::ContactPoint::init
virtual void init()
Initializes the contact point.
Definition
contactpoint.h:155
oofem::ContactPoint::giveLocationArray
virtual bool giveLocationArray(IntArray &locationArray, const IntArray &dofIDArry, const UnknownNumberingScheme &s) const =0
Builds a location array for assembling quantities related to this contact point.
oofem::ContactPoint::surface_dimension
int surface_dimension
Definition
contactpoint.h:71
oofem::ContactPoint::computeNmatrix
virtual void computeNmatrix(FloatMatrix &answer)=0
Computes the interpolation matrix (N-matrix) for this contact point.
oofem::FEContactPoint_Master::giveGlobalCoordinates
FloatArray giveGlobalCoordinates() override
Returns the current global coordinates of the contact point.
Definition
contactpoint.C:162
oofem::FEContactPoint_Master::giveLocalCoordinates
const FloatArray & giveLocalCoordinates() override
Returns the local (parametric) coordinates of the contact point.
Definition
contactpoint.h:251
oofem::FEContactPoint_Master::localCoordinates
FloatArray localCoordinates
Definition
contactpoint.h:245
oofem::FEContactPoint_Master::~FEContactPoint_Master
~FEContactPoint_Master()
Definition
contactpoint.h:249
oofem::FEContactPoint_Master::FEContactPoint_Master
FEContactPoint_Master(FEContactSurface *cs, int ceId, int sd, FloatArray lc)
Definition
contactpoint.h:248
oofem::FEContactPoint_Slave::slave_point
std::unique_ptr< GaussPoint > slave_point
Definition
contactpoint.h:230
oofem::FEContactPoint_Slave::giveGlobalCoordinates
FloatArray giveGlobalCoordinates() override
Returns the current global coordinates of the contact point.
Definition
contactpoint.h:237
oofem::FEContactPoint_Slave::~FEContactPoint_Slave
~FEContactPoint_Slave()
Definition
contactpoint.h:234
oofem::FEContactPoint_Slave::giveLocalCoordinates
const FloatArray & giveLocalCoordinates() override
Returns the local (parametric) coordinates of the contact point.
Definition
contactpoint.h:236
oofem::FEContactPoint_Slave::FEContactPoint_Slave
FEContactPoint_Slave(FEContactSurface *cs, int ceId, int sd, GaussPoint *gp)
Definition
contactpoint.h:233
oofem::FEContactPoint::compute_dNdxi_matrix
void compute_dNdxi_matrix(FloatMatrix &Bs, int i) override
Computes derivative of shape functions w.r.t. the i-th local surface parameter.
Definition
contactpoint.C:68
oofem::FEContactPoint::giveUpdatedCoordinates
void giveUpdatedCoordinates(FloatArray &coords, TimeStep *tStep) override
Returns updated coordinates of the contact point for the given time step.
Definition
contactpoint.C:134
oofem::FEContactPoint::giveLocalCoordinates
const FloatArray & giveLocalCoordinates() override=0
Returns the local (parametric) coordinates of the contact point.
oofem::FEContactPoint::contactSurface
std::unique_ptr< FEContactSurface > contactSurface
Definition
contactpoint.h:193
oofem::FEContactPoint::giveGlobalCoordinates
FloatArray giveGlobalCoordinates() override=0
Returns the current global coordinates of the contact point.
oofem::FEContactPoint::computeCurvature
void computeCurvature(FloatMatrix &G, const FloatArray &normal, TimeStep *tStep) override
Computes curvature-related surface quantities at this contact point.
Definition
contactpoint.C:96
oofem::FEContactPoint::giveContactElementId
int giveContactElementId()
Definition
contactpoint.h:221
oofem::FEContactPoint::computeNmatrix
void computeNmatrix(FloatMatrix &answer) override
Computes the interpolation matrix (N-matrix) for this contact point.
Definition
contactpoint.C:60
oofem::FEContactPoint::FEContactPoint
FEContactPoint(FEContactSurface *cs, int ceId, int sd)
Definition
contactpoint.h:196
oofem::FEContactPoint::giveUnknownVector
void giveUnknownVector(FloatArray &answer, const IntArray &dofMask, ValueModeType mode, TimeStep *tStep, bool padding=false) override
Extracts the unknown vector associated with this contact point.
Definition
contactpoint.C:155
oofem::FEContactPoint::giveNormalVector
FloatArray giveNormalVector() override
Returns the surface normal vector at the contact point.
Definition
contactpoint.C:89
oofem::FEContactPoint::~FEContactPoint
~FEContactPoint()
Definition
contactpoint.h:197
oofem::FEContactPoint::giveInterpolation
FEInterpolation * giveInterpolation()
Definition
contactpoint.C:46
oofem::FEContactPoint::inContact
bool inContact() override
Returns whether this contact point is currently in contact.
Definition
contactpoint.h:215
oofem::FEContactPoint::computeVectorOf
void computeVectorOf(ValueModeType mode, TimeStep *tStep, FloatArray &answer) override
Computes a vector quantity of the contact point for a given value mode.
Definition
contactpoint.C:126
oofem::FEContactPoint::setContactElementId
void setContactElementId(int ceId)
Definition
contactpoint.h:222
oofem::FEContactPoint::giveLocationArray
bool giveLocationArray(IntArray &locationArray, const IntArray &dofIDArry, const UnknownNumberingScheme &s) const override
Builds a location array for assembling quantities related to this contact point.
Definition
contactpoint.C:143
oofem::FEContactPoint::contactElementId
int contactElementId
Definition
contactpoint.h:192
oofem::FEContactSurface
Abstract representation of a finite element contact surface.
Definition
fecontactsurface.h:87
oofem::FEInterpolation
Definition
feinterpol.h:175
oofem::FloatArray
Definition
floatarray.h:92
oofem::FloatMatrix
Definition
floatmatrix.h:87
oofem::GaussPoint
Definition
gausspoint.h:95
oofem::IntArray
Definition
intarray.h:63
oofem::TimeStep
Definition
timestep.h:82
oofem::UnknownNumberingScheme
Definition
unknownnumberingscheme.h:48
fecontactsurface.h
feinterpol.h
gausspoint.h
oofem
Definition
additivemanufacturingproblem.C:83
This page is part of the
OOFEM-3.0
documentation. Copyright Copyright (C) 1994-2025 Borek Patzak
Bořek Patzák
Project e-mail:
oofem@fsv.cvut.cz
Generated at
for OOFEM by
doxygen
1.15.0 written by
Dimitri van Heesch
, © 1997-2011