GridapROMs.ParamODEs

This module provides the parametric ODE infrastructure, including time-stepping schemes (θ-method, Generalized-α) and the TimeCombination framework that encodes how each scheme combines contributions from different time levels.

Time combinations

A TimeCombination stores the parameters of an ODE time-marching scheme and provides the coefficients needed to combine snapshots from successive time levels in the reduced-basis context. Each operator in the semi-discrete ODE (stiffness, damping, mass) is assigned a CombinationOrder, which selects the appropriate set of coefficients.

Full API

GridapROMs.ParamODEsModule
module ParamODEs

Parametric FE operators and solutions for transient parametric PDEs.

Extends ParamSteady to the time-dependent setting, building on Gridap's ODEs machinery. Key components:

  • Time derivatives∂ₚt and ∂ₚtt, parameter-aware analogues of Gridap's ∂t/∂tt, for use inside weak forms.
  • Transient trial spacesTransientTrialParamFESpace and TransientMultiFieldParamFESpace add time-varying Dirichlet conditions to parametric FE spaces.
  • ODE operatorsODEParamOperator hierarchy (JointODEParamOperator, SplitODEParamOperator, LinearNonlinearODEParamOperator, …) translate a transient parametric weak form into the residual/Jacobian signature expected by Gridap's time-marching schemes.
  • Stage operatorsParamStageOperator wraps a single ODE stage solve, keeping track of the current time, stage coefficients, and parameter realisation.
  • Transient FE operatorsTransientParamFEOperator and specialisations (SplitTransientParamFEOperator, TransientLinearParamFEOperator, …) combine the spatial FE machinery with time-derivative information.
  • ODE solutionsODEParamSolution iterates over time steps, yielding (realisation, FEFunction) pairs; TransientParamFESolution wraps this iterator into a ParamFEFunction per time step.

Modules RBTransient and Extensions depend on the abstractions defined here.

source
GridapROMs.ParamODEs.CombinationOrderType
struct CombinationOrder{A<:TimeCombination, N} <: TimeCombination
  combination::A
end

Wraps a TimeCombination and selects the N-th derivative order for coefficient retrieval. In a $p$-th order ODE, the time-marching scheme produces $p+1$ operators (e.g. stiffness, damping, mass for $p=2$); CombinationOrder{A,N} isolates the coefficients for the $N$-th one.

The type parameter N is a positive integer:

  • N = 1 — zeroth-derivative operator (stiffness $A$).
  • N = 2 — first-derivative operator (mass $M$ for first-order; damping for second-order).
  • N = 3 — second-derivative operator (mass $M$ for second-order).

Convenience aliases:

source
GridapROMs.ParamODEs.ParamStageOperatorType
struct ParamStageOperator <: NonlinearParamOperator
  op::ODEParamOperator
  r::TransientRealisation
  state_update::Function
  ws::Tuple{Vararg{Real}}
  paramcache::AbstractParamCache
end

Stage operator to solve a parametric ODE with a time marching scheme

source
GridapROMs.ParamODEs.ThetaMethodCombinationType
struct ThetaMethodCombination <: TimeCombination
  dt::Real
  θ::Real
end

TimeCombination for the θ-method applied to a first-order ODE. Stores the time step dt and the implicitness parameter θ.

Two CombinationOrder levels are defined:

  • Order 1 (stiffness $A$): coefficients $(\theta,\, 1-\theta)$.
  • Order 2 (mass $M$): coefficients $(1/\Delta t,\, -1/\Delta t)$.
source
GridapROMs.ParamODEs.TimeCombinationType
abstract type TimeCombination end

Encodes how an ODE time-marching scheme combines contributions from different time levels when building a reduced space-time system.

For every ODE solver there is exactly one TimeCombination that stores the scheme parameters (time step, weights, …). Use the constructor

TimeCombination(odesolver::ODESolver)

to obtain the appropriate concrete subtype:

SolverTimeCombination subtype
ThetaMethodThetaMethodCombination
GeneralizedAlpha1GenAlpha1Combination
GeneralizedAlpha2GenAlpha2Combination

The per-order time-level weights are accessed through get_coefficients, while time_combination applies the full combination to a parametric solution vector.

See also: CombinationOrder, HighDimHyperReduction.

source
GridapROMs.ParamODEs.TransientLinearParamFEOpFromWeakFormType
struct TransientLinearParamFEOpFromWeakForm{T} <: TransientParamFEOperator{LinearParamODE,T}
  res::Function
  jacs::Tuple{Vararg{Function}}
  constant_forms::Tuple{Vararg{Bool}}
  tpspace::TransientParamSpace
  assem::Assembler
  trial::FESpace
  test::FESpace
  domains::FEDomains
  order::Integer
end

Instance of TransientParamFEOperator, to be used when the transient problem is linear

source
GridapROMs.ParamODEs.TransientParamFEOperatorType
const TransientParamFEOperator{O<:ODEParamOperatorType,T<:TriangulationStyle} = ParamFEOperator{O,T}

Parametric extension of a TransientFEOperator in Gridap. Compared to a standard TransientFEOperator, there are the following novelties:

  • a TransientParamSpace is provided, so that parametric realisations can be extracted directly from the TransientParamFEOperator
  • a function representing a norm matrix is provided, so that errors in the desired norm can be automatically computed

Subtypes:

source
GridapROMs.ParamODEs.TransientParamFESolutionType
struct TransientParamFESolution{V} <: TransientFESolution
  odesol::ODEParamSolution{V}
  trial
end

Wrapper around a TransientParamFEOperator and ODESolver that represents the parametric solution at a set of time steps. It is an iterator that computes the solution at each time step in a lazy fashion when accessing the solution.

source
GridapROMs.ParamODEs.get_coefficientsMethod
get_coefficients(c::TimeCombination, args...) -> NTuple{N,Real}

Return the tuple of coefficients that the combination c uses to weight snapshots at successive time levels. The length of the tuple equals the number of time levels involved (the stencil width of the scheme for the corresponding CombinationOrder).

source
GridapROMs.ParamODEs.time_combinationMethod
time_combination(c::TimeCombination, u, us0) -> NTuple{N,AbstractParamVector}

Apply the time combination c to the parametric solution vector u and the N initial-condition vectors us0. Returns an N-tuple of combined vectors, one per derivative order of the ODE (e.g. $u_{\theta}$ and $\dot{u}_{\theta}$ for a first-order scheme).

source