USER_CALC_INFO
Hello everybody!
Can you tell my, how use USER_CALC_INFO... I have own function for entegrating.... I want get coordinates of element's centre... And I first of all, call USER_CALC_INFO with arguments ACTION='GET' LOCALE='ELEMENTS' ENTITY='CENTRE' And AFTER it doing my computation... But, I get coordinates of verticles... Wehere is my mistake, Thanks!!! ------------------------------------------------------ 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). C CALL SET_A_B( RET, ARGS, NLOC ) ACTION='GET' LOCALE='ELEMENTS' ENTITY='CENTRE' CALL USER_CALC_INFO (WHO,ACTION,CVAR,LOCALE,ENTITY,WHEN, & CALIAS,CERACT,CRESLT2, & CZONE,ILOCS,ILOCF,IENTS,IENTF, & CZ,DZ,IZ,LZ,RZ) CRESLT2='GOOD' DO i=1, NLOC C ZC=ARGS(i,3) C DO k=1, NLOC C IF ARGS(k,3) == ZC THEN C SA(i,)=k C LayerNum=LayerNum+1 C END DO CALL MESAGE( 'WRITE','NLOC='//CFROMI(i)) CALL MESAGE( 'WRITE','X='//CFROMR(ARGS(i,1))) CALL MESAGE( 'WRITE','Y='//CFROMR(ARGS(i,2))) CALL MESAGE( 'WRITE','Z='//CFROMR(ARGS(i,3))) END DO C C Set success flag. CRESLT = 'GOOD' ----------------------------------------------- |
Re: USER_CALC_INFO
Dear Bloshchitsyn Vladimir,
It seems you have been struggling for a while with the use of USER_CALC_INFO (among other User Fortran tools). I rather you contact ANSYS CFX support directly for help on these issues. However, here is some initial help: 1 - USER_CALC_INFO only gather information on why the user routine is being called. The documentation states that users should only call with ACTION='GET'. Therefore, every argument is returned by the solver except ACTION, any previous values for the other arguments are ignored. CALL USER_CALC_INFO (WHO,ACTION,CVAR,LOCALE,ENTITY,WHEN, & CALIAS,CERACT,CRESLT2, & CZONE,ILOCS,ILOCF,IENTS,IENTF, & CZ,DZ,IZ,LZ,RZ) The information gathered should help you decide what action to take. For example, based on the LOCALE/ENTITY pair your calculation may be different. 2 - If you want access to the coordinates for the current locale, you should call USER_GET_MESHDATA. For example, for coordinates of LOCALE=IELG[number], where do you want the coordinates? Integration points within the element, nodes on the element or the element centre? For integration points, CALL USER_GET_MESHDATA('Coordinates', & 'Integration Points', & 'RETURN', 'STOP', CRESLT, & NCRDVX, pCRDVX, & CZ, DZ, IZ, LZ, RZ) Hopefully, the above helps, Opaque. |
All times are GMT -4. The time now is 04:35. |