Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LasNikas committed Jan 9, 2025
1 parent 4c800b9 commit 27da95e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
9 changes: 7 additions & 2 deletions src/general/initial_condition.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,13 @@ initial_condition = InitialCondition(; coordinates, velocity, mass, density)
initial_condition = InitialCondition(; coordinates, velocity=x -> 2x, mass=1.0, density=1000.0)
# output
InitialCondition{Float64}(-1.0, [0.0 1.0 1.0; 0.0 0.0 1.0], [0.0 2.0 2.0; 0.0 0.0 2.0], [1.0, 1.0, 1.0], [1000.0, 1000.0, 1000.0], [0.0, 0.0, 0.0])
┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
│ InitialCondition{Float64} │
│ ═════════════════════════ │
│ ndims: ……………………………………………………………… 2 │
│ number of particles: ………………………… 3 │
│ particle spacing: ………………………………… -1.0 │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
```
"""
struct InitialCondition{ELTYPE}
Expand Down Expand Up @@ -203,7 +209,6 @@ function Base.show(io::IO, ::MIME"text/plain", ic::InitialCondition)
end
end


function wrap_function(function_::Function, ::Val)
# Already a function
return function_
Expand Down
1 change: 0 additions & 1 deletion src/preprocessing/geometries/triangle_mesh.jl
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ function Base.show(io::IO, ::MIME"text/plain", geometry::TriangleMesh)
end
end


@inline Base.ndims(::TriangleMesh{NDIMS}) where {NDIMS} = NDIMS

@inline Base.eltype(::TriangleMesh{NDIMS, ELTYPE}) where {NDIMS, ELTYPE} = ELTYPE
Expand Down
3 changes: 2 additions & 1 deletion src/preprocessing/point_in_poly/winding_number_jacobson.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ function Base.show(io::IO, ::MIME"text/plain", winding::WindingNumberJacobson)
show(io, system)
else
summary_header(io, "WindingNumberJacobson")
summary_line(io, "winding number factor", "$(round(winding.winding_number_factor; digits=3))")
summary_line(io, "winding number factor",
"$(round(winding.winding_number_factor; digits=3))")
summary_line(io, "winding", "$(type2string(winding.winding))")
summary_footer(io)
end
Expand Down
2 changes: 0 additions & 2 deletions test/general/initial_condition.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
SphereShape(0.1, 0.5, (1.0, 0.5), 1000.0,
sphere_type=RoundSphere())))


@testset verbose=true "Show" begin
shape = RectangularShape(0.05, (20, 20), (0.0, 0.0), density=1.0)

Expand All @@ -35,7 +34,6 @@
│ number of particles: ………………………… 400 │
│ particle spacing: ………………………………… 0.05 │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘"""

end

@testset verbose=true "Constructors" begin
Expand Down

0 comments on commit 27da95e

Please sign in to comment.