On Thu, 20 Sep 2012, Derek Gaston wrote:

> You prefer to loop over all possible boundary ids on each side
> calling "has_boundary_id()" over just getting the ids for that side
> and doing the correct thing directly?

In the case where "all possible boundary ids" that a function cares
about is really plural, i.e. you've got the same function handling
multiple potentially overlapping BCs, you're right that the only
efficient way to do things is get the whole vector and loop over it.

Take a look at what we're teaching people to do in the singular cases,
though: adjoints_ex3, reduced_basis_ex5, systems_of_equations_ex2,
systems_of_equations_ex{3,4,6}, all effectively testing bc ids with
"if (boundary_id() == whatever)".  The idea behind has_boundary_id()
is just to get rid of those usage cases without turning one line of
code into five.
---
Roy

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to