diff --git a/docs/src/getting_started.md b/docs/src/getting_started.md index 950829e2..99d76d35 100644 --- a/docs/src/getting_started.md +++ b/docs/src/getting_started.md @@ -60,7 +60,7 @@ end @. particles.m = ρ * particles.V # Interpolation -mpvalues = [MPValue(Vec{2}, LinearBSpline()) for _ in 1:length(particles)] +mpvalues = [MPValue(LinearBSpline(), mesh) for _ in 1:length(particles)] # Plot results by `Plots.@gif` Δt = 0.001 diff --git a/src/Interpolations/mpvalue.jl b/src/Interpolations/mpvalue.jl index 87c20930..85f44fa8 100644 --- a/src/Interpolations/mpvalue.jl +++ b/src/Interpolations/mpvalue.jl @@ -31,11 +31,7 @@ julia> mesh = CartesianMesh(1.0, (0,5), (0,5)); # computational domain julia> x = Vec(2.2, 3.4); # particle coordinate -julia> mp = MPValue(Vec{2}, QuadraticBSpline()) -MPValue: - Interpolation: QuadraticBSpline() - Property names: w::Matrix{Float64}, ∇w::Matrix{Vec{2, Float64}} - Neighboring nodes: CartesianIndices((1:0, 1:0)) +julia> mp = MPValue(QuadraticBSpline(), mesh); julia> update!(mp, x, mesh) # update `mp` at position `x` in `mesh` MPValue: