diff --git a/src/ML-POD/fitpod_command.cpp b/src/ML-POD/fitpod_command.cpp index 6fb70a23d8..4b0e97c897 100644 --- a/src/ML-POD/fitpod_command.cpp +++ b/src/ML-POD/fitpod_command.cpp @@ -1247,7 +1247,7 @@ void FitPOD::least_squares_fit(datastruct data) if (comm->me == 0) { // symmetrize A - + for (int i = 0; i fabs(desc.b[i])) ? maxb : fabs(desc.b[i]); - - maxb = 1.0/maxb; - for (int i = 0; i fabs(desc.b[i])) ? maxb : fabs(desc.b[i]); + + maxb = 1.0/maxb; + for (int i = 0; idestroy(ipiv); // memory->destroy(work); - + // compute c = inverse(A) * b - + // for (int i = 0; ipod.filenametag + "_coefficients" + ".pod"; FILE *fp = fopen(filename.c_str(), "w"); - //int prec = utils::inumeric(FLERR,podptr->pod.precision,false,lmp); + //int prec = utils::inumeric(FLERR,podptr->pod.precision,false,lmp); std::string prec = "{:<10." + podptr->pod.precision + "f}\n"; - + fmt::print(fp, "POD_coefficients: {}\n", nd); for (int count = 0; count < nd; count++) { fmt::print(fp, prec.c_str(), desc.c[count]); - } + } fclose(fp); utils::logmesg(lmp, "**************** End of Least-Squares Fitting ****************\n"); }