Thanks to both of you!
The implementation of a own function was the best solution to my issue. In
there I basically ask the neighbor-cells and again those neighbors if the
given vertex is located on that cells. My function is a bit faster than
your suggestion Luca, but not that much.
In addition to that, I’d suggest you use the
GridTools::Cache::get_vertex_to_cell_map class, which builds the map once, and
stores it for future reference. This one uses GridTools::vertex_to_cell_map,
which builds the map with one pass, instead of looping over all cells.
Indeed, if you want to
On 5/4/21 12:15 PM, Simon Wiesheier wrote:
I looked up the Implementation of the mentioned function. Basically the
function loops over all active cells and compares those global vertices with
the one passed as second argument, so far so good.
But is there a similar function which accepts a
Thanks for all answers!
I've got a similar question:
I looked up the Implementation of the mentioned function. Basically the
function loops over all active cells and compares those global vertices
with the one passed as second argument, so far so good.
But is there a similar function which
Dear Simon,
one solution you have is to pass a *Triangulation*, and then generate the dof
cell accessors using the constructor
typename DoFHandler::cell_iterator cell1(*tria_iterator, dh1);
typename DoFHandler::cell_iterator cell2(*tria_iterator, dh2);
Best,
Luca.
> On 30 Apr 2021, at
Hi Jean-Paul,
your suggestion worked fine, thanks a lot!
Best
Simon
Am Sa., 1. Mai 2021 um 07:20 Uhr schrieb Jean-Paul Pelteret <
jppelte...@gmail.com>:
> Hi Simon,
>
> You could call GridTools:: find_cells_adjacent_to_vertex() with the
> triangulation instead of a DoFHandler, and then just
Hi Simon,
You could call GridTools:: find_cells_adjacent_to_vertex() with the
triangulation instead of a DoFHandler, and then just convert the returned
iterators to the type used by each DoFHandler using the method outlined here:
Hello Wolfgang,
I actually have a Time Measurement in my code implemented.
For my current computations the difference (one call vs two calls per
vertex) is neglible. But my model will become much bigger and therefore I'd
like to avoid unnecessary calls to that function.
Since I can pass only one
On 4/30/21 10:13 AM, Simon wrote:
auto cells_ref = GridTools::find_cells_adjacent_to_vertex(dof_handler_ref,
/*vertex*/);
auto cells_tmp = GridTools::find_cells_adjacent_to_vertex(dof_handler_tmp,
/*vertex*/);
I am not sure how "expensive" this function actually is. I have to call this
Dear all,
the mentioned function is exactly doing the right thing for me, i.e.
returning an vector of iterators to all cells, which share this vertex.
After calling this function I will loop over these cells and compute
certain things ...
My problem is that I have to work with two different
10 matches
Mail list logo