|
| 1 | +""" |
| 2 | + MetricTermsCrossProduct() |
| 3 | +
|
| 4 | +Struct used for multiple dispatch on functions that compute the metric terms. |
| 5 | +When the argument `metric_terms` is of type `MetricTermsCrossProduct`, the |
| 6 | +contravariant vectors are computed using the cross-product form. |
| 7 | +""" |
| 8 | +struct MetricTermsCrossProduct end |
| 9 | + |
| 10 | +""" |
| 11 | + MetricTermsInvariantCurl() |
| 12 | +
|
| 13 | +Struct used for multiple dispatch on functions that compute the metric terms. |
| 14 | +When the argument `metric_terms` is of type `MetricTermsInvariantCurl`, the |
| 15 | +contravariant vectors are computed using the invariant curl form. |
| 16 | +## References |
| 17 | +- Kopriva, D. A. (2006). Metric identities and the discontinuous spectral element method on |
| 18 | + curvilinear meshes. Journal of Scientific Computing 26, 301-327. |
| 19 | + [DOI: 10.1007/s10915-005-9070-8](https://doi.org/10.1007/s10915-005-9070-8) |
| 20 | +- Vinokur, M. and Yee, H. C. (2001). Extension of efficient low dissipation high order |
| 21 | + schemes for 3-D curvilinear moving grids. In Caughey, D. A., and Hafez, M. M. (eds.), |
| 22 | + Frontiers of Computational Fluid Dynamics 2002, World Scientific, Singapore, pp. 129–164. |
| 23 | + [DOI: 10.1142/9789812810793_0008](https://doi.org/10.1142/9789812810793_0008) |
| 24 | +""" |
| 25 | +struct MetricTermsInvariantCurl end |
| 26 | + |
| 27 | +""" |
| 28 | + MetricTermsCovariantSphere(christoffel_symbols = ChristoffelSymbolsAutodiff()) |
| 29 | +
|
| 30 | +Struct specifying options for computing geometric information for discretizations in |
| 31 | +covariant form based on an exact representation of the spherical geometry. Currently, the |
| 32 | +only field is `christoffel_symbols`, specifying the approach used to compute the |
| 33 | +Christoffel symbols, for which the options are [`ChristoffelSymbolsAutodiff`](@ref) or |
| 34 | +[`ChristoffelSymbolsCollocationDerivative`](@ref). |
| 35 | +""" |
| 36 | +struct MetricTermsCovariantSphere{ChristoffelSymbols} |
| 37 | + christoffel_symbols::ChristoffelSymbols |
| 38 | + function MetricTermsCovariantSphere(; |
| 39 | + christoffel_symbols::ChristoffelSymbols = ChristoffelSymbolsAutodiff()) where {ChristoffelSymbols} |
| 40 | + return new{ChristoffelSymbols}(christoffel_symbols) |
| 41 | + end |
| 42 | +end |
| 43 | + |
| 44 | +@doc raw""" |
| 45 | + ChristoffelSymbolsAutodiff() |
| 46 | +
|
| 47 | +Struct used for multiple dispatch on functions that compute the Christoffel symbols. This |
| 48 | +option uses [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) to compute |
| 49 | +```math |
| 50 | +\Gamma_{jk}^i = |
| 51 | +\frac{1}{2}G^{il}\big(\partial_j G_{kl} + \partial_k G_{jl} - \partial_l G_{jk}\big) |
| 52 | +``` |
| 53 | +using forward-mode automatic differentiation. |
| 54 | +!!! warning |
| 55 | + Using this option with [`GlobalSphericalCoordinates`](@ref) is prone to `NaN` values as |
| 56 | + a result of the polar singularity. This is remedied through the use of |
| 57 | + [`GlobalCartesianCoordinates`](@ref). |
| 58 | +""" |
| 59 | +struct ChristoffelSymbolsAutodiff end |
| 60 | + |
| 61 | +@doc raw""" |
| 62 | + ChristoffelSymbolsCollocationDerivative() |
| 63 | +
|
| 64 | +Struct used for multiple dispatch on functions that compute the Christoffel symbols. |
| 65 | +Letting $I^N$ denote the degree $N$ polynomial interpolation operator collocated with the |
| 66 | +scheme's quadrature nodes, this option computes the Christoffel symbols at each quadrature |
| 67 | +node using the approximation |
| 68 | +```math |
| 69 | +\Gamma_{jk}^i \approx |
| 70 | +\frac{1}{2}G^{il}\big(\partial_j I^N G_{kl} + \partial_k I^N G_{jl} - \partial_l I^N G_{jk}\big). |
| 71 | +``` |
| 72 | +""" |
| 73 | +struct ChristoffelSymbolsCollocationDerivative end |
0 commit comments