OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
truss1d.h
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 #ifndef truss1d_h
36 #define truss1d_h
37 
38 #include "../sm/Elements/structuralelement.h"
39 #include "../sm/ErrorEstimators/directerrorindicatorrc.h"
40 #include "../sm/ErrorEstimators/zzerrorestimator.h"
41 #include "../sm/ErrorEstimators/huertaerrorestimator.h"
42 #include "zznodalrecoverymodel.h"
44 #include "spatiallocalizer.h"
46 
47 #define _IFT_Truss1d_Name "truss1d"
48 
49 namespace oofem {
50 class FEI1dLin;
51 
56 class Truss1d : public StructuralElement,
60 {
61 protected:
62  static FEI1dLin interp;
63 
64 public:
65  Truss1d(int n, Domain * d);
66  virtual ~Truss1d() { }
67 
68  virtual FEInterpolation *giveInterpolation() const;
69 
70  virtual void computeLumpedMassMatrix(FloatMatrix &answer, TimeStep *tStep);
71  virtual void computeMassMatrix(FloatMatrix &answer, TimeStep *tStep)
72  { computeLumpedMassMatrix(answer, tStep); }
73 
74  virtual int computeNumberOfDofs() { return 2; }
75  virtual void giveDofManDofIDMask(int inode, IntArray &) const;
76 
77  // characteristic length (for crack band approach)
78  virtual double giveCharacteristicLength(const FloatArray &normalToCrackPlane)
79  { return this->computeLength(); }
80 
81  virtual double computeVolumeAround(GaussPoint *gp);
82 
83  virtual void computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep);
84  virtual void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep);
85 
86  virtual int testElementExtension(ElementExtension ext) { return 0; }
87 
89 
90 #ifdef __OOFEG
91  virtual void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep);
93  virtual void drawScalar(oofegGraphicContext &gc, TimeStep *tStep);
94 #endif
95 
96  // definition & identification
97  virtual const char *giveInputRecordName() const { return _IFT_Truss1d_Name; }
98  virtual const char *giveClassName() const { return "Truss1d"; }
99  virtual MaterialMode giveMaterialMode() { return _1dMat; }
100 
101  // NodalAveragingRecoveryMInterface
103  InternalStateType type, TimeStep *tStep);
104 
105  // HuertaErrorEstimatorInterface
106  virtual void HuertaErrorEstimatorI_setupRefinedElementProblem(RefinedElement *refinedElement, int level, int nodeId,
107  IntArray &localNodeIdArray, IntArray &globalNodeIdArray,
109  int &localNodeId, int &localElemId, int &localBcId,
110  IntArray &controlNode, IntArray &controlDof,
113 
114 protected:
115  virtual void computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int = 1, int = ALL_STRAINS);
116  virtual void computeBHmatrixAt(GaussPoint *gp, FloatMatrix &answer);
117  virtual void computeNmatrixAt(const FloatArray &iLocCoord, FloatMatrix &answer);
118  virtual void computeGaussPoints();
119 
120 };
121 } // end namespace oofem
122 #endif // truss1d_h
virtual const char * giveClassName() const
Definition: truss1d.h:98
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
The element interface required by NodalAvergagingRecoveryModel.
virtual void NodalAveragingRecoveryMI_computeNodalValue(FloatArray &answer, int node, InternalStateType type, TimeStep *tStep)
Computes the element value in given node.
Definition: truss1d.C:394
This class implements a two-node truss bar element for one-dimensional analysis.
Definition: truss1d.h:56
Class and object Domain.
Definition: domain.h:115
virtual double computeLength()
Computes the length (zero for all but 1D geometries)
Definition: element.C:1129
virtual FEInterpolation * giveInterpolation() const
Definition: truss1d.C:80
virtual void HuertaErrorEstimatorI_computeNmatrixAt(GaussPoint *gp, FloatMatrix &answer)
Definition: truss1d.C:207
virtual void giveDofManDofIDMask(int inode, IntArray &) const
Returns dofmanager dof mask for node.
Definition: truss1d.C:159
The element interface required by ZZNodalRecoveryModel.
virtual void drawScalar(oofegGraphicContext &gc, TimeStep *tStep)
Definition: truss1d.C:265
virtual void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
Computes constitutive matrix of receiver.
Definition: truss1d.C:153
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
virtual void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep)
Definition: truss1d.C:214
virtual Interface * giveInterface(InterfaceType it)
Interface requesting service.
Definition: truss1d.C:375
virtual double computeVolumeAround(GaussPoint *gp)
Returns volume related to given integration point.
Definition: truss1d.C:137
virtual MaterialMode giveMaterialMode()
Returns material mode for receiver integration points.
Definition: truss1d.h:99
MaterialMode
Type representing material mode of integration point.
Definition: materialmode.h:89
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: truss1d.C:147
Class implementing an array of integers.
Definition: intarray.h:61
MatResponseMode
Describes the character of characteristic material matrix.
virtual void HuertaErrorEstimatorI_setupRefinedElementProblem(RefinedElement *refinedElement, int level, int nodeId, IntArray &localNodeIdArray, IntArray &globalNodeIdArray, HuertaErrorEstimatorInterface::SetupMode sMode, TimeStep *tStep, int &localNodeId, int &localElemId, int &localBcId, IntArray &controlNode, IntArray &controlDof, HuertaErrorEstimator::AnalysisMode aMode)
Definition: truss1d.C:166
virtual void computeBHmatrixAt(GaussPoint *gp, FloatMatrix &answer)
Definition: truss1d.C:111
virtual int testElementExtension(ElementExtension ext)
Tests if the element implements required extension.
Definition: truss1d.h:86
virtual double giveCharacteristicLength(const FloatArray &normalToCrackPlane)
Returns the size of element in the given direction, in some cases adjusted (e.g.
Definition: truss1d.h:78
Class representing a general abstraction for finite element interpolation class.
Definition: feinterpol.h:132
Truss1d(int n, Domain *d)
Definition: truss1d.C:58
Abstract base class for all "structural" finite elements.
The element interface corresponding to ZZErrorEstimator.
The element interface corresponding to HuertaErrorEstimator.
virtual void computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int=1, int=ALL_STRAINS)
Computes the geometrical matrix of receiver in given integration point.
Definition: truss1d.C:98
ElementExtension
Type representing element extension.
#define _IFT_Truss1d_Name
Definition: truss1d.h:47
static FEI1dLin interp
Definition: truss1d.h:62
UnknownType
Type representing particular unknown (its physical meaning).
Definition: unknowntype.h:55
#define ALL_STRAINS
Class representing a 1d linear isoparametric interpolation.
Definition: fei1dlin.h:44
virtual void computeLumpedMassMatrix(FloatMatrix &answer, TimeStep *tStep)
Computes lumped mass matrix of receiver.
Definition: truss1d.C:83
Class representing vector of real numbers.
Definition: floatarray.h:82
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
Class Interface.
Definition: interface.h:82
The spatial localizer element interface associated to spatial localizer.
virtual void computeMassMatrix(FloatMatrix &answer, TimeStep *tStep)
Computes mass matrix of receiver.
Definition: truss1d.h:71
virtual const char * giveInputRecordName() const
Definition: truss1d.h:97
InterfaceType
Enumerative type, used to identify interface type.
Definition: interfacetype.h:43
virtual void drawDeformedGeometry(oofegGraphicContext &gc, TimeStep *tStep, UnknownType)
Definition: truss1d.C:239
virtual void computeNmatrixAt(const FloatArray &iLocCoord, FloatMatrix &answer)
Computes interpolation matrix for element unknowns.
Definition: truss1d.C:123
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual int computeNumberOfDofs()
Computes or simply returns total number of element's local DOFs.
Definition: truss1d.h:74
virtual ~Truss1d()
Definition: truss1d.h:66
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
Definition: truss1d.C:69
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80

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:32 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011