Mercurial > repos > public > sbplib_julia
diff docs/src/manifolds_charts_atlases.md @ 1922:84e5ab97902d feature/grids/manifolds
Add sketch of a docs page about manifolds, charts, and atalses
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 06 Feb 2025 08:59:47 +0100 |
parents | |
children | 3694f11075c5 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/docs/src/manifolds_charts_atlases.md Thu Feb 06 08:59:47 2025 +0100 @@ -0,0 +1,36 @@ +# Manifolds, Charts, and Atlases + +To construct grids on more complicated geometries we use manifolds described +by one or more charts. The charts describe a mapping from some parameter space +to the geometry that we are interested in. If there are more than one chart +for a given geometry this collection of charts and their connection is +described by and atlas. + +For the construction of differential and difference operators on a manifold +with a chart the library needs to know the Jacobian of the mapping as a +function of coordinates in the logical parameter space. Internally, +Diffinitive.jl uses a local Jacobian function, `Grids.jacobian(f, ΞΎ)`. For +geometry objects provided by the library this function should have fast and +efficient implementations. If you are creating your own mapping functions you +can implement `Grids.jacobian` for your function or type, for example + +```julia +f(x) = 2x +Grids.jacobian(::typeof(f), x) = fill(2, length(x)) +``` + +```julia +struct F end +(::F)(x) = 2x +Grids.jacobian(::F, x) = fill(2,length(x)) +``` + +You can also provide a fallback function using one of the many automatic +differentiation packages, for example + +```julia +using ForwardDiff +Grids.jacobian(f,x) = ForwardDiff.jacobian(f,x) +``` + +<!-- What more needs to be said here? --/>