Skip to content

Commit

Permalink
Adapt hydrostatic water column to GPU
Browse files Browse the repository at this point in the history
  • Loading branch information
efaulhaber committed Mar 20, 2024
1 parent f542c62 commit 1e66b68
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions examples/fluid/hydrostatic_water_column_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fluid_system = WeaklyCompressibleSPHSystem(tank.fluid, fluid_density_calculator,
# ==== Boundary

# This is to set another boundary density calculation with `trixi_include`
boundary_density_calculator = PressureZeroing()
boundary_density_calculator = AdamiPressureExtrapolation()

# This is to set wall viscosity with `trixi_include`
viscosity_wall = nothing
Expand All @@ -53,7 +53,7 @@ boundary_model = BoundaryModelDummyParticles(tank.boundary.density, tank.boundar
boundary_density_calculator,
smoothing_kernel, smoothing_length,
viscosity=viscosity_wall)
# boundary_system = BoundarySPHSystem(tank.boundary, boundary_model, movement=nothing)
boundary_system = BoundarySPHSystem(tank.boundary, boundary_model, movement=nothing)

# ==========================================================================================
# ==== Simulation
Expand All @@ -63,13 +63,11 @@ Adapt.@adapt_structure InitialCondition
Adapt.@adapt_structure WeaklyCompressibleSPHSystem
Adapt.@adapt_structure BoundarySPHSystem
Adapt.@adapt_structure BoundaryModelDummyParticles

fluid_system = adapt(CuArray, fluid_system)
boundary_model = adapt(CuArray, boundary_model)
boundary = adapt(CuArray, tank.boundary)
boundary_system = BoundarySPHSystem(boundary, boundary_model, movement=nothing)
boundary_system = adapt(CuArray, boundary_system)

semi = Semidiscretization(boundary_system, neighborhood_search=nothing)
semi = Semidiscretization(fluid_system, boundary_system, neighborhood_search=nothing)
ode = semidiscretize(semi, tspan, data_type=CuArray)

info_callback = InfoCallback(interval=50)
Expand Down

0 comments on commit 1e66b68

Please sign in to comment.