fixed some warnings of gcc-4.7
This commit is contained in:
parent
258590bd1a
commit
013f92ba26
@ -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)
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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; n<uiDimension; n++) if (dGrid[n]==NULL) error->Error(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<uiDimension; ++n)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user