hpsim/OGL

Create a base class for device persistent data

greole opened this issue · 1 comments

At several places in the OGL code base the following pattern occurs.

  • Given a name the object registry is consulted wether this object was already created
  • If an object with the given name does not exist create one, add to the object registry, and return the pointer to it
  • If it exists and no update was requested the pointer is returned and nothing else happens,
  • If it exists and an update was requested call the an update routine

This could be all wrapped into a base class and used for:

  • the sparsity pattern,
  • the matrix values,
  • the global addressing

and probably other IO classes like the IOExecPtr. It should also address rank specific and global data for parallel runs.

This should also include #30