Announcement

Collapse
No announcement yet.

problem with umat writen in c++

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • problem with umat writen in c++

    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

  • #2
    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
    Jorgen Bergstrom, Ph.D. PolymerFEM Administrator

    Comment


    • #3
      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

      Comment


      • #4
        Here's an exemplar interface function for a single-precision VUMAT written in c++:
        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
        }
        Jorgen Bergstrom, Ph.D. PolymerFEM Administrator

        Comment


        • #5
          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

          Comment


          • #6
            Originally posted by Jorgen View Post
            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
            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:
            lei.cai@ensam.eu

            Comment

            Working...
            X