Skip to content
This repository has been archived by the owner on May 18, 2023. It is now read-only.

Avod trans step size0 #996

Open
wants to merge 2 commits into
base: development
Choose a base branch
from
Open

Avod trans step size0 #996

wants to merge 2 commits into from

Conversation

tongtongcao
Copy link
Collaborator

Step size of the last RK step from one measurement layer to next layer is always 0.
For such RK step with step size of 0, RK calculation is taken, but scaled by 0.
Therefore, it is safe update. The update will not change results at all, but will save some running time.
For transport, percentage of saved time is about # of measurement layers / total of steps from first layer to last layer.

raffaelladevita
raffaelladevita previously approved these changes Dec 3, 2022
Copy link
Collaborator

@raffaelladevita raffaelladevita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess probably it was working anyway because Zf-Zi was never an exact multiple of the step size but it's good to have a check on that

@baltzell
Copy link
Collaborator

baltzell commented Dec 3, 2022

== testing on a float is generally not what you want, but maybe it's appropriate here.

@tongtongcao
Copy link
Collaborator Author

tongtongcao commented Dec 3, 2022

I guess probably it was working anyway because Zf-Zi was never an exact multiple of the step size but it's good to have a check on that

Step size is 1 cm except the step reaching next measurement layer. For this step,
if(Math.signum(Z[f] - Z[i]) *(z+s)>Math.signum(Z[f] - Z[i]) *Z[f])
s=Math.signum(Z[f] - Z[i]) *Math.abs(Z[f]-z);
However, z is updated inside of loop. Even if the next measurement layer has been reached, transport will continue one more step with step size = 0.
So the update adds a condition to stop loop when next layer is reached.

@baltzell
Copy link
Collaborator

baltzell commented Dec 7, 2022

Is there any good reason not to accept this?

zieglerv
zieglerv previously approved these changes Dec 12, 2022
@baltzell baltzell added this to the Pass3 milestone Jan 19, 2023
@raffaelladevita raffaelladevita dismissed stale reviews from zieglerv and themself via 1d15469 March 27, 2023 22:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants