OOFEM 3.0
Loading...
Searching...
No Matches
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
42namespace oofem {
43class IntArray;
44class FloatArray;
45
66
67
69{
70protected:
72public:
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;
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;
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;
185
186};
187
188
190{
191protected:
193 std::unique_ptr<FEContactSurface> contactSurface;
194
195public:
196 FEContactPoint(FEContactSurface *cs, int ceId, int sd) : ContactPoint(), contactElementId(ceId), contactSurface(std::move(cs)){this->surface_dimension = sd;}
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;
219 //
222 void setContactElementId(int ceId){contactElementId = ceId;}
224};
225
226
228{
229protected:
230 std::unique_ptr<GaussPoint> slave_point;
231
232public:
233 FEContactPoint_Slave(FEContactSurface *cs, int ceId, int sd,GaussPoint *gp) : FEContactPoint(cs, ceId, sd),slave_point(std::move(gp)){;}
235 //
236 const FloatArray &giveLocalCoordinates() override {return slave_point->giveNaturalCoordinates();}
237 FloatArray giveGlobalCoordinates() override {return slave_point->giveGlobalCoordinates();}
238};
239
240
241
243{
244protected:
246
247public:
248 FEContactPoint_Master(FEContactSurface *cs, int ceId, int sd, FloatArray lc) : FEContactPoint(cs, ceId, sd),localCoordinates(lc){;}
250 //
251 const FloatArray &giveLocalCoordinates() override {return this->localCoordinates;}
253};
254
255
256} // end namespace oofem
257#endif //contactpoint_h
int giveSurfaceDimension()
Returns the surface dimension associated with this contact point.
virtual void giveUpdatedCoordinates(FloatArray &coords, TimeStep *tStep)=0
Returns updated coordinates of the contact point for the given time step.
virtual void computeVectorOf(ValueModeType u, TimeStep *tStep, FloatArray &answer)=0
Computes a vector quantity of the contact point for a given value mode.
virtual void updateYourself(TimeStep *tStep)
Called to update internal state of the contact point for the time step.
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.
virtual const FloatArray & giveLocalCoordinates()=0
Returns the local (parametric) coordinates of the contact point.
virtual void compute_dNdxi_matrix(FloatMatrix &Bs, int i)=0
Computes derivative of shape functions w.r.t. the i-th local surface parameter.
virtual FloatArray giveGlobalCoordinates()=0
Returns the current global coordinates of the contact point.
virtual bool inContact()=0
Returns whether this contact point is currently in contact.
virtual FloatArray giveNormalVector()=0
Returns the surface normal vector at the contact point.
virtual void computeCurvature(FloatMatrix &G, const FloatArray &normal, TimeStep *tStep)=0
Computes curvature-related surface quantities at this contact point.
virtual void init()
Initializes the contact point.
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.
virtual void computeNmatrix(FloatMatrix &answer)=0
Computes the interpolation matrix (N-matrix) for this contact point.
FloatArray giveGlobalCoordinates() override
Returns the current global coordinates of the contact point.
const FloatArray & giveLocalCoordinates() override
Returns the local (parametric) coordinates of the contact point.
FEContactPoint_Master(FEContactSurface *cs, int ceId, int sd, FloatArray lc)
std::unique_ptr< GaussPoint > slave_point
FloatArray giveGlobalCoordinates() override
Returns the current global coordinates of the contact point.
const FloatArray & giveLocalCoordinates() override
Returns the local (parametric) coordinates of the contact point.
FEContactPoint_Slave(FEContactSurface *cs, int ceId, int sd, GaussPoint *gp)
void compute_dNdxi_matrix(FloatMatrix &Bs, int i) override
Computes derivative of shape functions w.r.t. the i-th local surface parameter.
void giveUpdatedCoordinates(FloatArray &coords, TimeStep *tStep) override
Returns updated coordinates of the contact point for the given time step.
const FloatArray & giveLocalCoordinates() override=0
Returns the local (parametric) coordinates of the contact point.
std::unique_ptr< FEContactSurface > contactSurface
FloatArray giveGlobalCoordinates() override=0
Returns the current global coordinates of the contact point.
void computeCurvature(FloatMatrix &G, const FloatArray &normal, TimeStep *tStep) override
Computes curvature-related surface quantities at this contact point.
void computeNmatrix(FloatMatrix &answer) override
Computes the interpolation matrix (N-matrix) for this contact point.
FEContactPoint(FEContactSurface *cs, int ceId, int sd)
void giveUnknownVector(FloatArray &answer, const IntArray &dofMask, ValueModeType mode, TimeStep *tStep, bool padding=false) override
Extracts the unknown vector associated with this contact point.
FloatArray giveNormalVector() override
Returns the surface normal vector at the contact point.
FEInterpolation * giveInterpolation()
bool inContact() override
Returns whether this contact point is currently in contact.
void computeVectorOf(ValueModeType mode, TimeStep *tStep, FloatArray &answer) override
Computes a vector quantity of the contact point for a given value mode.
void setContactElementId(int ceId)
bool giveLocationArray(IntArray &locationArray, const IntArray &dofIDArry, const UnknownNumberingScheme &s) const override
Builds a location array for assembling quantities related to this contact point.
Abstract representation of a finite element contact surface.

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