OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
lattice2d.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 lattice2d_h
36 #define lattice2d_h
37 
38 #include "../sm/Elements/latticestructuralelement.h"
39 
41 
42 #define _IFT_Lattice2d_Name "lattice2d"
43 #define _IFT_Lattice2d_thick "thick"
44 #define _IFT_Lattice2d_width "width"
45 #define _IFT_Lattice2d_gpcoords "gpcoords"
46 #define _IFT_Lattice2d_couplingflag "couplingflag"
47 #define _IFT_Lattice2d_couplingnumber "couplingnumber"
48 
49 
50 namespace oofem {
55 {
56 protected:
57  double kappa, pitch, length;
58 
59  double width, thickness;
63 
64 public:
65  Lattice2d(int n, Domain *d);
66  virtual ~Lattice2d();
67 
68  virtual int giveLocalCoordinateSystem(FloatMatrix &answer);
69 
75  virtual int computeGlobalCoordinates(FloatArray &answer, const FloatArray &lcoords);
76 
77  virtual double giveLength();
78 
79  virtual double giveNormalStress();
80  virtual double giveOldNormalStress();
81 
82  virtual int hasBeenUpdated();
83 
84  virtual double giveArea() { return this->width * this->thickness; }
85 
86  virtual int computeNumberOfDofs() { return 6; }
87  virtual void giveDofManDofIDMask(int inode, IntArray &) const;
88  virtual double computeVolumeAround(GaussPoint *gp);
89 
90  virtual int giveCrackFlag();
91 
92  virtual double giveCrackWidth();
93  virtual double giveOldCrackWidth();
94 
95  virtual double giveDissipation();
96  virtual double giveDeltaDissipation();
97 
98  virtual int giveCouplingFlag() { return couplingFlag; }
99 
100  virtual void giveCouplingNumbers(IntArray &numbers) { numbers = this->couplingNumbers; }
101  //
102  // definition & identification
103  //
104  virtual const char *giveInputRecordName() const { return _IFT_Lattice2d_Name; }
105  virtual const char *giveClassName() const { return "Lattice2d"; }
107  virtual Element_Geometry_Type giveGeometryType() const { return EGT_line_1; }
108 
109 #ifdef __OOFEG
110  virtual void drawYourself(oofegGraphicContext &gc, TimeStep *tStep);
111  virtual void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep);
113  virtual void drawSpecial(oofegGraphicContext &gc, TimeStep *tStep);
114  virtual void drawRawCrossSections(oofegGraphicContext &gc, TimeStep *tStep);
115  virtual void giveCrossSectionCoordinates(FloatArray &coords);
116 
117 #endif
118 
119 protected:
120 
121  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj = NULL);
122  virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj = NULL);
123 
124  virtual void computeBmatrixAt(GaussPoint *, FloatMatrix &, int = 1, int = ALL_STRAINS);
125  virtual bool computeGtoLRotationMatrix(FloatMatrix &);
126  virtual void computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep);
127  virtual void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep);
128  virtual void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep);
129 
130  virtual int giveNumberOfCrossSectionNodes() { return 2; }
131  double givePitch();
132  virtual void computeGaussPoints();
133  virtual integrationDomain giveIntegrationDomain() const { return _Line; }
134  virtual void giveGpCoordinates(FloatArray &coords);
135 };
136 } // end namespace oofem
137 #endif
virtual ~Lattice2d()
Definition: lattice2d.C:69
integrationDomain
Used by integrator class to supply integration points for proper domain to be integrated (Area...
virtual int giveLocalCoordinateSystem(FloatMatrix &answer)
Returns local coordinate system of receiver Required by material models with ortho- and anisotrophy...
Definition: lattice2d.C:330
Class and object Domain.
Definition: domain.h:115
#define _IFT_Lattice2d_Name
Definition: lattice2d.h:42
virtual int computeNumberOfDofs()
Computes or simply returns total number of element's local DOFs.
Definition: lattice2d.h:86
Element_Geometry_Type
Enumerative type used to classify element geometry Possible values are: EGT_point - point in space EG...
virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Restores the receiver state previously written in stream.
Definition: lattice2d.C:434
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj=NULL)
Stores receiver state to output stream.
Definition: lattice2d.C:398
virtual integrationDomain giveIntegrationDomain() const
Returns integration domain for receiver, used to initialize integration point over receiver volume...
Definition: lattice2d.h:133
virtual void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep)
Definition: lattice2d.C:493
virtual void giveCrossSectionCoordinates(FloatArray &coords)
Definition: lattice2d.C:629
virtual int giveCrackFlag()
Returns the crack flag.
Definition: lattice2d.C:74
virtual double computeVolumeAround(GaussPoint *gp)
Returns volume related to given integration point.
Definition: lattice2d.C:234
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
Definition: lattice2d.C:199
virtual const char * giveClassName() const
Definition: lattice2d.h:105
virtual double giveArea()
Returns the cross-sectional area of the lattice element.
Definition: lattice2d.h:84
virtual int hasBeenUpdated()
Returns flag indicating if status has been updated.
Definition: lattice2d.C:315
virtual void giveGpCoordinates(FloatArray &coords)
Gives the GP coordinates.
Definition: lattice2d.C:390
virtual bool computeGtoLRotationMatrix(FloatMatrix &)
Returns transformation matrix from global c.s.
Definition: lattice2d.C:211
virtual double giveDissipation()
Returns the energy dissipation computed at the GaussPoint of the element.
Definition: lattice2d.C:103
Class implementing an array of integers.
Definition: intarray.h:61
MatResponseMode
Describes the character of characteristic material matrix.
virtual void giveCouplingNumbers(IntArray &numbers)
Returns the coupling numbers.
Definition: lattice2d.h:100
FloatArray gpCoords
Definition: lattice2d.h:60
virtual double giveDeltaDissipation()
Returns the increment of dissipation computed at the GaussPoint of the element.
Definition: lattice2d.C:112
virtual void computeBmatrixAt(GaussPoint *, FloatMatrix &, int=1, int=ALL_STRAINS)
Computes the geometrical matrix of receiver in given integration point.
Definition: lattice2d.C:120
virtual int giveCouplingFlag()
Returns the coupling flag.
Definition: lattice2d.h:98
UnknownType
Type representing particular unknown (its physical meaning).
Definition: unknowntype.h:55
virtual void drawSpecial(oofegGraphicContext &gc, TimeStep *tStep)
Definition: lattice2d.C:550
virtual double giveOldCrackWidth()
Definition: lattice2d.C:91
double givePitch()
Definition: lattice2d.C:269
double thickness
Definition: lattice2d.h:59
virtual double giveCrackWidth()
Definition: lattice2d.C:83
#define ALL_STRAINS
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 giveLength()
Returns the element length.
Definition: lattice2d.C:251
virtual void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
Computes numerically stiffness matrix of receiver.
Definition: lattice2d.C:183
Class representing the general Input Record.
Definition: inputrecord.h:101
virtual void giveDofManDofIDMask(int inode, IntArray &) const
Returns dofmanager dof mask for node.
Definition: lattice2d.C:243
virtual void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
Computes constitutive matrix of receiver.
Definition: lattice2d.C:169
virtual void drawRawCrossSections(oofegGraphicContext &gc, TimeStep *tStep)
Definition: lattice2d.C:598
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: lattice2d.C:354
virtual void drawDeformedGeometry(oofegGraphicContext &gc, TimeStep *tStep, UnknownType)
Definition: lattice2d.C:520
virtual double giveNormalStress()
Returns the normal stress.
Definition: lattice2d.C:289
virtual double giveOldNormalStress()
Returns the old normal stress.
Definition: lattice2d.C:301
Lattice2d(int n, Domain *d)
Definition: lattice2d.C:60
virtual int giveNumberOfCrossSectionNodes()
Returns the number of crossSection nodes.
Definition: lattice2d.h:130
This class implements the base of a special lattice element following the concepts orginally develope...
virtual Element_Geometry_Type giveGeometryType() const
Returns the element geometry type.
Definition: lattice2d.h:107
virtual void drawYourself(oofegGraphicContext &gc, TimeStep *tStep)
Definition: lattice2d.C:472
the oofem namespace is to define a context or scope in which all oofem names are defined.
This class implements a 2-dimensional lattice element.
Definition: lattice2d.h:54
IntArray couplingNumbers
Definition: lattice2d.h:62
virtual int computeGlobalCoordinates(FloatArray &answer, const FloatArray &lcoords)
This function is different from the standard computeGlobalCorrdinates function as it returns the glob...
Definition: lattice2d.C:379
virtual const char * giveInputRecordName() const
Definition: lattice2d.h:104
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80
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: lattice2d.C:176

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