MultilinearMaps

Multilinear maps for representing polynomial nonlinear terms in full-order models. Each map stores an in-place function, a multiindex encoding which derivative-order slots it consumes, and an external forcing multiplicity.

MORFE.MultilinearMaps.AbstractMultilinearMapType
AbstractMultilinearMap{ORD}

Abstract supertype for all multilinear terms accepted by NDOrderModel.

Every concrete subtype must expose the fields multiindex, multiplicity_external, and deg with the same semantics as MultilinearMap.

source
MORFE.MultilinearMaps.FEMMultilinearMapType
FEMMultilinearMap{ORD} <: AbstractMultilinearMap{ORD}

Abstract type for FEM-backed multilinear terms that expose element-level primitives.

Implementing the interface below enables the RHS-C batched accumulation path in MultilinearTerms.jl: the mesh is traversed exactly once per (monomial, term, split) rather than once per factorisation entry.

Required methods (extend MORFE.*):

  • fem_elements(t) → element iterator
  • fem_n_qp(t) → quadrature points per element
  • fem_ndofs_per_cell(t) → DOFs per element
  • scatter_qp!(∇W_col, W_global, element, t) → fill qp field values for one unique W column
  • accumulate_qp!(Fe, ∇W_args::NTuple, mult, element, q, dΩ, t) → add integrand at one qp
  • assemble_element!(accum, Fe, element, t) → scatter element residual to global
  • fem_getdetJdV(element, q, t) → integration weight at qp q
source
MORFE.MultilinearMaps.MultilinearMapType
MultilinearMap{ORD, F}

Represents a single monomial term of order deg in the nonlinear function of an NDOrderModel.

A term is represented using a multiindex stored in the NTuple multiindex = (i0, ..., i{ORD-1}) where ik is the multiplicity of the derivative x^(k). So the ik specifies how many times the derivative x^(k) appears as an argument. In addition the function accepts multiplicity_external external variables r1, r2, ... which satisfy the first order dynamic system r' = dynamicsexternal(r), where dynamicsexternal is a DensePolynomial defined in NDOrderModel. The influence in f! is described by multiplicity_external

During evaluation the multilinear map is called as

f!(res,
   x^(0), ... repeated i_0 times,
   x^(1), ... repeated i_1 times,
   ...
   x^(ORD-1), ...repeated i_{ORD-1} times,
   r, ... repeated `multiplicity_external` times)

Important Notes

  • Each MultilinearMap must implement a multilinear map, i.e., it should be linear in each of its arguments independently.
  • The function f! accumulates (adds) into res and must be callable with the appropriate number of arguments.
  • If one i_k is larger than 1 we assume the input arguments are symmetric by permutation. For example:
multiindex = (0, 2,...)
f!(res, x^(1)_1, x^(1)_2, ...) = f!(res, x^(1)_2, x^(1)_1, ...)
source
MORFE.MultilinearMaps.MultilinearMapMethod
MultilinearMap(f, multiindex)

Create a multilinear term for a system of order ORD without external dynamics.

Arguments

  • f!: in-place evaluation function
  • multiindex: tuple specifying which derivatives are used
source
MORFE.MultilinearMaps.evaluate_term!Method
evaluate_term!(res, term, xs, r)

Evaluate a single MultilinearMap and accumulate (adds) the result into res.

Arguments

  • res: output vector (modified in-place)
  • term: multilinear term
  • xs: tuple (x, x^(1), …, x^(ORD-1)) of state derivatives
  • r: external state vector (or nothing if not used). If r is nothing but the term expects external arguments, an error is thrown.
source