mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-12 00:29:17 +05:00
correct timestep issues
This commit is contained in:
parent
2e6d418599
commit
147d2c026d
@ -1366,9 +1366,18 @@ void MgAdapt::getTimeStepInfos(std::string aFile, med_int& numdt, med_int& numit
|
|||||||
med_float dt;
|
med_float dt;
|
||||||
med_int tmp_numdt, tmp_numit;
|
med_int tmp_numdt, tmp_numit;
|
||||||
|
|
||||||
med_int step = data->myUseLastTimeStep ? nbofcstp : data->myTimeStep+1;
|
//~med_int step = data->myUseLastTimeStep ? nbofcstp : data->myTimeStep+1;
|
||||||
//~myPrint("step ", step);
|
//~myPrint("step ", step);
|
||||||
erreur = MEDfieldComputingStepInfo ( medIdt, nomcha, step, &tmp_numdt, &tmp_numit, &dt );
|
erreur = MEDfieldComputingStepInfo ( medIdt, nomcha, 1, &numdt, &numit, &dt );
|
||||||
|
for(med_int step = 1; step <= nbofcstp; step++ )
|
||||||
|
{
|
||||||
|
erreur = MEDfieldComputingStepInfo ( medIdt, nomcha, step, &tmp_numdt, &tmp_numit, &dt );
|
||||||
|
if(tmp_numdt > numdt)
|
||||||
|
{
|
||||||
|
numdt = tmp_numdt;
|
||||||
|
numit = tmp_numit;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ( erreur < 0 )
|
if ( erreur < 0 )
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -1377,8 +1386,6 @@ void MgAdapt::getTimeStepInfos(std::string aFile, med_int& numdt, med_int& numit
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
numdt = tmp_numdt;
|
|
||||||
numit = tmp_numit;
|
|
||||||
|
|
||||||
|
|
||||||
// Fermeture du fichier
|
// Fermeture du fichier
|
||||||
|
@ -693,7 +693,7 @@ void SMESHGUI_MgAdaptArguments::onSelectMedFileBackgroundbutton()
|
|||||||
{
|
{
|
||||||
fieldNameCmb->insertItem(0,QString(it->first));
|
fieldNameCmb->insertItem(0,QString(it->first));
|
||||||
int typeStepInField = it->second > 2 ? 2 : it->second ;
|
int typeStepInField = it->second > 2 ? 2 : it->second ;
|
||||||
timeStepGroupChanged(typeStepInField, true, it->second-1);
|
timeStepGroupChanged(typeStepInField, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -794,7 +794,7 @@ void SMESHGUI_MgAdaptArguments::onLocalSelected(QString filePath)
|
|||||||
{
|
{
|
||||||
fieldNameCmb->insertItem(0,QString(it->first));
|
fieldNameCmb->insertItem(0,QString(it->first));
|
||||||
int typeStepInField = it->second > 2 ? 2 : it->second ;
|
int typeStepInField = it->second > 2 ? 2 : it->second ;
|
||||||
timeStepGroupChanged(typeStepInField, true, it->second-1);
|
timeStepGroupChanged(typeStepInField, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user