|
[Sponsors] |
October 25, 2005, 13:57 |
user_getvar
|
#1 |
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 |
|
|
|