Skip to content

Commit

Permalink
autoformat
Browse files Browse the repository at this point in the history
  • Loading branch information
maltezfaria committed Oct 18, 2023
1 parent e7631d4 commit ac048dd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion ext/IntiMakieExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ end

function Makie.convert_arguments(P::Type{<:Makie.Poly}, msh::Inti.AbstractMesh)
connec = Inti.triangle_connectivity(msh)
return Makie.convert_arguments(P,Inti.nodes(msh), connec)
return Makie.convert_arguments(P, Inti.nodes(msh), connec)

Check warning on line 38 in ext/IntiMakieExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/IntiMakieExt.jl#L37-L38

Added lines #L37 - L38 were not covered by tests
end

end # module
48 changes: 24 additions & 24 deletions src/mesh.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ entities(msh::LagrangeMesh) = keys(msh.ent2tags)
Set of all entities covered by the mesh.
"""
domain(msh::LagrangeMesh) = Domain(entities(msh))
domain(msh::LagrangeMesh) = Domain(entities(msh))

Check warning on line 94 in src/mesh.jl

View check run for this annotation

Codecov / codecov/patch

src/mesh.jl#L94

Added line #L94 was not covered by tests

"""
dom2elt(m::LagrangeMesh,Ω,E)::Vector{Int}
Expand Down Expand Up @@ -231,9 +231,9 @@ elements of `LagrangeSquare` type, the triangulation is done by splitting the
element in two triangles. For elements of `LagrangeTetrahedron` type, the four
faces are returned. This method will error if the element type is not supported.
"""
triangle_connectivity(msh::SubMesh) = _triangle_connectivity(msh.parent, msh.domain)
triangle_connectivity(msh::SubMesh) = _triangle_connectivity(msh.parent, msh.domain)
triangle_connectivity(msh::LagrangeMesh) = _triangle_connectivity(msh, domain(msh))
function _triangle_connectivity(msh::Inti.LagrangeMesh{N,T}::Inti.Domain) where {N,T}
function _triangle_connectivity(msh::Inti.LagrangeMesh{N,T}, Ω::Inti.Domain) where {N,T}
connec = Int[]
for E in Inti.element_types(msh)
el_idxs = Inti.dom2elt(msh, Ω, E)::Vector{Int}
Expand All @@ -242,39 +242,39 @@ function _triangle_connectivity(msh::Inti.LagrangeMesh{N,T},Ω::Inti.Domain) whe
if E <: Inti.LagrangeTriangle

Check warning on line 242 in src/mesh.jl

View check run for this annotation

Codecov / codecov/patch

src/mesh.jl#L234-L242

Added lines #L234 - L242 were not covered by tests
# extract the first three tags
for n in el_idxs
push!(connec,tags[1,n])
push!(connec,tags[2,n])
push!(connec,tags[3,n])
push!(connec, tags[1, n])
push!(connec, tags[2, n])
push!(connec, tags[3, n])
end
elseif E <: Inti.LagrangeSquare
for n in el_idxs

Check warning on line 250 in src/mesh.jl

View check run for this annotation

Codecov / codecov/patch

src/mesh.jl#L244-L250

Added lines #L244 - L250 were not covered by tests
# lower triangle
push!(connec,tags[1,n])
push!(connec,tags[2,n])
push!(connec,tags[3,n])
push!(connec, tags[1, n])
push!(connec, tags[2, n])
push!(connec, tags[3, n])

Check warning on line 254 in src/mesh.jl

View check run for this annotation

Codecov / codecov/patch

src/mesh.jl#L252-L254

Added lines #L252 - L254 were not covered by tests
# upper triangle
push!(connec,tags[3,n])
push!(connec,tags[4,n])
push!(connec,tags[1,n])
push!(connec, tags[3, n])
push!(connec, tags[4, n])
push!(connec, tags[1, n])
end
elseif E <: Inti.LagrangeTetrahedron
for n in el_idxs

Check warning on line 261 in src/mesh.jl

View check run for this annotation

Codecov / codecov/patch

src/mesh.jl#L256-L261

Added lines #L256 - L261 were not covered by tests
# four faces
push!(connec,tags[1,n])
push!(connec,tags[2,n])
push!(connec,tags[3,n])
push!(connec, tags[1, n])
push!(connec, tags[2, n])
push!(connec, tags[3, n])

Check warning on line 265 in src/mesh.jl

View check run for this annotation

Codecov / codecov/patch

src/mesh.jl#L263-L265

Added lines #L263 - L265 were not covered by tests
#
push!(connec,tags[1,n])
push!(connec,tags[2,n])
push!(connec,tags[4,n])
push!(connec, tags[1, n])
push!(connec, tags[2, n])
push!(connec, tags[4, n])

Check warning on line 269 in src/mesh.jl

View check run for this annotation

Codecov / codecov/patch

src/mesh.jl#L267-L269

Added lines #L267 - L269 were not covered by tests
#
push!(connec,tags[1,n])
push!(connec,tags[3,n])
push!(connec,tags[4,n])
push!(connec, tags[1, n])
push!(connec, tags[3, n])
push!(connec, tags[4, n])

Check warning on line 273 in src/mesh.jl

View check run for this annotation

Codecov / codecov/patch

src/mesh.jl#L271-L273

Added lines #L271 - L273 were not covered by tests
#
push!(connec,tags[2,n])
push!(connec,tags[3,n])
push!(connec,tags[4,n])
push!(connec, tags[2, n])
push!(connec, tags[3, n])
push!(connec, tags[4, n])
end

Check warning on line 278 in src/mesh.jl

View check run for this annotation

Codecov / codecov/patch

src/mesh.jl#L275-L278

Added lines #L275 - L278 were not covered by tests
else
error("element type $E not supported")

Check warning on line 280 in src/mesh.jl

View check run for this annotation

Codecov / codecov/patch

src/mesh.jl#L280

Added line #L280 was not covered by tests
Expand Down

0 comments on commit ac048dd

Please sign in to comment.