Skip to content

Commit

Permalink
Remove abstract type Transfer in collision.jl and dam_break.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
KeitaNakamura committed Aug 12, 2024
1 parent 2b11da6 commit 58d6c02
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
11 changes: 5 additions & 6 deletions docs/literate/examples/collision.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@
using Tesserae
using StableRNGs #src

abstract type Transfer end
struct FLIP <: Transfer α::Float64 end
struct APIC <: Transfer end
struct TPIC <: Transfer end
struct XPIC <: Transfer m::Int end
struct FLIP α::Float64 end
struct APIC end
struct TPIC end
struct XPIC m::Int end

function main(transfer::Transfer = FLIP(1.0))
function main(transfer = FLIP(1.0))

## Simulation parameters
h = 0.1 # Grid spacing
Expand Down
7 changes: 3 additions & 4 deletions docs/literate/examples/dam_break.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
using Tesserae
using LinearAlgebra

abstract type Transfer end
struct FLIP <: Transfer α::Float64 end
struct TPIC <: Transfer end
struct FLIP α::Float64 end
struct TPIC end

function main(transfer::Transfer = FLIP(1.0))
function main(transfer = FLIP(1.0))

## Simulation parameters
h = 0.02 # Grid spacing
Expand Down

0 comments on commit 58d6c02

Please sign in to comment.