OOFEM 3.0
Loading...
Searching...
No Matches
contactbc.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 contactbc_h
36#define contactbc_h
37
38#include "activebc.h"
39#include "floatarray.h"
40#include "floatmatrix.h"
41#include "feinterpol.h"
42#include "contactpair.h"
43#include "contactsearch.h"
44#include "vtkbaseexportmodule.h"
45
47
48
49
50namespace oofem {
51class TimeStep;
52class GaussPoint;
53class IntArray;
55class SparseMtrx;
56class ContactPair;
58
77
79{
80protected:
82 std::unique_ptr<ContactSearchAlgorithm> contactSearchAlgorithm;
84public:
93
99 std::vector<std::unique_ptr<ContactPair>>& getContactPairs() {
100 return contactSearchAlgorithm->getContactPairs();
101 };
102 const std::vector<std::unique_ptr<ContactPair>>& getContactPairs() const {
103 return contactSearchAlgorithm->getContactPairs();
104 };
105
115 virtual void initForNewIteration(TimeStep *tStep, int iter);
127 void assemble(SparseMtrx &answer, TimeStep *tStep, CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s, double scale, void *lock) override;
139 virtual void assembleVector(FloatArray &answer, TimeStep *tStep, CharType type, ValueModeType mode, const UnknownNumberingScheme &s, FloatArray *eNorms, void *lock) override;
146 void postInitialize() override;
152 void assembleExtrapolatedForces(FloatArray &answer, TimeStep *tStep);
153 private:
161 void giveLocationArray(IntArray &loc, const UnknownNumberingScheme &ns, const ContactPair *cp) const;
172 void giveLocationArrays(std::vector< IntArray > &rows, std::vector< IntArray > &cols, CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s) override = 0;
183 virtual void computeTangentFromContact(FloatMatrix &answer, ContactPair *cp, TimeStep *tStep) = 0;
193 virtual void computeInternalForcesFromContact(FloatArray &answer, ContactPair *cp, TimeStep *tStep) = 0;
204 virtual void setupContactSearchAlgorithm() = 0;
210 void updateYourself(TimeStep *tStep) override;
211 public:
219 void giveExportData(std::vector< ExportRegion> &vtkPieces, FloatArray shift, TimeStep *tStep );
220
221
222
223};
224
225
226} // end namespace oofem
227#endif //contactbc_h
ActiveBoundaryCondition(int n, Domain *d)
Definition activebc.h:71
void giveLocationArrays(std::vector< IntArray > &rows, std::vector< IntArray > &cols, CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s) override=0
Builds row/column location arrays for contact assembly (pure virtual).
void updateYourself(TimeStep *tStep) override
Updates internal BC state for the given time step.
Definition contactbc.C:168
virtual ~ContactBoundaryCondition()
Virtual destructor.
Definition contactbc.h:92
void giveExportData(std::vector< ExportRegion > &vtkPieces, FloatArray shift, TimeStep *tStep)
Exports contact-related data (e.g., for VTK output).
Definition contactbc.C:181
ContactBoundaryCondition(int n, Domain *d)
Definition contactbc.h:90
virtual void computeInternalForcesFromContact(FloatArray &answer, ContactPair *cp, TimeStep *tStep)=0
Computes internal force contribution for one contact pair (pure virtual).
virtual void computeTangentFromContact(FloatMatrix &answer, ContactPair *cp, TimeStep *tStep)=0
Computes a consistent tangent contribution for one contact pair (pure virtual).
virtual ContactSearchAlgorithm * giveContactSearchAlgorithm()
Returns the configured contact search algorithm.
Definition contactbc.h:197
std::vector< std::unique_ptr< ContactPair > > & getContactPairs()
Returns the current list of detected contact pairs (modifiable).
Definition contactbc.h:99
const std::vector< std::unique_ptr< ContactPair > > & getContactPairs() const
Definition contactbc.h:102
std::unique_ptr< ContactSearchAlgorithm > contactSearchAlgorithm
contactSearchAlgorithm
Definition contactbc.h:82
virtual void setupContactSearchAlgorithm()=0
Creates and configures the contact search algorithm (pure virtual).
Represents a contact interaction between a master and a slave contact point.
Definition contactpair.h:68
Abstract base class for contact search algorithms.
FloatArrayF< N > assemble(const FloatArrayF< M > &x, int const (&c)[M])
Assemble components into zero matrix.
#define OOFEM_EXPORT
Definition oofemcfg.h:7

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