-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adaptive mesh refinement in specific region of computational domain #392
Comments
Hey Mike, seems like the text and the suggested inputs are not aligned, in that your inputs could be adaptive if the density is changing over time. If you want static refinement in regions, there are couple ways to do it, but based on your inputs above, you could simply refine within a subbox when the density is greater than zero (which is always, hopefully). If this is your only criteria, you could set the refinement interval to be 1000000 or something so that it never checks again. But combining a criteria that never changes which points it tags with another that is dynamic is not an issue. Perhaps I'm not understanding what you want though. Let me know |
Thanks for the reply Marc! Sorry I was not clear. I was thinking of a feature that allows dynamic refinement but only to a subset of the computational domain. In my example, if the computational domain was, say
the inputs provided above would adaptively refine density variations within the specified region, leaving the outer bounds of the computational domain unresolved. Is there a way to do this with the current implementation? This is not necessarily an issue as opposed to a feature. |
Your usage seems correct. each refinement criteria takes optional arguments "in_box_lo" and "in_box_hi" that define the physical coordinates of where that criteria will be applied. It should not tag any points outside that box (except by way of the "n_error_buf" functionality, and this box defaults to the entire domain. Let me know if you see behavior suggesting that it doesn't work as expected. |
Yep, that is exactly how I was thinking this would work. But, the currently implementation of LMeX supports either AMR or specification of |
I think I agree with you, but this is what I'd call a bug. Yes, for each specific refinement criteria, the tagging should work only on the intersection of each box with the m_domain_box at at that level associated with that criteria, and m_domain_box should default to the entire problem domain box. I'm not sure how it became what it is now, but I'm good with being able to set the refinement criteria box as a subdomain in physical coordinates of the entire domain, and being able to set a condition within that box that is always true (such as density > -1). IT would be great if you submitted a PR to AMReX and tag me as a reviewer. Thanks for pointing that out! |
Okay, sounds good. I am going to be out of the office for the next few weeks, but I will put it on the todo list for when I get back! |
Excellent. In theory, it should be a lot faster if the subbox is a tiny fraction of the domain too (although it's rare that regrinding takes too much time anyway). thanks for pointing this out. |
Coming back to this... I was able to get this feature to work, but it does not seem like AMReX supports
and on the PeleLMeX side, I set the box size to the domain is In my opinion, this is a bit of a hack so I have not initiated a PR. If this is something we want to pursue further, we will probably need support on the AMReX side to allow something like this. I wasn't sure how to do it cleanly/safely, but it should be possible with a little more thought. |
I'd prefer to tag cells you want rather than untagging those you don't. The issue is getting "proper nesting" correct. It turns out to be really complicated figuring out that bit. We had something like that for preventing c-f boundaries at outflows and it was a mess. I think that if you made every refinement criteria using the "in_box" argument it should do what you want, no? |
Hi all,
Is there any interest in combining the static and adaptive mesh refinement approaches? I am finding many instances where I would like to adaptively refine only a specific region of the flow with a certain criteria. It would look something like:
This would only tag density differences within the specified
in_box
region.Thanks!
Mike
The text was updated successfully, but these errors were encountered: