hpsim/OGL

Refactor lduLduBase

greole opened this issue · 0 comments

The current structure of the lduLduBase class is not ideal and several changes should be considered:

  1. rename the class to make the name more descriptive, a candidate would be SegregatetedCoupledSolverBase
  2. Instead of deriving from HostMatrix and IOGKOMatrixHandler an intermediate class LduCsrWrapper should be implemented

The new SegregatetedCoupledSolverBase class has the following responsibilities

Data members:

  • vector of DevicePersistent initial guesses and rhs

Methods:

  • generate_solver
  • generate_preconditioner
  • initialisation of initial guesses and rhs
  • solve_impl

The new intermediate LduCsrWrapper class has the following responsibilities:

Data members:

  • DevicePersistent sparsity pattern
  • DevicePersistent LduCsrMapping
  • DevicePersistent values

Methods:

  • init/update sparsity pattern
  • init/update lduCsrMapping
  • init/update values

Most of the functionality could be implement as a mixin which provide the needed update and init functions.

This depends on the implementation of DevicePersistent class #49