The equations of patchwork.solvers.cell_operator, declared on the code that implements them and checked by the tests.
Solve −∇⋅(a∇u)+cu=f on the leaf cells of a hierarchy.
- problem
- −∇⋅(a∇u)+cu=f,a≥0,c∈R or C
- curl curl
- ∇×(a∇×(Aϕϕ^))+cAϕ=f,∇×(Aϕϕ^)=(−∂zAϕ, r1∂r(rAϕ))
- energy
- E(u)=faces f∑afcf(vf⊤u)2+cells i∑ciViui2,vf⊤u=w+u+−w−u−,cf=dfAf
- azimuthal conductance
- w=r,cf=rfrmdfAf(radial face of Aϕ; rm the mean radius of the two values)
- face mean
- af=a−+a+2a−a+ (harmonic, the default),af=21(a−+a+) (arithmetic)
- symmetric coarse fine
- u∗=21δ(δ−1)ubelow+(1−δ2)uC+21δ(δ+1)uabove,δ=rk+21−21,df=21(hf+hc)(uniform; on a graded axis the Lagrange weights through the physical centres)
- conservative ghost
- ughost=3+r1−ruinner+r+12(r−1)ufine+(r+1)(r+3)8u∗,F=afAfhf(wu)ghost−(wu)fine
- dirichlet wall
- Aii+=h/2aAf,bi+=h/2aAfuD
- neumann wall
- bi+=aAfg
- axis
- Aii+=4πΔzafor Aϕ=ur/rc on 0<r<rc
- body
- Aii+=θdfafreeAf,bi+=θdfafreeAfUk
- Order
- 2
- Assumes
- the matrix is ∂E/∂u up to a factor 2: symmetric, complex symmetric (not Hermitian) for complex c; the conservative coarse-fine faces make it unsymmetric
- symmetric coarse-fine faces: second order in the mean, first order in the maximum norm next to a coarse-fine edge; linear or no interpolation where a neighbour along the face is missing, the mirror image beyond a
Neumann(0.0) wall or the axis - conservative coarse-fine faces: one flux, into the fine cell and out of the coarse one; linear ghost without the next fine cell
- bodies: a two-point flux to the surface (not Shortley-Weller), about first order in the maximum norm
- the order is in the volume-weighted L2 norm, for
coarse_fine="symmetric" (the default) - SuperLU on every rank; variable a with the azimuthal component is assembled but only constant a is tested
- References
- D. F. Martin and K. L. Cartwright, Solving Poisson's equation using adaptive mesh refinement, Tech. Rep. UCB/ERL M96/66, UC Berkeley (1996): quadratic coarse-fine interpolation as in
coarse_fine="conservative"
- Built from
The in-plane curl of the field u normal to the plane, (n, 2).
- scalar
- ∇×(uz^)=(∂yu, −∂xu)
- azimuthal
- ∇×(uϕ^)=(−∂zu, r1∂r(ru))
- Assumes
- 2D only; the derivatives of
gradient
- Built from
The gradient of a scalar u on the leaf cells, (n, ndim); zero in bodies.
- face difference
- gf=df(wu)+−(wu)−at the middle of the two values
- centre
- ∂au≈o+−o−g−o+−g+o−,o−<0<o+
- Order
- 2
- Assumes
- g± the face-length weighted means of the estimates on each side of the cell along the axis, at mean offsets o±; one side only gives that side's value
- the operator's own faces: coarse-fine interpolation (or the ghost), walls and surfaces of bodies; zero in bodies
- exact for linear fields and for Aϕ=Br/2; the order is in the maximum norm