geometric/internal.py
def wilsonB(self, xyz):
        """
        Given Cartesian coordinates xyz, return the Wilson B-matrix
        given by dq_i/dx_j where x is flattened (i.e. x1, y1, z1, x2, y2, z2)
        """
        global CacheWarning
        t0 = time.time()
        xhash = hash(xyz.tostring())
        ht = time.time() - t0
        if xhash in self.stored_wilsonB:
            ans = self.stored_wilsonB[xhash]
            return ans
        WilsonB = []
        Der = self.derivatives(xyz)
        for i in range(Der.shape[0]):
            WilsonB.append(Der[i].flatten())
        self.stored_wilsonB[xhash] = np.array(WilsonB)
        if len(self.stored_wilsonB) > 1000 and not CacheWarning:
            logger.warning("\x1b[91mWarning: more than 1000 B-matrices stored, memory leaks likely\x1b[0m\n")
            CacheWarning = True
        ans = np.array(WilsonB)
        return ans

        Given Cartesian coordinates xyz, return the Wilson B-matrix
        given by dq_i/dx_j where x is flattened (i.e. x1, y1, z1, x2, y2, z2)
        
Given Cartesian coordinates xyz, return the Wilson B-matrix
given by dq_i/dx_j where x is flattened
Given Cartesian coordinates xyz return the Wilson B - matrix given by dq_i / dx_j where x is flattened
def wilsonB(self, xyz):
        global CacheWarning
        t0 = time.time()
        xhash = hash(xyz.tostring())
        ht = time.time() - t0
        if xhash in self.stored_wilsonB:
            ans = self.stored_wilsonB[xhash]
            return ans
        WilsonB = []
        Der = self.derivatives(xyz)
        for i in range(Der.shape[0]):
            WilsonB.append(Der[i].flatten())
        self.stored_wilsonB[xhash] = np.array(WilsonB)
        if len(self.stored_wilsonB) > 1000 and not CacheWarning:
            logger.warning("\x1b[91mWarning: more than 1000 B-matrices stored, memory leaks likely\x1b[0m\n")
            CacheWarning = True
        ans = np.array(WilsonB)
        return ans
def wilsonB ( self , xyz ) : global CacheWarning t0 = time . time ( ) xhash = hash ( xyz . tostring ( ) ) ht = time . time ( ) - t0 if xhash in self . stored_wilsonB : ans = self . stored_wilsonB [ xhash ] return ans WilsonB = [ ] Der = self . derivatives ( xyz ) for i in range ( Der . shape [ 0 ] ) : WilsonB . append ( Der [ i ] . flatten ( ) ) self . stored_wilsonB [ xhash ] = np . array ( WilsonB ) if len ( self . stored_wilsonB ) > 1000 and not CacheWarning : logger . warning ( "\x1b[91mWarning: more than 1000 B-matrices stored, memory leaks likely\x1b[0m\n" ) CacheWarning = True ans = np . array ( WilsonB ) return ans
Given Cartesian coordinates xyz, return the Wilson B-matrix
given by dq_i/dx_j where x is flattened (i.e.
Given Cartesian coordinates xyz return the Wilson B - matrix given by dq_i / dx_j where x is flattened ( i . e .
"""
        Given Cartesian coordinates xyz, return the Wilson B-matrix
        given by dq_i/dx_j where x is flattened (i.e. x1, y1, z1, x2, y2, z2)
        """
self
xyz