c subroutine actmov c c this routine performs the active motion on c entity n. The data is passed on to afact. c include 'active.inc' include 'domain.inc' c c--local variables for bryosome problem----------------- c integer i,npos,mshift,irad, nct double precision pi,theta0(6),dist,dth double precision cang,sang,rad,theta c c--save some variables for future reference------------ c save irad, mshift, rad, nct, pi, theta0, dth c c--initialize the saved variables--perform once only--- c npos = 120 if (irad.eq.0) then irad = 1 rad = dist(tethx(1),tethy(1),tethx(2),tethy(2)) mshift = npos/2 pi = 4.0d0*datan(1.0d0) theta0(1) = (-pi/4.0d0) theta0(2) = (pi/12.0d0) - (pi/4.0d0) theta0(3) = (-pi/12.0d0) - (pi/4.0d0) theta0(4) = (5.0d0*pi/4.0d0) theta0(5) = (pi/12.0d0) + (5.0d0*pi/4.0d0) theta0(6) = (-pi/12.0d0) + (5.0d0*pi/4.0d0) endif c c--advance the time dependent saved variables only if c this is the first call to actmov for a given time -- c if (nct.ne.nt) then nct = nt mshift = mod(mshift+1,npos) dth = mshift*pi/2.0/dble(npos) endif c c--using the entity label, determine the angle of the c cilia---------------------------------------------- c if (elab.le.3) then theta = theta0(elab) + dth else theta = theta0(elab) - dth endif cang = dcos(theta) sang = dsin(theta) c c--move the tether points by delta theta--------------- c----reset to the start if a sweep has been completed-- c do i=2,nels tethx(i) = (rad*dble(i-1)*cang) + tethx(1) tethy(i) = (rad*dble(i-1)*sang) + tethy(1) enddo c c--move the immersed boundary points to the start------ c----if a sweep has been completed--------------------- c if ( mshift .eq. 0 ) then do i=2,nels ibptx(i) = tethx(i) ibpty(i) = tethy(i) enddo endif c return end c c-------------------------------------------------------------- c subroutine getsrc (ntsrc) c c user routine that specifies the sources c implicit none c include 'domain.inc' include 'sink.inc' c c global variables c integer ntsrc c c insert local variable definitions here. c *** ALL VARIABLES MUST BE DECLARED *** c c specify the location (xsourc,ysourc) and strength c of a source (src) here. c c The user should be sure the number of sources and c sinks does not exceed the number declared in the c .ibis file c ntsrc = 0 c return end