Differential Operators

Todo

Refactor interfaces and code. Refactor tweaks.

Base.divFunction
D = div(Gx,Gy,Gz, ar)       # is #V × 3#T
D = div(Gu,Gv, ar)          # is #V × 2#T
D = div(G, ar)              # assumes G=[Gx;Gy;Gz] or G=[Gu;Gv]
D = div(G, A)               # as above and A is a Diagonal matrix
D = div(mesh)               # computes divergence operator in global 3d coordinates

Compute divergence operator on triangle mesh from gradient, where arguments are return values from cgtg (or spcot), cgtc or grad.

For the gradient in global 3d coordinates operator is the same as would be returned by spcot.

See also spcot, grad

source
MeshProcessing.cgtgMethod
Gx, Gy, Gz, ar = cgtg(mesh; areas=true)

Sparse gradient operator in global 3d coordinates.

Get sparse block components (Gx,Gy,Gz) of gradient operator such that the gradient operator G = vcat(Gx,Gy,Gz).

The sparse matrices Gx,Gy,Gz have dimension m × n where n,m=size(mesh) are the number of vertices (n) and the number of triangles (m).

If areas=false on input then the returned array ar has zero length.

The gradient is expressed per triangle in (global) 3d coordinates x,y,z, each matrix block provides one coordinate.

source
MeshProcessing.cgtlMethod

Sparse gradient operator in local coordinates.

Gu, Gv ar = cgtl(mesh; areas=true)

Get sparse block components (Gu,Gv) of gradient operator such that the gradient operator G = vcat(Gu,Gv).

The sparse matrices Gu,Gv have dimension m × n where n,m=size(mesh) are the number of vertices (n)and the number of triangles (m`).

If areas=false on input then the returned array ar has zero length.

The gradient is expressed in local coordinates u,v per triangle, each matrix block provides one coordinate.

source
MeshProcessing.gradFunction
G, ar = grad(mesh; areas::Bool=true)   # assemble from cgtg(mesh,areas)
G, ar = grad(Gx, Gy, Gz, ar)
G = grad(Gx, Gy, Gz)
G = grad(Gu, Gu, ar)
G = grad(Gu, Gu)

Assemble gradient operator, where Gx, Gy, Gz, Gu, Gv, ar are output of cgtg and cgtl.

If areas=false on input then the returned array ar has zero length.

See also gradl

source
MeshProcessing.gradlFunction
G, ar = gradl(mesh; areas::Bool=true)   # assemble G from cgtl(mesh,areas)
G = gradl(Gu, Gu, ar)                   # same as grad
G = gradl(Gu, Gu)                       # same as grad

Assemble gradient operator in local coordinates, where Gu, Gv, ar are output of cgtl.

If areas=false on input then the returned array ar has zero length.

See also grad

source