OOFEM 3.0
Loading...
Searching...
No Matches
weakperiodicbc.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 WEAKPERIODICBC_H_
36#define WEAKPERIODICBC_H_
37
38#include <vector>
39#include <iostream>
40#include <memory>
41
42#include "activebc.h"
43#include "inputrecord.h"
44#include "floatmatrix.h"
45#include "floatarray.h"
46#include "intarray.h"
47#include "gausspoint.h"
48
50
51#define _IFT_WeakPeriodicBoundaryCondition_Name "weakperiodicbc"
52#define _IFT_WeakPeriodicBoundaryCondition_order "order"
53#define _IFT_WeakPeriodicBoundaryCondition_descritizationType "descritizationtype"
54#define _IFT_WeakPeriodicBoundaryCondition_dofids "dofids"
55#define _IFT_WeakPeriodicBoundaryCondition_ngp "ngp"
56#define _IFT_WeakPeriodicBoundaryCondition_gradient "gradient"
57#define _IFT_WeakPeriodicBoundaryCondition_nlgeo "nlgeo"
58#define _IFT_WeakPeriodicBoundaryCondition_elementSidesPositive "elementsidespositive"
59#define _IFT_WeakPeriodicBoundaryCondition_elementSidesNegative "elementsidesnegative"
60#define _IFT_WeakPeriodicBoundaryCondition_elementSidesPositiveSet "elementsidespositiveset"
61#define _IFT_WeakPeriodicBoundaryCondition_elementSidesNegativeSet "elementsidesnegativeset"
63
64namespace oofem {
65
66class Node;
67class Element;
68
76{
77private:
78
80 int bcID;
82
85
88
91
94
96 int ngp;
97
99 int ndof;
100
103
106
109
111 signed int sideSign [ 2 ];
112
114 std :: vector< int >side [ 2 ], element [ 2 ];
115
117 std :: vector< double >directions;
118
119 void giveEdgeNormal(FloatArray &answer, int element, int side);
120
121 void updateSminmax();
122
123 void updateDirection();
124
125 double computeBaseFunctionValue(int baseID, FloatArray coordinate);
126
127 double computeBaseFunctionValue1D(int baseID, double coordinate);
128
129 double computeBaseFunctionValue2D(int baseID, FloatArray coordinate);
130
131 std :: unique_ptr< Node > gammaDman;
133
134 double factorial(int n);
135
136 double binomial(double n, int k);
137
139 void getExponents(int n, int &i, int &j);
140
143
144 double computeProjectionCoefficient(int vIndex, int uIndex);
145
148
149 void computeDeformationGradient(FloatMatrix &answer, Element *e, FloatArray *lcoord, TimeStep *tStep);
150
153
156
158 bool nlgeo;
159
160public:
163
164 void initializeFrom(InputRecord &ir) override;
165 void postInitialize() override;
166
168
169 void assemble(SparseMtrx &answer, TimeStep *tStep, CharType type,
170 const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s, double scale = 1.0, void* lock=nullptr) override;
171
172 void assembleVector(FloatArray &answer, TimeStep *tStep,
173 CharType type, ValueModeType mode,
174 const UnknownNumberingScheme &s, FloatArray *eNorm = nullptr, void* lock=nullptr) override;
175
176 void giveInternalForcesVector(FloatArray &answer, TimeStep *tStep,
177 CharType type, ValueModeType mode,
178 const UnknownNumberingScheme &s, FloatArray *eNorm = nullptr, void* lock=nullptr);
179
180 void giveExternalForcesVector(FloatArray &answer, TimeStep *tStep,
181 CharType type, ValueModeType mode,
182 const UnknownNumberingScheme &s, void*lock=nullptr);
183
184 int giveNumberOfInternalDofManagers() override;
185
186 DofManager *giveInternalDofManager(int i) override;
187
188 void addElementSide(int elem, int side) override;
189
190 const char *giveClassName() const override { return "WeakPeriodicBoundaryCondition"; }
191 const char *giveInputRecordName() const override { return _IFT_WeakPeriodicBoundaryCondition_Name; }
192
193protected:
194 void computeElementTangent(FloatMatrix &answer, Element *e, int boundary, TimeStep *tStep);
195};
196}
197#endif /* WEAKPERIODICBC_H_ */
ActiveBoundaryCondition(int n, Domain *d)
Definition activebc.h:71
std ::unique_ptr< Node > gammaDman
void computeDeformationGradient(FloatMatrix &answer, Element *e, FloatArray *lcoord, TimeStep *tStep)
double computeProjectionCoefficient(int vIndex, int uIndex)
double computeBaseFunctionValue(int baseID, FloatArray coordinate)
void postInitialize() override
Performs post initialization steps. Called after all components are created and initialized.
WeakPeriodicBoundaryCondition(int n, Domain *d)
void giveEdgeNormal(FloatArray &answer, int element, int side)
void getExponents(int n, int &i, int &j)
double computeBaseFunctionValue2D(int baseID, FloatArray coordinate)
const char * giveClassName() const override
const char * giveInputRecordName() const override
void initializeFrom(InputRecord &ir) override
double computeBaseFunctionValue1D(int baseID, double coordinate)
@ trigonometric
FloatArrayF< N > assemble(const FloatArrayF< M > &x, int const (&c)[M])
Assemble components into zero matrix.
#define OOFEM_EXPORT
Definition oofemcfg.h:7
#define _IFT_WeakPeriodicBoundaryCondition_Name

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