API Reference
This page lists the main public symbols exported by CartesianOperators.
Capacity & Layout
AbstractCapacity{N,T}AssembledCapacity{N,T}assembled_capacity(m::GeometricMoments{N,T}; bc=zero(T))rebuild!(cap::AssembledCapacity{N,T}, m::GeometricMoments{N,T}; bc=zero(T))UnknownLayoutlayout_mono(ntotal)layout_diph(ntotal)
Differential/Assembly Routines
build_differential_operator(op_fn, nnodes::NTuple{N,Int}, dim::Int; periodic=false)build_Winv(cap::AssembledCapacity{N,T})build_GHW(cap::AssembledCapacity{N,T}; periodic=ntuple(_ -> false, N))
build_GHW returns:
(G, H, Winv, nnodes, D_m, D_p, S_m, S_p)
with shapes:
size(G) == size(H) == (N*ntotal, ntotal)size(Winv) == (N*ntotal, N*ntotal)
Operator Containers
DiffusionOps(cap::AssembledCapacity{N,Float64}; periodic=...)ConvectionOps(cap::AssembledCapacity{N,Float64}, uω, uγ; periodic=...)AdvectionOps{N,T}advection_ops(cap, uω, uγ; periodic=..., scheme=Centered())
Advection schemes:
AdvectionSchemeCentered <: AdvectionSchemeUpwind1 <: AdvectionSchemeS_plus(n, periodic=false)shift helper used by centered assembly
Apply APIs
Gradient:
gradient(op, xω, xγ; split=false)gradient!(q, op, xω, xγ)gradient!(qω, qγ, op, xω, xγ)(split in-place)
Divergence:
divergence(op, qω, qγ; split=false)divergence!(out, op, qω, qγ)divergence!(d_faces, d_int, op, qω, qγ)(split in-place)
Curl:
curl(op, qω, qγ; split=false)(2D scalar curl; CCW-positive)curl(op, qω; split=false)(shorthand with zero interface flux)curl!(out, op, qω, qγ)(2D in-place scalar curl)- 3D
curlcurrently throws an informative not-implemented error.
Boundary Helpers
periodic_flags(bc::BorderConditions, N)side_info(side::Symbol, N)each_boundary_cell(nnodes, side)apply_box_bc_mono!(A, b, cap, ops, D, bc_border; t=..., layout=...)
Miscellaneous
eval_coeff(D, x, t, row_lin)coefficient sampling helper
Notes
build_differential_operatoruses Kronecker lifting and zeroes halo rows.build_Winvbuilds a diagonal CSC directly from capacity buffers (O(N*ntotal)).gradient,divergence, and 2Dcurlwork on bothDiffusionOpsandConvectionOps.