OOFEM 3.0
Loading...
Searching...
No Matches
abaqususermaterial.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
35#include "abaqususermaterial.h"
36#include "gausspoint.h"
37#include "floatarrayf.h"
38#include "floatmatrixf.h"
39#include "classfactory.h"
40#include "dynamicinputrecord.h"
41
42#ifdef _WIN32 //_MSC_VER and __MINGW32__ included
43 #include <Windows.h>
44#else
45 #include <dlfcn.h>
46#endif
47
48#include <cstring>
49
50namespace oofem {
52
53std::size_t const AbaqusUserMaterial::abq2oo9[ 9 ] = { 0, 1, 2, 5, 4, 3, 6, 8, 7 };
54std::size_t const AbaqusUserMaterial::abq2oo6[ 6 ] = { 0, 1, 2, 5, 4, 3 };
55
59
61{
62#ifdef _WIN32
63 if ( this->umatobj ) {
64 FreeLibrary( ( HMODULE ) this->umatobj);
65 }
66#else
67 if ( this->umatobj ) {
68 dlclose(this->umatobj);
69 }
70
71#endif
72}
73
75{
76 std::string umatname;
77
79
83 umatname = "umat";
85 strncpy(this->cmname, umatname.c_str(), 79);
86
87 FloatArray s(6);
89 this->initialStress = s;
90
91#ifdef _WIN32
93 this->umatobj = ( void * ) LoadLibrary(filename.c_str() );
94 if ( !this->umatobj ) {
95 DWORD dlresult = GetLastError(); //works for MinGW 32bit and MSVC
96 OOFEM_ERROR("Couldn't load \"%s\",\nerror code = %d", filename.c_str(), dlresult);
97 }
98
99 // * ( void ** )( & this->umat ) = GetProcAddress( ( HMODULE ) this->umatobj, "umat_" );
100 * ( FARPROC * ) ( & this->umat ) = GetProcAddress( ( HMODULE ) this->umatobj, "umat_"); //works for MinGW 32bit
101 if ( !this->umat ) {
102 // char *dlresult = GetLastError();
103 DWORD dlresult = GetLastError(); //works for MinGW 32bit
104 OOFEM_ERROR("Couldn't load symbol umat,\nerror code: %d\n", dlresult);
105 }
106
107#else
108 this->umatobj = dlopen(filename.c_str(), RTLD_NOW);
109 if ( !this->umatobj ) {
110 OOFEM_ERROR( "couldn't load \"%s\",\ndlerror: %s", filename.c_str(), dlerror() );
111 }
112
113 * ( void ** ) ( & this->umat ) = dlsym(this->umatobj, "umat_");
114
115 char *dlresult = dlerror();
116 if ( dlresult ) {
117 OOFEM_ERROR("couldn't load symbol umat,\ndlerror: %s\n", dlresult);
118 }
119
120#endif
121
124 }
125
128 printf("mPerturbation: %e\n", mPerturbation);
129 }
130}
131
141
142std::unique_ptr<MaterialStatus> AbaqusUserMaterial::CreateStatus(GaussPoint *gp) const
143{
144 return std::make_unique<AbaqusUserMaterialStatus>(gp, this->numState);
145}
146
147
150{
151 auto ms = dynamic_cast< AbaqusUserMaterialStatus * >( this->giveStatus(gp) );
152 if ( !ms->hasTangent() ) {
153 // Evaluating the function once, so that the tangent can be obtained.
154 const_cast< AbaqusUserMaterial * >( this )->giveRealStressVector_3d(zeros< 6 >(), gp, tStep);
155 }
156
157 return ms->giveTempTangent();
158
159#if 0
160 double h = 1e-7;
161 FloatArray strain, strainh, stress, stressh;
162 strain = static_cast< StructuralMaterialStatus * >( gp->giveMaterialStatus() )->giveTempStrainVector();
163 stress = static_cast< StructuralMaterialStatus * >( gp->giveMaterialStatus() )->giveTempStressVector();
164 FloatMatrix En(strain.giveSize(), strain.giveSize() );
165 for ( int i = 1; i <= strain.giveSize(); ++i ) {
166 strainh = strain;
167 strainh.at(i) += h;
168 this->giveRealStressVector_3d(stressh, form, gp, strainh, tStep);
169 stressh.subtract(stress);
170 stressh.times(1.0 / h);
171 En.setColumn(stressh, i);
172 }
173 this->giveRealStressVector_3d(stress, form, gp, strain, tStep);
174
175 printf("En = ");
176 En.printYourself();
177 printf("Tangent = ");
178 answer.printYourself();
179#endif
180}
181
182
185{
186 auto ms = dynamic_cast< AbaqusUserMaterialStatus * >( this->giveStatus(gp) );
187 if ( !ms->hasTangent() ) {
188 // Evaluating the function once, so that the tangent can be obtained.
189 const auto &vF = ms->giveTempFVector();
190 this->giveFirstPKStressVector_3d(vF, gp, tStep);
191 }
192
193 if ( !mUseNumericalTangent ) {
194 // if(mStressInterpretation == 0) {
195 return ms->giveTempTangent();
196 /*
197 * }
198 * else {
199 * // The Abaqus Documentation of User Subroutines for UMAT Section 1.1.31 says that DDSDDE is defined as
200 * // partial(Delta(sigma))/partial(Delta(epsilon)).
201 * FloatMatrix dSdE;
202 * dSdE = ms->giveTempTangent();
203 * this->give_dPdF_from(dSdE, answer, gp);
204 * }
205 */
206 } else {
207 double h = mPerturbation;
208 auto const &vF = ms->giveTempFVector();
209 auto const &stress = ms->giveTempPVector();
211 for ( int i = 1; i <= 9; ++i ) {
212 auto vF_h = vF;
213 vF_h.at(i) += h;
214 auto stressh = this->giveFirstPKStressVector_3d(vF_h, gp, tStep);
215 auto ds = ( stressh - stress ) * ( 1. / h );
216 En.setColumn(ds, i);
217 }
218
219 // Reset
220 this->giveFirstPKStressVector_3d(vF, gp, tStep);
221
222 /*
223 * printf("En = ");
224 * En.printYourself();
225 *
226 * answer = ms->giveTempTangent();
227 * printf("Tangent = ");
228 * answer.printYourself();
229 *
230 * FloatMatrix diff = En;
231 * diff.subtract(answer);
232 * printf("diff: "); diff.printYourself();
233 */
234
235 return En;
236 }
237}
238
241 TimeStep *tStep) const
242{
243 auto dPdF3D = this->give3dMaterialStiffnessMatrix_dPdF(mmode, gp, tStep);
244 return dPdF3D({ 0, 1, 2, 5, 8 }, { 0, 1, 2, 5, 8 });
245}
246
249 TimeStep *tStep) const
250{
251 auto ms = static_cast< AbaqusUserMaterialStatus * >( this->giveStatus(gp) );
252 /* User-defined material name, left justified. Some internal material models are given names starting with
253 * the “ABQ_” character string. To avoid conflict, you should not use “ABQ_” as the leading string for
254 * CMNAME. */
255 //char cmname[80];
256
257 // Sizes of the tensors.
258 int ndi = 3;
259 int nshr = 3;
260
261 int ntens = ndi + nshr;
262 FloatArrayF< 6 >old_strain = ms->giveStrainVector();
263 FloatArrayF< 6 >old_stress = initialStress + ms->giveStressVector();
264 auto strainIncrement = strain - old_strain;
265 auto state = ms->giveStateVector();
266 FloatMatrixF< 6, 6 >abq_jacobian;
267 int numProperties = this->properties.giveSize();
268
269 // Temperature and increment
270 double temp = 0.0, dtemp = 0.0;
271
272 // Times and increment
273 double dtime = tStep->giveTimeIncrement();
275 double time[ 2 ] = {
276 tStep->giveTargetTime() - dtime, tStep->giveTargetTime()
277 };
278 double pnewdt = 1.0;
279
280 /* Specific elastic strain energy, plastic dissipation, and “creep” dissipation, respectively. These are passed
281 * in as the values at the start of the increment and should be updated to the corresponding specific energy
282 * values at the end of the increment. They have no effect on the solution, except that they are used for
283 * energy output. */
284 double sse, spd, scd;
285
286 // Outputs only in a fully coupled thermal-stress analysis:
287 double rpl = 0.0; // Volumetric heat generation per unit time at the end of the increment caused by mechanical working of the material.
288 FloatArrayF< 6 >ddsddt; // Variation of the stress increments with respect to the temperature.
289 FloatArrayF< 6 >drplde; // Variation of RPL with respect to the strain increments.
290 double drpldt = 0.0; // Variation of RPL with respect to the temperature.
291
292 /* An array containing the coordinates of this point. These are the current coordinates if geometric
293 * nonlinearity is accounted for during the step (see “Procedures: overview,” Section 6.1.1); otherwise,
294 * the array contains the original coordinates of the point */
295 FloatArray coords;
297
298 /* Rotation increment matrix. This matrix represents the increment of rigid body rotation of the basis
299 * system in which the components of stress (STRESS) and strain (STRAN) are stored. It is provided so
300 * that vector- or tensor-valued state variables can be rotated appropriately in this subroutine: stress and
301 * strain components are already rotated by this amount before UMAT is called. This matrix is passed in
302 * as a unit matrix for small-displacement analysis and for large-displacement analysis if the basis system
303 * for the material point rotates with the material (as in a shell element or when a local orientation is used).*/
304 auto drot = eye< 3 >();
305
306 /* Characteristic element length, which is a typical length of a line across an element for a first-order
307 * element; it is half of the same typical length for a second-order element. For beams and trusses it is a
308 * characteristic length along the element axis. For membranes and shells it is a characteristic length in
309 * the reference surface. For axisymmetric elements it is a characteristic length in the
310 * plane only.
311 * For cohesive elements it is equal to the constitutive thickness.*/
312 double celent = 0.0;
313
314 /* Array containing the deformation gradient at the beginning of the increment. See the discussion
315 * regarding the availability of the deformation gradient for various element types. */
316 auto dfgrd0 = eye< 3 >();
317 /* Array containing the deformation gradient at the end of the increment. The components of this array
318 * are set to zero if nonlinear geometric effects are not included in the step definition associated with
319 * this increment. See the discussion regarding the availability of the deformation gradient for various
320 * element types. */
321 auto dfgrd1 = eye< 3 >();
322
323 int noel = gp->giveElement()->giveNumber(); // Element number.
324 int npt = 0; // Integration point number.
325
326 int layer = 0; // Layer number (for composite shells and layered solids)..
327 int kspt = 0; // Section point number within the current layer.
328 int kstep = 0; // Step number.
329 int kinc = 0; // Increment number.
330
332 double predef;
333 double dpred;
334
335 // Change to Abaqus's component order
336 auto abq_stress = old_stress [ abq2oo6 ];
337 auto abq_old_strain = old_strain [ abq2oo6 ];
338 auto abq_strainIncrement = strainIncrement [ abq2oo6 ];
339
340 // printf("stress oofem: "); stress.printYourself();
341
342 OOFEM_LOG_DEBUG("AbaqusUserMaterial :: giveRealStressVector_3d - Calling subroutine");
343 this->umat(abq_stress.givePointer(), // STRESS
344 state.givePointer(), // STATEV
345 abq_jacobian.givePointer(), // DDSDDE
346 & sse, // SSE
347 & spd, // SPD
348 & scd, // SCD
349 & rpl, // RPL
350 ddsddt.givePointer(), // DDSDDT
351 drplde.givePointer(), // DRPLDE
352 & drpldt, // DRPLDT
353 abq_old_strain.givePointer(), // STRAN
354 abq_strainIncrement.givePointer(), // DSTRAN
355 time, // TIME
356 & dtime, // DTIME
357 & temp, // TEMP
358 & dtemp, // DTEMP
359 & predef, // PREDEF
360 & dpred, // DPRED
361 const_cast< AbaqusUserMaterial * >( this )->cmname, // CMNAME
362 & ndi, // NDI
363 & nshr, // NSHR
364 & ntens, // NTENS
365 const_cast< int * >( & numState ), // NSTATV
366 const_cast< AbaqusUserMaterial * >( this )->properties.givePointer(), // PROPS
367 & numProperties, // NPROPS
368 coords.givePointer(), // COORDS
369 drot.givePointer(), // DROT
370 & pnewdt, // PNEWDT
371 & celent, // CELENT
372 dfgrd0.givePointer(), // DFGRD0
373 dfgrd1.givePointer(), // DFGRD1
374 & noel, // NOEL
375 & npt, // NPT
376 & layer, // LAYER
377 & kspt, // KSPT
378 & kstep, // KSTEP
379 & kinc); // KINC
380
381 // Change to OOFEM's component order
382 auto jacobian = abq_jacobian(abq2oo6, abq2oo6);
383 // subtracking the initial stress
384 auto stress = abq_stress [ abq2oo6 ] - initialStress;
385
386 ms->letTempStrainVectorBe(strain);
387 ms->letTempStressVectorBe(stress);
388 ms->letTempStateVectorBe(state);
389 ms->letTempTangentBe(jacobian);
390 return stress;
391}
392
393
396 TimeStep *tStep) const
397{
398 auto ms = static_cast< AbaqusUserMaterialStatus * >( this->giveStatus(gp) );
399 /* User-defined material name, left justified. Some internal material models are given names starting with
400 * the “ABQ_” character string. To avoid conflict, you should not use “ABQ_” as the leading string for
401 * CMNAME. */
402 //char cmname[80];
403
404 // Sizes of the tensors.
405 int ndi = 3;
406 int nshr = 3;
407
408 int ntens = ndi + nshr;
409 FloatArrayF< 9 >abq_stress; // PK1 or cauchy
410
411 // compute Green-Lagrange strain
412 auto F = from_voigt_form_9(vF);
413 auto E = 0.5 * ( Tdot(F, F) - eye< 3 >() );
414 auto strain = to_voigt_strain_33(E);
415
416 auto strainIncrement = strain - FloatArrayF< 6 >( ms->giveStrainVector() );
417 FloatArray state = ms->giveStateVector();
418 FloatMatrixF< 9, 9 >abq_jacobian; // dPdF
419 int numProperties = this->properties.giveSize();
420
421 // Temperature and increment
422 double temp = 0.0, dtemp = 0.0;
423
424 // Times and increment
425 double dtime = tStep->giveTimeIncrement();
427 double time[ 2 ] = {
428 tStep->giveTargetTime() - dtime, tStep->giveTargetTime()
429 };
430 double pnewdt = 1.0;
431
432 /* Specific elastic strain energy, plastic dissipation, and “creep” dissipation, respectively. These are passed
433 * in as the values at the start of the increment and should be updated to the corresponding specific energy
434 * values at the end of the increment. They have no effect on the solution, except that they are used for
435 * energy output. */
436 double sse, spd, scd;
437
438 // Outputs only in a fully coupled thermal-stress analysis:
439 double rpl = 0.0; // Volumetric heat generation per unit time at the end of the increment caused by mechanical working of the material.
440 FloatArray ddsddt(ntens); // Variation of the stress increments with respect to the temperature.
441 FloatArray drplde(ntens); // Variation of RPL with respect to the strain increments.
442 double drpldt = 0.0; // Variation of RPL with respect to the temperature.
443
444 /* An array containing the coordinates of this point. These are the current coordinates if geometric
445 * nonlinearity is accounted for during the step (see “Procedures: overview,” Section 6.1.1); otherwise,
446 * the array contains the original coordinates of the point */
447 FloatArray coords;
449
450 /* Rotation increment matrix. This matrix represents the increment of rigid body rotation of the basis
451 * system in which the components of stress (STRESS) and strain (STRAN) are stored. It is provided so
452 * that vector- or tensor-valued state variables can be rotated appropriately in this subroutine: stress and
453 * strain components are already rotated by this amount before UMAT is called. This matrix is passed in
454 * as a unit matrix for small-displacement analysis and for large-displacement analysis if the basis system
455 * for the material point rotates with the material (as in a shell element or when a local orientation is used).*/
456 auto drot = eye< 3 >();
457
458 /* Characteristic element length, which is a typical length of a line across an element for a first-order
459 * element; it is half of the same typical length for a second-order element. For beams and trusses it is a
460 * characteristic length along the element axis. For membranes and shells it is a characteristic length in
461 * the reference surface. For axisymmetric elements it is a characteristic length in the
462 * plane only.
463 * For cohesive elements it is equal to the constitutive thickness.*/
464 double celent = 0.0;
465
466 /* Array containing the deformation gradient at the beginning of the increment. See the discussion
467 * regarding the availability of the deformation gradient for various element types. */
468 auto dfgrd0 = from_voigt_form_9(ms->giveFVector() );
469 /* Array containing the deformation gradient at the end of the increment. The components of this array
470 * are set to zero if nonlinear geometric effects are not included in the step definition associated with
471 * this increment. See the discussion regarding the availability of the deformation gradient for various
472 * element types. */
473 auto dfgrd1 = from_voigt_form_9(vF);
474
475 int noel = gp->giveElement()->giveNumber(); // Element number.
476 int npt = 0; // Integration point number.
477
478 // We intentionally ignore the layer number since that is handled by the layered cross-section in OOFEM.
479 int layer = 0; // Layer number (for composite shells and layered solids)..
480 int kspt = 0; // Section point number within the current layer.
481 int kstep = tStep->giveMetaStepNumber(); // Step number.
482 int kinc = 0; // Increment number.
483
485 double predef;
486 double dpred;
487
488 // Change to Abaqus's component order
489 auto abq_strain = strain [ abq2oo6 ];
490 auto abq_strainIncrement = strainIncrement [ abq2oo6 ];
491
492 OOFEM_LOG_DEBUG("AbaqusUserMaterial :: giveRealStressVector - Calling subroutine");
493 this->umat(abq_stress.givePointer(), // STRESS
494 state.givePointer(), // STATEV
495 abq_jacobian.givePointer(), // DDSDDE
496 & sse, // SSE
497 & spd, // SPD
498 & scd, // SCD
499 & rpl, // RPL
500 ddsddt.givePointer(), // DDSDDT
501 drplde.givePointer(), // DRPLDE
502 & drpldt, // DRPLDT
503 abq_strain.givePointer(), // STRAN
504 abq_strainIncrement.givePointer(), // DSTRAN
505 time, // TIME
506 & dtime, // DTIME
507 & temp, // TEMP
508 & dtemp, // DTEMP
509 & predef, // PREDEF
510 & dpred, // DPRED
511 const_cast< char * >( this->cmname ), // CMNAME
512 & ndi, // NDI
513 & nshr, // NSHR
514 & ntens, // NTENS
515 const_cast< int * >( & numState ), // NSTATV
516 const_cast< double * >( properties.givePointer() ), // PROPS
517 & numProperties, // NPROPS
518 coords.givePointer(), // COORDS
519 drot.givePointer(), // DROT
520 & pnewdt, // PNEWDT
521 & celent, // CELENT
522 dfgrd0.givePointer(), // DFGRD0
523 dfgrd1.givePointer(), // DFGRD1
524 & noel, // NOEL
525 & npt, // NPT
526 & layer, // LAYER
527 & kspt, // KSPT
528 & kstep, // KSTEP
529 & kinc); // KINC
530
531
532 // Change to OOFEM's component order
533 auto jacobian = abq_jacobian(abq2oo9, abq2oo9);
534
535 if ( mStressInterpretation == 0 ) {
536 auto stress = abq_stress [ abq2oo9 ];
537 auto P = from_voigt_form_9(stress);
538 auto vP = to_voigt_form_33(P);
539
540 auto cauchyStress = dotT(P, F) * ( 1. / det(F) );
541 auto vCauchyStress = to_voigt_stress_33(cauchyStress);
542
543 ms->letTempStrainVectorBe(strain);
544 ms->letTempStressVectorBe(vCauchyStress);
545 ms->letTempStateVectorBe(state);
546 ms->letTempTangentBe(jacobian);
547 ms->letTempPVectorBe(vP);
548 ms->letTempFVectorBe(vF);
549
550 return vP;
551 } else {
552 auto vsigma = abq_stress [ abq2oo6 ];
553 auto sigma = from_voigt_stress_6(vsigma);
554
555 auto P = dot(F, sigma);
556 auto vP = to_voigt_form_33(P);
557
558 // Convert from sigma to S
559 auto F_inv = inv(F);
560 auto S = dot(F_inv, P);
561 auto vS = to_voigt_stress_33(S);
562
563 // @todo Should convert from dsigmadE to dSdE here
564 // L2=detF*matmul( matmul ( inv(op_a_V9(F,F), cm-op_a_V9(ident,Tau)-op_b_V9(Tau,ident) ), inv(op_a_V9(Ft,Ft)))
565
566 ms->letTempStrainVectorBe(strain);
567 ms->letTempStressVectorBe(vS);
568 ms->letTempStateVectorBe(state);
569 ms->letTempTangentBe(jacobian);
570 ms->letTempPVectorBe(vP);
571 ms->letTempFVectorBe(vF);
572
573 return vP;
574 }
575}
576
577
579{
580 auto ms = static_cast< AbaqusUserMaterialStatus * >( this->giveStatus(gp) );
581 if ( type == IST_Undefined || type == IST_AbaqusStateVector ) {
582 // The undefined value is used to just dump the entire state vector.
583 answer = ms->giveStateVector();
584 return 1;
585 } else if ( type == IST_StressTensor ) {
586 answer = ms->giveStressVector();
587 answer.add(initialStress);
588 return 1;
589 } else {
590 return StructuralMaterial::giveIPValue(answer, gp, type, tStep);
591 }
592}
593
594
595
601
609
615
617{
619
620 fprintf(File, " stateVector ");
621 FloatArray state = this->giveStateVector();
622 for ( auto &var : state ) {
623 fprintf(File, " % .4e", var);
624 }
625
626 fprintf(File, "\n");
627}
628} // end namespace oofem
#define _IFT_AbaqusUserMaterial_numericalTangentPerturbation
#define _IFT_AbaqusUserMaterial_properties
#define _IFT_AbaqusUserMaterial_numState
#define _IFT_AbaqusUserMaterial_numericalTangent
#define _IFT_AbaqusUserMaterial_userMaterial
#define _IFT_AbaqusUserMaterial_initialStress
#define _IFT_AbaqusUserMaterial_name
#define E(a, b)
#define REGISTER_Material(class)
const FloatArray & giveStateVector() const
FloatArray stateVector
General state vector.
AbaqusUserMaterialStatus(GaussPoint *gp, int numState)
Constructor.
int numState
Number of state variables.
void updateYourself(TimeStep *tStep) override
bool hasTangentFlag
Checker to see if tangent has been computed.
const FloatMatrix & giveTempTangent()
FloatArray tempStateVector
Temporary state vector.
void printOutputAt(FILE *file, TimeStep *tStep) const override
Print receiver's output to given stream.
static std::size_t const abq2oo9[9]
void giveInputRecord(DynamicInputRecord &input) override
std::string filename
Name of the file that contains the umat function.
std::unique_ptr< MaterialStatus > CreateStatus(GaussPoint *gp) const override
AbaqusUserMaterial(int n, Domain *d)
Constructor.
void * umatobj
Dynamically loaded umat.
void(* umat)(double *stress, double *statev, double *ddsdde, double *sse, double *spd, double *scd, double *rpl, double *ddsddt, double *drplde, double *drpldt, double *stran, double *dstran, double time[2], double *dtime, double *temp, double *dtemp, double predef[1], double dpred[1], char cmname[80], int *ndi, int *nshr, int *ntens, int *nstatv, double *props, int *nprops, double coords[3], double *drot, double *pnewdt, double *celent, double *dfgrd0, double *dfgrd1, int *noel, int *npt, int *layer, int *kspt, int *kstep, int *kinc)
Pointer to the dynamically loaded umat-function (translated to C).
FloatArrayF< 6 > initialStress
Initial stress.
char cmname[80]
Name for material routine.
FloatMatrixF< 5, 5 > givePlaneStrainStiffnessMatrix_dPdF(MatResponseMode mmode, GaussPoint *gp, TimeStep *tStep) const override
FloatMatrixF< 9, 9 > give3dMaterialStiffnessMatrix_dPdF(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override
static std::size_t const abq2oo6[6]
virtual ~AbaqusUserMaterial()
Destructor.
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
FloatArrayF< 6 > giveRealStressVector_3d(const FloatArrayF< 6 > &strain, GaussPoint *gp, TimeStep *tStep) const override
Default implementation relies on giveRealStressVector for second Piola-Kirchoff stress.
FloatArrayF< 9 > giveFirstPKStressVector_3d(const FloatArrayF< 9 > &vF, GaussPoint *gp, TimeStep *tStep) const override
Default implementation relies on giveRealStressVector for second Piola-Kirchoff stress.
FloatArray properties
Material properties.
FloatMatrixF< 6, 6 > give3dMaterialStiffnessMatrix(MatResponseMode mode, GaussPoint *gp, TimeStep *tStep) const override
void initializeFrom(InputRecord &ir) override
int numState
Size of the state vector.
void setField(int item, InputFieldType id)
virtual int computeGlobalCoordinates(FloatArray &answer, const FloatArray &lcoords)
Definition element.C:1225
int giveNumber() const
Definition femcmpnn.h:104
const double * givePointer() const
double & at(Index i)
Definition floatarray.h:202
Index giveSize() const
Returns the size of receiver.
Definition floatarray.h:261
void add(const FloatArray &src)
Definition floatarray.C:218
const double * givePointer() const
Definition floatarray.h:506
void subtract(const FloatArray &src)
Definition floatarray.C:320
void times(double s)
Definition floatarray.C:834
void setColumn(const FloatArrayF< N > &src, std::size_t c)
const double * givePointer() const
void setColumn(const FloatArray &src, int c)
*Prints matrix to stdout Useful for debugging void printYourself() const
const FloatArray & giveNaturalCoordinates() const
Returns coordinate array of receiver.
Definition gausspoint.h:138
IntegrationPointStatus * giveMaterialStatus(IntegrationPointStatusIDType key=IPSID_Default)
Definition gausspoint.h:204
Element * giveElement()
Returns corresponding element to receiver.
Definition gausspoint.h:187
virtual bool hasField(InputFieldType id)=0
Returns true if record contains field identified by idString keyword.
GaussPoint * gp
Associated integration point.
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Definition material.C:206
const FloatArray & giveTempStressVector() const
Returns the const pointer to receiver's temporary stress vector.
void printOutputAt(FILE *file, TimeStep *tStep) const override
Print receiver's output to given stream.
StructuralMaterialStatus(GaussPoint *g)
Constructor. Creates new StructuralMaterialStatus with IntegrationPoint g.
void updateYourself(TimeStep *tStep) override
const FloatArray & giveTempStrainVector() const
Returns the const pointer to receiver's temporary strain vector.
FloatArray strainVector
Equilibrated strain vector in reduced form.
void giveInputRecord(DynamicInputRecord &input) override
void initializeFrom(InputRecord &ir) override
StructuralMaterial(int n, Domain *d)
int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep) override
int giveMetaStepNumber()
Returns receiver's meta step number.
Definition timestep.h:150
double giveTimeIncrement()
Returns solution step associated time increment.
Definition timestep.h:168
double giveTargetTime()
Returns target time.
Definition timestep.h:164
#define OOFEM_ERROR(...)
Definition error.h:79
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Definition inputrecord.h:75
#define IR_GIVE_FIELD(__ir, __value, __id)
Definition inputrecord.h:67
#define OOFEM_LOG_DEBUG(...)
Definition logger.h:144
#define S(p)
Definition mdm.C:469
FloatArrayF< 6 > to_voigt_stress_33(const FloatMatrixF< 3, 3 > &t)
FloatArrayF< 6 > to_voigt_strain_33(const FloatMatrixF< 3, 3 > &t)
FloatMatrixF< N, P > Tdot(const FloatMatrixF< M, N > &a, const FloatMatrixF< M, P > &b)
Computes .
FloatMatrixF< 3, 3 > from_voigt_form_9(const FloatArrayF< 9 > &v)
FloatMatrixF< N, P > dotT(const FloatMatrixF< N, M > &a, const FloatMatrixF< P, M > &b)
Computes .
FloatMatrixF< 3, 3 > from_voigt_stress_6(const FloatArrayF< 6 > &v)
double det(const FloatMatrixF< 2, 2 > &mat)
Computes the determinant.
FloatArrayF< 9 > to_voigt_form_33(const FloatMatrixF< 3, 3 > &t)
double dot(const FloatArray &x, const FloatArray &y)
FloatMatrixF< N, N > inv(const FloatMatrixF< N, N > &mat, double zeropiv=1e-24)
Computes the inverse.
FloatArrayF< N > zeros()
For more readable code.
FloatMatrixF< N, N > eye()
Constructs an identity matrix.

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