Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify ArbitraryMotion struct #371

Closed
pvillacorta opened this issue Apr 16, 2024 · 2 comments · Fixed by #408
Closed

Simplify ArbitraryMotion struct #371

pvillacorta opened this issue Apr 16, 2024 · 2 comments · Fixed by #408

Comments

@pvillacorta
Copy link
Collaborator

pvillacorta commented Apr 16, 2024

Change

mutable struct ArbitraryMotion{T<:Real,V<:AbstractVector{T}} <: MotionModel{T}
    period_durations::AbstractVector{T}
    dx::AbstractArray{T,2}
    dy::AbstractArray{T,2}
    dz::AbstractArray{T,2}
    ux::Vector{LinearInterpolator{T,V}}
    uy::Vector{LinearInterpolator{T,V}}
    uz::Vector{LinearInterpolator{T,V}}
end 

to:

 mutable struct ArbitraryMotion{T<:Real} <: MotionModel{T}
     period_durations::AbstractVector{T}
     dx::AbstractArray{T, 2}
     dy::AbstractArray{T, 2}
     dz::AbstractArray{T, 2}
 end

Originally posted by @cncastillo in #184 (comment)

@pvillacorta
Copy link
Collaborator Author

pvillacorta commented Apr 25, 2024

The most efficient solution should be deleting the times function or, at least, calculate the time nodes for ArbitraryMotion using ranges between 0 and 1 and then scaling them with the values of period_durations

Also consider periodic and non-periodic ArbitraryMotion.

  • Periodic should start and end with dx = 0
  • Non-periodic starts at 0 but does not need to end in 0

Also simplify adapt functions in GPUFunctions.jl

@pvillacorta
Copy link
Collaborator Author

Also, we need to re-implement resetmag matrix for flow dynamics, as it was removed from ArbitraryMotion for simplicity

@pvillacorta pvillacorta mentioned this issue May 15, 2024
14 tasks
@pvillacorta pvillacorta linked a pull request Jun 12, 2024 that will close this issue
@pvillacorta pvillacorta linked a pull request Jun 20, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant