next up previous contents index
Next: Forces Up: Nonlinear Burnett Coefficients Previous: The Integrator

Periodic Boundary Conditions

The subroutine SPM_quotCUBE" performs the periodic boundary conditions. It can be readily modified to perform Lees-Edwards boundary conditions if this was required.  

C Retract positions to within cube                                              
                                                                                
       SUBROUTINE CUBE( GAMMA )                                                 
       INCLUDE  (PARAM)                                                         
       DOUBLE PRECISION GAMMA(DIMPS)                                            
       INTEGER I                                                                
       DO 1 I=1,D*NP                                                            
        GAMMA(I) = GAMMA(I)-CUBSIZ*INT( GAMMA(I)/ CUBSIZ)                       
        IF (GAMMA(I).LT.0) GAMMA(I) = GAMMA(I)+CUBSIZ                           
   1    CONTINUE                                                                
       RETURN                                                                   
       END



Russell Standish
Thu May 18 11:43:52 EST 1995