changeset 1781:a73838c9ef94 feature/grids/manifolds

Let Chart implement Base.ndims instead of domain_dim
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 16 Sep 2024 09:05:47 +0200
parents 8ecdc5bb46be
children 614f731af685
files src/Grids/manifolds.jl test/Grids/manifolds_test.jl
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/Grids/manifolds.jl	Mon Sep 16 08:58:12 2024 +0200
+++ b/src/Grids/manifolds.jl	Mon Sep 16 09:05:47 2024 +0200
@@ -19,7 +19,6 @@
 """
 abstract type ParameterSpace{D} end
 Base.ndims(::ParameterSpace{D}) where D = D
-# TBD:  Should implement domain_dim?
 
 struct Interval{T} <: ParameterSpace{1}
     a::T
@@ -95,7 +94,7 @@
     parameterspace::PST
 end
 
-domain_dim(::Chart{D}) where D = D
+Base.ndims(::Chart{D}) where D = D
 (c::Chart)(ξ) = c.mapping(ξ)
 parameterspace(c::Chart) = c.parameterspace
 
--- a/test/Grids/manifolds_test.jl	Mon Sep 16 08:58:12 2024 +0200
+++ b/test/Grids/manifolds_test.jl	Mon Sep 16 09:05:47 2024 +0200
@@ -69,6 +69,7 @@
     @test c isa Chart{2}
     @test c([3,2]) == [6,4]
     @test parameterspace(c) == unitsquare()
+    @test ndims(c) == 2
 end
 
 @testset "Atlas" begin