On Tue, 23 Aug 2005, John Peterson wrote:
> Here's the before and after results for my code:
> before: dof_indices() 9699248 69.6233 0.000007 9.18
> after : dof_indices() 7974140 58.4917 0.000007 8.46
> I achieved this by not projecting 3 additional (unused) ABTR vector. I
> imagine the other optimization to project multiple vectors in a single
> step would help a lot as well.
Don't forget old_dof_indices - cutting out the same number of calls
there is just as helpful.
> > I'd bet the biggest offender is in the flux jump error indicator. It should
> > get called something like 1/2*n_elem*n_faces_per_elem in there.
> Obviously we can't save the dof_indices for ever since they change when you
> project the solution.
This raises the question, "what does it mean to save the dof_indices"?
The longest operation in dof_indices() really is the START_LOG call -
it's practically short enough to inline. I don't think sticking
dof_indices in some big matrix would be too much faster that pulling
them directly off the dof_objects.
There's some overhead involved in using a std::vector for the element
indices, but mostlly in the first call. After that, the vector has
been allocated to it's maximum size and the clear() and resize() calls
just change a size variable without reallocating memory.