Skip to content

Commit

Permalink
Fix time stamp for values < 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiangrimberg committed May 1, 2024
1 parent 2e9ded3 commit 4a8cd42
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions palace/models/postoperator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -747,8 +747,16 @@ void PostOperator::WriteFieldsFinal(const ErrorIndicator *indicator) const
HasE() ? *E->ParFESpace()->GetParMesh() : *B->ParFESpace()->GetParMesh();
mesh::DimensionalizeMesh(mesh, mesh_Lc0);
paraview.SetCycle(paraview.GetCycle() + 1);
paraview.SetTime(std::pow(10.0, 2.0 + static_cast<int>(std::log10(paraview.GetTime()))) -
1.0);
if (paraview.GetTime() < 1.0)
{
paraview.SetTime(99.0);
}
else
{
// 1 -> 99, 10 -> 999, etc.
paraview.SetTime(
std::pow(10.0, 2.0 + static_cast<int>(std::log10(paraview.GetTime()))) - 1.0);
}
mfem::DataCollection::FieldMapType field_map(paraview.GetFieldMap()); // Copy
for (const auto &[name, gf] : field_map)
{
Expand Down

0 comments on commit 4a8cd42

Please sign in to comment.