GridapROMs.RBSteady
GridapROMs.RBSteady — Module
module RBSteadyReduced-basis infrastructure for steady parametric PDEs: offline reduction and hyper-reduction, and online solution of the reduced problems. Main building blocks:
- Reduction methods (
ReductionMethods.jl) —Reduction,PODReduction,TTSVDReduction,LocalReduction,SupremizerReduction, and the hyper-reductionsDEIMHyperReduction,SOPTHyperReduction,RBFHyperReduction,NoHyperReduction,AffineHyperReduction. - Norms and couplings (
EnergyNorms.jl) —L2,H1,EnergyNorm,DivCoupling,BlockNorm. - Bases construction (
BasesConstruction.jl) —tpod,ttsvd,gram_schmidt,orth_projection. - Projections and RB spaces (
Projections.jl,RBSpaces.jl) —Projection,RBSpace,reduced_spaces,project,inv_project,galerkin_projection. - Hyper-reduction (
HyperReductions.jl,IntegrationDomains.jl,Interpolations.jl) —HRProjection,DEIM,SOPT,reduced_weak_form. - Local ROMs (
LocalProjections.jl,LocalHyperReductions.jl) —LocalProjection,get_local,compute_ncentroids. - Reduced operators and solvers (
RBOperators.jl,RBSolvers.jl) —RBSolver,RBOperator,reduced_operator,solution_snapshots. - Tensor-train linear algebra (
TTCores.jl,TTLinearAlgebra.jl) —contraction,sequential_product,cores2basis. - Post-processing and I/O (
PostProcess.jl,Diagnostics.jl) —rom_performance,rom_diagnostics,load_operator,load_snapshots.
The RBTransient module extends all of the above to the time-dependent setting.
GridapROMs.RBSteady.CONTRIBUTIONS_LABEL — Constant
CONTRIBUTIONS_LABELLabel of the files storing contributions
GridapROMs.RBSteady.JACOBIANS_LABEL — Constant
JACOBIANS_LABELLabel of the files storing Jacobian snapshots
GridapROMs.RBSteady.LHS_LABEL — Constant
LHS_LABELLabel of the files storing hyper-reduced Jacobians
GridapROMs.RBSteady.LINEAR_LABEL — Constant
LINEAR_LABELLabel of the files storing linear parts of a Bundle
GridapROMs.RBSteady.NONLINEAR_LABEL — Constant
NONLINEAR_LABELLabel of the files storing nonlinear parts of a Bundle
GridapROMs.RBSteady.OFFLINE_LABEL — Constant
OFFLINE_LABELLabel of the files storing offline quantities
GridapROMs.RBSteady.ONLINE_LABEL — Constant
ONLINE_LABELLabel of the files storing online quantities
GridapROMs.RBSteady.PROJECTION_LABEL — Constant
PROJECTION_LABELLabel of the files storing projections
GridapROMs.RBSteady.RESIDUALS_LABEL — Constant
RESIDUALS_LABELLabel of the files storing residual snapshots
GridapROMs.RBSteady.RESULTS_LABEL — Constant
RESULTS_LABELLabel of the files storing results of rom_performance
GridapROMs.RBSteady.RHS_LABEL — Constant
RHS_LABELLabel of the files storing hyper-reduced residuals
GridapROMs.RBSteady.SNAPSHOTS_LABEL — Constant
SNAPSHOTS_LABELLabel of the files storing snapshots
GridapROMs.RBSteady.STATISTICS_LABEL — Constant
STATISTICS_LABELLabel of the files storing performance statistics
GridapROMs.RBSteady.TEST_LABEL — Constant
TEST_LABELLabel of the files storing reduced test spaces
GridapROMs.RBSteady.TRIAL_LABEL — Constant
TRIAL_LABELLabel of the files storing reduced trial spaces
GridapROMs.RBSteady.AbstractTTCore — Type
abstract type AbstractTTCore{T,N} <: AbstractArray{T,N} endType for nonstandard representations of tensor train cores.
Subtypes:
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
endNot implemented yet. Will serve as a parameter-adaptivity greedy reduction algorithm
GridapROMs.RBSteady.AffineContribution — Type
const AffineContribution{V<:HRProjection} = Contribution{V}Contribution whose field values are Projections
GridapROMs.RBSteady.AffineHRContribution — Type
const AffineHRContribution = AffineContribution{<:AffineHRProjection}GridapROMs.RBSteady.AffineHRProjection — Type
const AffineHRProjection{A<:Projection} = HRProjection{AffineHyperReduction,A}GridapROMs.RBSteady.AffineHyperReduction — Type
struct AffineHyperReduction <: TrivialHyperReduction endResiduals and Jacobians are computed for a single parameter and projected offline; online, the projections are reused. Exact for μ-independent residuals and Jacobians
GridapROMs.RBSteady.AssembleOperator — Type
abstract type AssembleOperator endRecipe for a matrix assembled from the trial and test spaces of a FE operator: either a norm (NormStyle) or a coupling (CouplingStyle), possibly per field (BlockOperator). See assemble_operator.
GridapROMs.RBSteady.BlockCoupling — Type
const BlockCoupling = BlockOperatorGridapROMs.RBSteady.BlockHRProjection — Type
struct BlockHRProjection{A<:HyperReduction,B<:Projection,T<:HRProjection{A,B},N} <: HRProjection{A,BlockProjection{T,N}}
array::Array{T,N}
endBlock container for HRProjection in a MultiField setting.
GridapROMs.RBSteady.BlockInterpolation — Type
struct BlockInterpolation{I<:Interpolation,N} <: Interpolation
interp::Array{I,N}
endInterpolations of a multi-field problem, one per block
GridapROMs.RBSteady.BlockNorm — Type
const BlockNorm = BlockOperatorGridapROMs.RBSteady.BlockOperator — Type
struct BlockOperator{A<:Tuple{Vararg{AssembleOperator}}} <: AssembleOperator
op::A
endPer-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())).
GridapROMs.RBSteady.BlockProjection — Type
struct BlockProjection{A<:Projection,N} <: Projection
array::Array{A,N}
endBlock container for Projection of type A in a MultiField setting. This type is conceived similarly to ArrayBlock in Gridap. Every block is always populated.
GridapROMs.RBSteady.DEIMContribution — Type
const DEIMContribution = AffineContribution{<:DEIMProjection}GridapROMs.RBSteady.DEIMHyperReduction — Type
struct DEIMHyperReduction{A} <: HyperReduction{A}
reduction::Reduction{A,EuclideanNorm}
endHyper-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)
GridapROMs.RBSteady.DEIMProjection — Type
const DEIMProjection{A<:Projection} = HRProjection{<:DEIMHyperReduction,A}GridapROMs.RBSteady.DiagnosticsContribution — Type
struct DiagnosticsContribution{A,B,C}
fecache::A
coeff::B
hypred::C
endDiagnostic 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.
GridapROMs.RBSteady.DirectReduction — Type
abstract type DirectReduction{A,B} <: Reduction{A,B} endType representing direct reduction methods, e.g. truncated POD, TTSVD, etc.
Subtypes:
GridapROMs.RBSteady.DivCoupling — Type
struct DivCoupling <: CouplingStyle endDivergence coupling between a (vector-valued) primal field v and a dual field p, i.e. the bilinear form ∫(p*(∇⋅v))dΩ.
GridapROMs.RBSteady.DofMapCore — Type
struct DofMapCore{T,A<:AbstractArray{T,3},B<:AbstractArray} <: AbstractTTCore{T,3}
core::A
dof_map::B
endRepresents a tensor train core core reindexed by means of an index mapping dof_map
GridapROMs.RBSteady.EmptyInterpolation — Type
struct EmptyInterpolation <: Interpolation endInterpolation of trivial hyper-reductions, which do not interpolate
GridapROMs.RBSteady.EnergyNorm — Type
struct EnergyNorm{F<:Function} <: NormStyle
form::F
endNorm induced by a user-defined bilinear form form(u,v), e.g. EnergyNorm((u,v) -> ∫(∇(v)⋅∇(u))dΩ)
GridapROMs.RBSteady.EuclideanNorm — Type
const EuclideanNorm = ℓ2GridapROMs.RBSteady.GalerkinProjectable — Type
struct GalerkinProjectable{A<:AbstractArray} <: Projection
array::A
endWraps 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
GridapROMs.RBSteady.GenericDomain — Type
struct GenericDomain{A,B} <: IntegrationDomain
cells::Vector{Int32}
cell_idofs::A
dofs::B
endIntegration 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 overcells; for the vector case,cell_idofs[ic][j]is the 1-based index intodofsof thej-th DOF of cellcells[ic], or0if that DOF is not an interpolation DOF. For the matrix case,cell_idofs[ic]is a flat (column-major) array of lengthncellrows * ncellcols; positionr + (c-1)*ncellrowsstores the EIM pair index, or0if 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.
GridapROMs.RBSteady.GenericHRProjection — Type
struct GenericHRProjection{A<:HyperReduction,B<:Projection,C<:Interpolation} <: HRProjection{A,B}
style::A
basis::B
interpolation::C
endGeneric implementation of an HRProjection object
GridapROMs.RBSteady.GenericProjection — Type
struct GenericProjection{A<:AbstractArray,B<:AbstractArray} <: Projection
array::A
dof_map::B
endProjection 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).
GridapROMs.RBSteady.GlobalRBSolver — Type
const GlobalRBSolver{A,C,D,E} = RBSolver{A,GlobalContext,C,D,E}RBSolver computing a single (global) reduced operator
GridapROMs.RBSteady.GreedyInterpolation — Type
struct GreedyInterpolation{A,B<:IntegrationDomain} <: Interpolation
interpolation::A
domain::B
endInterpolation of DEIM and S-OPT hyper-reductions: the factorized interpolation matrix, and the reduced integration domain
GridapROMs.RBSteady.GreedyReduction — Type
abstract type GreedyReduction{A,B} <: Reduction{A,B} endType representing greedy reduction methods, which select the snapshots adaptively. Subtypes:
GridapROMs.RBSteady.H1 — Type
struct H1 <: NormStyle endH1 norm, with matrix assembled from ∫(v⋅u)dΩ + ∫(∇(v)⊙∇(u))dΩ
GridapROMs.RBSteady.HRMatProjection — Type
const HRMatProjection{A<:HyperReduction} = HRProjection{A,<:ReducedMatProjection}Hyper-reduction of a Jacobian
GridapROMs.RBSteady.HRParamArray — Type
struct HRParamArray{T,N,A,B,C<:ParamArray{T,N}} <: ParamArray{T,N}
fecache::A
coeff::B
hypred::C
endHyper-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
GridapROMs.RBSteady.HRProjection — Type
abstract type HRProjection{A<:HyperReduction,B<:Projection} <: Projection endSubtype 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:
- compute a snapshots tensor
T - construct a
ProjectionΦby running the functionreductiononT - implement an interpolation strategy
There are two types of interpolation strategies:
- Empirical interpolation of the
ProjectionΦ - 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:
GridapROMs.RBSteady.HRVecProjection — Type
const HRVecProjection{A<:HyperReduction} = HRProjection{A,<:ReducedVecProjection}Hyper-reduction of a residual
GridapROMs.RBSteady.HyperReduction — Type
abstract type HyperReduction{A} <: Reduction{A,EuclideanNorm} endType representing a hyper-reduction approximation of residuals/Jacobians of a differential problem. Orthogonality with respect to a norm other than the euclidean is not required for this reduction type.
Subtypes:
GridapROMs.RBSteady.HyperReduction — Method
HyperReduction(args...;compression=:global,hypred_strategy=:deim,kwargs...) -> HyperReductionBuilds 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:
:deim->DEIMHyperReduction:sopt->SOPTHyperReduction:rbf->RBFHyperReduction:none(aliases::no,:nohr) ->NoHyperReduction:affine->AffineHyperReduction
When compression=:local, the output is a LocalHyperReduction
GridapROMs.RBSteady.IntegrationDomain — Type
abstract type IntegrationDomain endType representing the set of interpolation DOFs of a Projection subjected to a EIM approximation. Subtypes:
GridapROMs.RBSteady.Interpolation — Type
abstract type Interpolation endOnline evaluation of the coefficients of a hyper-reduction. Subtypes:
GridapROMs.RBSteady.InvProjection — Type
struct InvProjection{A<:Projection} <: Projection
projection::A
endRepresents the inverse map of a Projection projection
GridapROMs.RBSteady.L2 — Type
struct L2 <: NormStyle endL2 norm, with matrix assembled from ∫(v⋅u)dΩ
GridapROMs.RBSteady.LocalHRContribution — Type
const LocalHRContribution = AffineContribution{<:LocalHRProjection}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}
endLocal 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)
GridapROMs.RBSteady.LocalHyperReduction — Type
const LocalHyperReduction{A} = LocalReduction{A,EuclideanNorm,<:HyperReduction{A}}Local version of a HyperReduction. See LocalReduction
GridapROMs.RBSteady.LocalInterpolation — Type
struct LocalInterpolation <: Interpolation
interp::AbstractMatrix{<:Interpolation}
k::NTuple{2,KmeansResult}
endInterpolations of a local hyper-reduction, indexed by (hyper-reduction cluster, reduced subspace cluster)
GridapROMs.RBSteady.LocalProjection — Type
struct LocalProjection{A<:Projection,N,K<:KmeansResult} <: Projection
projections::Array{A,N}
k::NTuple{N,K}
endCollection of projections, one per cluster of the parameter space, together with the k-means clustering(s) k that define the clusters. See get_local
GridapROMs.RBSteady.LocalRBSolver — Type
const LocalRBSolver{A,C,D,E} = RBSolver{A,LocalContext,C,D,E}RBSolver computing local reduced operators, one per cluster of the parameter space. Built automatically from a LocalReduction
GridapROMs.RBSteady.LocalReduction — Type
struct LocalReduction{A,B,R<:Reduction{A,B}} <: Reduction{A,B}
reduction::R
ncentroids::Int
endLocal 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
GridapROMs.RBSteady.MultiFieldRBSpace — Type
const MultiFieldRBSpace{S<:MultiFieldFESpace} = RBSpace{S}Reduced basis subspace of a MultiFieldFESpace in Gridap
GridapROMs.RBSteady.NitscheH1 — Type
struct NitscheH1 <: NormStyle
trian::Triangulation
γ::Float64
h::Float64
endH1 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.
GridapROMs.RBSteady.NoHRContribution — Type
const NoHRContribution = AffineContribution{<:NoHRProjection}GridapROMs.RBSteady.NoHRProjection — Type
const NoHRProjection{A<:Projection} = HRProjection{NoHyperReduction,A}GridapROMs.RBSteady.NoHyperReduction — Type
struct NoHyperReduction <: TrivialHyperReduction endNo hyper-reduction: residuals and Jacobians are assembled on the whole domain online, and then projected onto the reduced subspaces
GridapROMs.RBSteady.NoReduction — Type
struct NoReduction <: Reduction{NoReductionStyle,EuclideanNorm} endTrivial reduction: the snapshots are not compressed
GridapROMs.RBSteady.NoReductionStyle — Type
struct NoReductionStyle <: ReductionStyle endReduction style of a NoReduction
GridapROMs.RBSteady.NormStyle — Type
abstract type NormStyle <: AssembleOperator endSubtypes:
ℓ2(aliasedEuclideanNorm)L2H1NitscheH1EnergyNorm
GridapROMs.RBSteady.NormedProjection — Type
struct NormedProjection{A<:Projection,B<:MatrixOrTensor} <: Projection
projection::A
norm_matrix::B
endRepresents a Projection projection spanning a space equipped with an inner product represented by the quantity norm_matrix
GridapROMs.RBSteady.PODProjection — Type
const PODProjection{A<:AbstractMatrix,B<:AbstractArray} = GenericProjection{A,B}GridapROMs.RBSteady.PODReduction — Type
struct PODReduction{A,B} <: DirectReduction{A,B}
red_style::A
norm_style::B
nparams::Int
endReduction by means of a truncated POD. The field nparams indicates the number of parameters selected for the computation of the snapshots
GridapROMs.RBSteady.PSVDRank — Type
struct PSVDRank <: ReductionStyle
opts::LRAOptions
endStruct 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
GridapROMs.RBSteady.Projection — Type
abstract type Projection <: Map endRepresents a basis for a n-dimensional vector subspace of a N-dimensional vector space (where N >> n), to be used as a Galerkin projection operator. The kernel of a Projection is n-dimensional, whereas its image is N-dimensional.
Subtypes:
GridapROMs.RBSteady.RBDiagnostics — Type
struct RBDiagnostics
offline::Dict{String,Any}
online::Dict{String,Any}
endContainer 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}, oneK-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}, oneK-tuple per tolerance"hr_error_jac"—Vector{Tuple}, oneK-tuple per tolerance
GridapROMs.RBSteady.RBFContribution — Type
const RBFContribution = AffineContribution{<:RBFProjection}GridapROMs.RBSteady.RBFHyperReduction — Type
struct RBFHyperReduction{A} <: HyperReduction{A}
reduction::Reduction{A,EuclideanNorm}
strategy::AbstractRadialBasis
endNon-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
GridapROMs.RBSteady.RBFInterpolation — Type
struct RBFInterpolation{A<:Interpolator} <: Interpolation
interpolation::A
endRadial basis function interpolator of the coefficients, in the parameter space
GridapROMs.RBSteady.RBFProjection — Type
const RBFProjection{A<:Projection} = HRProjection{<:RBFHyperReduction,A}GridapROMs.RBSteady.RBOperator — Type
struct RBOperator{O,A,B} <: ROMOperator{O}
op::ParamOperator{O}
trial::RBSpace
test::RBSpace
lhs::A
rhs::B
endFields:
op: underlying high dimensional FE operatortrial: reduced trial spacetest: reduced test spacelhs: hyper-reduced left hand siderhs: hyper-reduced right hand side
GridapROMs.RBSteady.RBParamVector — Type
struct RBParamVector{T,A<:ParamVector{T},B} <: ParamArray{T,1}
data::A
fe_data::B
endParametric vector obtained by applying a Projection on a high-dimensional parametric FE vector fe_data, which is stored (but mostly unused) for conveniency
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
endWrapper 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
- a suitable subspace of a FESpace is sought, of dimension n << Nₕ
- a matrix-based discrete empirical interpolation method (e.g. DEIM) is performed
to approximate the manifold of the parametric residuals and jacobians
- the EIM approximations are compressed with (Petrov-)Galerkin projections
onto the subspace
- 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/snapshotscontext: eitherGlobalContext(aGlobalRBSolver) orLocalContext(aLocalRBSolver, used for cluster-local ROMs)state_reduction:Reductionstrategy compressing state snapshots into the reduced subspace (e.g.tol/nparamsfor TPOD or TT-SVD live here)residual_reduction,jacobian_reduction:HyperReductionstrategies hyper-reducing the residual/Jacobian, respectively; the number of snapshots used to train each is set through thenparams_res/nparams_jackeywords of the constructor belowtracker: aRBPerformanceTrackeraccumulating timing/memory/error information across the offline (subspace, jacobian and residual hyper-reduction) and online (reduced solve) phasesRBSolver(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.
GridapROMs.RBSteady.RBSpace — Type
struct RBSpace{S<:FESpace} <: FESpace
space::S
subspace::Projection
endReduced basis subspace of a FESpace in Gridap
GridapROMs.RBSteady.ROMOperator — Type
abstract type ROMOperator{O} <: ParamOperator{O} endType representing reduced algebraic operators used within a reduced order modelling framework in steady applications. A ROMOperator should contain the following information:
- a reduced test and trial space, computed according to
reduced_spaces - a hyper-reduced residual and jacobian, computed according to
reduced_weak_form
Subtypes:
GridapROMs.RBSteady.ROMSolver — Type
abstract type ROMSolver <: GridapType endSupertype of the solvers of reduced order models. See RBSolver
GridapROMs.RBSteady.ReducedAlgebraicProjection — Type
struct ReducedAlgebraicProjection{A<:AbstractArray} <: ReducedProjection{A}
basis::A
endReducedProjection storing the projected basis as a plain array
GridapROMs.RBSteady.ReducedMatProjection — Type
const ReducedMatProjection = ReducedProjection{<:AbstractArray{<:Any,3}}Galerkin projection of a basis of matrices (e.g. Jacobians)
GridapROMs.RBSteady.ReducedProjection — Type
abstract type ReducedProjection{A<:AbstractArray} <: Projection endType representing a Galerkin projection of a Projection onto a reduced subspace represented by another Projection.
Subtypes:
GridapROMs.RBSteady.ReducedVecProjection — Type
const ReducedVecProjection = ReducedProjection{<:AbstractMatrix}Galerkin projection of a basis of vectors (e.g. residuals)
GridapROMs.RBSteady.Reduction — Type
abstract type Reduction{A<:ReductionStyle,B<:AssembleOperator} endType indicating the reduction strategy to employ, and the AssembleOperator (e.g. EuclideanNorm, L2, H1, or a BlockOperator of these) with respect to which the reduction should occur.
Subtypes:
GridapROMs.RBSteady.Reduction — Method
Reduction(tolrank,norm::AssembleOperator=EuclideanNorm();nparams=50,compression=:global,ncentroids=10) -> Reduction
Reduction(coupling::CouplingStyle,tolrank,norm;kwargs...) -> SupremizerReductionBuilds the reduction of nparams snapshots, orthonormal in norm:
- a truncated POD (
PODReduction) whentolrankis a tolerance (Float64) or a rank (Int) - a TT-SVD (
TTSVDReduction) whentolrankis a vector of tolerances (or ranks), one per dimension of the snapshots - a
LocalReductionwithncentroidsclusters whencompression=:local - a
SupremizerReductionwhen the first argument is a coupling
GridapROMs.RBSteady.ReductionStyle — Type
abstract type ReductionStyle endType indicating the reduction strategy to employ.
Subtypes:
GridapROMs.RBSteady.SOPTContribution — Type
const SOPTContribution = AffineContribution{<:SOPTProjection}GridapROMs.RBSteady.SOPTHyperReduction — Type
struct SOPTHyperReduction{A} <: HyperReduction{A}
reduction::Reduction{A,EuclideanNorm}
endSame as DEIMHyperReduction, with interpolation entries selected according to the S-optimality criterion (see SOPT)
GridapROMs.RBSteady.SOPTProjection — Type
const SOPTProjection{A<:Projection} = HRProjection{<:SOPTHyperReduction,A}GridapROMs.RBSteady.SingleFieldRBSpace — Type
const SingleFieldRBSpace{S<:SingleFieldFESpace} = RBSpace{S}Reduced basis subspace of a SingleFieldFESpace in Gridap
GridapROMs.RBSteady.SparseCore — Type
abstract type SparseCore{T,N} <: AbstractTTCore{T,N} endTensor train cores for sparse matrices.
Subtypes:
GridapROMs.RBSteady.SparseCoreCSC — Type
struct SparseCoreCSC{T,Ti} <: SparseCore{T,3}
array::Array{T,3}
sparsity::SparsityCSC{T,Ti}
endTensor train cores for sparse matrices in CSC format
GridapROMs.RBSteady.SparseCoreCSC4D — Type
struct SparseCoreCSC4D{T,Ti} <: SparseCore{T,4}
core::SparseCoreCSC{T,Ti}
sparse_indexes::Vector{CartesianIndex{2}}
endTensor train cores for sparse matrices in CSC format, reshaped as 4D arrays
GridapROMs.RBSteady.SupremizerReduction — Type
struct SupremizerReduction{A,B,R<:Reduction{A,B}} <: Reduction{A,B}
reduction::R
coupling::AssembleOperator
supr_tol::Float64
endWrapper 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ᵀ.
GridapROMs.RBSteady.TTSVDProjection — Type
const TTSVDProjection{A<:AbstractVector{<:AbstractArray{<:Any,3}},B<:AbstractArray} = GenericProjection{A,B}GridapROMs.RBSteady.TTSVDRanks — Type
struct TTSVDRanks <: ReductionStyle
style::Vector{<:ReductionStyle}
endStruct 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
GridapROMs.RBSteady.TTSVDReduction — Type
struct TTSVDReduction{B} <: DirectReduction{TTSVDRanks,B}
red_style::TTSVDRanks
norm_style::B
nparams::Int
endReduction by means of a TTSVD. The field nparams indicates the number of parameters selected for the computation of the snapshots
GridapROMs.RBSteady.TrivialHyperReduction — Type
abstract type TrivialHyperReduction <: HyperReduction{NoReductionStyle} endHyper-reductions that do not compress residuals and Jacobians. Subtypes:
GridapROMs.RBSteady.TrivialSparseCore — Type
struct TrivialSparseCore{T,A<:SparsityPattern} <: SparseCore{T,3}
array::Array{T,3}
sparsity::A
endTrivial tensor train core for sparse matrices format
GridapROMs.RBSteady.ℓ2 — Type
struct ℓ2 <: NormStyle endEuclidean norm of the vectors of DOF values. No matrix is assembled
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 rowsi
GridapROMs.RBSteady.SOPT — Method
SOPT(a::Projection) -> (AbstractVector,AbstractMatrix)Computes the S-OPT hyper-reduction of a. Check this reference for more information
GridapROMs.RBSteady.allocate_hypred_cache — Method
allocate_hypred_cache(a,args...) -> HRParamArrayAllocates the HRParamArray storing the online evaluation of the hyper-reduction a
GridapROMs.RBSteady.assemble_hr_array_add! — Method
assemble_hr_array_add!(A,cellvals,celldofs,cells)Adds to A the entries of the cell arrays cellvals corresponding to the interpolation DOFs celldofs in the integration cells cells
GridapROMs.RBSteady.assemble_operator — Method
assemble_operator(a::AssembleOperator,feop) -> AbstractMatrixAssembles the matrix represented by a on the trial and test spaces of feop
GridapROMs.RBSteady.change_operator — Method
change_operator(op::ROMOperator,op′::ParamOperator) -> ROMOperatorRebinds 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′
GridapROMs.RBSteady.cluster — Function
cluster(a,k) -> VectorSplits a (e.g. snapshots) according to the clusters of its parameters. k can be a LocalReduction, a k-means result, or a vector of labels
GridapROMs.RBSteady.collect_cell_hr_matrix — Method
collect_cell_hr_matrix(trial,test,a::DomainContribution,trian,interp) -> TupleCell matrices of a on trian, with the cell-wise interpolation DOFs and the integration cells of interp
GridapROMs.RBSteady.collect_cell_hr_vector — Method
collect_cell_hr_vector(test,a::DomainContribution,trian,interp) -> TupleCell vectors of a on trian, with the cell-wise interpolation DOFs and the integration cells of interp
GridapROMs.RBSteady.compute_ncentroids — Method
compute_ncentroids(r::AbstractRealisation;init=min(4,num_params(r)),iend=min(16,num_params(r)÷2)) -> IntNumber of clusters, between init and iend, suggested by the elbow criterion on the variance of k-means clusterings of the parameters in r
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.
GridapROMs.RBSteady.contraction — Method
contraction(basis::AbstractArray,coefficient::AbstractArray) -> AbstractArrayMultiplies 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.
GridapROMs.RBSteady.cores2basis — Method
cores2basis(cores::AbstractArray{T,3}...) -> AbstractMatrixReturns 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
GridapROMs.RBSteady.div_coupling — Function
div_coupling(U::FESpace,V::FESpace) -> AbstractMatrixAssembles the matrix of DivCoupling on the spaces U, V. On TProductFESpaces, the output is a rank tensor of 1D matrices
GridapROMs.RBSteady.enrich! — Method
enrich!(
red::SupremizerReduction,
a::BlockProjection,
norm_matrix,
supr_matrix) -> NothingIn-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
GridapROMs.RBSteady.fetch_block — Method
fetch_block(a::AbstractArray,i::Int) -> AbstractArrayLazily extracts the i-th block from the array of cell blocks a
GridapROMs.RBSteady.galerkin_projection! — Method
galerkin_projection!(cache,args...) -> AbstractArraySame as galerkin_projection, storing the output in cache
GridapROMs.RBSteady.galerkin_projection — Method
galerkin_projection(Φₗ,A) -> Any
galerkin_projection(Φₗ,A,Φᵣ) -> AnyGalerkin projection of A on the subspaces specified by a (left, test) subspace Φₗ (row projection) and a (right, trial) subspace Φᵣ (column projection)
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)
GridapROMs.RBSteady.get_basis — Method
get_basis(a::Projection) -> AbstractMatrixReturns the basis spanning the reduced subspace represented by the projection a
GridapROMs.RBSteady.get_cell_idofs — Method
get_cell_idofs(i) -> AbstractVectorFor every integration cell of i, the local indices of the interpolation DOFs it contains
GridapROMs.RBSteady.get_clusters — Method
get_clusters(a) -> Tuple{Vararg{KmeansResult}}k-means clustering(s) of the parameter space defining the local quantities in a
GridapROMs.RBSteady.get_cores — Method
get_cores(a::Projection) -> Vector{<:AbstractArray{T,3}}Tensor-train cores of a, when a is computed with a TT-SVD
GridapROMs.RBSteady.get_fe_solver — Method
get_fe_solver(s::RBSolver) -> NonlinearSolverReturns the underlying NonlinearSolver from a RBSolver s
GridapROMs.RBSteady.get_integration_cells — Method
get_integration_cells(i) -> AbstractVectorCells of the reduced integration domain of i
GridapROMs.RBSteady.get_interpolation — Method
get_interpolation(a::HRProjection) -> InterpolationFor a HRProjection a represented by the couple (Φrb,i), returns i
GridapROMs.RBSteady.get_interpolation_dofs — Method
get_interpolation_dofs(i) -> AbstractVectorInterpolation DOFs (rows, or rows and columns for Jacobians) selected by the hyper-reduction
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
GridapROMs.RBSteady.get_norm_matrix — Method
get_norm_matrix(a) -> AbstractMatrixNorm matrix with respect to which the basis of a is orthonormal (the identity for a Euclidean projection)
GridapROMs.RBSteady.get_recast_basis — Method
get_recast_basis(a::Projection) -> AbstractArrayBasis of a, recast according to the DOF map of a (e.g. as a sparse matrix, for a projection of Jacobians)
GridapROMs.RBSteady.get_recast_cores — Method
get_recast_cores(a::Projection) -> Vector{<:AbstractArray}Same as get_recast_basis, for the cores of a TT projection
GridapROMs.RBSteady.get_reduced_solver — Method
get_reduced_solver(s) -> NonlinearSolverSolver 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
GridapROMs.RBSteady.get_reduced_subspace — Method
get_reduced_subspace(r::RBSpace) -> ProjectionReturns the Projection spanning the reduced subspace contained in r
GridapROMs.RBSteady.get_reduction — Method
get_reduction(r::Reduction) -> ReductionReduction wrapped by r (e.g. by a SupremizerReduction, a LocalReduction or a HyperReduction), or r itself
GridapROMs.RBSteady.get_rowcols_to_cells — Method
get_rowcols_to_cells(
cell_row_ids::AbstractArray,
cell_col_ids::AbstractArray,
rows::AbstractVector,
cols::AbstractVector) -> AbstractVectorReturns the list of cells containing the row ids rows and the col ids cols
GridapROMs.RBSteady.get_rows_to_cells — Method
get_rows_to_cells(
cell_row_ids::AbstractArray,
rows::AbstractVector
) -> AbstractVectorReturns the list of cells containing the row ids rows
GridapROMs.RBSteady.get_style — Method
get_style(a::HRProjection) -> HyperReductionHyper-reduction strategy of a
GridapROMs.RBSteady.gram_schmidt — Method
gram_schmidt(A::AbstractMatrix;kwargs...) -> AbstractMatrix
gram_schmidt(A::AbstractMatrix,X::Union{AbstractMatrix,Factorization};kwargs...) -> AbstractMatrixGram-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
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
GridapROMs.RBSteady.h1_norm — Function
h1_norm(U::FESpace,V::FESpace) -> AbstractMatrixAssembles the matrix of H1 on the spaces U, V. On TProductFESpaces, the output is a rank tensor of 1D matrices
GridapROMs.RBSteady.hr_diagnostics — Method
hr_diagnostics(a::HRProjection) -> NamedTupleReturns (dim=n,) for a single HR projection.
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).
GridapROMs.RBSteady.inv_project! — Method
inv_project!(x::AbstractArray,a::Projection,x̂::AbstractArray) -> NothingIn-place recasting of a low-dimensional object x̂ the high-dimensional space in which a is immersed
GridapROMs.RBSteady.inv_project — Method
inv_project(a::Projection,x::AbstractArray) -> AbstractArrayRecasts a low-dimensional object x onto the high-dimensional space in which a is immersed
GridapROMs.RBSteady.isnull — Method
isnull(a) -> BoolWhether the projection (or array) a is empty or zero
GridapROMs.RBSteady.jacobian_contribution — Method
jacobian_contribution(solver::RBSolver,op::ParamOperator,s::AbstractSnapshots) -> ContributionJacobian snapshots of op used for hyper-reduction, evaluated at the snapshots s, one per Jacobian triangulation
GridapROMs.RBSteady.l2_norm — Function
l2_norm(U::FESpace,V::FESpace) -> AbstractMatrixAssembles the matrix of L2 on the spaces U, V. On TProductFESpaces, the output is a rank tensor of 1D matrices
GridapROMs.RBSteady.load_contribution — Method
load_contribution(dir,trians;label="") -> ContributionLoads the hyper-reduced contributions stored in dir, and associates them with the triangulations trians (a tuple, or a Bundle of tuples)
GridapROMs.RBSteady.load_operator — Method
load_operator(dir,feop::ParamOperator;kwargs...) -> ROMOperatorGiven 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
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
GridapROMs.RBSteady.load_projection — Method
load_projection(dir;label="") -> ProjectionLoads the projection stored in dir
GridapROMs.RBSteady.load_results — Method
load_results(dir;label="") -> RBPerformanceTrackerLoads the results of rom_performance stored in dir
GridapROMs.RBSteady.load_snapshots — Method
load_snapshots(dir;label="") -> AbstractSnapshotsLoad the snapshots at the directory dir. Throws an error if the snapshots have not been previously saved to file
GridapROMs.RBSteady.load_stats — Method
load_stats(dir;label="") -> PerformanceTrackerLoads the performance statistics stored in dir
GridapROMs.RBSteady.load_subspace — Method
load_subspace(dir,f::FESpace;label="") -> RBSpaceLoads the reduced subspace of f stored in dir
GridapROMs.RBSteady.local_vals — Method
local_vals(a) -> AbstractArrayLocal (per-cluster) quantities stored in a
GridapROMs.RBSteady.num_fe_dofs — Method
num_fe_dofs(a::Projection) -> IntFor a projection map a from a low dimensional space n to a high dimensional one N, returns N
GridapROMs.RBSteady.num_reduced_dofs — Method
num_reduced_dofs(a::Projection) -> IntFor a projection map a from a low dimensional space n to a high dimensional one N, returns n
GridapROMs.RBSteady.orth_complement! — Method
orth_complement!(v::AbstractVector,basis::AbstractMatrix,args...) -> NothingIn-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
GridapROMs.RBSteady.orth_projection — Method
orth_projection(v::AbstractVector, basis::AbstractMatrix, args...) -> AbstractVectorOrthogonal 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
GridapROMs.RBSteady.project! — Method
project!(x̂::AbstractArray,a::Projection,x::AbstractArray,args...) -> NothingIn-place projection of a high-dimensional object x onto the subspace represented by a
GridapROMs.RBSteady.project — Method
project(a::Projection,x::AbstractArray,args...) -> AbstractArrayProjects a high-dimensional object x onto the subspace represented by a
GridapROMs.RBSteady.projection — Method
projection(red::Reduction,s::AbstractArray) -> Projection
projection(red::Reduction,s::AbstractArray,X::MatrixOrTensor) -> ProjectionConstructs 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
GridapROMs.RBSteady.projection_diagnostics — Method
projection_diagnostics(r::RBSpace) -> NamedTupleReturns (dim=n,factor=Nₕ/n) for the trial/test reduction.
GridapROMs.RBSteady.projection_eltype — Method
projection_eltype(a::Projection) -> DataTypeReturns the eltype of the projection a
GridapROMs.RBSteady.projection_error — Method
projection_error(solver,op,s) -> NumberAverage relative error committed by projecting the solution snapshots s onto the RB trial space of op.
GridapROMs.RBSteady.reduced_basis — Method
reduced_basis(red::Reduction,s::AbstractSnapshots,args...) -> ProjectionComputes the basis by compressing the snapshots s
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)
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...) -> ROMOperatorOffline 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
GridapROMs.RBSteady.reduced_residual — Method
reduced_residual(
solver::RBSolver,
op::ParamOperator,
red_test::RBSpace,
s::AbstractSnapshots
) -> AffineContributionReduces 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
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
GridapROMs.RBSteady.reduced_subspace — Method
reduced_subspace(space::FESpace,basis::Projection) -> RBSpaceConstructs a RBSpace from a FESpace space and a projection basis
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
GridapROMs.RBSteady.reduction — Method
reduction(red::Reduction,A::AbstractArray,args...) -> AbstractArray
reduction(red::Reduction,A::AbstractArray,X::AbstractMatrix) -> AbstractArrayGiven an array (of snapshots) A, returns a reduced basis obtained by means of the reduction strategy red
GridapROMs.RBSteady.residual_contribution — Method
residual_contribution(solver::RBSolver,op::ParamOperator,s::AbstractSnapshots) -> ContributionResidual snapshots of op used for hyper-reduction, evaluated at the snapshots s, one per residual triangulation
GridapROMs.RBSteady.rom_diagnostics — Method
rom_diagnostics(dir,rbsolver,feop,args...;label=ONLINE_LABEL,kwargs...)
-> RBDiagnosticsScans 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.
GridapROMs.RBSteady.rom_performance — Method
rom_performance(
solver::RBSolver,
op::ROMOperator,
x::AbstractSnapshots,
x̂::AbstractSnapshots
) -> RBPerformanceTrackerUpdates solver.tracker.error from the (relative) error between the full-order snapshots fesnaps and the reduced approximation x̂, and returns solver.tracker
GridapROMs.RBSteady.sequential_product — Method
sequential_product(a::AbstractArray,b::AbstractArray...) -> AbstractArrayThis function sequentially multiplies the results of several (sequential as well) calls to contraction
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) -> TransientSnapshotsSolves 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
GridapROMs.RBSteady.supremizers — Method
supremizers(ns,C::AbstractMatrix,ϕ::AbstractMatrix) -> AbstractMatrixSupremizers 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)
GridapROMs.RBSteady.symcholesky — Method
symcholesky(X) -> FactorizationCholesky factorization of the norm matrix X, after symmetrising it (see symmetrise!). For a rank tensor, the factorization of its 1D factors
GridapROMs.RBSteady.symmetrise! — Method
symmetrise!(A::AbstractMatrix;atol=1e-12,rtol=1e-8) -> BoolReplaces A with its symmetric part, if A is symmetric up to the given tolerances. Returns whether this is the case
GridapROMs.RBSteady.tpod — Method
tpod(red_style::ReductionStyle,A::AbstractMatrix) -> AbstractMatrix
tpod(red_style::ReductionStyle,A::AbstractMatrix,X::MatrixOrTensor) -> AbstractMatrixTruncated 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
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
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
GridapROMs.RBSteady.union_bases — Method
union_bases(a::Projection,b::Projection,args...) -> ProjectionComputes 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)))
GridapROMs.Utils.get_linear_part — Method
get_linear_part(op::RBOperator) -> RBOperator
get_nonlinear_part(op::RBOperator) -> RBOperatorSplits a Bundle-lhs/rhs RBOperator (built from a LinearNonlinearParamOperator) back into its two plainly-tagged halves, sharing the same reduced trial/test