Reduce memory use and allocations for some connectivity descriptors
- Feb 28, 2022
-
-
Many data access were provided as a WeakItemValue are now returned as ItemValue. This may never be a problem since it is unlikely that a Connectivity object could be destroyed and not these values. The new API is always better.
-
isBoundaryFace(), isBoundaryEdge() and isBoundaryNode() which returns boolean ItemValue's Also add a template version isBoundary<item_type>() to ease generic programming.
-
-
Memory use reduction occurs for 1D and 2D - In dimension 1 node/edge/face numbers/owner/is_owned share the same underlying arrays since node, edge and face are actually the same - In dimension 2 edge/face numbers/owner/is_owned share the same underlying arrays since edge and face are actually the same On the way, ItemValue (resp. ItemArray) APIs changed: one can no more affect a direct Array (resp. Table). One now must use the new constructor that uses a connectivity and an Array (resp. Table). This is always a better approach than before since it eventually consumes one useless allocation/deallocation.
-