Commit 1b6afe4a authored by Kirill Terekhov's avatar Kirill Terekhov

guard nans in vtu file output

parent bf2e5f29
...@@ -246,8 +246,13 @@ namespace INMOST ...@@ -246,8 +246,13 @@ namespace INMOST
} }
else if( it->GetDataType() == DATA_REAL ) else if( it->GetDataType() == DATA_REAL )
{ {
for(INMOST_DATA_ENUM_TYPE k = 0; k < it->GetSize(); ++k) for (INMOST_DATA_ENUM_TYPE k = 0; k < it->GetSize(); ++k)
f << jt->RealArray(*it)[k] << " "; {
INMOST_DATA_REAL_TYPE val = jt->RealArray(*it)[k];
if (__isbad(val))
f << type_undef[it->GetDataType()] << " ";
else f << val << " ";
}
} }
else if( it->GetDataType() == DATA_INTEGER ) else if( it->GetDataType() == DATA_INTEGER )
{ {
...@@ -262,8 +267,13 @@ namespace INMOST ...@@ -262,8 +267,13 @@ namespace INMOST
#if defined(USE_AUTODIFF) #if defined(USE_AUTODIFF)
else if( it->GetDataType() == DATA_VARIABLE ) else if( it->GetDataType() == DATA_VARIABLE )
{ {
for(INMOST_DATA_ENUM_TYPE k = 0; k < it->GetSize(); ++k) for (INMOST_DATA_ENUM_TYPE k = 0; k < it->GetSize(); ++k)
f << jt->VariableArray(*it)[k].GetValue() << " "; {
INMOST_DATA_REAL_TYPE val = jt->VariableArray(*it)[k].GetValue();
if (__isbad(val))
f << type_undef[it->GetDataType()] << " ";
else f << val << " ";
}
} }
#endif #endif
f << std::endl; f << std::endl;
...@@ -298,7 +308,12 @@ namespace INMOST ...@@ -298,7 +308,12 @@ namespace INMOST
else if( it->GetDataType() == DATA_REAL ) else if( it->GetDataType() == DATA_REAL )
{ {
for(INMOST_DATA_ENUM_TYPE k = 0; k < it->GetSize(); ++k) for(INMOST_DATA_ENUM_TYPE k = 0; k < it->GetSize(); ++k)
f << jt->RealArray(*it)[k] << " "; {
INMOST_DATA_REAL_TYPE val = jt->RealArray(*it)[k];
if (__isbad(val))
f << type_undef[it->GetDataType()] << " ";
else f << val << " ";
}
} }
else if( it->GetDataType() == DATA_INTEGER ) else if( it->GetDataType() == DATA_INTEGER )
{ {
...@@ -314,7 +329,12 @@ namespace INMOST ...@@ -314,7 +329,12 @@ namespace INMOST
else if( it->GetDataType() == DATA_VARIABLE ) else if( it->GetDataType() == DATA_VARIABLE )
{ {
for(INMOST_DATA_ENUM_TYPE k = 0; k < it->GetSize(); ++k) for(INMOST_DATA_ENUM_TYPE k = 0; k < it->GetSize(); ++k)
f << jt->VariableArray(*it)[k].GetValue() << " "; {
INMOST_DATA_REAL_TYPE val = jt->VariableArray(*it)[k].GetValue();
if (__isbad(val))
f << type_undef[it->GetDataType()] << " ";
else f << val << " ";
}
} }
#endif #endif
f << std::endl; f << std::endl;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment