diff src/Grids/manifolds.jl @ 1564:35fe4375b35f feature/grids/manifolds

Export things and fix ConcreteChart and Simplex
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 25 Apr 2024 13:17:48 +0200
parents 81e97d3bec8c
children 90af15f38c62
line wrap: on
line diff
--- a/src/Grids/manifolds.jl	Wed Apr 24 13:26:30 2024 +0200
+++ b/src/Grids/manifolds.jl	Thu Apr 25 13:17:48 2024 +0200
@@ -47,6 +47,8 @@
     verticies::NTuple{D,SVector{D,T}}
 end
 
+Simplex(verticies::Vararg{AbstractArray}) = Simplex(Tuple(SVector(v...) for v ∈ verticies))
+
 Triangle{T} = Simplex{T,2}
 Tetrahedron{T} = Simplex{T,3}
 
@@ -84,9 +86,9 @@
 (c::Chart{D})(x̄::SVector{D}) where D = c(x̄...)
 
 
-struct ConcereteChart{PST<:ParameterSpace, MT}
+struct ConcreteChart{D, PST<:ParameterSpace{D}, MT} <: Chart{D}
+    mapping::MT
     parameterspace::PST
-    mapping::MT
 end
 
 (c::Chart)(x̄) = c.mapping(x̄)