Notifications
Clear all

problem with umat writen in c++


atlas09
Posts: 57
Topic starter
(@atlas09)
Trusted Member
Joined: 12 years ago

does anyone now how can i write a umat in c++?

what are the commands to call it?

I need some easy instructions.

I can load a umat writen in fortran..but i would like to go to c++ now.

Thanks in advance for every replay

Topic Tags
6 Replies
Jorgen
Posts: 3920
Moderator
(@jorgen)
Member
Joined: 2 years ago

I have written UMATs in c++. It works just fine as long as you create an interface to your UMAT() routine that contains the right number and type of arguments. Fortran passes arguments by reference, for example.

I recommend that you read the Intel Fortran & C++ compiler manuals for details.

-Jorgen

Topic Tags
6 Replies
lynx
Posts: 59
 lynx
(@lynx)
Trusted Member
Joined: 12 years ago

Dear Jorgen,

Can you kindly post only the interface which bridges C++ and FORTRAN of your codes?

How can type managements be handled in that manner. ABAQUS manuals

serve the subroutine interfaces in fortran and one has to stick to (v)aba_param.inc in order to supply compilation.

Best

Kumar

Reply
Jorgen
Posts: 3920
Moderator
(@jorgen)
Member
Joined: 2 years ago

Heres an exemplar interface function for a single-precision VUMAT written in c++:

[QUOTE]

extern C void

vumat_(int *nblock, int *ndi, int *nshr, int *nstatev, int *nfieldv, int *nprops,

int *lanneal, float *stepTime, float *totTime, float *dt, char *cmname, float *coordMp,

float *charLen, float *props, float *density, float *Dstrain, float *rSpinInc,

float *temp0, float *U0, float *F0, float *field0, float *stressVec0, float *state0,

float *intEne0, float *inelaEn0, float *temp1, float *U1, float *F1,

float *field1, float *stressVec1, float *state1, float *intEne1, float *inelaEn1)

{

//code here

}

[/QUOTE]

Reply
lynx
Posts: 59
 lynx
(@lynx)
Trusted Member
Joined: 12 years ago

Dear Jorgen,

Thank you very much for the input.

I will try the interface and turn back to you at the closest possible time.

Best

Kumar

Reply
Giannis Papaioannou
Posts: 1
(@Giannis Papaioannou)
New Member
Joined: 4 years ago

[QUOTE=Jorgen,n7343]I have written UMATs in c++. It works just fine as long as you create an interface to your UMAT() routine that contains the right number and type of arguments. Fortran passes arguments by reference, for example.

I recommend that you read the Intel Fortran & C++ compiler manuals for details.

-Jorgen[/QUOTE]

Dear Jorgen,

I am a new user of umat and I am trying to write my first umat in c++. I
wrote an elastic example with Fortran.
Can someone show me an example of umat in C++ about a simple elastic
problem?
Thanks a lot!

And please, if you are willing to share with me ,please send me an email:
[email]lei.cai@ensam.eu[/email]

Reply
ramprasadv94
Posts: 1
(@ramprasadv94)
New Member
Joined: 4 days ago

Can someone share an UMAT example file for a simple linear elastic model written in c++?

Reply
Share: