Skip to content

Commit b0dfe64

Browse files
committed
Improved specification of standards
1 parent 0ab5c5f commit b0dfe64

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

src/ParticleSpecies.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,15 @@ void ParticleSpecies::flush(
168168
}
169169
else
170170
{
171-
auto it = find("position");
172-
if (it != end())
173-
it->second.setUnitDimension({{UnitDimension::L, 1}});
174-
it = find("positionOffset");
175-
if (it != end())
176-
it->second.setUnitDimension({{UnitDimension::L, 1}});
171+
if (flushParams.flushLevel != FlushLevel::SkeletonOnly)
172+
{
173+
auto it = find("position");
174+
if (it != end())
175+
it->second.setUnitDimension({{UnitDimension::L, 1}});
176+
it = find("positionOffset");
177+
if (it != end())
178+
it->second.setUnitDimension({{UnitDimension::L, 1}});
179+
}
177180

178181
Container<Record>::flush(path, flushParams);
179182

src/Record.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ Record &Record::setUnitDimension(unit_representations::AsMap const &udim)
4545
}
4646
Record &Record::setUnitDimension(unit_representations::AsArray const &udim)
4747
{
48-
return setUnitDimension(
49-
unit_representations::asMap(udim, /* skip_zeros = */ false));
48+
setAttribute("unitDimension", udim);
49+
return *this;
5050
}
5151

5252
void Record::flush_impl(

0 commit comments

Comments
 (0)