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
> function for all vertices of my triangulation, so currently I call it
> "2*n_vertices()" times.
>
> I´d like to call this function only once for a given vertex, i.e.
> "n_vertices()"times.
> Is there a way to realize this in combination with two different dof_handlers?
There are probably ways to work around this, but I'd like to repeat a point
Bruno made the other day on this very mailing list:
"Unless you have measured that this is a bottleneck in you code, you should
use what's the more readable. If there is a difference between these two
codes, it would need to be in a hot loop to matter. My advice is to write easy
to understand code and once you have made sure that the code works, then use a
profiler to find the bottleneck and optimize the code."
I think this is good advice!
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/