GridapROMs.ParamSteady
GridapROMs.ParamSteady — Module
module ParamSteadyParametric FE operators and solvers for steady parametric PDEs.
Extends Gridap's FEOperator/FESpaces layer with parameter awareness, so that residuals and Jacobians can be evaluated at a Realisation (a batch of parameter samples). The module introduces:
- Operator types —
LinearParamEq,NonlinearParamEq,LinearNonlinearParamEqtag whether a parametric operator is linear, nonlinear, or a split linear + nonlinear combination. - Low-level algebraic operators —
ParamOperator,LinearParamOperator,LinearNonlinearParamOperatorwrap assembled matrices/vectors and expose theresidual!/jacobian!interface at parameter level. - FE-level operators —
ParamFEOperator,LinearParamFEOperatormanage Gridap assemblers, FE domains, and parameter-to-sample dispatch. A linear + nonlinear split operator is just aParamFEOperator(O=LinearNonlinearParamEq) whoseres/jac/domainsfields are each aBundleof the linear and nonlinear halves;get_linear_part/get_nonlinear_partsplit it back apart. - Solvers — thin wrappers in
ParamFESolvers.jldispatch parametric solves to the underlying Gridap / GridapSolvers linear or nonlinear solvers.
Downstream modules (ParamODEs, RBSteady, Extensions) all build on the abstractions defined here.
GridapROMs.ParamSteady.GenericParamOperator — Type
struct GenericParamOperator{O<:UnEvalOperatorType} <: ParamOperator{O}
op::ParamFEOperator{O}
endWrapper that transforms a ParamFEOperator into an ParamOperator
GridapROMs.ParamSteady.LinearNonlinearParamEq — Type
struct LinearNonlinearParamEq <: UnEvalOperatorType endTag for an operator whose res/jac fields are each a Bundle of a linear and a nonlinear half
GridapROMs.ParamSteady.LinearNonlinearParamOperator — Type
const LinearNonlinearParamOperator = ParamOperator{LinearNonlinearParamEq}GridapROMs.ParamSteady.LinearParamEq — Type
struct LinearParamEq <: UnEvalOperatorType endGridapROMs.ParamSteady.NonlinearParamEq — Type
struct NonlinearParamEq <: UnEvalOperatorType endGridapROMs.ParamSteady.ParamFEOpFromWeakForm — Type
struct ParamFEOpFromWeakForm{O<:UnEvalOperatorType} <: ParamFEOperator{O}
res::Union{Function,Bundle}
jac::Union{Function,Bundle}
pspace::ParamSpace
assem::Assembler
trial::FESpace
test::FESpace
domains::Union{FEDomains,Bundle}
endInstance of ParamFEOperator, used for nonlinear (O=NonlinearParamEq), linear (O=LinearParamEq), and linear+nonlinear split (O=LinearNonlinearParamEq, res/jac/domains each a Bundle) steady problems alike
GridapROMs.ParamSteady.ParamFEOperator — Type
abstract type ParamFEOperator{O<:UnEvalOperatorType} <: FEOperator endParametric extension of a FEOperator in Gridap. Compared to a standard FEOperator, there are the following novelties:
- a ParamSpace is provided, so that parametric realisations can be extracted directly from the ParamFEOperator
- a function representing a norm matrix is provided, so that errors in the desired norm can be automatically computed
Subtypes:
GridapROMs.ParamSteady.ParamFEOperator — Method
ParamFEOperator(res::Bundle,jac::Bundle,pspace,trial,test,domains::Bundle=Bundle(FEDomains(),FEDomains())
) -> ParamFEOperator{LinearNonlinearParamEq}Returns a parametric FE operator that bundles a linear and a nonlinear part
GridapROMs.ParamSteady.ParamOperator — Type
abstract type ParamOperator{O<:UnEvalOperatorType} <: NonlinearParamOperator endType representing algebraic operators when solving parametric differential problems
GridapROMs.ParamSteady.ParamOperator — Method
ParamOperator(res,jac,pspace,trial,test[,domains]) -> ParamOperatorNonlinear parametric algebraic operator, built from the residual res(μ,u,v), the Jacobian jac(μ,u,du,v), a ParamSpace pspace, the trial and test spaces, and optionally the FEDomains on which res and jac are integrated. When res, jac and domains are Bundles, the operator is split into a linear part (written as in LinearParamOperator) and a nonlinear part
GridapROMs.ParamSteady.UnEvalOperatorType — Type
abstract type UnEvalOperatorType <: GridapType endType representing operators that are not evaluated yet. This may include operators representing transient problems (although the implementation in Gridap differs), parametric problems, and a combination thereof. Could become a supertype of ODEOperatorType in Gridap
GridapROMs.ParamSteady.LinearParamFEOperator — Method
LinearParamFEOperator(rhs::Function,jac::Function,pspace,trial,test,args...
) -> ParamFEOperator{LinearParamEq}Returns a linear parametric FE operator. Unlike ParamFEOperator, which takes a residual res(μ,u,v), this takes the right-hand side rhs(μ,v) directly: a genuinely linear problem has no residual to evaluate at a current state u, only a (μ-dependent, but not u-dependent) jacobian and right-hand side. Assembling allocate_residual/residual! on the resulting operator therefore just assembles rhs(μ,v), and solving accounts for the sign accordingly (see ParamSolvers)
GridapROMs.ParamSteady.LinearParamOperator — Method
LinearParamOperator(rhs,jac,pspace,trial,test[,domains]) -> ParamOperatorLinear parametric algebraic operator, built from the right-hand side rhs(μ,v), the bilinear form jac(μ,du,v), a ParamSpace pspace, the trial and test spaces, and optionally the FEDomains on which rhs and jac are integrated
GridapROMs.ParamSteady.get_fe_operator — Method
get_fe_operator(op::ParamOperator) -> ParamFEOperatorFetches the underlying FE operator of an algebraic operator op
GridapROMs.ParamSteady.get_jac — Method
get_jac(op) -> FunctionJacobian of the operator op, as a function (μ,u,du,v) -> ... (with an additional time argument in transient problems)
GridapROMs.ParamSteady.get_param_assembler — Method
get_param_assembler(op,r::AbstractRealisation) -> AssemblerAssembler of op, parameterised to assemble parameterised arrays of length param_length(r)
GridapROMs.ParamSteady.get_param_space — Method
get_param_space(feop::ParamFEOperator) -> ParamSpace
get_param_space(feop::TransientParamFEOperator) -> TransientParamSpaceReturns the space of parameters contained in feop
GridapROMs.Utils.change_domains — Method
change_domains(op::ParamFEOperator,args...) -> ParamFEOperatorChanges the triangulations for residual/jacobian, keeping everything else unchanged
GridapROMs.Utils.get_linear_part — Method
get_linear_part(op::ParamFEOpFromWeakForm{LinearNonlinearParamEq}) -> ParamFEOpFromWeakForm{LinearParamEq}
get_nonlinear_part(op::ParamFEOpFromWeakForm{LinearNonlinearParamEq}) -> ParamFEOpFromWeakForm{NonlinearParamEq}Splits a Bundle-based linear+nonlinear operator back into its two plainly-tagged halves
GridapROMs.Utils.set_domains — Method
set_domains(op::ParamFEOperator,args...) -> ParamFEOperatorA no-op: residual/jacobian assembly no longer depends on whether triangulations were explicitly tracked, so there is nothing left to "fix"