OOFEM
3.0
Loading...
Searching...
No Matches
src
tm
Elements
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
35
#include "
tm/Elements/qquad1_ht.h
"
36
#include "
fei2dquadquad.h
"
37
#include "
crosssection.h
"
38
#include "
gausspoint.h
"
39
#include "
gaussintegrationrule.h
"
40
#include "
floatmatrix.h
"
41
#include "
floatarray.h
"
42
#include "
intarray.h
"
43
#include "
mathfem.h
"
44
#include "
classfactory.h
"
45
46
47
namespace
oofem
{
48
REGISTER_Element
(
QQuad1_ht
);
49
REGISTER_Element
(
QQuad1_hmt
);
50
REGISTER_Element
(
QQuad1_mt
);
51
52
FEI2dQuadQuad
QQuad1_ht :: interpolation(1, 2);
53
54
QQuad1_ht :: QQuad1_ht(
int
n,
Domain
*aDomain) :
TransportElement
(n, aDomain,
HeatTransferEM
),
SpatialLocalizerInterface
(this),
ZZNodalRecoveryModelInterface
(this),
SPRNodalRecoveryModelInterface
()
55
{
56
numberOfDofMans
= 8;
57
numberOfGaussPoints
= 4;
58
}
59
60
QQuad1_hmt :: QQuad1_hmt(
int
n,
Domain
*aDomain) :
QQuad1_ht
(n, aDomain)
61
{
62
emode
=
HeatMass1TransferEM
;
63
}
64
65
QQuad1_mt :: QQuad1_mt(
int
n,
Domain
*aDomain) :
QQuad1_ht
(n, aDomain)
66
{
67
emode
=
Mass1TransferEM
;
68
}
69
70
71
FEInterpolation
*
72
QQuad1_ht :: giveInterpolation()
const
{
return
&
interpolation
; }
73
74
void
75
QQuad1_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
85
void
86
QQuad1_ht :: initializeFrom(
InputRecord
&ir,
int
priority)
87
{
88
TransportElement :: initializeFrom(ir, priority);
89
}
90
91
92
double
93
QQuad1_ht :: computeVolumeAround(
GaussPoint
*gp)
94
{
95
double
determinant = fabs( this->
interpolation
.giveTransformationJacobian( gp->
giveNaturalCoordinates
(),
96
FEIElementGeometryWrapper
(
this
) ) );
97
double
thickness = this->
giveCrossSection
()->give(
CS_Thickness
, gp);
// 't'
98
return
determinant * gp->
giveWeight
() * thickness;
99
}
100
101
102
double
103
QQuad1_ht :: giveThicknessAt(
const
FloatArray
&gcoords)
104
{
105
return
this->
giveCrossSection
()->give(
CS_Thickness
, gcoords,
this
,
false
);
106
}
107
108
109
double
110
QQuad1_ht :: computeEdgeVolumeAround(
GaussPoint
*gp,
int
iEdge)
111
{
112
double
result = this->
interpolation
.edgeGiveTransformationJacobian( iEdge, gp->
giveNaturalCoordinates
(),
113
FEIElementGeometryWrapper
(
this
) );
114
FloatArray
gc
;
115
this->
interpolation
.edgeLocal2global(
gc
, iEdge, gp->
giveNaturalCoordinates
(),
116
FEIElementGeometryWrapper
(
this
) );
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
123
Interface
*
124
QQuad1_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
139
void
140
QQuad1_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
148
void
149
QQuad1_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
167
int
168
QQuad1_ht :: SPRNodalRecoveryMI_giveNumberOfIP()
169
{
170
return
numberOfGaussPoints
;
171
}
172
173
174
SPRPatchType
175
QQuad1_ht :: SPRNodalRecoveryMI_givePatchType()
176
{
177
return
SPRPatchType_2dquadratic
;
178
}
179
180
181
void
182
QQuad1_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
classfactory.h
REGISTER_Element
#define REGISTER_Element(class)
Definition
classfactory.h:131
oofem::Domain
Definition
domain.h:121
oofem::EIPrimaryFieldInterface
Definition
primaryfield.h:59
oofem::Element::giveNode
Node * giveNode(int i) const
Definition
element.h:629
oofem::Element::numberOfDofMans
int numberOfDofMans
Number of dofmanagers.
Definition
element.h:136
oofem::Element::integrationRulesArray
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
Definition
element.h:157
oofem::Element::numberOfGaussPoints
int numberOfGaussPoints
Definition
element.h:175
oofem::Element::giveCrossSection
CrossSection * giveCrossSection()
Definition
element.C:534
oofem::FEI2dQuadQuad
Definition
fei2dquadquad.h:53
oofem::FEIElementGeometryWrapper
Definition
feinterpol.h:108
oofem::FEInterpolation
Definition
feinterpol.h:175
oofem::FEMComponent::giveNumber
int giveNumber() const
Definition
femcmpnn.h:104
oofem::FloatArray
Definition
floatarray.h:92
oofem::FloatArray::clear
void clear()
Definition
floatarray.h:254
oofem::GaussPoint
Definition
gausspoint.h:95
oofem::GaussPoint::giveNaturalCoordinates
const FloatArray & giveNaturalCoordinates() const
Returns coordinate array of receiver.
Definition
gausspoint.h:138
oofem::GaussPoint::giveMaterialMode
MaterialMode giveMaterialMode()
Returns corresponding material mode of receiver.
Definition
gausspoint.h:190
oofem::GaussPoint::giveWeight
double giveWeight()
Returns integration weight of receiver.
Definition
gausspoint.h:180
oofem::InputRecord
Definition
inputrecord.h:98
oofem::IntArray
Definition
intarray.h:63
oofem::IntArray::resize
void resize(int n)
Definition
intarray.C:73
oofem::IntArray::at
int & at(std::size_t i)
Definition
intarray.h:104
oofem::Interface
Definition
interface.h:83
oofem::QQuad1_hmt
Definition
qquad1_ht.h:92
oofem::QQuad1_ht
Definition
qquad1_ht.h:55
oofem::QQuad1_ht::QQuad1_ht
QQuad1_ht(int n, Domain *d)
Definition
qquad1_ht.C:54
oofem::QQuad1_ht::interpolation
static FEI2dQuadQuad interpolation
Definition
qquad1_ht.h:57
oofem::QQuad1_mt
Definition
qquad1_ht.h:106
oofem::SPRNodalRecoveryModelInterface::SPRNodalRecoveryModelInterface
SPRNodalRecoveryModelInterface()
Constructor.
Definition
sprnodalrecoverymodel.h:127
oofem::SpatialLocalizerInterface::SpatialLocalizerInterface
SpatialLocalizerInterface(Element *element)
Definition
spatiallocalizer.h:65
oofem::TimeStep
Definition
timestep.h:82
oofem::TransportElement::TransportElement
TransportElement(int n, Domain *d, ElementMode em=HeatTransferEM)
Definition
transportelement.C:75
oofem::TransportElement::Mass1TransferEM
@ Mass1TransferEM
Definition
transportelement.h:57
oofem::TransportElement::HeatTransferEM
@ HeatTransferEM
Definition
transportelement.h:57
oofem::TransportElement::HeatMass1TransferEM
@ HeatMass1TransferEM
Definition
transportelement.h:57
oofem::TransportElement::emode
ElementMode emode
Definition
transportelement.h:60
oofem::ZZNodalRecoveryModelInterface::ZZNodalRecoveryModelInterface
ZZNodalRecoveryModelInterface(Element *element)
Constructor.
Definition
zznodalrecoverymodel.h:106
crosssection.h
OOFEM_WARNING
#define OOFEM_WARNING(...)
Definition
error.h:80
OOFEM_ERROR
#define OOFEM_ERROR(...)
Definition
error.h:79
fei2dquadquad.h
floatarray.h
floatmatrix.h
gaussintegrationrule.h
gausspoint.h
intarray.h
mathfem.h
oofem
Definition
additivemanufacturingproblem.C:83
oofem::SPRPatchType
SPRPatchType
Definition
sprnodalrecoverymodel.h:48
oofem::SPRPatchType_2dquadratic
@ SPRPatchType_2dquadratic
Definition
sprnodalrecoverymodel.h:52
oofem::CS_Thickness
@ CS_Thickness
Thickness.
Definition
crosssection.h:59
oofem::InternalStateType
InternalStateType
Definition
internalstatetype.h:206
oofem::InterfaceType
InterfaceType
Definition
interfacetype.h:43
oofem::SPRNodalRecoveryModelInterfaceType
@ SPRNodalRecoveryModelInterfaceType
Definition
interfacetype.h:51
oofem::ZZNodalRecoveryModelInterfaceType
@ ZZNodalRecoveryModelInterfaceType
Definition
interfacetype.h:49
oofem::EIPrimaryFieldInterfaceType
@ EIPrimaryFieldInterfaceType
Definition
interfacetype.h:60
oofem::SpatialLocalizerInterfaceType
@ SpatialLocalizerInterfaceType
Definition
interfacetype.h:57
gc
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
qquad1_ht.h
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