prob_data.setup() state = State(prob_data) matrices = SpatialD(state) # We apply the power iteration to the **cmfd** matrices solver = Solver(state, matrices) x0 = np.random.rand(prob_data.n_dofs) + 1. #fill(1.0,n) tolerance = 1.e-10 max_it = 1000 solver.power_iteration(x0,tolerance,max_it) state.plot(color='blue') #plt.plot(prob_data.x, phi_fmfd, 'o', color='red' , linewidth=3.0,linestyle='--') #plt.plot(prob_data.x, phi_cmfd, 'x', color='blue', linewidth=3.0,linestyle='--') #plt.legend(["phi_1 CMFD"], loc="upper left") #plt.show() #plt.savefig('figures/CMFD.png', bbox_inches='tight') # # # phi_ref = sin(x*pi/L)/norm(sin(x*pi/L)) # # plot(x, phi_ref, color="black", linewidth=1.0, linestyle="-")