Skip to content

Refactor lduLduBase #50

@greole

Description

@greole

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactoringImprovement of the code structure

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions