Derivs: add template instantiation for cell centered grid functions#344
Derivs: add template instantiation for cell centered grid functions#344
Conversation
|
Since, as far as I recall, in CarpetX, we tie centering ``` which is "strange" (but yes it is equal to |
|
|
And it actually computes something sensible? Ie what does the |
|
It only used to detect shocks. It's an approximation to the cell center value of that cell and it's good enough for shock detection.
|
|
Ok, so |
|
I don't understand. I need cell-centered derivative of a cell-centered grid function for shock detection purpose. The easiest way is to use finite difference. right? |
|
By "cell centered" what do you mean? CarpetX thinks of "<1,1,1>" as "an average over the cell", and not "the value of a function [eg the metric] sampled at the location of the center of the cell". Which one do you actually have? |
|
It’s cell-average. But also an approximation of cell center value. Do you have a even easier way to construct derivative than finite difference |
|
Well, as long as you have checked that indeed How is it computed though? Just as a centered finite difference? This would not be quite correct since it would differ from what a higher-order accurate derivative would have to do. Or (much more correctly) as a 2nd order reconstruction and derivative (which may indeed give the same expression, IDK)? I.e. compute the 2nd order polynomial |
|
|
|
I think cell-centered grid is more fundamental at amrex level. However, the user can use it to represent cell-average (just as what we did with AsterX). This PR just provides with the user that if they are using cell-centered grid and use it as sampling at that location they can take derivatives using |
|
If the user is using cell-centered grid as cell-average, and finite difference is not an approximation for the derivatives, they can just not call |
|
When you say that CarpetX assume that |
only in a |
|
hmm, I guess we currently cannot use these since CarpetX will pick the prolongation operator based on the centering. Still not quite sure what your cell centered derivatives act on? On a function sampled at the center or a derivative of the continuous function whose cell averages are stored in the cell? |
No description provided.