OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
lattice2d_mt.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_mt_h
36 #define lattice2d_mt_h
37 
39 #include "spatiallocalizer.h"
40 
42 
43 #define _IFT_Lattice2d_mt_Name "latticemt2d"
44 #define _IFT_Lattice2DMT_dim "dim"
45 #define _IFT_Lattice2DMT_thick "thick"
46 #define _IFT_Lattice2DMT_width "width"
47 #define _IFT_Lattice2DMT_gpcoords "gpcoords"
48 #define _IFT_Lattice2DMT_crackwidth "crackwidth"
49 #define _IFT_Lattice2DMT_couplingflag "couplingflag"
50 #define _IFT_Lattice2DMT_couplingnumber "couplingnumber"
51 
52 
53 
54 namespace oofem {
60 {
61 protected:
62  double area;
63  double length;
64 
69 
72 
73  double crackWidth;
74 
75 public:
76  // constructor
78  virtual ~Lattice2d_mt();
79 
82  virtual double computeVolumeAround(GaussPoint *);
83 
84  virtual int giveCouplingFlag(){ return this->couplingFlag;}
85 
86  virtual void giveCouplingNumbers(IntArray &numbers){ numbers = this->couplingNumbers;}
87 
88  virtual void giveCrackLengths(FloatArray &lengths){ lengths = this->crackLengths;}
89 
90  virtual void giveCrackWidths(FloatArray &widths){ widths = crackWidths;}
91 
92 
93  virtual int computeGlobalCoordinates(FloatArray &answer, const FloatArray &lcoords);
94 
95  virtual bool computeLocalCoordinates(FloatArray &answer, const FloatArray &gcoords);
96 
97  virtual void computeConductivityMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep);
98 
99  virtual void computeCapacityMatrix(FloatMatrix &answer, TimeStep *tStep);
100 
101  virtual const char *giveInputRecordName() const { return _IFT_Lattice2d_mt_Name; }
102  virtual const char *giveClassName() const { return "Lattice2d_mtElement"; }
103 
104  virtual Element_Geometry_Type giveGeometryType() const { return EGT_line_1; }
105 
106  virtual double giveWidth() { return width; }
107  virtual int computeNumberOfDofs() { return 2; }
108  virtual void giveDofManDofIDMask(int inode, IntArray &) const;
110 
111  virtual void updateInternalState(TimeStep *tStep);
112 
113 #ifdef __OOFEG
114  // Graphics output
115  virtual void drawYourself(oofegGraphicContext &gc, TimeStep *tStep);
116  virtual void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep);
117  virtual void drawRawCrossSections(oofegGraphicContext &gc, TimeStep *tStep);
118  virtual void giveCrossSectionCoordinates(FloatArray &coords);
119 #endif
120 
121 protected:
122  virtual void computeGaussPoints();
123 
124  virtual void computeBmatrixAt(FloatMatrix &answer, const FloatArray &lcoords) { this->computeGradientMatrixAt(answer, lcoords); }
125  virtual void computeGradientMatrixAt(FloatMatrix &answer, const FloatArray &lcoords);
126  virtual void computeNmatrixAt(FloatMatrix &n, const FloatArray &);
127 
128  virtual double givePressure();
129 
130  virtual double giveOldPressure();
131 
132  virtual double giveMass();
133 
134 
135  /* computes the submatrix of interpolation matrix cooresponding to single unknown.
136  */
137  virtual void computeNSubMatrixAt(FloatMatrix &n, const FloatArray &);
138 
139  virtual double giveLength();
140 
141  virtual double giveArea() { return width * thickness; }
142 
143 
144  virtual void giveGpCoordinates(FloatArray &coords);
145 
146  virtual double computeEdgeVolumeAround(GaussPoint *gp, int iEdge) { return 0; }
147 
148  virtual int giveApproxOrder(int unknownIndx) { return 1; }
149 };
150 } // end namespace oofem
151 #endif
FloatArray crackWidths
Definition: lattice2d_mt.h:67
virtual int giveApproxOrder(int unknownIndx)
Definition: lattice2d_mt.h:148
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: lattice2d_mt.C:211
virtual double computeEdgeVolumeAround(GaussPoint *gp, int iEdge)
Computes the length around a integration point on a edge.
Definition: lattice2d_mt.h:146
virtual int computeGlobalCoordinates(FloatArray &answer, const FloatArray &lcoords)
Computes the global coordinates from given element's local coordinates.
Definition: lattice2d_mt.C:373
Class and object Domain.
Definition: domain.h:115
Element_Geometry_Type
Enumerative type used to classify element geometry Possible values are: EGT_point - point in space EG...
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
virtual void computeInternalSourceRhsVectorAt(FloatArray &answer, TimeStep *, ValueModeType mode)
Computes the contribution to balance equation(s) due to internal sources.
Definition: lattice2d_mt.C:302
virtual const char * giveInputRecordName() const
Definition: lattice2d_mt.h:101
virtual void drawRawGeometry(oofegGraphicContext &gc, TimeStep *tStep)
Definition: lattice2d_mt.C:413
This class implements a 2-dimensional lattice mass transport element.
Definition: lattice2d_mt.h:59
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
#define _IFT_Lattice2d_mt_Name
Definition: lattice2d_mt.h:43
virtual void computeGaussPoints()
Initializes the array of integration rules member variable.
Definition: lattice2d_mt.C:196
virtual void computeConductivityMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
Computes the conductivity matrix of the receiver.
Definition: lattice2d_mt.C:257
virtual double giveLength()
Returns the element length.
Definition: lattice2d_mt.C:77
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_mt.h:86
virtual void updateInternalState(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
Definition: lattice2d_mt.C:176
virtual double giveMass()
Returns the mass.
Definition: lattice2d_mt.C:120
virtual void giveCrackLengths(FloatArray &lengths)
Returns the crack lengths.
Definition: lattice2d_mt.h:88
virtual int computeNumberOfDofs()
Computes or simply returns total number of element's local DOFs.
Definition: lattice2d_mt.h:107
Lattice2d_mt(int, Domain *, ElementMode em=HeatTransferEM)
Definition: lattice2d_mt.C:60
virtual void drawRawCrossSections(oofegGraphicContext &gc, TimeStep *tStep)
Definition: lattice2d_mt.C:438
virtual double givePressure()
Returns the pressure.
Definition: lattice2d_mt.C:95
FloatArray crackLengths
Definition: lattice2d_mt.h:68
virtual void drawYourself(oofegGraphicContext &gc, TimeStep *tStep)
Definition: lattice2d_mt.C:398
virtual void computeNmatrixAt(FloatMatrix &n, const FloatArray &)
Computes the interpolation matrix corresponding to all unknowns.
Definition: lattice2d_mt.C:155
virtual const char * giveClassName() const
Definition: lattice2d_mt.h:102
virtual void computeNSubMatrixAt(FloatMatrix &n, const FloatArray &)
Definition: lattice2d_mt.C:138
virtual Element_Geometry_Type giveGeometryType() const
Returns the element geometry type.
Definition: lattice2d_mt.h:104
virtual ~Lattice2d_mt()
Definition: lattice2d_mt.C:73
virtual double computeVolumeAround(GaussPoint *)
Returns volume related to given integration point.
Definition: lattice2d_mt.C:250
Class representing vector of real numbers.
Definition: floatarray.h:82
IntArray couplingNumbers
Definition: lattice2d_mt.h:66
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
FloatArray gpCoords
Definition: lattice2d_mt.h:71
Class representing the general Input Record.
Definition: inputrecord.h:101
virtual double giveArea()
Returns the cross-sectional area of the lattice element.
Definition: lattice2d_mt.h:141
virtual void computeGradientMatrixAt(FloatMatrix &answer, const FloatArray &lcoords)
Computes the gradient matrix corresponding to one unknown.
Definition: lattice2d_mt.C:162
virtual void giveDofManDofIDMask(int inode, IntArray &) const
Returns dofmanager dof mask for node.
Definition: lattice2d_mt.C:205
virtual void computeBmatrixAt(FloatMatrix &answer, const FloatArray &lcoords)
Definition: lattice2d_mt.h:124
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual void giveCrossSectionCoordinates(FloatArray &coords)
Definition: lattice2d_mt.C:469
virtual double giveOldPressure()
Returns the old pressure.
Definition: lattice2d_mt.C:107
virtual double giveWidth()
Definition: lattice2d_mt.h:106
virtual void computeCapacityMatrix(FloatMatrix &answer, TimeStep *tStep)
Computes the capacity matrix of the receiver.
Definition: lattice2d_mt.C:283
virtual bool computeLocalCoordinates(FloatArray &answer, const FloatArray &gcoords)
Computes the element local coordinates from given global coordinates.
Definition: lattice2d_mt.C:385
virtual void giveCrackWidths(FloatArray &widths)
Returns the crack widths.
Definition: lattice2d_mt.h:90
Class representing integration point in finite element program.
Definition: gausspoint.h:93
virtual void giveGpCoordinates(FloatArray &coords)
Gives the GP coordinates.
Definition: lattice2d_mt.C:365
Class representing solution step.
Definition: timestep.h:80
virtual int giveCouplingFlag()
Returns the coupling flag.
Definition: lattice2d_mt.h:84

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