diff --git a/FDTD/operator.cpp b/FDTD/operator.cpp index 08906d9..514f571 100644 --- a/FDTD/operator.cpp +++ b/FDTD/operator.cpp @@ -139,9 +139,9 @@ struct Operator::Grid_Path Operator::FindPath(double start[], double stop[]) double meshStart[] = {discLines[0][uiStart[0]], discLines[1][uiStart[1]], discLines[2][uiStart[2]]}; double meshStop[] = {discLines[0][uiStop[0]], discLines[1][uiStop[1]], discLines[2][uiStop[2]]}; - double foot,dist,minFoot,minDist; - int minDir; bool UpDir; + double foot=0,dist=0,minFoot=0,minDist=0; + int minDir=0; unsigned int minPos[3]; double startFoot,stopFoot,currFoot; Point_Line_Distance(meshStart,start,stop,startFoot,dist); @@ -158,7 +158,7 @@ struct Operator::Grid_Path Operator::FindPath(double start[], double stop[]) P[0] = discLines[0][currPos[0]]; P[1] = discLines[1][currPos[1]]; P[2] = discLines[2][currPos[2]]; - if ((currPos[n]-1)>=0) + if (((int)currPos[n]-1)>=0) { P[n] = discLines[n][currPos[n]-1]; Point_Line_Distance(P,start,stop,foot,dist); @@ -725,13 +725,13 @@ bool Operator::CalcEFieldExcitation() double delta[3]; double amp=0; - for (pos[2]=0;pos[2]GetIndexDelta(2,pos[2])); - for (pos[1]=0;pos[1]GetIndexDelta(1,pos[1])); - for (pos[0]=0;pos[0]GetIndexDelta(0,pos[0])); coord[0] = discLines[0][pos[0]]; @@ -748,7 +748,7 @@ bool Operator::CalcEFieldExcitation() CSPropElectrode* elec = prop->ToElectrode(); if (elec!=NULL) { - if ((elec->GetActiveDir(n)) && (pos[n]GetActiveDir(n)) && (pos[n]<(int)numLines[n]-1)) { amp = elec->GetWeightedExcitation(n,coord)*delta[n]*gridDelta; if (amp!=0) @@ -865,5 +865,7 @@ bool Operator::CalcPEC() } } } + + return true; } diff --git a/FDTD/processcurrent.cpp b/FDTD/processcurrent.cpp index 381d567..66c23a0 100644 --- a/FDTD/processcurrent.cpp +++ b/FDTD/processcurrent.cpp @@ -65,22 +65,22 @@ int ProcessCurrent::Process() } //x-current - for (int i=start[0];icurr[0][i][start[1]][start[2]]; //y-current - for (int i=start[1];icurr[1][stop[0]][i][start[2]]; //z-current - for (int i=start[2];icurr[2][stop[0]][stop[1]][i]; //x-current - for (int i=start[0];icurr[0][i][stop[1]][stop[2]]; //y-current - for (int i=start[1];icurr[1][start[0]][i][stop[2]]; //z-current - for (int i=start[2];icurr[2][start[0]][start[1]][i]; // cerr << "ts: " << Eng->numTS << " i: " << current << endl; diff --git a/FDTD/processfields.cpp b/FDTD/processfields.cpp index 49214c7..3d538c6 100644 --- a/FDTD/processfields.cpp +++ b/FDTD/processfields.cpp @@ -193,6 +193,7 @@ bool ProcessFields::DumpMultiVectorArray2VTK(ofstream &file, string names[], FDT WriteVTKVectorArray(file, names[n], array[n], numLines); file << endl; } + return true; } void ProcessFields::WriteVTKScalarArray(ofstream &file, string name, FDTD_FLOAT*** array, unsigned int* numLines) @@ -220,16 +221,18 @@ bool ProcessFields::DumpScalarArray2VTK(ofstream &file, string name, FDTD_FLOAT* { WriteVTKHeader(file, discLines, numLines); WriteVTKScalarArray(file, name, array, numLines); + return true; } bool ProcessFields::DumpMultiScalarArray2VTK(ofstream &file, string names[], FDTD_FLOAT*** array[], unsigned int numFields, double** discLines, unsigned int* numLines) { WriteVTKHeader(file, discLines, numLines); - for (int n=0;n