diff --git a/Common/processfields_fd.cpp b/Common/processfields_fd.cpp index 8d3cb77..75bbffc 100644 --- a/Common/processfields_fd.cpp +++ b/Common/processfields_fd.cpp @@ -210,7 +210,7 @@ void ProcessFieldsFD::DumpFDData() cerr << "ProcessFieldsFD::Process: can't dump to file...! " << endl; //legacy support, use /FieldData/FD frequency-Attribute in the future - float freq[1]={m_FD_Samples.at(n)}; + float freq[1] = {(float)m_FD_Samples.at(n)}; if (m_HDF5_Dump_File->WriteAtrribute("/FieldData/FD/"+ss.str()+"_real","frequency",freq,1)==false) cerr << "ProcessFieldsFD::Process: can't dump to file...! " << endl; if (m_HDF5_Dump_File->WriteAtrribute("/FieldData/FD/"+ss.str()+"_imag","frequency",freq,1)==false) diff --git a/Common/processfields_sar.cpp b/Common/processfields_sar.cpp index 26e3ad0..076390c 100644 --- a/Common/processfields_sar.cpp +++ b/Common/processfields_sar.cpp @@ -216,10 +216,10 @@ void ProcessFieldsSAR::DumpFDData() size_t datasize[]={numLines[0],numLines[1],numLines[2]}; if (m_HDF5_Dump_File->WriteScalarField(ss.str(), SAR, datasize)==false) cerr << "ProcessFieldsSAR::Process: can't dump to file...! " << endl; - float freq[1]={m_FD_Samples.at(n)}; + float freq[1] = {(float)m_FD_Samples.at(n)}; if (m_HDF5_Dump_File->WriteAtrribute("/FieldData/FD/"+ss.str(),"frequency",freq,1)==false) cerr << "ProcessFieldsSAR::Process: can't dump to file...! " << endl; - float pow[1]={power}; + float pow[1] = {(float)power}; if (m_HDF5_Dump_File->WriteAtrribute("/FieldData/FD/"+ss.str(),"power",pow,1)==false) cerr << "ProcessFieldsSAR::Process: can't dump to file...! " << endl; } diff --git a/Common/processfields_td.cpp b/Common/processfields_td.cpp index 86104ef..e17ea6a 100644 --- a/Common/processfields_td.cpp +++ b/Common/processfields_td.cpp @@ -68,7 +68,7 @@ int ProcessFieldsTD::Process() ss << std::setw( pad_length ) << std::setfill( '0' ) << m_Eng_Interface->GetNumberOfTimesteps(); size_t datasize[]={numLines[0],numLines[1],numLines[2]}; success &= m_HDF5_Dump_File->WriteVectorField(ss.str(), field, datasize); - float time[1]={m_Eng_Interface->GetTime(m_dualTime)}; + float time[1] = {(float)m_Eng_Interface->GetTime(m_dualTime)}; success &= m_HDF5_Dump_File->WriteAtrribute("/FieldData/TD/"+ss.str(),"time",time,1); } else diff --git a/FDTD/extensions/operator_ext_pml_sf.cpp b/FDTD/extensions/operator_ext_pml_sf.cpp index d714b5b..d067cce 100644 --- a/FDTD/extensions/operator_ext_pml_sf.cpp +++ b/FDTD/extensions/operator_ext_pml_sf.cpp @@ -278,7 +278,7 @@ double Operator_Ext_PML_SF_Plane::GetKappaGraded(double depth, double Zm) const if (depth<0) return 0.0; - double vars[5] = {depth, m_pml_delta, m_pml_width, Zm, m_numLines[m_ny]}; + double vars[5] = {depth, m_pml_delta, m_pml_width, Zm, (double)m_numLines[m_ny]}; return m_GradingFunction->Eval(vars); } diff --git a/FDTD/extensions/operator_ext_upml.cpp b/FDTD/extensions/operator_ext_upml.cpp index 94acbe3..29e28bf 100644 --- a/FDTD/extensions/operator_ext_upml.cpp +++ b/FDTD/extensions/operator_ext_upml.cpp @@ -302,7 +302,7 @@ void Operator_Ext_UPML::CalcGradingKappa(int ny, unsigned int pos[3], double Zm, if (n==ny) depth-=m_Op->GetEdgeLength(n,pos)/2; - double vars[5] = {depth, width/m_Size[2*n], width, Zm, m_Size[2*n]}; + double vars[5] = {depth, width/m_Size[2*n], width, Zm, (double)m_Size[2*n]}; if (depth>0) kappa_v[n] = m_GradingFunction->Eval(vars); else @@ -333,7 +333,7 @@ void Operator_Ext_UPML::CalcGradingKappa(int ny, unsigned int pos[3], double Zm, if (n==ny) depth+=m_Op->GetEdgeLength(n,pos)/2; - double vars[5] = {depth, width/(m_Size[2*n]), width, Zm, m_Size[2*n]}; + double vars[5] = {depth, width/(m_Size[2*n]), width, Zm, (double)m_Size[2*n]}; if (depth>0) kappa_v[n] = m_GradingFunction->Eval(vars); else diff --git a/FDTD/operator.cpp b/FDTD/operator.cpp index c506d3b..b8fbd98 100644 --- a/FDTD/operator.cpp +++ b/FDTD/operator.cpp @@ -199,8 +199,7 @@ double Operator::GetNodeWidth(int ny, const int pos[3], bool dualMesh) const if ( (pos[0]<0) || (pos[1]<0) || (pos[2]<0) ) return 0.0; - unsigned int uiPos[]={pos[0],pos[1],pos[2]}; - return GetNodeWidth(ny, uiPos, dualMesh); + return GetNodeWidth(ny, pos, dualMesh); } double Operator::GetNodeArea(int ny, const unsigned int pos[3], bool dualMesh) const @@ -215,8 +214,7 @@ double Operator::GetNodeArea(int ny, const int pos[3], bool dualMesh) const if ( (pos[0]<0) || (pos[1]<0) || (pos[2]<0) ) return 0.0; - unsigned int uiPos[]={pos[0],pos[1],pos[2]}; - return GetNodeArea(ny, uiPos, dualMesh); + return GetNodeArea(ny, pos, dualMesh); } unsigned int Operator::SnapToMeshLine(int ny, double coord, bool &inside, bool dualMesh) const @@ -1178,7 +1176,7 @@ bool Operator::Calc_EffMatPos(int ny, const unsigned int* pos, double* EffMat) c double deltaP_M=GetRawDiscDelta(nP,pos[nP]-1); double deltaPP_M=GetRawDiscDelta(nPP,pos[nPP]-1); - int loc_pos[3]={pos[0],pos[1],pos[2]}; + int loc_pos[3] = {(int)pos[0],(int)pos[1],(int)pos[2]}; double A_n; double area = 0; diff --git a/FDTD/operator_cylinder.cpp b/FDTD/operator_cylinder.cpp index 938e433..293f782 100644 --- a/FDTD/operator_cylinder.cpp +++ b/FDTD/operator_cylinder.cpp @@ -132,7 +132,7 @@ double Operator_Cylinder::GetNodeWidth(int ny, const int pos[3], bool dualMesh) if ( (pos[0]<0) || (pos[1]<0 && CC_closedAlpha==false) || (pos[2]<0) ) return 0.0; - unsigned int uiPos[]={pos[0],pos[1],pos[2]}; + unsigned int uiPos[]={(unsigned int)pos[0],(unsigned int)pos[1],(unsigned int)pos[2]}; if (pos[1]<0 && CC_closedAlpha==true) uiPos[1]+=numLines[1]-2; @@ -173,7 +173,7 @@ double Operator_Cylinder::GetNodeArea(int ny, const int pos[3], bool dualMesh) c if ( (pos[0]<0) || (pos[1]<0 && CC_closedAlpha==false) || (pos[2]<0) ) return 0.0; - unsigned int uiPos[]={pos[0],pos[1],pos[2]}; + unsigned int uiPos[]={(unsigned int)pos[0],(unsigned int)pos[1],(unsigned int)pos[2]}; if (pos[1]<0 && CC_closedAlpha==true) uiPos[1]+=numLines[1]-2; diff --git a/tools/AdrOp.cpp b/tools/AdrOp.cpp index 18b1c52..1940b61 100644 --- a/tools/AdrOp.cpp +++ b/tools/AdrOp.cpp @@ -499,11 +499,11 @@ unsigned int AdrOp::GetCellPos(int i, int j, int k) double AdrOp::GetShiftCellVolume(int ny, int step) { for (unsigned int n=0; nError(9); - int uiMax[4]={uiImax-1,uiJmax-1,uiKmax-1,uiLmax-1}; + int uiMax[4]={(int)uiImax-1,(int)uiJmax-1,(int)uiKmax-1,(int)uiLmax-1}; while (ny<0) ny+=uiDimension; ny=ny%uiDimension; iCellShift[ny]=step; - int uiPos[4]={uiIpos+iCellShift[0],uiJpos+iCellShift[1],uiKpos+iCellShift[2]}; + int uiPos[4]={(int)uiIpos+iCellShift[0],(int)uiJpos+iCellShift[1],(int)uiKpos+iCellShift[2]}; double dVol=1; for (unsigned int n=0; n