rom: LSPG: unsteady default problem

Defined in module: pressio4py.rom.lspg.unsteady

Import as:       from pressio4py.rom import lspg

API, Parameters and Requirements

# continuous-time overloads
problem = lspg.unsteady.DefaultProblem(scheme, fom_adapter, decoder, \            (1)
                                       rom_state, fom_ref_state)

problem = lspg.unsteady.PrecDefaultProblem(scheme, fom_adapter, decoder, \        (2)
                                           rom_state, fom_ref_state,     \
                                           preconditioner)

# discrete-time overloads
problem = lspg.unsteady.DiscreteTimeProblemTwoStates(fom_adapter, decoder,   \    (3)
                                                     rom_state, fom_ref_state)

problem = lspg.unsteady.DiscreteTimeProblemThreeStates(fom_adapter, decoder, \    (4)
                                                       rom_state, fom_ref_state)
  • scheme:
    • only applicable to (1,2)
    • value from the ode.stepscheme enum setting the desired stepping scheme
    • requires an implicit value
  • fom_adapter:
    • instance of your adapter class specifying the FOM problem.
    • for (1,2): must statisfy the continuous-time API for unsteady LSPG, see API list
    • for (3): must satisfy the discrete-time API with two states, see API list
    • for (4): must satisfy the discrete-time API with three states, see API list
  • decoder:
    • decoder object
    • must satify the requirements listed here
  • rom_state:
    • currently, must be a rank-1 numpy.array
  • fom_ref_state:
    • your FOM reference state that is used when reconstructing the FOM state
    • must be a rank-1 numpy.array
  • preconditioner:
    • functor needed to precondition the ROM operators
    • must be a functor with a specific API:

      class Prec:
        def __call__(self, fom_state, time, operand):
          # given the current FOM state,
          # apply your preconditioner to the operand.
          # Ensure that you overwrite the data in the operand.
          # As an example, a trivial preconditioner that does nothing:
          # operand[:] *= 1.