building solver class to accomplish generic CG
need to refactor the matrix library