I am putting up this issue as the result of a discussion we had on the 6/6/2024 Parthenon sync call.
In #1092, I cleaned up DataCollection a little bit so that MeshBlockData did not need to be pre-built by hand before creating MeshData objects with GetOrAdd. One thing that I changed was that DataCollection<MeshBlockData>::Add can now take create new MeshBlockData in the collection from either another MeshBlockData (as before) or from a MeshBlock. It was not possible to do something similar for call to DataCollection<MeshData>::Add, since there is no analogy to MeshBlock for MeshData, i.e. MeshBlockData is to MeshBlock as MeshData is to ??????.
Additionally, all block list partitioning is dealt with in DataCollection<MeshData>::GetOrAdd_impl. At least to me, this is a little bit of a strange place to have it conceptually. Also, as it is currently written the only partitioning allowed is to the Mesh::DefaultPackSize().
As a result, it seems like it would be a good thing to create an object BlockPartition (or some better name). A set of these could live in Mesh and DataCollection<MeshData>::Add would work on them as well. It seems like it would be straightforward to address most of the issues brought up in #1003, #959, and #419.
I am putting up this issue as the result of a discussion we had on the 6/6/2024 Parthenon sync call.
In #1092, I cleaned up
DataCollection
a little bit so thatMeshBlockData
did not need to be pre-built by hand before creatingMeshData
objects withGetOrAdd
. One thing that I changed was thatDataCollection<MeshBlockData>::Add
can now take create newMeshBlockData
in the collection from either anotherMeshBlockData
(as before) or from aMeshBlock
. It was not possible to do something similar for call toDataCollection<MeshData>::Add
, since there is no analogy toMeshBlock
forMeshData
, i.e.MeshBlockData
is toMeshBlock
asMeshData
is to??????
.Additionally, all block list partitioning is dealt with in
DataCollection<MeshData>::GetOrAdd_impl
. At least to me, this is a little bit of a strange place to have it conceptually. Also, as it is currently written the only partitioning allowed is to theMesh::DefaultPackSize()
.As a result, it seems like it would be a good thing to create an object
BlockPartition
(or some better name). A set of these could live inMesh
andDataCollection<MeshData>::Add
would work on them as well. It seems like it would be straightforward to address most of the issues brought up in #1003, #959, and #419.