47 for(
int i = 0; i < size * size; i++) {
59 for (
int col = 0; col < size; col++)
60 for (
int row = 0; row < col + 1; row++) {
72 for(
int i = 0; i < size * size; i++) {
82 std::cout<<
"error reading file"<<std::endl;
90 double*
tmpptr=
new double [size*size];
92 for (
int i=0;i<size*size;i++)
99 template<
typename Treal,
typename Trealonfile>
106 for (
int i = 0; i < size; i++) {
114 template<
typename Treal,
typename Tmatrix>
120 throw Failure(
"read_matrix: Cannot open inputfile");
130 template<
typename Treal,
typename Trealonfile,
typename Tmatrix>
138 throw Failure(
"read_matrix: Cannot open inputfile rowfile");
142 throw Failure(
"read_matrix: Cannot open inputfile colfile");
146 throw Failure(
"read_matrix: Cannot open inputfile valfile");
148 int* row =
new int[
nval];
149 int* col =
new int[
nval];
156 A.assign_from_sparse(row, col,
val,
nval);
162 for (
int i = 0; i <
nval; i++) {
166 std::cout<<
"Maxdiff: "<<
maxdiff<<std::endl;
174 template<
typename Treal>
182 throw Failure(
"read_xyz: Cannot open inputfile");
184 input >> std::setprecision(10);
189 for(
int i = 0 ; i <
natoms ; i++) {
Definition allocate.cc:39
static Treal maxdiff_tri(const Treal *f1, const Treal *f2, int size)
Definition general.h:56
static void read_xyz(Treal *x, Treal *y, Treal *z, char *atomsPath, int const natoms, int const size)
Definition general.h:175
static Treal maxdiff(const Treal *f1, const Treal *f2, int size)
Definition general.h:44
static void fileread(Treal *ptr, int size, FILE *file)
Definition general.h:100
static void read_sparse_matrix(Tmatrix &A, char const *const rowPath, char const *const colPath, char const *const valPath, int const nval)
Definition general.h:131
static Treal getMachineEpsilon()
Definition matInclude.h:147
static Treal frobdiff(const Treal *f1, const Treal *f2, int size)
Definition general.h:69
static void read_matrix(Tmatrix &A, char const *const matrixPath, int const size)
Definition general.h:115
Treal template_blas_sqrt(Treal x)
Treal template_blas_fabs(Treal x)