OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
qtruss1d.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 #include "../sm/Elements/Bars/qtruss1d.h"
36 #include "fei1dquad.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 "../sm/CrossSections/structuralcrosssection.h"
44 #include "mathfem.h"
45 #include "classfactory.h"
46 
47 #ifdef __OOFEG
48  #include "oofeggraphiccontext.h"
49 #endif
50 
51 namespace oofem {
52 REGISTER_Element(QTruss1d);
53 
54 FEI1dQuad QTruss1d :: interpolation(1);
55 
56 QTruss1d :: QTruss1d(int n, Domain *aDomain) : NLStructuralElement(n, aDomain)
57 {
58  numberOfDofMans = 3;
59 }
60 
61 
64 {
66 }
67 
68 void
69 QTruss1d :: giveDofManDofIDMask(int inode, IntArray &answer) const
70 {
71  answer = {D_u};
72 }
73 
74 int
76 {
77  this->interpolation.local2global( answer, lcoords, FEIElementGeometryWrapper(this) );
78  return 1;
79 }
80 
81 void
83 {
84  this->giveStructuralCrossSection()->giveRealStress_1d(answer, gp, strain, tStep);
85 }
86 
87 void
89 {
90  this->giveStructuralCrossSection()->giveStiffnessMatrix_1d(answer, rMode, gp, tStep);
91 }
92 
93 double
95 // Returns the length of the receiver. This method is valid only if 1
96 // Gauss point is used.
97 {
99  double weight = gp->giveWeight();
100  return detJ *weight *this->giveCrossSection()->give(CS_Area, gp);
101 }
102 
103 
105 // Sets up the array of Gauss Points of the receiver.XF
106 {
107  if ( integrationRulesArray.size() == 0 ) {
108  integrationRulesArray.resize( 1 );
109  integrationRulesArray [ 0 ].reset( new GaussIntegrationRule(1, this, 1, 3) );
111  }
112 }
113 
114 void
116 {
118 }
119 
120 void
122 {
123  this->computeBmatrixAt(gp, answer);
124 }
125 } // end namespace oofem
CrossSection * giveCrossSection()
Definition: element.C:495
virtual double giveTransformationJacobian(const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the determinant of the transformation.
Definition: fei1dquad.C:118
Class and object Domain.
Definition: domain.h:115
Abstract base class for "structural" finite elements with geometrical nonlinearities.
virtual void computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int=1, int=ALL_STRAINS)
Computes the geometrical matrix of receiver in given integration point.
Definition: qtruss1d.C:115
virtual void giveDofManDofIDMask(int inode, IntArray &) const
Returns dofmanager dof mask for node.
Definition: qtruss1d.C:69
Class implementing an array of integers.
Definition: intarray.h:61
virtual void computeBHmatrixAt(GaussPoint *gp, FloatMatrix &answer)
Computes a matrix which, multiplied by the column matrix of nodal displacements, gives the displaceme...
Definition: qtruss1d.C:121
MatResponseMode
Describes the character of characteristic material matrix.
virtual int computeGlobalCoordinates(FloatArray &answer, const FloatArray &lcoords)
Computes the global coordinates from given element's local coordinates.
Definition: qtruss1d.C:75
virtual double evaldNdx(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates the matrix of derivatives of interpolation functions (shape functions) at given point...
Definition: fei1dquad.C:54
virtual double computeVolumeAround(GaussPoint *gp)
Returns volume related to given integration point.
Definition: qtruss1d.C:94
REGISTER_Element(LSpace)
virtual double giveWeight()
Returns integration weight of receiver.
Definition: gausspoint.h:181
StructuralCrossSection * giveStructuralCrossSection()
Helper function which returns the structural cross-section for the element.
Wrapper around element definition to provide FEICellGeometry interface.
Definition: feinterpol.h:95
virtual void computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep)
Computes the stress vector of receiver at given integration point, at time step tStep.
Definition: qtruss1d.C:82
static FEI1dQuad interpolation
Definition: qtruss1d.h:52
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
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
virtual double give(CrossSectionProperty a, GaussPoint *gp)
Returns the value of cross section property at given point.
Definition: crosssection.C:151
QTruss1d(int n, Domain *d)
Definition: qtruss1d.C:56
virtual void local2global(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)
Evaluates global coordinates from given local ones.
Definition: fei1dquad.C:68
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
Definition: qtruss1d.C:104
Class representing the general Input Record.
Definition: inputrecord.h:101
virtual void giveRealStress_1d(FloatArray &answer, GaussPoint *gp, const FloatArray &reducedStrain, TimeStep *tStep)=0
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: qtruss1d.C:63
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
virtual void giveStiffnessMatrix_1d(FloatMatrix &answer, MatResponseMode mode, GaussPoint *gp, TimeStep *tStep)=0
virtual void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
Computes constitutive matrix of receiver.
Definition: qtruss1d.C:88
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80
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:30 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011