OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
planestresselementevaluator.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/PlaneStress/planestresselementevaluator.h"
36 #include "../sm/CrossSections/structuralcrosssection.h"
37 #include "floatarray.h"
38 #include "floatmatrix.h"
39 #include "domain.h"
40 #include "node.h"
41 #include "element.h"
42 #include "gausspoint.h"
43 #include "gaussintegrationrule.h"
44 #include "matresponsemode.h"
45 #include "crosssection.h"
46 #include "mathfem.h"
47 #include "iga/iga.h"
48 
49 namespace oofem {
51 {
52  FloatArray N;
55  answer.beNMatrixOf(N, 2);
56 }
57 
59 {
60  FloatMatrix d;
61 
63  // this uses FEInterpolation::nodes2coords - quite inefficient in this case (large num of dofmans)
64  interp->evaldNdx( d, gp->giveNaturalCoordinates(),
66 
67  answer.resize(3, d.giveNumberOfRows() * 2);
68  answer.zero();
69 
70  for ( int i = 1; i <= d.giveNumberOfRows(); i++ ) {
71  answer.at(1, i * 2 - 1) = d.at(i, 1);
72  answer.at(2, i * 2 - 0) = d.at(i, 2);
73 
74  answer.at(3, 2 * i - 1) = d.at(i, 2);
75  answer.at(3, 2 * i - 0) = d.at(i, 1);
76  }
77 }
78 
79 
81 {
82  double determinant, weight, thickness, volume;
83  determinant = fabs( this->giveElement()->giveInterpolation()
84  ->giveTransformationJacobian( gp->giveNaturalCoordinates(),
86  gp->giveIntegrationRule()->giveKnotSpan() ) ) );
87  weight = gp->giveWeight();
88  thickness = this->giveElement()->giveCrossSection()->give(CS_Thickness, gp);
89  volume = determinant * weight * thickness;
90 
91  return volume;
92 }
93 
94 
96 {
97  static_cast< StructuralCrossSection * >( this->giveElement()->giveCrossSection() )->giveRealStress_PlaneStress(answer, gp, strain, tStep);
98 }
99 
101 {
102  static_cast< StructuralCrossSection * >( this->giveElement()->giveCrossSection() )->giveStiffnessMatrix_PlaneStress(answer, rMode, gp, tStep);
103 }
104 } // end namespace oofem
CrossSection * giveCrossSection()
Definition: element.C:495
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates the array of interpolation functions (shape functions) at given point.
Element * giveElement()
Returns corresponding element to receiver.
Definition: gausspoint.h:188
virtual const IntArray * giveKnotSpan()
Returns receiver sub patch indices (if apply).
virtual void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
Computes constitutive matrix of receiver.
MatResponseMode
Describes the character of characteristic material matrix.
virtual Element * giveElement()=0
virtual FEInterpolation * giveInterpolation() const
Definition: element.h:629
Class representing a general abstraction for finite element interpolation class.
Definition: feinterpol.h:132
virtual void computeNMatrixAt(FloatMatrix &answer, GaussPoint *gp)
Assemble interpolation matrix at given IP.
virtual double giveWeight()
Returns integration weight of receiver.
Definition: gausspoint.h:181
#define N(p, q)
Definition: mdm.C:367
double at(int i, int j) const
Coefficient access function.
Definition: floatmatrix.h:176
IntegrationRule * giveIntegrationRule()
Returns corresponding integration rule to receiver.
Definition: gausspoint.h:186
void beNMatrixOf(const FloatArray &n, int nsd)
Assigns the receiver to be a repeated diagonal matrix.
Definition: floatmatrix.C:505
Class representing vector of real numbers.
Definition: floatarray.h:82
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
virtual double give(CrossSectionProperty a, GaussPoint *gp)
Returns the value of cross section property at given point.
Definition: crosssection.C:151
void resize(int rows, int cols)
Checks size of receiver towards requested bounds.
Definition: floatmatrix.C:1358
virtual void computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep)
Computes the stress vector.
void zero()
Zeroes all coefficient of receiver.
Definition: floatmatrix.C:1326
Geometry wrapper for IGA elements.
Definition: iga.h:57
Abstract base class for all structural cross section models.
the oofem namespace is to define a context or scope in which all oofem names are defined.
int giveNumberOfRows() const
Returns number of rows of receiver.
Definition: floatmatrix.h:156
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80
virtual double evaldNdx(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo)=0
Evaluates the matrix of derivatives of interpolation functions (shape functions) at given point...
virtual void computeBMatrixAt(FloatMatrix &answer, GaussPoint *gp)
Assembles the strain-displacement matrix of the receiver at given integration point.
const FloatArray & giveNaturalCoordinates()
Returns coordinate array of receiver.
Definition: gausspoint.h:138

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