OOFEM 3.0
Loading...
Searching...
No Matches
qquad1_ht.C
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
36#include "fei2dquadquad.h"
37#include "crosssection.h"
38#include "gausspoint.h"
40#include "floatmatrix.h"
41#include "floatarray.h"
42#include "intarray.h"
43#include "mathfem.h"
44#include "classfactory.h"
45
46
47namespace oofem {
51
52FEI2dQuadQuad QQuad1_ht :: interpolation(1, 2);
53
59
60QQuad1_hmt :: QQuad1_hmt(int n, Domain *aDomain) : QQuad1_ht(n, aDomain)
61{
63}
64
65QQuad1_mt :: QQuad1_mt(int n, Domain *aDomain) : QQuad1_ht(n, aDomain)
66{
68}
69
70
72QQuad1_ht :: giveInterpolation() const { return & interpolation; }
73
74void
75QQuad1_ht :: computeGaussPoints()
76{
77 if ( integrationRulesArray.size() == 0 ) {
78 integrationRulesArray.resize( 1 );
79 integrationRulesArray [ 0 ] = std::make_unique<GaussIntegrationRule>(1, this, 1, 3);
80 this->giveCrossSection()->setupIntegrationPoints(* integrationRulesArray [ 0 ], numberOfGaussPoints, this);
81 }
82}
83
84
85void
86QQuad1_ht :: initializeFrom(InputRecord &ir, int priority)
87{
88 TransportElement :: initializeFrom(ir, priority);
89}
90
91
92double
93QQuad1_ht :: computeVolumeAround(GaussPoint *gp)
94{
95 double determinant = fabs( this->interpolation.giveTransformationJacobian( gp->giveNaturalCoordinates(),
97 double thickness = this->giveCrossSection()->give(CS_Thickness, gp); // 't'
98 return determinant * gp->giveWeight() * thickness;
99}
100
101
102double
103QQuad1_ht :: giveThicknessAt(const FloatArray &gcoords)
104{
105 return this->giveCrossSection()->give(CS_Thickness, gcoords, this, false);
106}
107
108
109double
110QQuad1_ht :: computeEdgeVolumeAround(GaussPoint *gp, int iEdge)
111{
112 double result = this->interpolation.edgeGiveTransformationJacobian( iEdge, gp->giveNaturalCoordinates(),
115 this->interpolation.edgeLocal2global( gc, iEdge, gp->giveNaturalCoordinates(),
117 // temporary gauss point on element (not edge) to evaluate thickness
118 GaussPoint _gp( NULL, 1, gc, 1.0, gp->giveMaterialMode() );
119 double thick = this->giveCrossSection()->give(CS_Thickness, & _gp); // 't'
120 return result *thick *gp->giveWeight();
121}
122
123Interface *
124QQuad1_ht :: giveInterface(InterfaceType interface)
125{
126 if ( interface == SpatialLocalizerInterfaceType ) {
127 return static_cast< SpatialLocalizerInterface * >(this);
128 } else if ( interface == EIPrimaryFieldInterfaceType ) {
129 return static_cast< EIPrimaryFieldInterface * >(this);
130 } else if ( interface == ZZNodalRecoveryModelInterfaceType ) {
131 return static_cast< ZZNodalRecoveryModelInterface * >(this);
132 } else if ( interface == SPRNodalRecoveryModelInterfaceType ) {
133 return static_cast< SPRNodalRecoveryModelInterface * >(this);
134 }
135
136 return nullptr;
137}
138
139void
140QQuad1_ht :: SPRNodalRecoveryMI_giveSPRAssemblyPoints(IntArray &pap)
141{
142 pap.resize(8);
143 for ( int i = 1; i <= 8; i++ ) {
144 pap.at(i) = this->giveNode(i)->giveNumber();
145 }
146}
147
148void
149QQuad1_ht :: SPRNodalRecoveryMI_giveDofMansDeterminedByPatch(IntArray &answer, int pap)
150{
151 int found = 0;
152 answer.resize(1);
153
154 for ( int i = 1; i <= 8; i++ ) {
155 if ( this->giveNode(i)->giveNumber() == pap ) {
156 found = 1;
157 }
158 }
159
160 if ( found ) {
161 answer.at(1) = pap;
162 } else {
163 OOFEM_ERROR("unknown node number %d", pap);
164 }
165}
166
167int
168QQuad1_ht :: SPRNodalRecoveryMI_giveNumberOfIP()
169{
170 return numberOfGaussPoints;
171}
172
173
175QQuad1_ht :: SPRNodalRecoveryMI_givePatchType()
176{
178}
179
180
181void
182QQuad1_ht :: NodalAveragingRecoveryMI_computeNodalValue(FloatArray &answer, int node, InternalStateType type, TimeStep *tStep)
183{
184 answer.clear();
185 OOFEM_WARNING("IP values will not be transferred to nodes. Use ZZNodalRecovery instead (parameter stype 1)");
186}
187
188
189
190
191} // end namespace oofem
#define REGISTER_Element(class)
Node * giveNode(int i) const
Definition element.h:629
int numberOfDofMans
Number of dofmanagers.
Definition element.h:136
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
Definition element.h:157
int numberOfGaussPoints
Definition element.h:175
CrossSection * giveCrossSection()
Definition element.C:534
int giveNumber() const
Definition femcmpnn.h:104
const FloatArray & giveNaturalCoordinates() const
Returns coordinate array of receiver.
Definition gausspoint.h:138
MaterialMode giveMaterialMode()
Returns corresponding material mode of receiver.
Definition gausspoint.h:190
double giveWeight()
Returns integration weight of receiver.
Definition gausspoint.h:180
void resize(int n)
Definition intarray.C:73
int & at(std::size_t i)
Definition intarray.h:104
QQuad1_ht(int n, Domain *d)
Definition qquad1_ht.C:54
static FEI2dQuadQuad interpolation
Definition qquad1_ht.h:57
SpatialLocalizerInterface(Element *element)
TransportElement(int n, Domain *d, ElementMode em=HeatTransferEM)
ZZNodalRecoveryModelInterface(Element *element)
Constructor.
#define OOFEM_WARNING(...)
Definition error.h:80
#define OOFEM_ERROR(...)
Definition error.h:79
@ CS_Thickness
Thickness.
@ SPRNodalRecoveryModelInterfaceType
@ ZZNodalRecoveryModelInterfaceType
@ EIPrimaryFieldInterfaceType
@ SpatialLocalizerInterfaceType
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]

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