def init_data(self, key, ckey, term, **kwargs): state, aux = self.get_args( **kwargs ) n_el, n_qp = state.get_data_shapes(term.integral, ckey[-1])[:2] shape = (n_el, n_qp, state.n_components, 1) # print self.name, key, ckey, shape DataCache.init_data( self, key, ckey, shape )
def init_data(self, key, ckey, term, **kwargs): state, = self.get_args( **kwargs ) n_el, n_qp, dim = state.get_data_shapes(term.integral, ckey[-1])[:3] shape = (n_el, n_qp, dim, dim) # print self.name, key, ckey, shape DataCache.init_data( self, key, ckey, shape )
def init_data(self, key, ckey, term, **kwargs): state, = self.get_args( **kwargs ) region_name, ig = term.get_current_group()[1:] n_fa, n_qp = state.get_data_shapes(term.integral, ig, region_name)[:2] shape = (n_fa, n_qp, state.n_components, 1) DataCache.init_data( self, key, ckey, shape )
def init_data( self, key, ckey, **kwargs ): state, = self.get_args( **kwargs ) n_el, n_qp = state.get_data_shapes( ckey )[:2] shape = (n_el, n_qp, 1, 1) # print self.name, key, ig, shape DataCache.init_data( self, key, ckey, shape )
def init_data(self, key, ckey, term, **kwargs): decay, values = self.get_args(**kwargs) shape = values.shape self.shapes = { 'history' : shape, 'increment' : shape, 'decay' : decay.shape, } DataCache.init_datas(self, ckey, self.shapes, zero=True)
def init_data( self, key, ckey, **kwargs ): state, aux = self.get_args( **kwargs ) n_el, n_qp, dim = state.get_data_shapes( ckey )[:3] sym = dim * (dim + 1) / 2 shape = (n_el, n_qp, sym, 1) # print self.name, key, ckey, shape DataCache.init_data( self, key, ckey, shape )
def init_data(self, key, ckey, term, **kwargs): state, data_shape = self.get_args( **kwargs ) n_fa, n_qp, dim, n_ep = data_shape self.shapes = { 'F' : (n_fa, n_qp, dim, dim), 'invF' : (n_fa, n_qp, dim, dim), 'detF' : (n_fa, n_qp, 1, 1), } DataCache.init_datas( self, ckey, self.shapes )
def init_data(self, key, ckey, term, **kwargs): state, = self.get_args( **kwargs ) n_el, n_qp, dim = state.get_data_shapes(term.integral, ckey[-1])[:3] sym = dim * (dim + 1) / 2 self.shapes = { 'F' : (n_el, n_qp, dim, dim), 'detF' : (n_el, n_qp, 1, 1), 'B' : (n_el, n_qp, sym, 1), 'trB' : (n_el, n_qp, 1, 1), 'in2B' : (n_el, n_qp, 1, 1), 'E' : (n_el, n_qp, sym, 1), } DataCache.init_datas( self, ckey, self.shapes )
def init_data( self, key, ckey, **kwargs ): state, = self.get_args( **kwargs ) n_el, n_qp, dim = state.get_data_shapes( ckey )[:3] sym = dim * (dim + 1) / 2 self.shapes = { 'F' : (n_el, n_qp, dim, dim), 'detF' : (n_el, n_qp, 1, 1), 'C' : (n_el, n_qp, sym, 1), 'trC' : (n_el, n_qp, 1, 1), 'in2C' : (n_el, n_qp, 1, 1), 'invC' : (n_el, n_qp, sym, 1), 'E' : (n_el, n_qp, sym, 1), } DataCache.init_datas( self, ckey, self.shapes )
def __init__( self, name, arg_names, history_sizes = None ): keys = ['F', 'detF', 'C', 'trC', 'in2C', 'invC', 'E'] DataCache.__init__( self, name, arg_names, keys, history_sizes, terms.dq_finite_strain_tl )
def __init__(self, name, arg_names, history_sizes=None): DataCache.__init__(self, name, arg_names, ['history', 'increment', 'decay'], history_sizes)
def __init__( self, name, arg_names, history_sizes = None ): DataCache.__init__( self, name, arg_names, ['state'], history_sizes, terms.dq_state_in_qp )
def init_data( self, key, ckey, **kwargs ): state, = self.get_args( **kwargs ) n_fa, n_qp = state.get_data_shapes( ckey, kind = 'Surface' )[:2] shape = (n_fa, n_qp, state.dpn, 1) DataCache.init_data( self, key, ckey, shape )
def __init__( self, name, arg_names, history_sizes = None ): DataCache.__init__( self, name, arg_names, ['strain'], history_sizes, terms.dq_cauchy_strain )
def __init__( self, name, arg_names, history_sizes = None ): DataCache.__init__( self, name, arg_names, ['matqp'], history_sizes, terms.dq_state_in_qp ) self.shape = {} self.mode_in = {} self.mode_out = {}
def init_data( self, key, ckey, **kwargs ): mat, ap, assumed_shapes, mode_in = self.get_args( **kwargs ) if mode_in is None: if mat.ndim == 3: ig = ckey[1] rshape = ap.region.shape[ig] if rshape.n_vertex == rshape.n_cell: msg = ('cannot determine mode_in! (%d nodes, %d cells ' + 'material data shape: %s)') \ % (rshape.n_vertex, rshape.n_cell, mat.shape) raise ValueError( msg ) if mat.shape[0] == rshape.n_vertex: mode_in = 'vertex' elif mat.shape[0] == rshape.n_cell: mode_in = 'element_avg' else: msg = ('cannot determine mode_in! (%d nodes, %d cells ' + 'material data shape: %s)') \ % (rshape.n_vertex, rshape.n_cell, mat.shape) raise ValueError( msg ) elif mat.ndim == 2: ashape = assumed_shapes[0] if ashape[2:] != mat.shape: mode_in = 'vertex' else: mode_in = 'const' else: raise ValueError shape = None for ashape in assumed_shapes: if ashape[0] == 1: if ashape[1] == 1: mode_out = 'const' else: mode_out = 'const_in_qp' else: if ashape[1] == 1: mode_out = 'variable' else: mode_out = 'variable_in_qp' if mode_in == 'const': shape = ashape break elif mode_in == 'element_avg': if mode_out in ['variable_in_qp', 'variable']: shape = ashape break elif mode_in == 'vertex': if mode_out in ['variable_in_qp']: shape = ashape break if shape is None: raise ValueError self.mode_in[ckey] = mode_in self.mode_out[ckey] = mode_out self.shape[ckey] = shape DataCache.init_data( self, key, ckey, shape )
def init_data( self, key, ckey, **kwargs ): shape = (1, 1, 1, 1) DataCache.init_data( self, key, ckey, shape )
def __init__( self, name, arg_names, history_sizes = None ): DataCache.__init__( self, name, arg_names, ['volume'], history_sizes )
def __init__( self, name, arg_names, history_sizes = None ): keys = ['F', 'detF', 'invF'] DataCache.__init__( self, name, arg_names, keys, history_sizes, terms.dq_tl_finite_strain_surface )
def __init__( self, name, arg_names, history_sizes = None ): DataCache.__init__( self, name, arg_names, ['div'], history_sizes, terms.dq_div_vector )
def __init__( self, name, arg_names, history_sizes = None ): DataCache.__init__( self, name, arg_names, ['grad'], history_sizes, terms.dq_grad )