On Thu, Dec 2, 2010 at 9:20 AM, Boyce Griffith <griffith@...> wrote:
> On 11/16/10 2:24 PM, Derek Gaston wrote:
>> On Nov 16, 2010, at 10:27 AM, Boyce Griffith wrote:
>>> Is adding qrule->need_reinit() the only change that you are making to
>>> QBase? I am probably missing something, but it seems like allowing the
>>> quadrature rule to vary from element to element would also require something
>>> like changing the arguments for qrule->init() to include the element on
>>> which the quadrature rule is being initialized.
>>> (Incidentally, this is functionality that I would definitely use!)
>> Hmmm... I only added a new virtual called shapes_need_reinit() that
>> returns false by default. This is all that was necessary for my application
>> because I added other functions to my qrule class to tell it the information
>> it needs before I call fe->reinit().
>> I do see your point and wouldn't be opposed to someone making that
> OK; I'm just now getting a chance to look at this. It seems like changing
> the interface to QBase to depend on the element instead of the element type
> would screw up caching of points/weights, which seems undesirable.
> Looking at the implementation of QBase::init(), it seems like the quadrature
> rule will not generally be reinitialized, even if
> QBase::shapes_need_reinit() is set to return true, unless the element type
> or p-order have changed. Should QBase::init() be virtual?
Hmm... this function ended up getting named "shapes_need_reinit"?
Not sure I understand that, there aren't any "shapes" in the QBase. I
would have voted for QBase::needs_reinit(), but whatever.