On 01/26/2017 01:20 AM, Lam DANG wrote:

But I still a concern that the function class (the Coefficient class in step
6) will be called in many time in the main code.

Yes, but so are many other functions (e.g., FEValues::shape_grad). Is this function *particularly* expensive in your case?

I'm asking because unless you have *concrete* evidence that something is slow, then it's not worth changing -- in particular, if the result is code that is more complex. There is a saying in computer science that "premature optimization is the root of all evil", and I think there is truth to that. So, *unless you have measured that it is a problem*, then the simplest approach is the way to go.

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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to