Skip to content

Question about the AMR Functionality in Castro. #3026

Answered by zingale
xiaoxiangyeyu-zxy asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

I don't think that there are any default refinement indicators. In the docs:
https://amrex-astro.github.io/Castro/docs/AMR.html#tagging-for-refinement
it shows using density and temperature as an example.

The gradient is computed simply the difference between two adjancent zones, without any dx normalization.

The relative gradient divides the gradient by the cell value. The code for that is here:
https://github.com/AMReX-Codes/amrex/blob/bd2d730d925bf2b3dc5911b821deb52501d30890/Src/AmrCore/AMReX_ErrorList.cpp#L395

so relative gradient checks:

max(abs(a(i+1,j,k) - a(i,j,k)), abs(a(i,j,k) - a(i-1,j,k))) > threshold * abs(a(i,j,k))

and if that is true, then it tags a cell for refinement.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@xiaoxiangyeyu-zxy
Comment options

Answer selected by xiaoxiangyeyu-zxy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants