comparison docs/src/manifolds_charts_atlases.md @ 2003:524a52f190d7 feature/sbp_operators/laplace_curvilinear

Merge feature/grids/geometry_functions
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 29 Apr 2025 09:03:05 +0200
parents d89f7a1a6f37
children
comparison
equal deleted inserted replaced
1962:496b8d3903c6 2003:524a52f190d7
1 # Manifolds, Charts, and Atlases 1 # Manifolds, Charts, and Atlases
2 2
3 To construct grids on more complicated geometries we use manifolds described 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 4 by one or more charts. The charts describe a mapping from a logical parameter
5 to the geometry that we are interested in. If there are more than one chart 5 space to the geometry that we are interested in. If there are more than one
6 for a given geometry this collection of charts and their connection is 6 chart for a given geometry this collection of charts and how they are
7 described by and atlas. 7 connected is described by an atlas.
8
9 We consider a mapping from the logical coordidinates ``\xi \in \Xi`` to the
10 physical coordinates ``x \in \Omega``. A `Chart` describes the mapping by a
11 `ParameterSpace` respresenting ``\Xi`` and some mapping object that takes
12 arguments ``\xi \in \Xi`` and returns coordinates ``x\in\Omega``. The mapping
13 object can either be a function or some other callable object.
8 14
9 For the construction of differential and difference operators on a manifold 15 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 16 with a chart the library needs to know the Jacobian,
11 function of coordinates in the logical parameter space. Internally, 17 ``\frac{\partial x}{\partial \xi}``, of the mapping as a function of
12 Diffinitive.jl uses a local Jacobian function, `Grids.jacobian(f, ξ)`. For 18 coordinates in the logical parameter space. Internally, Diffinitive.jl uses a
13 geometry objects provided by the library this function should have fast and 19 local Jacobian function, `Grids.jacobian(f, ξ)`. For geometry objects provided
14 efficient implementations. If you are creating your own mapping functions you 20 by the library this function should have fast and efficient implementations.
15 can implement `Grids.jacobian` for your function or type, for example 21 If you are creating your own mapping functions you must implement
22 `Grids.jacobian` for your function or type, for example
16 23
17 ```julia 24 ```julia
18 f(x) = 2x 25 f(x) = 2x
19 Grids.jacobian(::typeof(f), x) = fill(2, length(x)) 26 Grids.jacobian(::typeof(f), x) = fill(2, length(x))
20 ``` 27 ```
30 37
31 ```julia 38 ```julia
32 using ForwardDiff 39 using ForwardDiff
33 Grids.jacobian(f,x) = ForwardDiff.jacobian(f,x) 40 Grids.jacobian(f,x) = ForwardDiff.jacobian(f,x)
34 ``` 41 ```
35
36 <!-- What more needs to be said here? --/>