1 !vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvC 2 ! C 3 ! Module name: EVAL_USR_FCT C 4 ! Purpose: Evaluates a user-defined function f_usr(x1,x2,x3) C 5 ! where (x1,x2,x3) are the Cartesian coordinates of any C 6 ! point in the computational domain C 7 ! Regions where f_usr < 0 are part of the computational domain. C 8 ! Regions where f_usr > 0 are excluded from the computational domain. C 9 ! The integer Q is used to assign a boundary condition to the cut cell C 10 ! C 11 ! Author: Jeff Dietiker Date: 21-Feb-08 C 12 ! Reviewer: Date: C 13 ! C 14 ! Revision Number # Date: ##-###-## C 15 ! Author: # C 16 ! Purpose: # C 17 ! C 18 !^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^C 19 SUBROUTINE EVAL_USR_FCT(x1,x2,x3,Q,f_usr,CLIP_FLAG) 20 21 USE param 22 USE param1 23 USE parallel 24 USE constant 25 USE run 26 USE toleranc 27 USE geometry 28 USE indices 29 USE compar 30 USE sendrecv 31 USE fldvar 32 USE quadric 33 USE cutcell 34 35 IMPLICIT NONE 36 37 38 !----------------------------------------------- 39 ! 40 ! Include files defining common blocks here 41 ! 42 ! 43 ! Define local variables here 44 DOUBLE PRECISION :: x1,x2,x3 45 DOUBLE PRECISION :: f_usr 46 INTEGER :: Q 47 LOGICAL :: CLIP_FLAG 48 ! 49 ! 50 ! Include files defining statement functions here 51 ! 52 IF(N_USR_DEF < 1) RETURN 53 ! 54 ! Insert user-defined code here 55 ! The code must define a value for f_usr and Q 56 ! 57 58 CLIP_FLAG = .TRUE. 59 RETURN 60 61 62 END SUBROUTINE EVAL_USR_FCT 63 64