OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
qwedge_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 - 2013 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 
36 #include "qwedge_ht.h"
37 #include "fei3dwedgequad.h"
38 #include "node.h"
39 #include "gausspoint.h"
40 #include "gaussintegrationrule.h"
41 #include "floatmatrix.h"
42 #include "floatarray.h"
43 #include "intarray.h"
44 #include "mathfem.h"
45 #include "load.h"
46 #include "crosssection.h"
47 #include "classfactory.h"
48 
49 
50 namespace oofem {
51 REGISTER_Element(QWedge_ht);
52 
53 FEI3dWedgeQuad QWedge_ht :: interpolation;
54 
56  // Constructor.
57 {
58  numberOfDofMans = 15;
59 }
60 
61 QWedge_hmt :: QWedge_hmt(int n, Domain *aDomain) : QWedge_ht(n, aDomain)
62 {
64 }
65 
66 QWedge_mt :: QWedge_mt(int n, Domain *aDomain) : QWedge_ht(n, aDomain)
67 {
69 }
70 
71 
74 {
77 
78 }
79 
80 
81 void
83 {
84  if ( integrationRulesArray.size() == 0 ) {
85  integrationRulesArray.resize( 1 );
86  integrationRulesArray [ 0 ].reset( new GaussIntegrationRule(1, this, 1, 2) );
88  }
89 }
90 
91 
92  double
94 // Returns the portion of the receiver which is attached to gp.
95 {
96  double determinant, weight, volume;
97  determinant = fabs( this->interpolation.giveTransformationJacobian( gp->giveNaturalCoordinates(),
98  FEIElementGeometryWrapper(this) ) );
99 
100  weight = gp->giveWeight();
101  volume = determinant * weight;
102  return volume;
103 }
104 
105 
106 
107 double
109 {
110  double result = this->interpolation.edgeGiveTransformationJacobian( iEdge, gp->giveNaturalCoordinates(),
112  return result *gp->giveWeight();
113 }
114 
115 
117 
118 
119 
120 
121 
122 Interface *
124 {
125  if ( interface == ZZNodalRecoveryModelInterfaceType ) {
126  return static_cast< ZZNodalRecoveryModelInterface * >(this);
127  } else if ( interface == SPRNodalRecoveryModelInterfaceType ) {
128  return static_cast< SPRNodalRecoveryModelInterface * >(this);
129  } else if ( interface == NodalAveragingRecoveryModelInterfaceType ) {
130  return static_cast< NodalAveragingRecoveryModelInterface * >(this);
131  } else if ( interface == SpatialLocalizerInterfaceType ) {
132  return static_cast< SpatialLocalizerInterface * >(this);
133  }
134 
135  OOFEM_LOG_INFO("Interface on Lwedge element not supported");
136  return NULL;
137 }
138 
139 void
141 {
142  pap.resize(6);
143  for ( int i = 1; i <= 6; i++ ) {
144  pap.at(i) = this->giveNode(i)->giveNumber();
145  }
146 }
147 
148 void
150 {
151  int found = 0;
152  answer.resize(1);
153 
154  for ( int i = 1; i <= 6; 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
169 {
170  return numberOfGaussPoints;
171 }
172 
173 
176 {
177  return SPRPatchType_3dBiLin;
178 }
179 
180 
181 void
183 {
184  answer.clear();
185  OOFEM_WARNING("IP values will not be transferred to nodes. Use ZZNodalRecovery instead (parameter stype 1)");
186 }
187 
188 } // end namespace oofem
CrossSection * giveCrossSection()
Definition: element.C:495
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
The element interface required by NodalAvergagingRecoveryModel.
The element interface required by ZZNodalRecoveryModel.
virtual void NodalAveragingRecoveryMI_computeNodalValue(FloatArray &answer, int node, InternalStateType type, TimeStep *tStep)
Computes the element value in given node.
Definition: qwedge_ht.C:182
Class and object Domain.
Definition: domain.h:115
The element interface required by ZZNodalRecoveryModel.
QWedge_hmt(int n, Domain *d)
Definition: qwedge_ht.C:61
void clear()
Clears receiver (zero size).
Definition: floatarray.h:206
virtual double edgeGiveTransformationJacobian(int iedge, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the edge jacobian of transformation between local and global coordinates.
virtual FEInterpolation * giveInterpolation() const
Definition: qwedge_ht.C:116
Class implementing an array of integers.
Definition: intarray.h:61
int & at(int i)
Coefficient access function.
Definition: intarray.h:103
virtual void SPRNodalRecoveryMI_giveDofMansDeterminedByPatch(IntArray &answer, int pap)
Definition: qwedge_ht.C:149
This class implements a Linear 3d 6 - node thermal finite element.
Definition: qwedge_ht.h:57
virtual int SPRNodalRecoveryMI_giveNumberOfIP()
Definition: qwedge_ht.C:168
Class representing a general abstraction for finite element interpolation class.
Definition: feinterpol.h:132
#define OOFEM_LOG_INFO(...)
Definition: logger.h:127
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: element.C:638
#define OOFEM_ERROR(...)
Definition: error.h:61
REGISTER_Element(LSpace)
virtual void SPRNodalRecoveryMI_giveSPRAssemblyPoints(IntArray &pap)
Definition: qwedge_ht.C:140
virtual double giveWeight()
Returns integration weight of receiver.
Definition: gausspoint.h:181
This abstract class represent a general base element class for transport problems.
Wrapper around element definition to provide FEICellGeometry interface.
Definition: feinterpol.h:95
virtual double computeVolumeAround(GaussPoint *gp)
Returns volume related to given integration point.
Definition: qwedge_ht.C:93
void resize(int n)
Checks size of receiver towards requested bounds.
Definition: intarray.C:124
virtual int setupIntegrationPoints(IntegrationRule &irule, int npoints, Element *element)
Sets up integration rule for the given element.
Definition: crosssection.C:54
int numberOfGaussPoints
Number of integration points as specified by nip.
Definition: element.h:188
Class representing vector of real numbers.
Definition: floatarray.h:82
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
virtual Interface * giveInterface(InterfaceType t)
Interface requesting service.
Definition: qwedge_ht.C:123
Class representing the general Input Record.
Definition: inputrecord.h:101
virtual SPRPatchType SPRNodalRecoveryMI_givePatchType()
Definition: qwedge_ht.C:175
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
Definition: qwedge_ht.C:82
Class Interface.
Definition: interface.h:82
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: qwedge_ht.C:73
The spatial localizer element interface associated to spatial localizer.
virtual double giveTransformationJacobian(const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the determinant of the transformation.
std::vector< std::unique_ptr< IntegrationRule > > integrationRulesArray
List of integration rules of receiver (each integration rule contains associated integration points a...
Definition: element.h:170
InterfaceType
Enumerative type, used to identify interface type.
Definition: interfacetype.h:43
QWedge_mt(int n, Domain *d)
Definition: qwedge_ht.C:66
static FEI3dWedgeQuad interpolation
Definition: qwedge_ht.h:60
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual double computeEdgeVolumeAround(GaussPoint *gp, int iEdge)
Computes the length around a integration point on a edge.
Definition: qwedge_ht.C:108
int giveNumber() const
Definition: femcmpnn.h:107
Node * giveNode(int i) const
Returns reference to the i-th node of element.
Definition: element.h:610
Class representing integration point in finite element program.
Definition: gausspoint.h:93
#define OOFEM_WARNING(...)
Definition: error.h:62
Class representing solution step.
Definition: timestep.h:80
QWedge_ht(int, Domain *)
Definition: qwedge_ht.C:55
int numberOfDofMans
Number of dofmanagers.
Definition: element.h:149
const FloatArray & giveNaturalCoordinates()
Returns coordinate array of receiver.
Definition: gausspoint.h:138
Class representing Gaussian-quadrature integration rule.

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:31 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011