From 257d73bd4ea22b2b19a01b9bccc5f2d642284f2b Mon Sep 17 00:00:00 2001 From: Keita Nakamura Date: Mon, 5 Aug 2024 21:05:34 +0900 Subject: [PATCH] Update docs for MPValue --- docs/src/getting_started.md | 2 +- src/Interpolations/mpvalue.jl | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) 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: