Skip to content

Commit

Permalink
Fix: Read ParticlePatches Attr
Browse files Browse the repository at this point in the history
`ParticlePatches` are no openPMD records but a special group.
It does not need required record components such as `unitDimension`.
  • Loading branch information
ax3l committed Apr 17, 2024
1 parent 9e53e9a commit 22f3309
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/backend/PatchRecord.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,24 +60,6 @@ void PatchRecord::flush_impl(

void PatchRecord::read()
{
Parameter<Operation::READ_ATT> aRead;
aRead.name = "unitDimension";
IOHandler()->enqueue(IOTask(this, aRead));
IOHandler()->flush(internal::defaultFlushParams);

if (auto val =
Attribute(*aRead.resource).getOptional<std::array<double, 7> >();
val.has_value())
this->setAttribute("unitDimension", val.value());
else
throw error::ReadError(
error::AffectedObject::Attribute,
error::Reason::UnexpectedContent,
{},
"Unexpected Attribute datatype for 'unitDimension' (expected an "
"array of seven floating point numbers, found " +
datatypeToString(Attribute(*aRead.resource).dtype) + ")");

Parameter<Operation::LIST_DATASETS> dList;
IOHandler()->enqueue(IOTask(this, dList));
IOHandler()->flush(internal::defaultFlushParams);
Expand Down

0 comments on commit 22f3309

Please sign in to comment.