Minor fixes to 2group solver

This commit is contained in:
Shikhar Kumar 2018-11-10 13:58:23 -05:00
parent e2c2a03220
commit dbf2cb3e1a

View file

@ -1,5 +1,3 @@
//TODO remove
#include <iostream>
#include <vector>
#include "openmc/cmfd_solver.h"
@ -12,8 +10,6 @@ namespace openmc {
// Global variables
//==============================================================================
// TODO check which variables actually necessary
std::vector<int> indptr;
std::vector<int> indices;
@ -179,7 +175,7 @@ int cmfd_linsolver_2g(double* A_data, double* b, double* x, double tol) {
for (int icol = d1idx + 2; icol < indptr[irow + 1]; icol++)
tmp1 += A_data[icol] * x[indices[icol]];
for (int icol = d2idx + 1; icol < indptr[irow + 2]; icol++)
tmp1 += A_data[icol] * x[indices[icol]];
tmp2 += A_data[icol] * x[indices[icol]];
// Adjust with RHS vector
tmp1 = b[irow] - tmp1;