changeset 1869:20bd8887db0d feature/grids/manifolds

Fix Aqua and JET fails
author Jonatan Werpers <jonatan@werpers.com>
date Fri, 24 Jan 2025 23:40:28 +0100
parents 81559cb7b11c
children 27534b471b6a
files Manifest.toml Project.toml src/Grids/manifolds.jl
diffstat 3 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/Manifest.toml	Thu Jan 23 23:22:11 2025 +0100
+++ b/Manifest.toml	Fri Jan 24 23:40:28 2025 +0100
@@ -2,7 +2,7 @@
 
 julia_version = "1.11.2"
 manifest_format = "2.0"
-project_hash = "a8bfbeb10ca8c44ef39fdba75f02b23fc92b2c6a"
+project_hash = "ee8c0a343999f5b3688985e0f72b77be7cbe1c92"
 
 [[deps.Artifacts]]
 uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
--- a/Project.toml	Thu Jan 23 23:22:11 2025 +0100
+++ b/Project.toml	Fri Jan 24 23:40:28 2025 +0100
@@ -26,6 +26,7 @@
 StaticArrays = "1.0"
 TOML = "1.0"
 Makie = "0.21"
+Plots = "1.40"
 SparseArrayKit = "0.3"
 Tokens = "0.1.1"
 SparseArrays = "1.10"
--- a/src/Grids/manifolds.jl	Thu Jan 23 23:22:11 2025 +0100
+++ b/src/Grids/manifolds.jl	Fri Jan 24 23:40:28 2025 +0100
@@ -60,6 +60,9 @@
 
 struct Simplex{T,D,NV} <: ParameterSpace{D}
     verticies::NTuple{NV,SVector{D,T}}
+
+    Simplex(verticies::Tuple{SVector{D,T}, Vararg{SVector{D,T},N}}) where {T,D,N} = new{T,D,N+1}(verticies)
+    Simplex(::Tuple{}) = throw(ArgumentError("Must provide at least one vertex."))
 end
 
 function Simplex(verticies::Vararg{AbstractArray})
@@ -191,7 +194,7 @@
 
 function polygon_edges(ps...)
     n = length(ps)
-    return [LineSegment(ps[i], ps[mod1(i+1,n)]) for i ∈ eachindex(Ps)]
+    return [LineSegment(ps[i], ps[mod1(i+1,n)]) for i ∈ eachindex(ps)]
 end
 
 struct Circle{T,PT} <: Curve
@@ -199,7 +202,10 @@
     r::T
 end
 
-(c::Circle)(θ) = c.c + r*@SVector[cos(Θ), sin(Θ)]
+function (C::Circle)(θ)
+    (;c, r) = C
+    c + r*@SVector[cos(θ), sin(θ)]
+end
 
 struct TransfiniteInterpolationSurface{T1,T2,T3,T4} <: Surface
     c₁::T1