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 dof_handler to that function, I guess there is no
"obvious" way to make only one call, is it?

-Simon

Wolfgang Bangerth <[email protected]> schrieb am Fr., 30. Apr. 2021,
18:16:

> 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:                 [email protected]
>                             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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/966f38ec-5ce2-f879-c9c4-2df21ab1110b%40colostate.edu
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAM50jEtCWSTAhzEi7uPmgvkC94DMGJnP43AAhOuJw_97KCVT7g%40mail.gmail.com.

Reply via email to