Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
    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 )
Ejemplo n.º 3
0
    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 )
Ejemplo n.º 4
0
    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 )