diff --git a/Phreeqc.h b/Phreeqc.h index 1fe31a3d..7c395e54 100644 --- a/Phreeqc.h +++ b/Phreeqc.h @@ -1144,9 +1144,7 @@ protected: int string_trim_right(char *str); int string_trim_left(char *str); static LDBLE under(LDBLE xval); -#ifdef SKIP void zero_double(LDBLE * target, int n); -#endif int get_input_errors(void); int isamong(char c, const char *s_l); Address Hash_multi(HashTable * Table, const char *Key); diff --git a/cl1.cpp b/cl1.cpp index a386c622..362f1651 100644 --- a/cl1.cpp +++ b/cl1.cpp @@ -903,6 +903,7 @@ cl1_space(int check, int l_n2d, int klm, int l_nklmd) x_arg = &x_arg_v[0]; } memset(x_arg_v.data(), 0, sizeof(double) * (size_t)l_n2d); + //zero_double(x_arg, l_n2d); if (klm > res_arg_v.size()) { @@ -910,6 +911,7 @@ cl1_space(int check, int l_n2d, int klm, int l_nklmd) res_arg = &res_arg_v[0]; } memset(res_arg_v.data(), 0, sizeof(double) * (size_t)klm); + //zero_double(res_arg, klm); if (l_nklmd > scratch_v.size()) { @@ -917,4 +919,5 @@ cl1_space(int check, int l_n2d, int klm, int l_nklmd) scratch = &scratch_v[0]; } memset(scratch_v.data(), 0, sizeof(double) * (size_t)l_nklmd); + //zero_double(scratch, l_nklmd); } diff --git a/model.cpp b/model.cpp index a017d43f..9498508e 100644 --- a/model.cpp +++ b/model.cpp @@ -1142,20 +1142,21 @@ ineq(int in_kode) zero_v.resize((size_t)max_row_count); zero = zero_v.data(); memset(zero, 0, (size_t)max_row_count * sizeof(double)); + //zero_double(zero, max_row_count); //space((void **) ((void *) &res), max_row_count, &res_max, sizeof(LDBLE)); - //zero_double(res, max_row_count); res_v.resize((size_t)max_row_count); res = res_v.data(); memset(res, 0, (size_t)max_row_count * sizeof(double)); + //zero_double(res, max_row_count); //space((void **) ((void *) &delta1), max_column_count, &delta1_max, // sizeof(LDBLE)); - //zero_double(delta1, max_column_count); delta1_v.resize((size_t)max_column_count); delta1 = delta1_v.data(); memset(delta1, 0,(size_t)max_column_count * sizeof(double)); + //zero_double(delta1, max_column_count); /* * Copy equations to optimize into ineq_array diff --git a/utilities.cpp b/utilities.cpp index 07792d95..c0bb7e19 100644 --- a/utilities.cpp +++ b/utilities.cpp @@ -1991,7 +1991,6 @@ string_pad(const char *str, int i) } return (str_ptr); } -#ifdef SKIP /* ---------------------------------------------------------------------- */ void Phreeqc:: zero_double(LDBLE * target, int n) @@ -2013,7 +2012,6 @@ zero_double(LDBLE * target, int n) memcpy((void *) target, (void *) zeros, (size_t) (n * sizeof(LDBLE))); return; } -#endif /* ---------------------------------------------------------------------- */ int Phreeqc:: get_input_errors()