Skip to content
Snippets Groups Projects
Commit a50be0a8 authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

Finish reduction (sum, min and max) functions for ItemValue

- These functions treat only owned items to perform reductions.

- ItemValue now know the Connectivity it is built on.
  To do so, one adds a `shared_ptr` to the Connectivity to preserve coherence
  of the data, even when Connectivity is no more used (for instance replaced by
  another).

- Since it is convenient to be able to use the ItemValue mechanism to describe
  the Connectivity itself, we introduced "WeakItemValue" types which do not
  point to the connectivity through a `shared_ptr` but using a `weak_ptr`. These
  template types (WeakNodeValue, WeakEdgeValue, WeakFaceValue and WeakCellValue)
  **should not be used** outside of the Connectivity classes

- Actually "WeakItemValue" is build using the third template parameter of
  ItemValue which is defaulted to `shared_ptr`.

- During these developments, simple clean-up were performed to Mesh, MeshData and
  MeshNodeBoundary: one now accesses to the dimension using T::Dimension (for
  static use) of through the dimension() member function (for dynamic use).

- Note that same kind of work will be performed for SubItemValuePerItem (use a
  pointer to the Connectivity) and define a "WeakSubItemValuePerItem" to the
  case of Connectivity internal members
parent a83f8fb1
No related branches found
No related tags found
1 merge request!11Feature/mpi
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment