diff --git a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C index a97c20f56787d4ffd0754a357c9bde1c3dac93d3..c2386312c52bf4b33d0d6e4220444e7974df2b9a 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C @@ -647,8 +647,16 @@ void Foam::ZoneMesh<ZoneType, MeshType>::movePoints(const pointField& pts) template<class ZoneType, class MeshType> void Foam::ZoneMesh<ZoneType, MeshType>::updateMetaData() { - dictionary& meta = this->getMetaData(); - meta.set("names", this->names()); + wordList zoneNames(this->names()); + if (zoneNames.empty()) + { + this->removeMetaData(); + } + else + { + dictionary& meta = this->getMetaData(); + meta.set("names", zoneNames); + } }