OOFEM 3.0
Loading...
Searching...
No Matches
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 - 2025 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
37#include "floatarray.h"
38#include "floatmatrix.h"
39#include "domain.h"
40#include "node.h"
41#include "element.h"
42#include "gausspoint.h"
44#include "matresponsemode.h"
45#include "crosssection.h"
46#include "mathfem.h"
47#include "iga/iga.h"
48
49namespace oofem {
50void PlaneStressStructuralElementEvaluator :: computeNMatrixAt(FloatMatrix &answer, GaussPoint *gp)
51{
55 answer.beNMatrixOf(N, 2);
56}
57
58void PlaneStressStructuralElementEvaluator :: computeBMatrixAt(FloatMatrix &answer, GaussPoint *gp)
59{
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
80double PlaneStressStructuralElementEvaluator :: computeVolumeAround(GaussPoint *gp)
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
95void PlaneStressStructuralElementEvaluator :: computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep)
96{
97 answer = static_cast< StructuralCrossSection * >( this->giveElement()->giveCrossSection() )->giveRealStress_PlaneStress(strain, gp, tStep);
98}
99
100void PlaneStressStructuralElementEvaluator :: computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
101{
102 answer = static_cast< StructuralCrossSection * >( this->giveElement()->giveCrossSection() )->giveStiffnessMatrix_PlaneStress(rMode, gp, tStep);
103}
104} // end namespace oofem
#define N(a, b)
virtual FEInterpolation * giveInterpolation() const
Definition element.h:648
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
virtual double evaldNdx(FloatMatrix &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
void resize(Index rows, Index cols)
Definition floatmatrix.C:79
void beNMatrixOf(const FloatArray &n, int nsd)
void zero()
Zeroes all coefficient of receiver.
int giveNumberOfRows() const
Returns number of rows of receiver.
double at(std::size_t i, std::size_t j) const
const FloatArray & giveNaturalCoordinates() const
Returns coordinate array of receiver.
Definition gausspoint.h:138
IntegrationRule * giveIntegrationRule()
Returns corresponding integration rule to receiver.
Definition gausspoint.h:185
Element * giveElement()
Returns corresponding element to receiver.
Definition gausspoint.h:187
double giveWeight()
Returns integration weight of receiver.
Definition gausspoint.h:180
virtual const IntArray * giveKnotSpan()
Returns receiver sub patch indices (if apply).
virtual Element * giveElement()=0
@ CS_Thickness
Thickness.

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011