Validate particle positions/accelerations and preserve adaptive timestep across outputs#190
Open
AhmedSalih3d wants to merge 7 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
ExtractCells!to throw aDomainErrorwhen a particle position contains non-finite values and removed an unsafe@simd ivdepuse to make the loop clearer (src/SPHNeighborList.jl).Δtthat computes max acceleration from vectors of acceleration and added aninitial_time_stephelper that preservesSimMetaData.CurrentTimeStepacross output chunks; exportedinitial_time_step(src/TimeStepping.jl).UpdateTimeStepto detect non-finite acceleration magnitudes and throw aDomainErrorto fail fast on unstable states (src/TimeStepping.jl).FullTimeStepoverloads to route calls consistently for differentSimulationMetaDatatype parameters (src/TimeStepping.jl).src/SPHCellList.jl) replaced the unconditional initial timestep calculation withinitial_time_step(...), deferred the first neighbor-list build to only whenSimMetaData.IndexCounter == 0, and moved theSingleNeighborTimeSteppinginitialization into that branch.Pressure!,ApplyMDBCBeforeHalf!, andNeighborLoopPerParticle!forSingleNeighborTimeSteppingmode to reinitialize state after the rebuild (src/SPHCellList.jl).dt₂after timestep updates to keep the half-step consistent with the newdtvalue (src/SPHCellList.jl).Testing
] test .which exercised neighbor-list, time-stepping, and integration tests; all tests passed.DomainErroris raised for non-finite inputs and to confirm preserved initial timestep behavior; these tests succeeded.Codex Task