GridapROMs.RBSteady

GridapROMs.RBSteady — Module
module RBSteady

Reduced-basis infrastructure for steady parametric PDEs: offline reduction and hyper-reduction, and online solution of the reduced problems. Main building blocks:

The RBTransient module extends all of the above to the time-dependent setting.

source
GridapROMs.RBSteady.AdaptiveReduction — Type
struct AdaptiveReduction{A,B,R<:DirectReduction{A,B}} <: GreedyReduction{A,B}
  reduction::R
  adaptive_nparams::Int
  adaptive_tol::Float64
  adaptive_maxiter::Int
end

Not implemented yet. Will serve as a parameter-adaptivity greedy reduction algorithm

source
GridapROMs.RBSteady.AffineHyperReduction — Type
struct AffineHyperReduction <: TrivialHyperReduction end

Residuals and Jacobians are computed for a single parameter and projected offline; online, the projections are reused. Exact for μ-independent residuals and Jacobians

source
GridapROMs.RBSteady.BlockHRProjection — Type
struct BlockHRProjection{A<:HyperReduction,B<:Projection,T<:HRProjection{A,B},N} <: HRProjection{A,BlockProjection{T,N}}
  array::Array{T,N}
end

Block container for HRProjection in a MultiField setting.

source
GridapROMs.RBSteady.BlockOperator — Type
struct BlockOperator{A<:Tuple{Vararg{AssembleOperator}}} <: AssembleOperator
  op::A
end

Per-field AssembleOperator, for a MultiFieldFESpace. E.g., a Stokes-like energy norm (H1 for velocity, L2 for pressure) is BlockOperator((H1(),L2())); a divergence coupling for two dual fields is BlockOperator((DivCoupling(),DivCoupling())).

source
GridapROMs.RBSteady.BlockProjection — Type
struct BlockProjection{A<:Projection,N} <: Projection
  array::Array{A,N}
end

Block container for Projection of type A in a MultiField setting. This type is conceived similarly to ArrayBlock in Gridap. Every block is always populated.

source
GridapROMs.RBSteady.DEIMHyperReduction — Type
struct DEIMHyperReduction{A} <: HyperReduction{A}
  reduction::Reduction{A,EuclideanNorm}
end

Hyper-reduction by means of the (matrix) discrete empirical interpolation method: residuals/Jacobians are compressed with reduction, and interpolated at entries selected with a greedy algorithm (see DEIM)

source
GridapROMs.RBSteady.DiagnosticsContribution — Type
struct DiagnosticsContribution{A,B,C}
  fecache::A
  coeff::B
  hypred::C
end

Diagnostic counterpart of HRParamArray. Unlike HRParamArray, which accumulates hyper-reduced contributions across triangulations into a single reduced-dimension array, DiagnosticsContribution keeps one per-triangulation entry in hypred::C, where C is either an ArrayContribution (steady) or a ArrayContributionTuple (transient Jacobians). Each entry stores the reconstruction of the HR operator contribution from that triangulation, expanded back to a high-dimensional (FE or RB) space so that it can be directly compared with full-order snapshots.

source
GridapROMs.RBSteady.DivCoupling — Type
struct DivCoupling <: CouplingStyle end

Divergence coupling between a (vector-valued) primal field v and a dual field p, i.e. the bilinear form ∫(p*(∇⋅v))dΩ.

source
GridapROMs.RBSteady.DofMapCore — Type
struct DofMapCore{T,A<:AbstractArray{T,3},B<:AbstractArray} <: AbstractTTCore{T,3}
  core::A
  dof_map::B
end

Represents a tensor train core core reindexed by means of an index mapping dof_map

source
GridapROMs.RBSteady.EnergyNorm — Type
struct EnergyNorm{F<:Function} <: NormStyle
  form::F
end

Norm induced by a user-defined bilinear form form(u,v), e.g. EnergyNorm((u,v) -> ∫(∇(v)⋅∇(u))dΩ)

source
GridapROMs.RBSteady.GalerkinProjectable — Type
struct GalerkinProjectable{A<:AbstractArray} <: Projection
  array::A
end

Wraps an array (e.g. a snapshot of a residual or a Jacobian) so that it can be Galerkin-projected as if it were a basis

source
GridapROMs.RBSteady.GenericDomain — Type
struct GenericDomain{A,B} <: IntegrationDomain
  cells::Vector{Int32}
  cell_idofs::A
  dofs::B
end

Integration domain for the hyper-reduction of a residual (vector-valued form) or a Jacobian (matrix-valued form).

  • cells: sorted list of cell indices (local to the triangulation) that contain at least one interpolation DOF.
  • cell_idofs: lazy map over cells; for the vector case, cell_idofs[ic][j] is the 1-based index into dofs of the j-th DOF of cell cells[ic], or 0 if that DOF is not an interpolation DOF. For the matrix case, cell_idofs[ic] is a flat (column-major) array of length ncellrows * ncellcols; position r + (c-1)*ncellrows stores the EIM pair index, or 0 if that (row,col) entry is not an interpolation pair.
  • dofs: for the vector case, a vector of global DOF indices selected as interpolation DOFs by EIM/DEIM. For the matrix case, a tuple (rows, cols) of such vectors.
source
GridapROMs.RBSteady.GenericProjection — Type
struct GenericProjection{A<:AbstractArray,B<:AbstractArray} <: Projection
  array::A
  dof_map::B
end

Projection stemming from a truncated proper orthogonal decomposition tpod, or from a tensor train SVD ttsvd (in which case array is a vector of tensor train cores rather than a basis matrix, see TTSVDProjection).

source
GridapROMs.RBSteady.GreedyInterpolation — Type
struct GreedyInterpolation{A,B<:IntegrationDomain} <: Interpolation
  interpolation::A
  domain::B
end

Interpolation of DEIM and S-OPT hyper-reductions: the factorized interpolation matrix, and the reduced integration domain

source
GridapROMs.RBSteady.HRParamArray — Type
struct HRParamArray{T,N,A,B,C<:ParamArray{T,N}} <: ParamArray{T,N}
  fecache::A
  coeff::B
  hypred::C
end

Hyper-reduced residual or Jacobian. Stores the FE quantities integrated on the reduced integration domains (fecache), the coefficients of the affine expansion (coeff), and the resulting reduced array (hypred), which defines the array interface

source
GridapROMs.RBSteady.HRProjection — Type
abstract type HRProjection{A<:HyperReduction,B<:Projection} <: Projection end

Subtype of a Projection dedicated to the output of a hyper-reduction procedure applied on residual/jacobians of a differential problem. This procedure can be summarized in the following steps:

  1. compute a snapshots tensor T
  2. construct a Projection Φ by running the function reduction on T
  3. implement an interpolation strategy

There are two types of interpolation strategies:

  1. Empirical interpolation of the Projection Φ
  2. Radial basis interpolation over the parameter space

We recall that a RB method requires the (Petrov-)Galerkin projection of the operators (residuals/Jacobians) on the reduced subspace spanned by Φ:

  • for residuals: Φrb = test_basisᵀ Φ
  • for Jacobians: Φrb = test_basisᵀ Φ trial_basis

The output of this operation is a ReducedProjection. Therefore, a HRProjection is completely characterized by the couple (Φrb,i), where i indicates the chosen interpolation strategy.

Subtypes:

source
GridapROMs.RBSteady.HyperReduction — Method
HyperReduction(args...;compression=:global,hypred_strategy=:deim,kwargs...) -> HyperReduction

Builds a steady hyper-reduction strategy. args and kwargs define the underlying Reduction (e.g. a tolerance and the number of snapshots nparams), or args is the state reduction, whose tolerance (or rank) is inherited. Supported values of hypred_strategy:

When compression=:local, the output is a LocalHyperReduction

source
GridapROMs.RBSteady.LocalHRProjection — Type
struct LocalHRProjection{A<:HyperReduction,B<:Projection,T<:HRProjection{A,B},K<:KmeansResult} <: HRProjection{A,B}
  reductions::Matrix{T}
  k::NTuple{2,K}
end

Local hyper-reduction: the hyper-reduction computed on each cluster of residual (or Jacobian) snapshots, projected onto each local reduced subspace. Indexed by (hyper-reduction cluster, reduced subspace cluster)

source
GridapROMs.RBSteady.LocalInterpolation — Type
struct LocalInterpolation <: Interpolation
  interp::AbstractMatrix{<:Interpolation}
  k::NTuple{2,KmeansResult}
end

Interpolations of a local hyper-reduction, indexed by (hyper-reduction cluster, reduced subspace cluster)

source
GridapROMs.RBSteady.LocalProjection — Type
struct LocalProjection{A<:Projection,N,K<:KmeansResult} <: Projection
  projections::Array{A,N}
  k::NTuple{N,K}
end

Collection of projections, one per cluster of the parameter space, together with the k-means clustering(s) k that define the clusters. See get_local

source
GridapROMs.RBSteady.LocalReduction — Type
struct LocalReduction{A,B,R<:Reduction{A,B}} <: Reduction{A,B}
  reduction::R
  ncentroids::Int
end

Local version of reduction: the snapshots are clustered in ncentroids clusters of the parameter space with k-means, and each cluster is reduced separately. Obtained with the keyword compression=:local in Reduction and HyperReduction

source
GridapROMs.RBSteady.NitscheH1 — Type
struct NitscheH1 <: NormStyle
  trian::Triangulation
  γ::Float64
  h::Float64
end

H1 norm with an added Nitsche boundary penalty term, for spaces with weakly imposed Dirichlet BCs (e.g. on a cut/aggregated embedded mesh):

∫(v⋅u)dΩ + ∫(∇(v)⊙∇(u))dΩ + ∫((γ/h)*v⋅u)dΓ

where dΓ is built from trian.

source
GridapROMs.RBSteady.NoHyperReduction — Type
struct NoHyperReduction <: TrivialHyperReduction end

No hyper-reduction: residuals and Jacobians are assembled on the whole domain online, and then projected onto the reduced subspaces

source
GridapROMs.RBSteady.NormedProjection — Type
struct NormedProjection{A<:Projection,B<:MatrixOrTensor} <: Projection
  projection::A
  norm_matrix::B
end

Represents a Projection projection spanning a space equipped with an inner product represented by the quantity norm_matrix

source
GridapROMs.RBSteady.PODReduction — Type
struct PODReduction{A,B} <: DirectReduction{A,B}
  red_style::A
  norm_style::B
  nparams::Int
end

Reduction by means of a truncated POD. The field nparams indicates the number of parameters selected for the computation of the snapshots

source
GridapROMs.RBSteady.PSVDRank — Type
struct PSVDRank <: ReductionStyle
  opts::LRAOptions
end

Struct employed when the chosen reduction algorithm is a probabilistic POD that leverages the package LowRankApprox. The field opts specifies the options needed to run the randomized POD

source
GridapROMs.RBSteady.RBDiagnostics — Type
struct RBDiagnostics
  offline::Dict{String,Any}
  online::Dict{String,Any}
end

Container for ROM diagnostics, each phase stored as a Dict{String,Any}.

Every dict always contains a "tols" key mapping to a Vector{Float64} of tolerances sorted in decreasing order. All other keys map to a Vector of the same length, with one entry per tolerance.

Offline (structural) keys are derived by flattening the offline_diagnostics named tuple:

  • "state dim", "state factor" — basis size and compression factor
  • "rhs dim" — Vector{Tuple}, one K-tuple per tolerance (one integer per triangulation)
  • "lhs dim" — same for the Jacobian contributions

Online keys:

  • "projection_error" — Vector{Float64}
  • "hr_error_res" — Vector{Tuple}, one K-tuple per tolerance
  • "hr_error_jac" — Vector{Tuple}, one K-tuple per tolerance
source
GridapROMs.RBSteady.RBFHyperReduction — Type
struct RBFHyperReduction{A} <: HyperReduction{A}
  reduction::Reduction{A,EuclideanNorm}
  strategy::AbstractRadialBasis
end

Non-intrusive hyper-reduction: residuals/Jacobians are compressed with reduction, and the coefficients of the expansion are interpolated in the parameter space with radial basis functions strategy (by default, polyharmonic splines). No integration is performed online

source
GridapROMs.RBSteady.RBOperator — Type
struct RBOperator{O,A,B} <: ROMOperator{O}
  op::ParamOperator{O}
  trial::RBSpace
  test::RBSpace
  lhs::A
  rhs::B
end

Fields:

  • op: underlying high dimensional FE operator
  • trial: reduced trial space
  • test: reduced test space
  • lhs: hyper-reduced left hand side
  • rhs: hyper-reduced right hand side
source
GridapROMs.RBSteady.RBParamVector — Type
struct RBParamVector{T,A<:ParamVector{T},B} <: ParamArray{T,1}
  data::A
  fe_data::B
end

Parametric vector obtained by applying a Projection on a high-dimensional parametric FE vector fe_data, which is stored (but mostly unused) for conveniency

source
GridapROMs.RBSteady.RBSolver — Type
struct RBSolver{A,B,C,D,E,F} <: ROMSolver
  fesolver::A
  context::B
  state_reduction::C
  residual_reduction::D
  jacobian_reduction::E
  tracker::F
end

Wrapper around a FE solver (e.g. NonlinearSolver or ODESolver in Gridap) with additional information on the reduced basis (RB) method employed to solve a given problem dependent on a set of parameters. A RB method is a projection-based reduced order model where

  1. a suitable subspace of a FESpace is sought, of dimension n << Nₕ
  2. a matrix-based discrete empirical interpolation method (e.g. DEIM) is performed

to approximate the manifold of the parametric residuals and jacobians

  1. the EIM approximations are compressed with (Petrov-)Galerkin projections

onto the subspace

  1. for every desired choice of parameters, numerical integration is performed, and

the resulting n × n system of equations is cheaply solved

Fields:

  • fesolver: solver used to compute the full-order (FE) solutions/snapshots

  • context: either GlobalContext (a GlobalRBSolver) or LocalContext (a LocalRBSolver, used for cluster-local ROMs)

  • state_reduction: Reduction strategy compressing state snapshots into the reduced subspace (e.g. tol/nparams for TPOD or TT-SVD live here)

  • residual_reduction, jacobian_reduction: HyperReduction strategies hyper-reducing the residual/Jacobian, respectively; the number of snapshots used to train each is set through the nparams_res/nparams_jac keywords of the constructor below

  • tracker: a RBPerformanceTracker accumulating timing/memory/error information across the offline (subspace, jacobian and residual hyper-reduction) and online (reduced solve) phases

    RBSolver(fesolver,reduction::Reduction;nparamsres=20,nparamsjac=20,hypredstrategy=:deim,verbose=true) RBSolver(fesolver::ODESolver,reduction::Reduction;nparamsres=20,nparamsjacs=(20,20),hypredstrategy=:deim,verbose=true) RBSolver(fesolver,style::ReductionStyle,args...;nparams=100,kwargs...) RBSolver(fesolver,statereduction,residualreduction,jacobian_reduction)

The most convenient way to build a RBSolver: reduction (or style, from which a Reduction is built using nparams snapshots) governs the state subspace, while nparams_res/nparams_jac set the number of snapshots used for hyper-reduction (nparams_jacs, one per Jacobian, in transient problems), and hypred_strategy the hyper-reduction method (see HyperReduction). The hyper-reductions inherit the tolerance (or rank) of reduction; to set them independently, pass them explicitly, as in the last constructor. verbose controls whether solver.tracker prints cost information as it is populated during the offline/online phases (through set_subspace_tracker!, set_jacobian_tracker!, set_residual_tracker! and update_rom_tracker!); the (relative) error of an online solve against a full-order reference is instead computed on demand with rom_performance.

source
GridapROMs.RBSteady.ROMOperator — Type
abstract type ROMOperator{O} <: ParamOperator{O} end

Type representing reduced algebraic operators used within a reduced order modelling framework in steady applications. A ROMOperator should contain the following information:

Subtypes:

source
GridapROMs.RBSteady.Reduction — Method
Reduction(tolrank,norm::AssembleOperator=EuclideanNorm();nparams=50,compression=:global,ncentroids=10) -> Reduction
Reduction(coupling::CouplingStyle,tolrank,norm;kwargs...) -> SupremizerReduction

Builds the reduction of nparams snapshots, orthonormal in norm:

  • a truncated POD (PODReduction) when tolrank is a tolerance (Float64) or a rank (Int)
  • a TT-SVD (TTSVDReduction) when tolrank is a vector of tolerances (or ranks), one per dimension of the snapshots
  • a LocalReduction with ncentroids clusters when compression=:local
  • a SupremizerReduction when the first argument is a coupling
source
GridapROMs.RBSteady.SparseCoreCSC — Type
struct SparseCoreCSC{T,Ti} <: SparseCore{T,3}
  array::Array{T,3}
  sparsity::SparsityCSC{T,Ti}
end

Tensor train cores for sparse matrices in CSC format

source
GridapROMs.RBSteady.SparseCoreCSC4D — Type
struct SparseCoreCSC4D{T,Ti} <: SparseCore{T,4}
  core::SparseCoreCSC{T,Ti}
  sparse_indexes::Vector{CartesianIndex{2}}
end

Tensor train cores for sparse matrices in CSC format, reshaped as 4D arrays

source
GridapROMs.RBSteady.SupremizerReduction — Type
struct SupremizerReduction{A,B,R<:Reduction{A,B}} <: Reduction{A,B}
  reduction::R
  coupling::AssembleOperator
  supr_tol::Float64
end

Wrapper for reduction methods reduction that require an additional step of stabilization, by means of a supremizer enrichment. Check this for more details in a steady setting, and this for more details in a transient setting. The fields coupling and supr_tol (which is only needed only in transient applications) are respectively the supremizing operator (a CouplingStyle, e.g. DivCoupling, or a BlockOperator of these) and the tolerance involved in the enrichment. For a saddle point problem with a Jacobian of the form

[ A Bᵀ B 0 ]

this operator is given by the bilinear form representing the matrix Bᵀ.

source
GridapROMs.RBSteady.TTSVDRanks — Type
struct TTSVDRanks <: ReductionStyle
  style::Vector{<:ReductionStyle}
end

Struct employed when the chosen reduction algorithm is a TTSVD, with reduction algorithm at each step specified in the vector of reduction styles style. Check this reference for more details on the TTSVD algorithm

source
GridapROMs.RBSteady.TTSVDReduction — Type
struct TTSVDReduction{B} <: DirectReduction{TTSVDRanks,B}
  red_style::TTSVDRanks
  norm_style::B
  nparams::Int
end

Reduction by means of a TTSVD. The field nparams indicates the number of parameters selected for the computation of the snapshots

source
GridapROMs.RBSteady.DEIM — Method
DEIM(a::Projection) -> (AbstractVector,AbstractMatrix)

Computes the EIM of a. The outputs are:

  • a vector of integers i, corresponding to a list of interpolation row indices
  • a matrix Φi = view(Φ,i), where Φ = get_basis(a). This quantity represents the restricted basis on the set of interpolation rows i
source
GridapROMs.RBSteady.SOPT — Method
SOPT(a::Projection) -> (AbstractVector,AbstractMatrix)

Computes the S-OPT hyper-reduction of a. Check this reference for more information

source
GridapROMs.RBSteady.change_operator — Method
change_operator(op::ROMOperator,op′::ParamOperator) -> ROMOperator

Rebinds op's hyper-reduced lhs/rhs to a new underlying FE operator op′ (e.g. the same problem at a different geometry, in a moving-domain setting), adapting their triangulations to op′'s. When op′'s domains coincide with op's own (the common, non-moving-domain case), change_domains is a no-op and this just rebinds op.op to op′

source
GridapROMs.RBSteady.compute_ncentroids — Method
compute_ncentroids(r::AbstractRealisation;init=min(4,num_params(r)),iend=min(16,num_params(r)÷2)) -> Int

Number of clusters, between init and iend, suggested by the elbow criterion on the variance of k-means clusterings of the parameters in r

source
GridapROMs.RBSteady.contraction — Method
contraction(Φₗₖ::AbstractArray{T,3},Aₖ::AbstractArray{T,3}) -> AbstractArray{T,4}
contraction(Φₗₖ::AbstractArray{T,3},Aₖ::AbstractArray{T,3},Φᵣₖ::AbstractArray{T,3}) -> AbstractArray{T,6}

Contraction of tensor train cores, as a result of a (Petrov-)Galerkin projection. The contraction of Aₖ by Φₗₖ is the left-contraction of a TT core Aₖ by a (left, test) TT core Φₗₖ, whereas the contraction of Aₖ by Φᵣₖ is the right-contraction of a TT core Aₖ by a (right, trial) TT core Φᵣₖ. The dimension of the output of a contraction involving N factors is: 3N - N = 2N.

source
GridapROMs.RBSteady.contraction — Method
contraction(basis::AbstractArray,coefficient::AbstractArray) -> AbstractArray

Multiplies a reduced basis basis by a set of reduced coeffiecients coefficient. It acts as a generalized linear combination, since basis might have a dimension higher than 2.

source
GridapROMs.RBSteady.cores2basis — Method
cores2basis(cores::AbstractArray{T,3}...) -> AbstractMatrix

Returns a basis in a matrix format from a list of tensor train cores cores. When also supplying the indexing strategy dof_map, the result is reindexed accordingly

source
GridapROMs.RBSteady.enrich! — Method
enrich!(
  red::SupremizerReduction,
  a::BlockProjection,
  norm_matrix,
  supr_matrix) -> Nothing

In-place augmentation of the primal block of a BlockProjection a. This function has the purpose of stabilizing the reduced equations stemming from a saddle point problem

source
GridapROMs.RBSteady.galerkin_projection — Method
galerkin_projection(Φₗ,A) -> Any
galerkin_projection(Φₗ,A,Φᵣ) -> Any

Galerkin projection of A on the subspaces specified by a (left, test) subspace Φₗ (row projection) and a (right, trial) subspace Φᵣ (column projection)

source
GridapROMs.RBSteady.galerkin_projection — Method
galerkin_projection(a::Projection,b::Projection) -> ReducedProjection
galerkin_projection(a::Projection,b::Projection,c::Projection,args...) -> ReducedProjection

(Petrov) Galerkin projection of a projection map b onto the subspace a (row projection) and, if applicable, onto the subspace c (column projection)

source
GridapROMs.RBSteady.get_local — Method
get_local(a,μ::AbstractVector)
get_local(a,r::Realisation)

Local quantity (projection, reduced space, hyper-reduction or reduced operator) of a relative to the cluster of the parameter μ, i.e. the cluster with the closest centroid. For a realisation, one per parameter

source
GridapROMs.RBSteady.get_reduced_solver — Method
get_reduced_solver(s) -> NonlinearSolver

Solver of the reduced problems, derived from the FE solver of s: a dense LU solver for linear problems, a Newton method for nonlinear ones, and the same time-marching scheme for transient ones

source
GridapROMs.RBSteady.get_rowcols_to_cells — Method
get_rowcols_to_cells(
  cell_row_ids::AbstractArray,
  cell_col_ids::AbstractArray,
  rows::AbstractVector,
  cols::AbstractVector) -> AbstractVector

Returns the list of cells containing the row ids rows and the col ids cols

source
GridapROMs.RBSteady.gram_schmidt — Method
gram_schmidt(A::AbstractMatrix;kwargs...) -> AbstractMatrix
gram_schmidt(A::AbstractMatrix,X::Union{AbstractMatrix,Factorization};kwargs...) -> AbstractMatrix

Gram-Schmidt orthogonalization for a matrix A under a Euclidean norm. A (positive definite) sparse matrix X representing an inner product on the row space of A can be provided to make the result orthogonal under a different norm

source
GridapROMs.RBSteady.gram_solver — Method
gram_solver(X;kwargs...)

Solver for the norm (Gram) matrix X: a Cholesky factorization in serial, a preconditioned conjugate gradient in distributed settings

source
GridapROMs.RBSteady.h1_norm — Function
h1_norm(U::FESpace,V::FESpace) -> AbstractMatrix

Assembles the matrix of H1 on the spaces U, V. On TProductFESpaces, the output is a rank tensor of 1D matrices

source
GridapROMs.RBSteady.hr_error — Method
hr_error(solver,op,res,jac,μ) -> (Tuple,Tuple)

Compute per-triangulation hyper-reduction errors for residuals and Jacobians.

For each triangulation in the HR contributions:

  • Residuals: the HR reconstruction Ψ·Φrb·coeff (in FE space) is compared with the full-order snapshot vector using the Euclidean norm.
  • Jacobians: the HR reconstruction Φrb·coeff (in RB space) is compared with the Galerkin projection of the FOM Jacobian onto the RB subspace using the Frobenius norm; this equals the full-space Frobenius error when the RB bases are orthonormal.

Returns (hr_error_res,hr_error_jac) where each is a Tuple with one Float64 per triangulation (mean relative error over parameters).

source
GridapROMs.RBSteady.inv_project! — Method
inv_project!(x::AbstractArray,a::Projection,x̂::AbstractArray) -> Nothing

In-place recasting of a low-dimensional object x̂ the high-dimensional space in which a is immersed

source
GridapROMs.RBSteady.inv_project — Method
inv_project(a::Projection,x::AbstractArray) -> AbstractArray

Recasts a low-dimensional object x onto the high-dimensional space in which a is immersed

source
GridapROMs.RBSteady.jacobian_contribution — Method
jacobian_contribution(solver::RBSolver,op::ParamOperator,s::AbstractSnapshots) -> Contribution

Jacobian snapshots of op used for hyper-reduction, evaluated at the snapshots s, one per Jacobian triangulation

source
GridapROMs.RBSteady.l2_norm — Function
l2_norm(U::FESpace,V::FESpace) -> AbstractMatrix

Assembles the matrix of L2 on the spaces U, V. On TProductFESpaces, the output is a rank tensor of 1D matrices

source
GridapROMs.RBSteady.load_operator — Method
load_operator(dir,feop::ParamOperator;kwargs...) -> ROMOperator

Given a FE operator feop, load its reduced counterpart stored in the directory dir. Throws an error if the reduced operator has not been previously saved to file

source
GridapROMs.RBSteady.load_problem_snapshots — Method
load_problem_snapshots(dir,rbsolver,feop,args...;nparams=:all,label=ONLINE_LABEL,kwargs...)
  -> (AbstractSnapshots,ArrayContribution,ArrayContribution)

Loads the solution snapshots (cached to dir) and computes the residual/Jacobian Contributions used for diagnostics on the fly (via residual_contribution/ jacobian_contribution), at the subset of parameters used to train the residual/Jacobian hyper-reduction

source
GridapROMs.RBSteady.load_snapshots — Method
load_snapshots(dir;label="") -> AbstractSnapshots

Load the snapshots at the directory dir. Throws an error if the snapshots have not been previously saved to file

source
GridapROMs.RBSteady.orth_complement! — Method
orth_complement!(v::AbstractVector,basis::AbstractMatrix,args...) -> Nothing

In-place orthogonal complement of v on the column space of basis. When a symmetric, positive definite matrix X is provided as an argument, the output is X-orthogonal, otherwise it is ℓ²-orthogonal

source
GridapROMs.RBSteady.orth_projection — Method
orth_projection(v::AbstractVector, basis::AbstractMatrix, args...) -> AbstractVector

Orthogonal projection of v on the column space of basis. When a symmetric, positive definite matrix X is provided as an argument, the output is X-orthogonal, otherwise it is ℓ²-orthogonal

source
GridapROMs.RBSteady.project! — Method
project!(x̂::AbstractArray,a::Projection,x::AbstractArray,args...) -> Nothing

In-place projection of a high-dimensional object x onto the subspace represented by a

source
GridapROMs.RBSteady.project — Method
project(a::Projection,x::AbstractArray,args...) -> AbstractArray

Projects a high-dimensional object x onto the subspace represented by a

source
GridapROMs.RBSteady.projection — Method
projection(red::Reduction,s::AbstractArray) -> Projection
projection(red::Reduction,s::AbstractArray,X::MatrixOrTensor) -> Projection

Constructs a Projection from a collection of snapshots s. An inner product represented by the quantity X can be provided, in which case the resulting Projection will be X-orthogonal

source
GridapROMs.RBSteady.reduced_jacobian — Method
reduced_jacobian(
  solver::RBSolver,
  op::ParamOperator,
  red_trial::RBSpace,
  red_test::RBSpace,
  s::AbstractSnapshots
  ) -> Union{AffineContribution,AffineContributionTuple}

Reduces the Jacobian contained in op via hyper-reduction. This function first builds the Jacobian snapshots, which are then reduced according to the strategy reduced_jacobian specified in the reduced solver solver. In transient applications, the output is a tuple of length equal to the number of Jacobians(i.e., equal to the order of the ODE plus one)

source
GridapROMs.RBSteady.reduced_operator — Method
reduced_operator(solver::RBSolver,feop::ParamOperator,args...;kwargs...) -> ROMOperator
reduced_operator(solver::RBSolver,feop::ParamOperator,s::AbstractSnapshots) -> ROMOperator
reduced_operator(dir::String,solver::RBSolver,feop::ParamOperator,args...;kwargs...) -> ROMOperator

Offline phase: computes the reduced operator of the FE operator feop, i.e. the reduced spaces (reduced_spaces) and the hyper-reduced residual and Jacobian (reduced_weak_form). The snapshots s are computed with solution_snapshots if not provided (args and kwargs are passed on to it). When dir is provided, snapshots and reduced operator are saved there

source
GridapROMs.RBSteady.reduced_residual — Method
reduced_residual(
  solver::RBSolver,
  op::ParamOperator,
  red_test::RBSpace,
  s::AbstractSnapshots
  ) -> AffineContribution

Reduces the residual contained in op via hyper-reduction. This function first builds the residual snapshots, which are then reduced according to the strategy residual_reduction specified in the reduced solver solver

source
GridapROMs.RBSteady.reduced_spaces — Method
reduced_spaces(solver::RBSolver,feop::ParamOperator,s::AbstractSnapshots
  ) -> (RBSpace, RBSpace)

Computes the subspace of the test, trial FESpaces contained in the FE operator feop by compressing the snapshots s

source
GridapROMs.RBSteady.reduced_weak_form — Method
reduced_weak_form(
  solver::RBSolver,
  op::ParamOperator,
  red_trial::RBSpace,
  red_test::RBSpace,
  s::AbstractSnapshots
  ) -> (AffineContribution,Union{AffineContribution,AffineContributionTuple})

Reduces the residual/Jacobian contained in op via hyper-reduction. Check the functions reduced_residual and reduced_jacobian for more details

source
GridapROMs.RBSteady.reduction — Method
reduction(red::Reduction,A::AbstractArray,args...) -> AbstractArray
reduction(red::Reduction,A::AbstractArray,X::AbstractMatrix) -> AbstractArray

Given an array (of snapshots) A, returns a reduced basis obtained by means of the reduction strategy red

source
GridapROMs.RBSteady.residual_contribution — Method
residual_contribution(solver::RBSolver,op::ParamOperator,s::AbstractSnapshots) -> Contribution

Residual snapshots of op used for hyper-reduction, evaluated at the snapshots s, one per residual triangulation

source
GridapROMs.RBSteady.rom_diagnostics — Method
rom_diagnostics(dir,rbsolver,feop,args...;label=ONLINE_LABEL,kwargs...)
    -> RBDiagnostics

Scans every immediate sub-directory of dir whose name parses as a Float64 tolerance, loads the corresponding RB operator, and computes both offline (structural) and online (accuracy) diagnostics using the snapshots stored in dir under label.

Returns an RBDiagnostics object whose offline and online fields are Dict{String,Any} sorted by decreasing tolerance (coarsest model first), with all scalar fields flattened into named Vector entries.

source
GridapROMs.RBSteady.rom_performance — Method
rom_performance(
  solver::RBSolver,
  op::ROMOperator,
  x::AbstractSnapshots,
  x̂::AbstractSnapshots
  ) -> RBPerformanceTracker

Updates solver.tracker.error from the (relative) error between the full-order snapshots fesnaps and the reduced approximation x̂, and returns solver.tracker

source
GridapROMs.RBSteady.sequential_product — Method
sequential_product(a::AbstractArray,b::AbstractArray...) -> AbstractArray

This function sequentially multiplies the results of several (sequential as well) calls to contraction

source
GridapROMs.RBSteady.solution_snapshots — Method
solution_snapshots(solver::RBSolver,feop::ParamOperator[,r::AbstractRealisation],args...;nparams) -> AbstractSnapshots
solution_snapshots(solver::RBSolver,rbop::ROMOperator,r::AbstractRealisation,args...) -> AbstractSnapshots
solution_snapshots(solver::NonlinearSolver,feop::ParamOperator,r::Realisation) -> Snapshots
solution_snapshots(solver::ODESolver,feop::ODEParamOperator,r::TransientRealisation,u0) -> TransientSnapshots

Solves the FE problem feop (or the reduced problem rbop) for every parameter in r, and returns the solutions as snapshots. Given an RBSolver, the cost of the solves is recorded in its tracker, and r defaults to a realisation of the number of parameters needed offline. In transient problems, the initial condition u0, a function of the parameter, must be provided

source
GridapROMs.RBSteady.supremizers — Method
supremizers(ns,C::AbstractMatrix,ϕ::AbstractMatrix) -> AbstractMatrix

Supremizers X⁻¹ C ϕ of the dual basis ϕ, where C is the coupling matrix and ns a solver for the primal norm matrix X (see gram_solver)

source
GridapROMs.RBSteady.symmetrise! — Method
symmetrise!(A::AbstractMatrix;atol=1e-12,rtol=1e-8) -> Bool

Replaces A with its symmetric part, if A is symmetric up to the given tolerances. Returns whether this is the case

source
GridapROMs.RBSteady.tpod — Method
tpod(red_style::ReductionStyle,A::AbstractMatrix) -> AbstractMatrix
tpod(red_style::ReductionStyle,A::AbstractMatrix,X::MatrixOrTensor) -> AbstractMatrix

Truncated proper orthogonal decomposition of A. When provided, X is a (symmetric, positive definite) norm matrix with respect to which the output is made orthogonal. If X is not provided, the output is orthogonal with respect to the euclidean norm

source
GridapROMs.RBSteady.ttsvd — Method
ttsvd(red_style::TTSVDRanks,A::AbstractArray) -> AbstractVector{<:AbstractArray}
ttsvd(red_style::TTSVDRanks,A::AbstractArray,X::AbstractRankTensor) -> AbstractVector{<:AbstractArray}

Tensor train SVD of A. When provided, X is a norm tensor (representing a symmetric, positive definite matrix) with respect to which the output is made orthogonal. Note: if ndims(A) = N, the length of the ouptput is N-1, since we are not interested in reducing the axis of the parameters. Check this reference for more details

source
GridapROMs.RBSteady.unbalanced_contractions — Method
unbalanced_contractions(cores_left,cores,cores_right) -> Vector{<:AbstractArray}

Contractions of the TT cores with cores_left and cores_right, which may have fewer cores than cores: unassigned entries are skipped

source
GridapROMs.RBSteady.union_bases — Method
union_bases(a::Projection,b::Projection,args...) -> Projection

Computes the projection corresponding to the union of a and b. In essence this operation performs as

gram_schmidt(union(get_basis(a),get_basis(b)))

source