CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CFX (http://www.cfd-online.com/Forums/cfx/)
-   -   UserFortran source problem (http://www.cfd-online.com/Forums/cfx/21354-userfortran-source-problem.html)

Karlis June 19, 2005 12:03

UserFortran source problem
 
Hi, take a look at this source! -actual density is not constant, but here GRV(j) is constant for every j..! Why?! How to get correct density values??

#include "cfx5ext.h"

dllexport(f_exp)

SUBROUTINE F_EXP( NLOC,NRET,NARG,RET,ARGS,CRESLT,CZ,DZ,IZ,LZ,RZ ) #include "MMS.h" #include "cfd_constants.h" #include "stack_point.h" C ------------------------------

INTEGER NLOC, NRET, NARG

CHARACTER CRESLT*(*)

REAL RET( 1:NLOC,1:NRET ), ARGS( 1:NLOC,1:NARG )

INTEGER IZ(*)

CHARACTER CZ(*)*(1)

DOUBLE PRECISION DZ(*)

LOGICAL LZ(*)

REAL RZ(*) C

CHARACTER*15 CFROMR

EXTERNAL CFROMR

CHARACTER*15 CFROMI

EXTERNAL CFROMI C

INTEGER II

CHARACTER*120 o

REAL valll, V1

__stack_point__ pGRAD_VAL

REAL GRV(NLOC)

o = 'XStikls.Density'

DO II=1,NLOC

CALL USER_GETVAR (o,CRESLT,pGRAD_VAL,CZ,DZ,IZ,LZ,RZ)

IF (CRESLT .NE. 'GOOD') THEN

CALL MESAGE( 'WRITE','ERROR' )

END IF

GRV = RZ(pGRAD_VAL)

RET(II,1:1) = GRV(II)

END DO

CALL MESAGE( 'WRITE','VAL='//CFROMR(GRV(1))//' '//CFROMR(GRV(NLOC/2)))

CRESLT = 'GOOD'

END


All times are GMT -4. The time now is 17:05.