OOFEM 3.0
Loading...
Searching...
No Matches
qbrick1_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 "fei3dhexaquad.h"
37#include "node.h"
38#include "gausspoint.h"
40#include "floatmatrix.h"
41#include "floatarray.h"
42#include "intarray.h"
43#include "domain.h"
44#include "mathfem.h"
45#include "load.h"
46#include "crosssection.h"
47#include "classfactory.h"
48
49namespace oofem {
53
54FEI3dHexaQuad QBrick1_ht :: interpolation;
55
57{
58 numberOfDofMans = 20;
60}
61
62QBrick1_hmt :: QBrick1_hmt(int n, Domain *aDomain) : QBrick1_ht(n, aDomain)
63{
65}
66
67QBrick1_mt :: QBrick1_mt(int n, Domain *aDomain) : QBrick1_ht(n, aDomain)
68{
70}
71
72
74QBrick1_ht :: giveInterpolation() const { return & interpolation; }
75
76
77void
78QBrick1_ht :: computeGaussPoints()
79{
80 if ( integrationRulesArray.size() == 0 ) {
81 integrationRulesArray.resize( 1 );
82 integrationRulesArray [ 0 ] = std::make_unique<GaussIntegrationRule>(1, this, 1, 2);
83 this->giveCrossSection()->setupIntegrationPoints(* integrationRulesArray [ 0 ], numberOfGaussPoints, this);
84 }
85}
86
87
88void
89QBrick1_ht :: initializeFrom(InputRecord &ir, int priority)
90{
91 TransportElement :: initializeFrom(ir, priority);
92}
93
94
95double
96QBrick1_ht :: computeVolumeAround(GaussPoint *gp)
97{
98 double determinant = fabs( this->interpolation.giveTransformationJacobian( gp->giveNaturalCoordinates(),
100
101 return determinant * gp->giveWeight();
102}
103
104
105double
106QBrick1_ht :: computeEdgeVolumeAround(GaussPoint *gp, int iEdge)
107{
108 double result = this->interpolation.edgeGiveTransformationJacobian( iEdge, gp->giveNaturalCoordinates(),
110 return result *gp->giveWeight();
111}
112
113
114double
115QBrick1_ht :: computeSurfaceVolumeAround(GaussPoint *gp, int iSurf)
116{
117 double determinant = fabs( interpolation.surfaceGiveTransformationJacobian( iSurf, gp->giveNaturalCoordinates(), FEIElementGeometryWrapper(this) ) );
118 return determinant * gp->giveWeight();
119}
120
121
122Interface *
123QBrick1_ht :: giveInterface(InterfaceType interface)
124{
125 if ( interface == SpatialLocalizerInterfaceType ) {
126 return static_cast< SpatialLocalizerInterface * >(this);
127 } else if ( interface == EIPrimaryFieldInterfaceType ) {
128 return static_cast< EIPrimaryFieldInterface * >(this);
129 } else if ( interface == ZZNodalRecoveryModelInterfaceType ) {
130 return static_cast< ZZNodalRecoveryModelInterface * >(this);
131 } else if ( interface == SPRNodalRecoveryModelInterfaceType ) {
132 return static_cast< SPRNodalRecoveryModelInterface * >(this);
133 }
134
135 return nullptr;
136}
137
138void
139QBrick1_ht :: SPRNodalRecoveryMI_giveSPRAssemblyPoints(IntArray &pap)
140{
142 for ( int i = 1; i <= numberOfDofMans; i++ ) {
143 pap.at(i) = this->giveNode(i)->giveNumber();
144 }
145}
146
147void
148QBrick1_ht :: SPRNodalRecoveryMI_giveDofMansDeterminedByPatch(IntArray &answer, int pap)
149{
150 int found = 0;
151 answer.resize(1);
152
153 for ( int i = 1; i <= numberOfDofMans; i++ ) {
154 if ( this->giveNode(i)->giveNumber() == pap ) {
155 found = 1;
156 }
157 }
158
159 if ( found ) {
160 answer.at(1) = pap;
161 } else {
162 OOFEM_ERROR("unknown node number %d", pap);
163 }
164}
165
166int
167QBrick1_ht :: SPRNodalRecoveryMI_giveNumberOfIP()
168{
169 return numberOfGaussPoints;
170}
171
172
174QBrick1_ht :: SPRNodalRecoveryMI_givePatchType()
175{
177}
178
179} // 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
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
static FEI3dHexaQuad interpolation
Definition qbrick1_ht.h:59
QBrick1_ht(int n, Domain *d)
Definition qbrick1_ht.C:56
SpatialLocalizerInterface(Element *element)
TransportElement(int n, Domain *d, ElementMode em=HeatTransferEM)
ZZNodalRecoveryModelInterface(Element *element)
Constructor.
#define OOFEM_ERROR(...)
Definition error.h:79
@ SPRNodalRecoveryModelInterfaceType
@ ZZNodalRecoveryModelInterfaceType
@ EIPrimaryFieldInterfaceType
@ SpatialLocalizerInterfaceType

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