Skip to content

Guard particle name list accesses against an empty list. - #204

Merged
WeiqunZhang merged 1 commit into
AMReX-Fluids:developmentfrom
WeiqunZhang:fix-empty-particle-namelist
Aug 19, 2026
Merged

WeiqunZhang merged 1 commit into
AMReX-Fluids:developmentfrom
WeiqunZhang:fix-empty-particle-namelist

Conversation

@WeiqunZhang

Copy link
Copy Markdown
Member

ErrorEst and the particle_count plot variable both indexed element 0 of particleData.getNames(), which is empty unless use_tracer_particles is set, and operator[] returns nullptr on a miss. m_refine_particles and plt_ccse_regtest reach both sites by default.

Fixes #174.

ErrorEst and the particle_count plot variable both indexed element 0 of particleData.getNames(), which is empty unless use_tracer_particles is set, and operator[] returns nullptr on a miss. m_refine_particles and plt_ccse_regtest reach both sites by default.

Fixes AMReX-Fluids#174.
@WeiqunZhang
WeiqunZhang merged commit ac42345 into AMReX-Fluids:development Aug 19, 2026
12 checks passed
@WeiqunZhang
WeiqunZhang deleted the fix-empty-particle-namelist branch August 19, 2026 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OOB particles_namelist[0] in ErrorEst and particle_count plotting when no particles exist

2 participants