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 DOUBLE PRECISION, PARAMETER :: eps = 1.0D-9 47 INTEGER :: Q 48 LOGICAL :: CLIP_FLAG 49 ! 50 ! 51 ! Include files defining statement functions here 52 ! 53 IF(N_USR_DEF < 1) RETURN 54 ! 55 ! Insert user-defined code here 56 ! The code must define a value for f_usr and Q 57 ! 58 59 CLIP_FLAG = .TRUE. 60 RETURN 61 62 63 END SUBROUTINE EVAL_USR_FCT 64 65