OOFEM 3.0
Loading...
Searching...
No Matches
AbaqusUserElement.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 - 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
35#ifndef abaqususerelement_h
36#define abaqususerelement_h
37
38#include "structuralelement.h"
39#include "floatarray.h"
40#include "floatmatrix.h"
41#include "timestep.h"
42
44
45#define _IFT_AbaqusUserElement_Name "abaqususerelement"
46#define _IFT_AbaqusUserElement_userElement "uel"
47#define _IFT_AbaqusUserElement_numcoords "coords"
48#define _IFT_AbaqusUserElement_dofs "dofs"
49#define _IFT_AbaqusUserElement_numsvars "numsvars"
50#define _IFT_AbaqusUserElement_properties "properties"
51#define _IFT_AbaqusUserElement_type "type"
52#define _IFT_AbaqusUserElement_name "name"
54
55namespace oofem {
56class ParamKey;
77{
78private:
80 void *uelobj;
81
86
89
92
95
97 int jtype;
98
100 int nrhs = 2;
102
105
107 int ndofel = 0;
108
110 int mcrd = 2;
111
113 int mlvarx = 1;
114
118
121
123 int kinc = 1, kstep = 1;
124
126 int npredef = 1;
128
131
133 int ndLoad = 0;
134 int mdLoad = 0;
135
137 int *jdltype = nullptr; // Temporary init.
138
140 double params[ 3 ];
141
144
147
149 void (*uel)(double *rhs, double *amatrx, double *svars, double energy[ 8 ], int *ndofel, // 5
150 int *nrhs, int *nsvars, double *props, int *nprops, double *coords, int *mcrd, // 6
151 int *nnode, double *u, double *du, double *v, double *a, int *jtype, // 6
152 double time[ 2 ], double *dtime, int *kstep, int *kinc, int *jelem, // 5
153 double params[ 3 ], int *ndload, int *jdltyp, double *adlmag, double *predef, // 5
154 int *npredef, int *lflags, int *mvarx, double *ddlmag, int *mdload, // 5
155 double *pnewdt, int *jprops, int *njprop, double *period); // 4 - tot 36
156
158 std::string filename;
159
167
168public:
170 AbaqusUserElement(int n, Domain *d);
171
173 virtual ~AbaqusUserElement();
174
175 void computeConsistentMassMatrix(FloatMatrix &answer, TimeStep *tStep, double &mass, const double *ipDensity = NULL) override;
176 //void computeInitialStressMatrix(FloatMatrix &answer, TimeStep *tStep) override;
177 void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep) override;
178 void giveInternalForcesVector(FloatArray &answer, TimeStep *tStep, int useUpdatedGpRecord = 0) override;
179 virtual void giveInternalForcesVector(FloatArray &answer, TimeStep *tStep, FloatArray &U, FloatMatrix &DU, int useUpdatedGpRecord);
180 int computeNumberOfDofs() override { return this->ndofel; }
181 void giveDofManDofIDMask(int inode, IntArray &answer) const override;
182 void computeField(ValueModeType mode, TimeStep *tStep, const FloatArray &lcoords, FloatArray &answer) override
183 { OOFEM_ERROR("Abaqus user element cannot support computing local unknown vector\n"); }
184 void updateYourself(TimeStep *tStep) override;
185 void updateInternalState(TimeStep *tStep) override;
186
187 bool hasTangent() const {
188 return hasTangentFlag;
189 }
190 virtual void letTempTangentBe(FloatMatrix &src) {
191 tempAmatrx = src;
192 hasTangentFlag = true;
193 }
195 return tempRHS = src;
196 }
198 return tempSvars = src;
199 }
200 virtual const FloatArray &giveStateVector() const {
201 return svars;
202 }
203 virtual const FloatArray &giveTempStateVector() const {
204 return tempSvars;
205 }
206 virtual const FloatMatrix &giveTempTangent() {
207 return tempAmatrx;
208 }
209
210 void initializeFrom(InputRecord &ir, int priority) override;
211 void giveInputRecord(DynamicInputRecord &input) override;
212 void postInitialize() override;
213
214 // definition & identification
215 const char *giveClassName() const override { return "AbaqusUserElement"; }
216 const char *giveInputRecordName() const override { return _IFT_AbaqusUserElement_Name; }
218 Element_Geometry_Type giveGeometryType() const override { return EGT_line_1; }
219
220protected:
221 void computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep) override {
222 OOFEM_ERROR("Function not defined for AbaqusUserElement and should never be called. This is a bug.");
223 }
224 void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) override {
225 OOFEM_ERROR("Function not defined for AbaqusUserElement and should never be called. This is a bug.");
226 }
227
228 void computeBmatrixAt(GaussPoint *, FloatMatrix &, int = 1, int = ALL_STRAINS) override {
229 OOFEM_ERROR("Function not defined for AbaqusUserElement and should never be called. This is a bug.");
230 }
231
232 int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override {
233 OOFEM_ERROR("Function not defined for AbaqusUserElement and should never be called. This is a bug.");
234 }
235};
236}// namespace oofem
237
238#endif // abaqususerelement_h
#define _IFT_AbaqusUserElement_Name
FloatArray svars
Status variables.
void computeBmatrixAt(GaussPoint *, FloatMatrix &, int=1, int=ALL_STRAINS) override
static ParamKey IPK_AbaqusUserElement_userElement
virtual FloatMatrix & letTempRhsBe(FloatMatrix &src)
static ParamKey IPK_AbaqusUserElement_type
integrationDomain giveIntegrationDomain() const override
virtual const FloatArray & giveTempStateVector() const
static ParamKey IPK_AbaqusUserElement_properties
void postInitialize() override
Performs post initialization steps. Called after all components are created and initialized.
virtual const FloatArray & giveStateVector() const
void initializeFrom(InputRecord &ir, int priority) override
void giveDofManDofIDMask(int inode, IntArray &answer) const override
void * uelobj
Dynamically loaded uel.
static ParamKey IPK_AbaqusUserElement_numsvars
Element_Geometry_Type giveGeometryType() const override
FloatArray U
Inputs to element routines. Velocity and Acceleration currently ignored.
void updateYourself(TimeStep *tStep) override
const char * giveInputRecordName() const override
virtual void letTempTangentBe(FloatMatrix &src)
FloatMatrix amatrx
Element amatrx.
std::string filename
File containing the uel function.
bool hasTangentFlag
Keeps track of whether the tangent has been obtained already.
FloatArray props
Element properties.
void giveInternalForcesVector(FloatArray &answer, TimeStep *tStep, int useUpdatedGpRecord=0) override
virtual const FloatMatrix & giveTempTangent()
int numSvars
Number of status variables.
virtual ~AbaqusUserElement()
Destructor.
static ParamKey IPK_AbaqusUserElement_numcoords
AbaqusUserElement(int n, Domain *d)
Constructor.
void(* uel)(double *rhs, double *amatrx, double *svars, double energy[8], int *ndofel, int *nrhs, int *nsvars, double *props, int *nprops, double *coords, int *mcrd, int *nnode, double *u, double *du, double *v, double *a, int *jtype, double time[2], double *dtime, int *kstep, int *kinc, int *jelem, double params[3], int *ndload, int *jdltyp, double *adlmag, double *predef, int *npredef, int *lflags, int *mvarx, double *ddlmag, int *mdload, double *pnewdt, int *jprops, int *njprop, double *period)
Pointer to the dynamically loaded uel-function (translated to C).
void giveInputRecord(DynamicInputRecord &input) override
void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep) override
const char * giveClassName() const override
virtual FloatArray & letTempSvarsBe(FloatArray &src)
void computeConsistentMassMatrix(FloatMatrix &answer, TimeStep *tStep, double &mass, const double *ipDensity=NULL) override
void computeField(ValueModeType mode, TimeStep *tStep, const FloatArray &lcoords, FloatArray &answer) override
void computeStressVector(FloatArray &answer, const FloatArray &strain, GaussPoint *gp, TimeStep *tStep) override
void updateInternalState(TimeStep *tStep) override
static ParamKey IPK_AbaqusUserElement_name
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
static ParamKey IPK_AbaqusUserElement_dofs
void computeConstitutiveMatrixAt(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) override
StructuralElement(int n, Domain *d)
#define OOFEM_ERROR(...)
Definition error.h:79
@ _UnknownIntegrationDomain
#define ALL_STRAINS

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