Beispiel #1
0
    def map_field_to_K(self, D_Est):
        # print('map_field_to_K:')
        #==========================================================================
        B_Eso, det_J_E = self.B_Eso
        k2_ij = self.integ_factor * np.einsum('Eso,Est,Etp,E->Eop', B_Eso,
                                              D_Est, B_Eso, det_J_E / 2)
        K_Eiejf = k2_ij.reshape(-1, 3, 2, 3, 2)
        K_Eicjd = self.xk2K(K_Eiejf)

        _, n_i, n_c, n_j, n_d = K_Eicjd.shape
        K_Eij = K_Eicjd.reshape(-1, n_i * n_c, n_j * n_d)
        o_Ei = self.o_Eia.reshape(-1, n_i * n_c)
        # print('K_Eij:', K_Eij)
        print('o_Ei:', o_Ei)
        return SysMtxArray(mtx_arr=K_Eij, dof_map_arr=o_Ei)
    def map_field_to_K(self, D_Est):
        # print('map_field_to_K')
        w_m = self.fets.w_m  # Gauss points weights
        _, det_J_Fm = self.B_Emiabo

        B_Empf = self.B_Empf
        k2_Emop = self.integ_factor * np.einsum(
            'm, Empf, Ept, Emtq, Em -> Emfq', w_m, B_Empf, D_Est, B_Empf,
            det_J_Fm)
        k2_Eop = np.sum(k2_Emop, axis=1)

        # o_Ei = self.o_Eia.reshape(-1, 3 * 5)
        # print('o_Ei:', o_Ei)
        o_Ei = self.o_Ia[self.F_N].reshape(-1, 3 * self.fets.n_nodal_dofs)

        return SysMtxArray(mtx_arr=k2_Eop, dof_map_arr=o_Ei)
    def map_field_to_K(self, D_Est):
        # print('map_field_to_K')
        w_m = self.fets.w_m  # Gauss points weights
        B_Emiabo, det_J_Fm = self.B_Emiabo

        B_Empf = self._get_B_Empf()
        k2_Emop = self.integ_factor * np.einsum('m, Empf, Ept, Emtq, Em -> Emfq', w_m, B_Empf, D_Est, B_Empf,
                                                   det_J_Fm)
        k2_Eop = np.sum(k2_Emop, axis=1)

        # o_Ei = self.o_Eia.reshape(-1, 3 * 5)
        # print('o_Ei:', o_Ei)
        # # # o_Ei = self.o_Ia[self.mesh.I_Fi].reshape(-1, 3 * self.fets.n_nodal_dofs)
        # # o_Ei = self.o_Ia[self.F_N].reshape(-1, 3 * self.fets.n_nodal_dofs)
        #
        # return SysMtxArray(mtx_arr=k2_Eop, dof_map_arr=o_Ei)


        K_Eiejf = k2_Eop.reshape(-1, 3, 5, 3, 5)
        K_Eicjd = self.xk2K(K_Eiejf)
        _, n_i, n_c, n_j, n_d = K_Eicjd.shape
        K_Eij = K_Eicjd.reshape(-1, n_i * n_c, n_j * n_d)
        o_Ei = self.o_Eia.reshape(-1, n_i * n_c)
        return SysMtxArray(mtx_arr=K_Eij, dof_map_arr=o_Ei)
Beispiel #4
0
 def map_field_to_K(self, tns4):
     K_mij = np.einsum('mnijkl,...ijkl->...mn', GG, tns4)
     dof_Ei = np.arange(6, dtype=np.int_)[np.newaxis, ...]
     return SysMtxArray(mtx_arr=K_mij, dof_map_arr=dof_Ei)