Yeah, I still use these, and would miss them if they were gone!

On Jul 18, 2012, at 1:31 AM, "Paul T. Bauman" 
<ptbau...@gmail.com<mailto:ptbau...@gmail.com>> wrote:

On Wed, Jul 18, 2012 at 1:00 AM, Roy Stogner 
<royst...@ices.utexas.edu<mailto:royst...@ices.utexas.edu>> wrote:

Two generic reasons for storing separate scalar components:

Backwards compatibility.  IIRC the dphidx etc. arrays existed first,

Ah, OK.

Efficiency.  IIRC the Phalanx people discovered that compilers are
much better at vectorizing operations (autogenerating SIMD code) when
the stride between those MD is 1 (as in scalar arrays) rather than 3
or 9 (as in 3-vector or 3x3-tensor arrays).  However, this is just
theoretical for us - since we order our arrays phi[i][qp] instead of
phi[qp][i] but we typically want the quadrature point loop to be
outermost, we end up having a huge stride regardless.  In our case it
would be more efficient to remove the scalar arrays just to avoid the
redundant copying.

I was wondering if this could be the case, but wasn't sure about in practice in 
an actual quadrature loop where maybe it could do prefetching on the components 
if you had big enough cache. I'm gonna be optimistic and say I wonder if it 
could still be worth it to have separate arrays when we get around to fixing 
the stride problem?

How, exactly?  It's possible for user code to get_dphidx() *outside*
an element loop, but expect the returned reference to continue to
point to a modified-at-each-reinit scalar array at each element inside
the loop.

Nevermind, I was being an idiot as usual.

We could do something like the current calculate_dphi
tricks to update dphidx if-and-only-if it's been requested, but I'd
think this would make your code more complicated rather than less.

Technically, the if-logic would be a little more cumbersome, but 
compute_shape_functions looks much cleaner with the FETransformation stuff 
(patch coming soon... now that I've written it, I can see that it may not 
require FEMap, so I might be trying to separate the two), so it wouldn't be too 
bad; it will just make the API a bit ugly for my current incarnation.

Thanks for the comments.
------------------------------------------------------------------------------
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<mailto:Libmesh-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/libmesh-devel
------------------------------------------------------------------------------
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

Reply via email to