Skip to content

Accumulate the correct cumulative ref_ratio in ErrorEst. - #203

Merged
WeiqunZhang merged 1 commit into
AMReX-Fluids:developmentfrom
WeiqunZhang:fix-errorest-cumulative-ref-ratio
Aug 19, 2026
Merged

Accumulate the correct cumulative ref_ratio in ErrorEst.#203
WeiqunZhang merged 1 commit into
AMReX-Fluids:developmentfrom
WeiqunZhang:fix-errorest-cumulative-ref-ratio

Conversation

@WeiqunZhang

Copy link
Copy Markdown
Member

The particle-count loop multiplied rr by ref_ratio[levc] every iteration, giving ref_ratio[levc]^(lev-levc) rather than the product over levc..lev-1, so average_down used the wrong ratio when per-level ratios differ. Unchanged for uniform amr.ref_ratio.

Fixes #173.

The particle-count loop multiplied rr by ref_ratio[levc] every iteration, giving ref_ratio[levc]^(lev-levc) rather than the product over levc..lev-1, so average_down used the wrong ratio when per-level ratios differ. Unchanged for uniform amr.ref_ratio.

Fixes AMReX-Fluids#173.
@WeiqunZhang
WeiqunZhang merged commit e71c783 into AMReX-Fluids:development Aug 19, 2026
12 checks passed
@WeiqunZhang
WeiqunZhang deleted the fix-errorest-cumulative-ref-ratio 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.

ErrorEst particle refinement: cumulative ratio uses ref_ratio[levc] not ref_ratio[lev-1]

2 participants