On Thu, 10 May 2012, Roy Stogner wrote: > So, 2.: Do we create FEAbstract, which doesn't include *phi* data or > get_*phi* methods, then derive FEBase and FEVectorBase from it? Or do > we just add get_vec_*phi* methods (and vec_*phi data) to FEBase? > > With the latter option, we'd have a bunch of redundant (albeit empty) > vectors in every FEBase, and trying to access scalar data from a > vector element type or vice-versa would be a runtime error (or > possibly only an assert), not very type safe. > > With the former option, we'd end up having to turn get_*phi* from > inline functions into virtual functions.
Wait a minute... no we wouldn't. Anything only defined in one subclass (like get_*phi*) wouldn't need to be represented in the abstract base, anything implementable in the abstract base (like get_JxW etc) wouldn't need to be virtual. compute_shape_functions would need to be virtual, but it's *already* virtual thanks to the needs of InfFE and FEXYZ. The FEAbstract option is looking better than I'd feared from that quick "WTF a few virtual functions can slow down code by a factor of 10!?" experiment. --- Roy ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libmesh-devel mailing list Libmesh-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-devel