コード例 #1
0
 def cbs_refresh( self ):
     isf = CBShortFiber()
     phi_array, le_array = self.distr_ppfs
     w = self.w.reshape( 1, 100 )
     all_resp = isf( w, self.tau, self.fiber_length, 2 * self.r, self.E_f, le_array, phi_array, self.f, 0, 0, 1e15 )
     resp = sumi( all_resp, axis = 0 )
     resp = resp[0:argmax( resp ) + 2]
     if resp.max() <= self.weakest_cb:
         self.weakest_cb = resp.max()
     self.cbs_pulloutlist.append( resp )
     function = interp1d( resp, self.w[0:argmax( resp ) + 2] )
     self.invers_list.append( function )
     self.all_resp_list.append( all_resp )
コード例 #2
0
 def active_fibers ( self, crack_x, le_array ):
     crack_x = crack_x.reshape( len( crack_x ), 1 )
     matrix = abs( crack_x ) >= le_array
     y = sumi ( matrix, axis = 1 )
     return y