comparison 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
comparison
equal deleted inserted replaced
1921:7fb713570965 1922:84e5ab97902d
1 # Manifolds, Charts, and Atlases
2
3 To construct grids on more complicated geometries we use manifolds described
4 by one or more charts. The charts describe a mapping from some parameter space
5 to the geometry that we are interested in. If there are more than one chart
6 for a given geometry this collection of charts and their connection is
7 described by and atlas.
8
9 For the construction of differential and difference operators on a manifold
10 with a chart the library needs to know the Jacobian of the mapping as a
11 function of coordinates in the logical parameter space. Internally,
12 Diffinitive.jl uses a local Jacobian function, `Grids.jacobian(f, ΞΎ)`. For
13 geometry objects provided by the library this function should have fast and
14 efficient implementations. If you are creating your own mapping functions you
15 can implement `Grids.jacobian` for your function or type, for example
16
17 ```julia
18 f(x) = 2x
19 Grids.jacobian(::typeof(f), x) = fill(2, length(x))
20 ```
21
22 ```julia
23 struct F end
24 (::F)(x) = 2x
25 Grids.jacobian(::F, x) = fill(2,length(x))
26 ```
27
28 You can also provide a fallback function using one of the many automatic
29 differentiation packages, for example
30
31 ```julia
32 using ForwardDiff
33 Grids.jacobian(f,x) = ForwardDiff.jacobian(f,x)
34 ```
35
36 <!-- What more needs to be said here? --/>