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
VectorTools::point_value() throw exception: point not locally owned #5367
Comments
I don't think there is actually a good solution. You are asking that the algorithm tries to find a locally-owned cell when given a point that happens to be a vertex that is shared between a locally owned and a ghost cell. But if we apply this reasoning to the two processors that are owning these two cells, then that would mean that the algorithm should find different cells on different processors when given the same point. This seems like a generally bad idea -- given floating point inaccuracies, the only useful solution is to declare that the point is either in one of the two cells, or in the other. To have the two processors return different answers is asking for trouble. |
I think the problem is that |
But in floating point arithmetic, a point cannot be "on a face or edge". It could be on a vertex. But in practice, I think the better practice is to use points that are just perturbed a tiny bit to avoid the ambiguity -- just move the point by 1e-15 in a random direction and there will be a unique cell in which it is located. |
By the way, if you want to find all cells adjacent to a particular vertex, then there is already |
Well that depends on your mesh. Not everybody is using complex spherical meshes some of us are using simple and nice slab geometry :-).
I agree this is the easiest solution.
But @jtceleron is not calling |
I think the |
@jtceleron You cannot simply change the assertion because we need a cell that is locally owned. What you propose requires to get all the cells that are around the vertex and then pick one that is locally owned. That means changing |
That is not a satisfying solution for |
But I understand that from a user perspective, the situation may be awkward, but it is consistent and deterministic. So I don't think that there is a bug or undesirable behavior in at least the original testcase provided in the first post above. If there is a problem in |
…ll where the point lies needs to be locally owned by the mpi process. I check for this with find_active_cell_around_point and if true we ask for the value at that point, if not, then we set the variable to zero. After this, we use Utilities::MPI::sum to sum the all the copies of this variable in every mpi process (note that only one should be different from zero) and the result is assingned to the variable in every mpi process. After, the variable in all mpi process should have the same value. More info about this problem can be found in: dealii/dealii#5367 In any case, using point_value is not an efficient way to find the collector temperature. I should just average the cell temperature (assuming that the cell
This is yet another issue related to |
The problem is described in deal.II google group. here.
The return of GridTools::find_active_cell_around_point() is ambiguous if the input is a vertex. Such a test seems to be present in the function VectorTools::point_value(). If working with parallel::shared::Triangulation, then we will get an exception saying that the point is not locally_owned even if we have done the cell->is_locally_owned() test.
Attached a test code.
locally_owned_cell_test.zip
The text was updated successfully, but these errors were encountered: