# print 'elem.nodes_geo', elem.nodes_geo # print 'elem.get_X_mtx()', elem.get_X_mtx() # Put the tseval (time-stepper) into the spatial context of the # discretization and specify the response tracers to evaluate there. # right_dof = 2 ts = TS( tse = tseval, sdomain = domain, # conversion to list (square brackets) is only necessary for slicing of # single dofs, e.g "get_left_dofs()[0,1]" which elsewise retuns an integer only bcond_list = [ # constraint for all left dofs in x-direction: BCDof(var='u', dof = i, value = 0.)\ for i in domain.get_left_dofs()[:,0] ] + # constraint for all left dofs in y-direction: [ BCDof(var='u', dof = i, value = 0.)\ for i in domain.get_left_dofs()[:,1] ] + # imposed displacement for all right dofs in x-direction: [ BCDof(var='u', dof = i, value = 2.*e-5 )\ for i in domain.get_right_dofs()[:,0]] , rtrace_list = [ # RTraceGraph(name = 'Fi,right over u_right (iteration)' , # var_y = 'F_int', idx_y = right_dof, # var_x = 'U_k', idx_x = right_dof, # record_on = 'update'), # RTraceDomainField(name = 'Deformation' , # var = 'eps', idx = 0, # record_on = 'update'),
# for i, elem in enumerate( domain.elements ): # print 'elem.id_number', elem.id_number # print 'elem.nodes_geo', elem.nodes_geo # print 'elem.get_X_mtx()', elem.get_X_mtx() # Put the tseval (time-stepper) into the spatial context of the # discretization and specify the response tracers to evaluate there. # right_dof = 2 ts = TS( tse = tseval, sdomain = domain, # conversion to list (square brackets) is only necessary for slicing of # single dofs, e.g "get_left_dofs()[0,1]" bcond_list = [ BCDof(var='u', dof = i, value = 0.) for i in domain.get_left_dofs()[:,0] ] + [ BCDof(var='u', dof = i, value = 0.) for i in [domain.get_left_dofs()[0,1]] ] + [ BCDof(var='u', dof = i, value = 0.002 ) for i in domain.get_right_dofs()[:,0] ], rtrace_list = [ # RTraceGraph(name = 'Fi,right over u_right (iteration)' , # var_y = 'F_int', idx_y = right_dof, # var_x = 'U_k', idx_x = right_dof, # record_on = 'update'), # RTraceDomainField(name = 'Stress' , # var = 'sig_app', idx = 0, # record_on = 'update'), RTraceDomainField(name = 'Displacement' , var = 'u', idx = 0, record_on = 'update', warp = True), # RTraceDomainField(name = 'N0' ,
# Discretization # line_domain = MGridDomain( lengths = (3.,1.,0.), shape = (8,8,0), n_e_nodes_geo = (1,1,0), n_e_nodes_dof = (1,1,0), node_map_geo = [0,1,3,2], node_map_dof = [0,1,3,2] ) # Put the tseval (time-stepper) into the spatial context of the # discretization and specify the response tracers to evaluate there. # right_dof = 2 ts = TS( tse = tseval, sdomain = line_domain, bcond_list = [ BCDof(var='u', dof = i, value = 0.) for i in line_domain.get_left_dofs()[:,0]] + [ BCDof(var='u', dof = i, value = 20 ) for i in line_domain.get_right_dofs()[:,0]], rtrace_list = [ RTraceGraph(name = 'Fi,right over u_right (iteration)' , var_y = 'F_int', idx_y = right_dof, var_x = 'U_k', idx_x = right_dof, update_on = 'update'), # RTraceDomainField(name = 'Flux field' , # var = 'eps', idx = 0, # update_on = 'update'), RTraceDomainField(name = 'Temperature' , var = 'u', idx = 0, update_on = 'update'), # RTraceDomainField(name = 'Shape functions' , # var = 'N_mtx', idx = 0, # update_on = 'update')