Skip to content

Commit

Permalink
Added a new element type to accepted arrays of points in CellPoint
Browse files Browse the repository at this point in the history
  • Loading branch information
amartinhuertas committed Dec 22, 2021
1 parent ea21295 commit 77b31b1
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/CellData/CellFields.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 77b31b1

Please sign in to comment.