Hi Michael,
> mg_nx: 1 3 7
> Error in generalev, info= 7 6 -1
The logfile suggests this happens inside the multigrid setup for pressure solve.
At mid level, mg_nx = 3, there are 4 points + 2 extended points = 6 points each direction.
generalev info and the "-1" indicates the first diagonal entry breaks the positive definite.
This typically happens when there is a missing BC, so the overlapping Schwarz can't find the values outside the domain.
> 2.2204E-16 2.2204E-16 2.2204E-16 2.2204E-16 2.2204E-16 0.0000E+00 xyz repair 1
> 2.2204E-16 2.2204E-16 2.2204E-16 3.8987E-16 3.9562E-16 2.8917E-16 xyz repair 2
> 2.2204E-16 1.1102E-16 1.1102E-16 2.6507E-16 2.4384E-16 2.0780E-16 xyz repair 3
> 1.1102E-16 1.1102E-16 1.1102E-16 1.1102E-16 1.1102E-16 1.1102E-16 xyz repair 4
fix_geom says there are no gaps for the coordinates, so it's less likely to be a connectivity issue.
Since you said the number of tagged BC is right, I suspect the BC are assigned at the wrong location.
I'd suggest visualize the location of the BC to make sure it's not accidentally assigned to the interior.
subroutine usrdat2
include 'SIZE'
include 'TOTAL'
! after setting up CBC
call rzero(vx,lx1*ly1*lz1*nelv)
do iel = 1,nelv
do ifc = 1,2*ldim
if (cbc(ifc,iel,1).eq.'W ') call facev(vx,iel,ifc,1.0,lx1,ly1,lz1)
enddo
enddo
call outpost(vx,vy,vz,pr,t,'aaa')
return
end
Then, you can open it with paraview and check whether the values > 0.5 are indeed your desired BC location
Another check is to use multiplicity to check whether the CBC is set at the right location.
call rone(vy,lx1*ly1*lz1*nelv)
ifield = 1
call dssum(vy,lx1,ly1,lz1)
! for a internal face point (not on edges nor corners)
! vy = 1 on bdry face, 2 on internal face
ierr1 = 0
ierr2 = 0
do iel = 1,nelv
do ifc = 1,2*ldim
call facind(kx1,kx2,ky1,ky2,kz1,kz2,lx1,ly1,lz1,ifc)
mx = (1 + kx1) / 2 ! index of the face center, only works when lx1 > 2
my = (1 + ky1) / 2
mz = (1 + kz1) / 2 ! also works in 2D
val_fc = vy(mx,my,mz,iel) ! vy at face center
! err1: you assign 'W ' to an internal face
if (cbc(ifc,iel,1).eq.'W '.AND.val_fc.gt.1.5) ierr1 = ierr1 + 1
! err2: you didn't assign 'W ' to a boundary face
if (cbc(ifc,iel,1).ne.'W '.AND.val_fc.lt.1.5) ierr2 = ierr2 + 1
enddo
enddo
ierr1 = iglsum(ierr1,1) ! all reduce
ierr2 = iglsum(ierr2,1)
if (nid.eq.0) write(*,*)'err',ierr1,ierr2
Hope this helps,
Yu-Hsiang
--