Hello I have noticed that dphi from FEVectorBase has a structure like this:
std::vector<std::vector<RealGradient> > dphi; dphi[shape_funct][qp](i,j) shape_funct goes from zero to the number of degrees of freedom per element, qp is the gaussian point. This makes the interpolation operation for the gradient of a field “u” something like this: RealGradient du = 0; for (unsigned int l=0; l != n_dofs; l++) du.add_scaled(dphi[l][qp], coef(l)); 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. For instance, these are the LAGRANGE_VEC, first order, Quad elements, shape functions for a given node in a 2D problem. (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? Thanks Miguel ------------------------------------------------------------------------------ _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users