Closed archermarx closed 1 month ago
Hi @archermarx
In WarpX, we have a static mesh refinement and currently adaptive MR is not supported
Mesh-refinement, if turned on, will therefore be triggered at initialization and the MR patch will remain static throughout the simulation.
If you setamr.max_level = 1
, you would also need to specify the region that you would want to refine.
This relates to the answer for (2)
You could have as many refined regions as you want, provided they do not overlap. You can set the region that you want to refine using an analytical function : `warpx.ref_patch_function(x,y,z)'. (I need to look up to see if this is supported with PICMI interface) Here is an example https://github.com/ECP-WarpX/WarpX/blob/development/Examples/Tests/particles_in_pml/inputs_mr_2d
Here is an example of how a refined grid is added with level specification https://github.com/ECP-WarpX/WarpX/blob/development/Examples/Physics_applications/plasma_acceleration/PICMI_inputs_plasma_acceleration_mr.py
Thanks for the answers!
Hi all,
I'm trying to understand how AMR works in WarpX, practically. I read the theory section in the docs, but it's all pretty low-level stuff about the specifics how how deposition is handled across mesh levels. I'm trying to understand some of the higher level concepts.
How is mesh refinement triggered during a simulation? I.e. if I enable mesh refinement by setting
amr.max_level = 1
, how does WarpX determine when it needs to refine the meshHow many refined regions can be active on the same level? Can you only have one refined region at level 1, or can you have multiple (possibly disconnected) refined regions.
Is there an equivalent of the amr.max_level setting for PICMI inputs?