예제 #1
0
    def Stiffness(self):
        ng = 1
        (P, W) = gauss(1)

        K = zeros((6, 6))
        for i in range(ng):
            for j in range(ng):
                for k in range(ng):
                    p = [P[i], P[j], P[k]]
                    w = W[i] * W[j] * W[k]
                    pz = self.zeta(p)
                    J = self.Jacobian(p)
                    #N = self.N()
                    #B = self.B()
                    K += w * J * self.BtEB(pz)
                    #K += w*J*B.T*E*B
        return K
예제 #2
0
파일: solid.py 프로젝트: umvarma/pynastran
    def Stiffness(self):
        ng = 1
        (P, W) = gauss(1)

        K = zeros((6, 6))
        for i in range(ng):
            for j in range(ng):
                for k in range(ng):
                    p = [P[i], P[j], P[k]]
                    w = W[i] * W[j] * W[k]
                    pz = self.zeta(p)
                    J = self.Jacobian(p)
                    #N = self.N()
                    #B = self.B()
                    K += w * J * self.BtEB(pz)
                    #K += w*J*B.T*E*B
        return K
예제 #3
0
 def test_gauss(self):
     """tests ``gauss``"""
     gauss(1)
     gauss(2)
     gauss(3)
     gauss(4)
     gauss(5)
     with self.assertRaises(NotImplementedError):
         gauss(6)