Skip to content

Commit

Permalink
Specialize 'Proj' for 'SubDomain'
Browse files Browse the repository at this point in the history
  • Loading branch information
eliascarv committed Dec 18, 2024
1 parent 4dbd2e2 commit 575132c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/transforms/proj.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ applycoord(t::Proj, g::RectilinearGrid) = TransformedGrid(g, t)

applycoord(t::Proj, g::StructuredGrid) = TransformedGrid(g, t)

applycoord(t::Proj, d::SubDomain) = TransformedDomain(d, t)

# -----------
# IO METHODS
# -----------
Expand Down
10 changes: 10 additions & 0 deletions test/transforms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1414,6 +1414,16 @@ end
r, c = TB.apply(f, d)
@test r SimpleMesh(f.(vertices(d)), topology(d))

# ----------
# SUBDOMAIN
# ----------

f = Proj(Polar)
g = CartesianGrid((10, 10), cart(1, 1), T.((1, 1)))
d = view(g, 1:10)
r, c = TB.apply(f, d)
@test r view(SimpleMesh(f.(vertices(g)), topology(g)), 1:10)

# --------------
# SPECIAL CASES
# --------------
Expand Down

0 comments on commit 575132c

Please sign in to comment.