Logo Search packages:      
Sourcecode: python-gtkglext1 version File versions  Download package

def coolwave::CoolWave::__getforce (   self,
  gridSize 
) [private]

The force derivative of the transcendental
waveform is changed in order to cause a spatial
propagation of the 3D waveform.

Definition at line 79 of file coolwave.py.

00079                                    :
        ''' The force derivative of the transcendental
        waveform is changed in order to cause a spatial
        propagation of the 3D waveform.
        '''
        for i in xrange(0, gridSize):
            for j in xrange(0, gridSize):
                self.__force[i][j] = 0.0

        for i in xrange(2, gridSize-2):
            for j in xrange(2, gridSize-2):
                d = self.__posit[i][j] - self.__posit[i][j-1]
                self.__force[i][j] -= d
                self.__force[i][j-1] += d

                d = self.__posit[i][j] - self.__posit[i-1][j]
                self.__force[i][j] -= d
                self.__force[i-1][j] += d

                d = self.__posit[i][j] - self.__posit[i][j+1]
                self.__force[i][j] -= d
                self.__force[i][j+1] += d

                d = self.__posit[i][j] - self.__posit[i+1][j]
                self.__force[i][j] -= d
                self.__force[i+1][j] += d

                d = (self.__posit[i][j] - self.__posit[i+1][j+1]) * SQRTOFTWOINV
                self.__force[i][j] -= d
                self.__force[i+1][j+1] += d

                d = (self.__posit[i][j] - self.__posit[i-1][j-1]) * SQRTOFTWOINV
                self.__force[i][j] -= d
                self.__force[i-1][j-1] += d

                d = (self.__posit[i][j] - self.__posit[i+1][j-1]) * SQRTOFTWOINV
                self.__force[i][j] -= d
                self.__force[i+1][j-1] += d

                d = (self.__posit[i][j] - self.__posit[i-1][j+1]) * SQRTOFTWOINV
                self.__force[i][j] -= d
                self.__force[i-1][j+1] += d

    def __getveloc (self, gridSize, dt):


Generated by  Doxygen 1.6.0   Back to index