On Wed, 3 Aug 2016, Salazar De Troya, Miguel wrote:
where coef is the vector with the element components of the
solution. The problem that I see here is that for the LAGRANGE
element, dphi[l][qp] is a RealGradient with mostly zeros and it’s
the same information for shape functions on the same node but
different vector component.
Yup. This is one reason why we typically manually use multiple
LAGRANGE variables rather than a single LAGRANGE_VEC variable when
solving problems for which a tensor product finite element space is
adequate. The vector-valued finite elements are intended more for
cases where you want H(curl) or other exotic vector elements that
can't be expressed as tensor products of scalar elements.
LAGRANGE_VEC currently just exists for debugging purposes IMHO.
That being said, two items I'm getting funded for next fiscal year are
"vector-valued element support" (i.e. bringing it from "technically
exists" to "can be used for all the same library features that
scalar-valued elements support") and "optimization", so I'm sure the
intersection of the two will get some attention too.
(xx,xy,xz)=(-0.252376, -0.252376, -0)
(yx,yy,yz)=( 0, 0, 0)
(zx,zy,zz)=( 0, 0, 0)
(xx,xy,xz)=( 0, 0, 0)
(yx,yy,yz)=(-0.252376, -0.252376, -0)
(zx,zy,zz)=( 0, 0, 0)
If there was a way to, first use only one shape function for the
degrees of freedom in the node (would mean four shape functions
instead of eight for the case above) and second, avoid the zeros,
would this significantly save computational resources? If no, why?
You can get rid of ten of those zeros by recompiling with
LIBMESH_DIM==2, in a pinch.
The trouble with the remaining 50% sparsity (and with the analogous
66% sparsity in 3D) is that it's LAGRANGE_VEC specific; dphi is dense
for other vector elements. It's hard to figure out an API which
optimizes in the sparse case without pessimizing in the dense case.
I have actually done that successfully in one code, but I'm not sure
how easy it would be to integrate into libMesh.
---
Roy
------------------------------------------------------------------------------
_______________________________________________
Libmesh-users mailing list
Libmesh-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-users