From fd943481d6341511e18a9a55d32319566c460390 Mon Sep 17 00:00:00 2001 From: Ian Bell <ian.bell@nist.gov> Date: Fri, 17 Sep 2021 17:13:13 -0400 Subject: [PATCH] Another try with initializing z --- src/time_fugcoeff.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/time_fugcoeff.cpp b/src/time_fugcoeff.cpp index 1553a63..2cbb020 100644 --- a/src/time_fugcoeff.cpp +++ b/src/time_fugcoeff.cpp @@ -86,7 +86,7 @@ int main() SETUPdll(nc, hfld, hhmx, href, ierr, herr, 10000, 255, 3, 255); if (ierr != 0) printf("This ierr: %d herr: %s\n", ierr, herr); } - std::valarray<double> z(20); z = 1.0/Ncomp; + std::valarray<double> z(20); z = 0.0; z[std::slice(0, Ncomp, 1)] = 1.0 / Ncomp; std::valarray<double> u(20); u = 0.0; auto usummer = 0.0; auto tic = std::chrono::high_resolution_clock::now(); -- GitLab