From 489a45a6665aa12c9ec4337121ca9cb748648a54 Mon Sep 17 00:00:00 2001 From: Thorsten Liebig Date: Wed, 16 Nov 2011 12:50:22 +0100 Subject: [PATCH] fix missing initializations in CalcTimestep_Var1/3() --- FDTD/operator.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/FDTD/operator.cpp b/FDTD/operator.cpp index edf6041..cd72696 100644 --- a/FDTD/operator.cpp +++ b/FDTD/operator.cpp @@ -1465,8 +1465,8 @@ double Operator::CalcTimestep_Var1() dT=1e200; double newT; unsigned int pos[3]; - unsigned int smallest_pos[3]; - unsigned int smallest_n; + unsigned int smallest_pos[3] = {0, 0, 0}; + unsigned int smallest_n = 0; unsigned int ipos; unsigned int ipos_PM; unsigned int ipos_PPM; @@ -1529,8 +1529,8 @@ double Operator::CalcTimestep_Var3() // cout << "Operator::CalcTimestep(): Using timestep algorithm by Andreas Rennings, Dissertation @ University Duisburg-Essen, 2008, pp. 76, eq. 4.77 ff." << endl; double newT; unsigned int pos[3]; - unsigned int smallest_pos[3]; - unsigned int smallest_n; + unsigned int smallest_pos[3] = {0, 0, 0}; + unsigned int smallest_n = 0; unsigned int ipos; double w_total=0; double wqp=0,wt1=0,wt2=0;