84 SUBROUTINE removebcs_meff(ndim,nrows,nnz,nstart,rp1,cval,aval,newnrows,newnstart,newndim,global)
98 INTEGER ::
i,
j,
m, counter1, counter2, counter3, counter4, counter5
100 INTEGER :: ndim, nnz, nstart, nrows
101 REAL(kind=wp),
DIMENSION(nnz) :: aval
102 INTEGER,
DIMENSION(nnz) :: cval
103 INTEGER,
DIMENSION(nrows+1) :: rp1
106 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: dispbc
107 INTEGER,
ALLOCATABLE,
DIMENSION(:) :: tempintv
115 DO i = 1, global%NumNp
116 IF (nodeproc(
i) == myid)
THEN
118 IF(node_flag(
i,
j) == 8)
THEN
119 numdisp = numdisp + 1
127 CALL mpi_barrier(rocstar_communicator,ierr)
128 CALL mpi_reduce(numdisp, gnumdisp, 1, mpi_integer, mpi_sum, 0 , rocstar_communicator, ierr)
129 CALL mpi_bcast(gnumdisp, 1, mpi_integer, 0, rocstar_communicator, ierr)
130 newndim = 3*gnumnp - gnumdisp
135 ALLOCATE(dispbc(1:numdisp))
139 DO i = 1, global%NumNp
140 IF (local2global(
i) ==
m)
THEN
141 IF (nodeproc(
i) == myid)
THEN
143 IF(node_flag(
i,
j) == 8)
THEN
144 counter2 = counter2 + 1
145 dispbc(counter2) = 3*
m - 3 +
j
156 ALLOCATE(numdispproc(1:nprocs))
158 numdispproc(myid+1) = numdisp
160 CALL mpi_bcast(numdispproc(
i), 1, mpi_integer,
i-1, rocstar_communicator, ierr)
164 newnstart = newnstart - numdispproc(
i)
169 ALLOCATE(gdispbc(1:gnumdisp))
173 IF (numdispproc(
i) > 0)
THEN
174 ALLOCATE(tempintv(1:numdispproc(
i)))
176 if (
i-1 == myid) tempintv(:) = dispbc(:)
177 CALL mpi_bcast(tempintv(1), numdispproc(
i), mpi_integer,
i-1, rocstar_communicator, ierr)
178 DO j = 1, numdispproc(
i)
179 counter1 = counter1 + 1
180 gdispbc(counter1) = tempintv(
j)
193 DO j = rp1(
i)+1, rp1(
i+1)
194 counter2 = counter2 + 1
197 IF((gdispbc(
m) ==
i + nstart - 1).OR.(gdispbc(
m) == cval(counter2)+1))
THEN
202 IF(counter1 == 0) nnz_temp = nnz_temp + 1
212 IF(gdispbc(
m) ==
i + nstart - 1)
THEN
217 IF(counter1 == 0) newnrows = newnrows + 1
221 ALLOCATE(rp_temp(1:newnrows+1))
222 ALLOCATE(cval_temp(1:nnz_temp))
223 ALLOCATE(aval_temp(1:nnz_temp))
231 DO j = rp1(
i)+1, rp1(
i+1)
232 counter2 = counter2 + 1
236 IF(gdispbc(
m) < cval(counter2)+1)
THEN
237 counter5 = counter5 + 1
239 IF((gdispbc(
m) ==
i + nstart - 1).OR.(gdispbc(
m) == cval(counter2)+1))
THEN
243 IF(counter1 == 0)
THEN
244 counter3 = counter3 + 1
245 aval_temp(counter3) = aval(counter2)
246 cval_temp(counter3) = cval(counter2) - counter5
251 IF(gdispbc(
m) ==
i + nstart - 1)
THEN
255 IF(counter1 == 0)
THEN
256 counter4 = counter4 + 1
257 rp_temp(counter4+1) = counter3
315 INTEGER ::
i,
m, counter1, counter2
317 INTEGER :: ndim, newndim, nstart
318 REAL(kind=wp),
DIMENSION(ndim) :: pbar
319 REAL(kind=wp),
DIMENSION(newndim) :: newpbar
327 IF(gdispbc(
m) ==
i + nstart - 1)
THEN
331 IF(counter1 == 0)
THEN
332 counter2 = counter2 + 1
333 newpbar(counter2) = pbar(
i)
384 INTEGER ::
i,
m, counter1, counter2, counter3
386 INTEGER :: ndim, newndim, nstart
387 REAL(kind=wp),
DIMENSION(ndim) ::
a
388 REAL(kind=wp),
DIMENSION(newndim) :: newa
396 IF((gdispbc(
m) <=
i + counter3 + nstart - 1).AND.(gdispbc(
m) >= nstart))
THEN
397 counter3 = counter3 + 1
400 a(
i+counter3) = newa(
i)
subroutine removebcs_newa(nstart, ndim, a, newndim, newa)
subroutine removebcs_meff(ndim, nrows, nnz, nstart, rp1, cval, aval, newnrows, newnstart, newndim, global)
subroutine removebcs_pbar(nstart, ndim, pbar, newndim, newpbar)