#NEWLINE# def c_vec_init( self , is_top , is_facet = False ) : #NEWLINE# #INDENT# is_top_init = is_top #NEWLINE# val = [ ] #NEWLINE# vec_idx = 0 #NEWLINE# for ( i , ( m , d ) ) in enumerate ( zip ( self . map , self . data ) ) : #NEWLINE# #INDENT# is_top = ( is_top_init and m . iterset . _extruded ) #NEWLINE# if self . _flatten : #NEWLINE# #INDENT# for k in range ( d . cdim ) : #NEWLINE# #INDENT# for idx in range ( m . arity ) : #NEWLINE# #INDENT# val . append ( ( '%(vec_name)s[%(idx)s] = %(data)s' % { #NEWLINE# #INDENT# 'vec_name' : self . c_vec_name ( ) , #NEWLINE# 'idx' : vec_idx , #NEWLINE# 'data' : self . c_ind_data ( idx , i , k , is_top = is_top , offset = ( m . offset [ idx ] if is_top else None ) ) , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# vec_idx += 1 #NEWLINE# #UNINDENT# if is_facet : #NEWLINE# #INDENT# for idx in range ( m . arity ) : #NEWLINE# #INDENT# val . append ( ( '%(vec_name)s[%(idx)s] = %(data)s' % { #NEWLINE# #INDENT# 'vec_name' : self . c_vec_name ( ) , #NEWLINE# 'idx' : vec_idx , #NEWLINE# 'data' : self . c_ind_data ( idx , i , k , is_top = is_top , offset = m . offset [ idx ] ) , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# vec_idx += 1 #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# for idx in range ( m . arity ) : #NEWLINE# #INDENT# val . append ( ( '%(vec_name)s[%(idx)s] = %(data)s' % { #NEWLINE# #INDENT# 'vec_name' : self . c_vec_name ( ) , #NEWLINE# 'idx' : vec_idx , #NEWLINE# 'data' : self . c_ind_data ( idx , i , is_top = is_top , offset = ( m . offset [ idx ] if is_top else None ) ) , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# vec_idx += 1 #NEWLINE# #UNINDENT# if is_facet : #NEWLINE# #INDENT# for idx in range ( m . arity ) : #NEWLINE# #INDENT# val . append ( ( '%(vec_name)s[%(idx)s] = %(data)s' % { #NEWLINE# #INDENT# 'vec_name' : self . c_vec_name ( ) , #NEWLINE# 'idx' : vec_idx , #NEWLINE# 'data' : self . c_ind_data ( idx , i , is_top = is_top , offset = m . offset [ idx ] ) , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# vec_idx += 1 #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return ';\n' . join ( val )