Selecting internal cells
Posted: Mon Sep 13, 2010 12:44 pm
Hi I am selecting an internal "circle" of cells for - the following seems to work how I'd like it to by looping on all cells in a yz-plane and then testing if the cells are in the circle's radius:
call getcel('x > -0.7 and x < 0.7',nlelt,lstelt)
! ======
do iel = 1, nlelt
if ( xyzcen(2,ii)**2 + xyzcen(3,ii)**2 .lt. 1.d2 ) then
...commands...
endif
enddo
But I am wondering on the looping of all cells in this plane when my mesh size increases. I have two questions: Will it be computationally expensive? Is there a better method for selecting the cells how I would like to?
Thanks,
James
call getcel('x > -0.7 and x < 0.7',nlelt,lstelt)
! ======
do iel = 1, nlelt
if ( xyzcen(2,ii)**2 + xyzcen(3,ii)**2 .lt. 1.d2 ) then
...commands...
endif
enddo
But I am wondering on the looping of all cells in this plane when my mesh size increases. I have two questions: Will it be computationally expensive? Is there a better method for selecting the cells how I would like to?
Thanks,
James