Skip to content

Commit

Permalink
UMAT fixes for Intel LLVM builds
Browse files Browse the repository at this point in the history
  • Loading branch information
rcarson3 committed Jul 14, 2024
1 parent 2d49b6f commit 96914a9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/mechanics_umat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ void AbaqusUmatModel::ModelSetup(const int nqpts, const int nelems, const int sp


// call c++ wrapper of umat routine
umat(&stress[0], &statev[0], &ddsdde[0], &sse, &spd, &scd, &rpl,
umat_call(&stress[0], &statev[0], &ddsdde[0], &sse, &spd, &scd, &rpl,
ddsdt, drplde, &drpldt, &stran[0], &dstran[0], time,
&deltaTime, &tempk, &dtemp, &predef, &dpred, &cmname,
&ndi, &nshr, &ntens, &nstatv, &props[0], &nprops, &coords[0],
Expand Down
2 changes: 1 addition & 1 deletion src/umat_tests/umat.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#ifdef WIN32
#define UMAT_API __declspec(dllexport)
#elif defined(__clang__)
#elif defined(__clang__) || defined(__INTEL_LLVM_COMPILER)
#define UMAT_API extern "C"
#define UMAT umat
#else
Expand Down
6 changes: 3 additions & 3 deletions src/umat_tests/userumat.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ extern "C" {

#ifdef WIN32
#define UMAT_API __declspec(dllexport)
#elif defined(__clang__)
#elif defined(__clang__) || defined(__INTEL_LLVM_COMPILER)
#define UMAT_API
#define UMAT umat
#else
#define UMAT_API
#define UMAT umat_
#endif

// A fortran function defined in umat.f
// A fortran function defined in umat.f
void UMAT(real8 *stress, real8 *statev, real8 *ddsdde,
real8 *sse, real8 *spd, real8 *scd, real8 *rpl,
real8 *ddsdt, real8 *drplde, real8 *drpldt,
Expand All @@ -36,7 +36,7 @@ extern "C" {

// The C entry point function for my umat
UMAT_API void
umat(real8 *stress, real8 *statev, real8 *ddsdde,
umat_call(real8 *stress, real8 *statev, real8 *ddsdde,
real8 *sse, real8 *spd, real8 *scd, real8 *rpl,
real8 *ddsdt, real8 *drplde, real8 *drpldt,
real8 *stran, real8 *dstran, real8 *time,
Expand Down
2 changes: 1 addition & 1 deletion src/umat_tests/userumat.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ extern "C" {
int *layer, int *kspt, int *kstep, int *kinc);
// The C entry point function for my umat
UMAT_API void
umat(real8 *stress, real8 *statev, real8 *ddsdde,
umat_call(real8 *stress, real8 *statev, real8 *ddsdde,
real8 *sse, real8 *spd, real8 *scd, real8 *rpl,
real8 *ddsdt, real8 *drplde, real8 *drpldt,
real8 *stran, real8 *dstran, real8 *time,
Expand Down
5 changes: 4 additions & 1 deletion src/userumat.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
extern "C" {
#ifdef WIN32
#define UMAT_API __declspec(dllexport)
#elif defined(__clang__) || defined(__INTEL_LLVM_COMPILER)
#define UMAT_API
#define UMAT_FUNC umat
#else
#define UMAT_API
#define UMAT_FUNC umat_
Expand All @@ -35,7 +38,7 @@ extern "C" {

// The C entry point function for my umat
UMAT_API void
umat(real8 *stress, real8 *statev, real8 *ddsdde,
umat_call(real8 *stress, real8 *statev, real8 *ddsdde,
real8 *sse, real8 *spd, real8 *scd, real8 *rpl,
real8 *ddsdt, real8 *drplde, real8 *drpldt,
real8 *stran, real8 *dstran, real8 *time,
Expand Down

0 comments on commit 96914a9

Please sign in to comment.