OOFEM 3.0
Loading...
Searching...
No Matches
qtruss1d.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
36#include "fei1dquad.h"
37#include "crosssection.h"
38#include "gausspoint.h"
40#include "floatmatrix.h"
41#include "floatarray.h"
42#include "intarray.h"
44#include "mathfem.h"
45#include "classfactory.h"
46
47#ifdef __OOFEG
48 #include "oofeggraphiccontext.h"
49#endif
50
51namespace oofem {
53
55
56QTruss1d::QTruss1d(int n, Domain *aDomain) : NLStructuralElement(n, aDomain)
57{
59}
60
61void
62QTruss1d::giveDofManDofIDMask(int inode, IntArray &answer) const
63{
64 answer = { D_u };
65}
66
67int
69{
70 this->interpolation.local2global(answer, lcoords, FEIElementGeometryWrapper(this) );
71 return 1;
72}
73
74void
76{
77 answer = this->giveStructuralCrossSection()->giveRealStress_1d(strain, gp, tStep);
78}
79
80void
81QTruss1d::computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
82{
83 answer = this->giveStructuralCrossSection()->giveStiffnessMatrix_1d(rMode, gp, tStep);
84}
85
86void
88{
89 answer = this->giveStructuralCrossSection()->giveStiffnessMatrix_dPdF_1d(rMode, gp, tStep);
90}
91
92double
94// Returns the length of the receiver. This method is valid only if 1
95// Gauss point is used.
96{
97 double detJ = fabs(this->interpolation.giveTransformationJacobian(gp->giveNaturalCoordinates(), FEIElementGeometryWrapper(this) ) );
98 double weight = gp->giveWeight();
99 return detJ * weight * this->giveCrossSection()->give(CS_Area, gp);
100}
101
102
104// Sets up the array of Gauss Points of the receiver.XF
105{
106 if ( integrationRulesArray.size() == 0 ) {
107 integrationRulesArray.resize(1);
108 integrationRulesArray [ 0 ] = std::make_unique< GaussIntegrationRule >(1, this, 1, 3);
110 }
111}
112
113void
115{
116 this->interpolation.evaldNdx(answer, gp->giveNaturalCoordinates(), FEIElementGeometryWrapper(this) );
117}
118
119void
121{
122 this->computeBmatrixAt(gp, answer);
123}
124} // end namespace oofem
#define REGISTER_Element(class)
virtual double give(CrossSectionProperty a, GaussPoint *gp) const
virtual int setupIntegrationPoints(IntegrationRule &irule, int npoints, Element *element)
int numberOfDofMans
Number of dofmanagers.
Definition element.h:136
std::vector< std ::unique_ptr< IntegrationRule > > integrationRulesArray
Definition element.h:157
int numberOfGaussPoints
Definition element.h:175
CrossSection * giveCrossSection()
Definition element.C:534
const FloatArray & giveNaturalCoordinates() const
Returns coordinate array of receiver.
Definition gausspoint.h:138
double giveWeight()
Returns integration weight of receiver.
Definition gausspoint.h:180
NLStructuralElement(int n, Domain *d)
int computeGlobalCoordinates(FloatArray &answer, const FloatArray &lcoords) override
Definition qtruss1d.C:68
double computeVolumeAround(GaussPoint *gp) override
Definition qtruss1d.C:93
QTruss1d(int n, Domain *d)
Definition qtruss1d.C:56
static FEI1dQuad interpolation
Definition qtruss1d.h:52
void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) override
Definition qtruss1d.C:81
void computeGaussPoints() override
Definition qtruss1d.C:103
void computeConstitutiveMatrix_dPdF_At(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) override
Definition qtruss1d.C:87
void giveDofManDofIDMask(int inode, IntArray &) const override
Definition qtruss1d.C:62
void computeBmatrixAt(GaussPoint *gp, FloatMatrix &answer, int=1, int=ALL_STRAINS) override
Definition qtruss1d.C:114
void computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep) override
Definition qtruss1d.C:75
void computeBHmatrixAt(GaussPoint *gp, FloatMatrix &answer) override
Definition qtruss1d.C:120
virtual FloatMatrixF< 1, 1 > giveStiffnessMatrix_dPdF_1d(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatArrayF< 1 > giveRealStress_1d(const FloatArrayF< 1 > &reducedStrain, GaussPoint *gp, TimeStep *tStep) const =0
virtual FloatMatrixF< 1, 1 > giveStiffnessMatrix_1d(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const =0
StructuralCrossSection * giveStructuralCrossSection()
Helper function which returns the structural cross-section for the element.
@ CS_Area
Area.

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