Example #1
0
#A = sparse.coo_matrix((V,(I,J)),shape=(4,4))



# We define the data for the problem, i.e., 
#  * the cross sections for node;
#  * the length of every node;
#  * the boudnary conditions;
#  * and the local refinement of every node;
#  

prob_data = ProblemData()
#                     D               Sigma_a  nu   Sigma_f  Delta_x
prob_data.set_xs('0',[1/(3*0.416667), 0.334,   1.0, 0.000,   2.7]) #moderator
prob_data.set_xs('1',[1/(3*0.416667), 0.334,   1.0, 0.178,   2.4]) #fuel
prob_data.set_composition(['0', '1', '0', '1', '0', '1', '0'])
prob_data.set_bc(0,0)
prob_data.set_refinements(20)

prob_data.setup()


state = State(prob_data)



matrices = SpatialD(state)


# We apply the power iteration to the **cmfd** matrices
solver = Solver(state, matrices)