@@ -76,10 +76,6 @@ contains
7676 call MPI_BCAST(patch_bc(i)%${VAR}$, 1 , MPI_INTEGER, 0 , MPI_COMM_WORLD, ierr)
7777 #:endfor
7878
79- #:for VAR in [' vel' , ' angular_vel' , ' angles' ]
80- call MPI_BCAST(patch_ib(i)%${VAR}$, 3 , mpi_p, 0 , MPI_COMM_WORLD, ierr)
81- #:endfor
82-
8379 call MPI_BCAST(patch_bc(i)%radius, 1 , mpi_p, 0 , MPI_COMM_WORLD, ierr)
8480
8581 #:for VAR in [' centroid' , ' length' ]
@@ -120,7 +116,11 @@ contains
120116 if (chemistry) then
121117 call MPI_BCAST(patch_icpp(i)%Y, size (patch_icpp(i)%Y), mpi_p, 0 , MPI_COMM_WORLD, ierr)
122118 end if
123- ! Broadcast IB variables
119+ ! Broadcast IB variables: patch_ib is indexed 1 :num_patches_max,
120+ ! not 1 :num_bc_patches_max, so these must live in the num_patches_max loop.
121+ #:for VAR in [' vel' , ' angular_vel' , ' angles' ]
122+ call MPI_BCAST(patch_ib(i)%${VAR}$, size (patch_ib(i)%${VAR}$), mpi_p, 0 , MPI_COMM_WORLD, ierr)
123+ #:endfor
124124 call MPI_BCAST(patch_ib(i)%geometry, 1 , MPI_INTEGER, 0 , MPI_COMM_WORLD, ierr)
125125 call MPI_BCAST(patch_ib(i)%model_filepath, len (patch_ib(i)%model_filepath), MPI_CHARACTER, 0 , MPI_COMM_WORLD, ierr)
126126 call MPI_BCAST(patch_ib(i)%model_threshold, 1 , mpi_p, 0 , MPI_COMM_WORLD, ierr)
0 commit comments