# Set up spaces space = H1Space(mesh, shapeset) set_bc(space) space.set_uniform_order(P_INIT) # Enumerate basis functions space.assign_dofs() # Set initial condition tsln = Solution() tsln.set_const(mesh, T_INIT) # Weak formulation wf = WeakForm(1) set_forms(wf, tsln) # Matrix solver solver = DummySolver() # Linear system ls = LinSystem(wf, solver) ls.set_spaces(space) ls.set_pss(pss) # Visualisation sview = ScalarView("Temperature", 0, 0, 450, 600) #title = "Time %s, exterior temperature %s" % (TIME, temp_ext(TIME)) #Tview.set_min_max_range(0,20); #Tview.set_title(title); #Tview.fix_scale_width(3);
# Perform initial mesh refinements for i in range(INIT_REF_NUM): mesh.refine_all_elements() mesh.refine_towards_boundary(bdy_air, INIT_REF_NUM_BDY) # Create an H1 space with default shapeset space = H1Space(mesh, P_INIT) set_bc(space) # Set initial condition tsln = Solution() tsln.set_const(mesh, T_INIT) # Initialize the weak formulation wf = WeakForm() set_forms(wf) # Initialize the linear system. ls = LinSystem(wf) ls.set_spaces(space) # Visualisation sview = ScalarView("Temperature", 0, 0, 450, 600) #title = "Time %s, exterior temperature %s" % (TIME, temp_ext(TIME)) #Tview.set_min_max_range(0,20); #Tview.set_title(title); #Tview.fix_scale_width(3); # Time stepping nsteps = int(FINAL_TIME / TAU + 0.5) rhsonly = False
# Perform initial mesh refinements for i in range(INIT_REF_NUM): mesh.refine_all_elements() mesh.refine_towards_boundary(bdy_air, INIT_REF_NUM_BDY) # Create an H1 space with default shapeset space = H1Space(mesh, P_INIT) set_bc(space) # Set initial condition tsln = Solution() tsln.set_const(mesh, T_INIT) # Initialize the weak formulation wf = WeakForm() set_forms(wf) # Initialize the linear system. ls = LinSystem(wf) ls.set_spaces(space) # Visualisation sview = ScalarView("Temperature", 0, 0, 450, 600) #title = "Time %s, exterior temperature %s" % (TIME, temp_ext(TIME)) #Tview.set_min_max_range(0,20); #Tview.set_title(title); #Tview.fix_scale_width(3); # Time stepping nsteps = int(FINAL_TIME/TAU + 0.5) rhsonly = False;