-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathusub.cpp
77 lines (67 loc) · 2.31 KB
/
usub.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// Generated by usub.cpp.py.
#ifndef usub_cpp
#define usub_cpp
#include <stdio.h>
#include <string.h>
#include "umat_data.h"
#include "UMAT_C_ELASTICITY_1D/umat.cpp"
#include "UMAT_C_ELASTICITY_ISO/umat.cpp"
/**
*
* This is the general UMat function.
* Depending on the name of the material model chosen in ABAQUS, the specific UMat function is executed.
* Before that, a UMatData structure is created, that contains all data given by ABAQUS, but reinterpreted in C++ types (names are conserved).
*
*/
extern "C" 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,
double *dtime,
double *temp,
double *dtemp,
double *predef,
double *dpred,
char *cmname,
int *ndi,
int *nshr,
int *ntens,
int *nstatv,
double *props,
int *nprops,
double *coords,
double *drot,
double *pnewdt,
double *celent,
double *dfgrd0,
double *dfgrd1,
int *noel,
int *npt,
int *layer,
int *kspt,
int *kstep,
int *kinc,
short cmname_len)
{
if (strncmp(cmname, "UMAT_C_ELASTICITY_1D", 20) == 0)
{
UMatData<umat_c_elasticity_1d::ndim, umat_c_elasticity_1d::nvec, umat_c_elasticity_1d::npro, umat_c_elasticity_1d::nsta> umat_data(stress, statev, ddsdde, sse, spd, scd, rpl, ddsddt, drplde, drpldt, stran, dstran, time, dtime, temp, dtemp, predef, dpred, cmname, ndi, nshr, ntens, nstatv, props, nprops, coords, drot, pnewdt, celent, dfgrd0, dfgrd1, noel, npt, layer, kspt, kstep, kinc, cmname_len);
umat_c_elasticity_1d::umat(umat_data);
}
if (strncmp(cmname, "UMAT_C_ELASTICITY_ISO", 21) == 0)
{
UMatData<umat_c_elasticity_iso::ndim, umat_c_elasticity_iso::nvec, umat_c_elasticity_iso::npro, umat_c_elasticity_iso::nsta> umat_data(stress, statev, ddsdde, sse, spd, scd, rpl, ddsddt, drplde, drpldt, stran, dstran, time, dtime, temp, dtemp, predef, dpred, cmname, ndi, nshr, ntens, nstatv, props, nprops, coords, drot, pnewdt, celent, dfgrd0, dfgrd1, noel, npt, layer, kspt, kstep, kinc, cmname_len);
umat_c_elasticity_iso::umat(umat_data);
}
} // void umat_
#endif // # ifndef usub_cpp