From 77b31b1f750209c1cbee3975a2347f83e0bc44d1 Mon Sep 17 00:00:00 2001 From: amartin Date: Wed, 22 Dec 2021 11:10:49 +1100 Subject: [PATCH] Added a new element type to accepted arrays of points in CellPoint --- src/CellData/CellFields.jl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/CellData/CellFields.jl b/src/CellData/CellFields.jl index 4ca12fd59..5ce2532a3 100644 --- a/src/CellData/CellFields.jl +++ b/src/CellData/CellFields.jl @@ -2,15 +2,18 @@ A single point or an array of points on the cells of a Triangulation CellField objects can be evaluated efficiently at CellPoint instances. """ + +const CPET=Union{Point,AbstractArray{<:Point},VectorBlock{<:AbstractArray{<:Point}}} + struct CellPoint{DS} <: CellDatum - cell_ref_point::AbstractArray{<:Union{Point,AbstractArray{<:Point}}} - cell_phys_point::AbstractArray{<:Union{Point,AbstractArray{<:Point}}} + cell_ref_point::AbstractArray{<:CPET} + cell_phys_point::AbstractArray{<:CPET} trian::Triangulation domain_style::DS end function CellPoint( - cell_ref_point::AbstractArray{<:Union{Point,AbstractArray{<:Point}}}, + cell_ref_point::AbstractArray{<:CPET}, trian::Triangulation, domain_style::ReferenceDomain) @@ -20,7 +23,7 @@ function CellPoint( end function CellPoint( - cell_phys_point::AbstractArray{<:Union{Point,AbstractArray{<:Point}}}, + cell_phys_point::AbstractArray{<:CPET}, trian::Triangulation, domain_style::PhysicalDomain) cell_map = get_cell_map(trian) @@ -623,7 +626,7 @@ function _to_common_domain(a::CellField...) Cannote operate cellfields defined over more than 2 different triangulations at this moment. """ - @notimplemented + @notimplemented end map(i->change_domain(i,target_trian,target_domain),a) end