CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

user_getvar

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   October 25, 2005, 13:57
Default user_getvar
  #1
adma
Guest
 
Posts: n/a
I has some experience of using user fortran in cfx4.4 and just started to use user fortran in cfx5. Really have hard time to switch.

Right now I am trying to extract fluid "Dynamic viscosity" in user fortran and do some modification. I tried with user_getvar, but running cfx5mkext always says "unresolved external symbol _USER_GETVAR@36.....". Do I miss something here, e.g., missing include some .h files? My sample code is below.

Can someone send me a user_getvar example code? Thanks!

My email stonebrook2003@hotmail.com

#include "cfx5ext.h" dllexport(myviscosity)

SUBROUTINE myviscosity (

& NLOC, NRET, NARG, RET, ARGS, CRESLT, CZ,DZ,IZ,LZ,RZ )

#include "MMS.h" #include "stack_point.h"

INTEGER NLOC,NARG,NRET C

CHARACTER CRESLT*(*) C

REAL ARGS(NLOC,NARG), RET(NLOC,NRET) C

INTEGER IZ(*)

CHARACTER CZ(*)*(1)

DOUBLE PRECISION DZ(*)

LOGICAL LZ(*)

REAL RZ(*)

C ------------------------------

__stack_point__ PVISCOSITY

end

C Send any diagnostic messages via master process.

CALL MESAGE( 'WRITE','Hello World!' ) C C Initialise RET(1:NLOC*NRET) to zero.

CALL SET_A_0( RET, NLOC*NRET ) C C Copy first argument ARGS(1:NLOC,1) to RET(1:NLOC,1).

CALL SET_A_B( RET, ARGS, NLOC ) C C Set success flag.

CRESLT = 'GOOD'

CALL USER_GETVAR ('DYNAMIC VISCOSITY',CRESLT,PVISCOSITY,

+ CZ,DZ,IZ,LZ,RZ)

C LATER

END

  Reply With Quote

 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 06:37.