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:                 bange...@colostate.edu
                           www: http://www.math.colostate.edu/~bangerth/

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/966f38ec-5ce2-f879-c9c4-2df21ab1110b%40colostate.edu.

Reply via email to