INIT_GEOMETRY_square_duct.F90 3.39 KB
Newer Older
Femi Kadri's avatar
Femi Kadri committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
SUBROUTINE INIT_GEOMETRY_square_duct(&
& global_x_min_real,&
& global_x_max_real,&
& global_x_min_ghost,&
& global_x_max_ghost,&
& global_y_min_real,&
& global_y_max_real,&
& global_y_min_ghost,&
& global_y_max_ghost,&
& global_z_min_real,&
& global_z_max_real,&
& My_MPI_Process_ID,&
& local_x_min_ghost,&
& local_x_max_ghost,&
& local_y_min_ghost,&
& local_y_max_ghost,&
& local_z_min_ghost,&
& local_z_max_ghost,&
& local_walls)
		
		!This subroutine fills the domain with a GEOMETRY_square_duct (walls in Y and Z dimensions)
       
	   
		USE debug_module

	   
	    IMPLICIT NONE
	!-----------INTENT(IN)-----------------------------------------------------------------------------------------------

		INTEGER,INTENT(IN) :: global_x_min_real,global_x_max_real
		INTEGER,INTENT(IN) :: global_x_min_ghost,global_x_max_ghost
		INTEGER,INTENT(IN) :: global_y_min_real,global_y_max_real
		INTEGER,INTENT(IN) :: global_y_min_ghost,global_y_max_ghost
		INTEGER,INTENT(IN) :: global_z_min_real,global_z_max_real
		INTEGER,INTENT(IN) :: My_MPI_Process_ID

		INTEGER,INTENT(IN) :: local_x_min_ghost,local_x_max_ghost
		INTEGER,INTENT(IN) :: local_y_min_ghost,local_y_max_ghost
		INTEGER,INTENT(IN) :: local_z_min_ghost,local_z_max_ghost

	!-----------INTENT(INOUT)-----------------------------------------------------------------------------------------------
		LOGICAL*4,INTENT(INOUT),DIMENSION(local_x_min_ghost:local_x_max_ghost, &
		& local_y_min_ghost:local_y_max_ghost,local_z_min_ghost:local_z_max_ghost) &
		&  :: local_walls

		LOGICAL*4,PARAMETER :: debug = GLOBAL_DEBUG
	!-----------NO INTENT-----------------------------------------------------------------------------------------------
		INTEGER :: I,J,K

		IF(debug) WRITE (0,*) My_MPI_Process_ID,'entered SUBROUTINE INIT_GEOMETRY_square_duct'

		IF(debug) WRITE (0,*) My_MPI_Process_ID,'INIT_GEOMETRY_square_duct: global_y_min_ghost',global_y_min_ghost
		IF(debug) WRITE (0,*) My_MPI_Process_ID,'INIT_GEOMETRY_square_duct: global_y_max_ghost',global_y_max_ghost
		IF(debug) WRITE (0,*) My_MPI_Process_ID,'INIT_GEOMETRY_square_duct: global_x_min_ghost',global_x_min_ghost
		IF(debug) WRITE (0,*) My_MPI_Process_ID,'INIT_GEOMETRY_square_duct: global_x_max_ghost',global_x_max_ghost

		IF(debug) WRITE (0,*) My_MPI_Process_ID,'INIT_GEOMETRY_square_duct: global_z_min_real',global_z_min_real
		IF(debug) WRITE (0,*) My_MPI_Process_ID,'INIT_GEOMETRY_square_duct: global_z_max_real',global_z_max_real
		IF(debug) WRITE (0,*) My_MPI_Process_ID,'INIT_GEOMETRY_square_duct: global_y_min_real',global_y_min_real
		IF(debug) WRITE (0,*) My_MPI_Process_ID,'INIT_GEOMETRY_square_duct: global_y_max_real',global_y_max_real
		IF(debug) WRITE (0,*) My_MPI_Process_ID,'INIT_GEOMETRY_square_duct: global_x_min_real',global_x_min_real
		IF(debug) WRITE (0,*) My_MPI_Process_ID,'INIT_GEOMETRY_square_duct: global_x_max_real',global_x_max_real


		DO K=local_z_min_ghost,local_z_max_ghost
	
			DO J=local_y_min_ghost,local_y_max_ghost
	
				DO I=local_x_min_ghost,local_x_max_ghost
	
					IF(J.EQ.global_y_min_real.OR.J.EQ.global_y_max_real.OR.&
					& K.EQ.global_z_min_real.OR.K.EQ.global_z_max_real) THEN
						
						local_walls(I,J,K) = .TRUE.

					ENDIF !!J.EQ.global_y_min_real.OR.J.EQ.global_y_max_real
	
				END DO !k = 1, nz
	
			END DO !j = 1, ny
		
		END DO !i = 1, nx
	

		IF(debug) WRITE (0,*) My_MPI_Process_ID,'about to RETURN from SUBROUTINE INIT_GEOMETRY_square_duct'

RETURN
END SUBROUTINE INIT_GEOMETRY_square_duct