From: John Peterson <jwpeterson@gm...>  20090529 14:23:53

On Fri, May 29, 2009 at 5:57 AM, Lorenzo Botti <bottilorenzo@...> wrote: > Hi all,I'm trying to avoid inverse mapping for side integration with the > following procedure. > 1) search for the elem local nodes indices on the side (they are stored in > side_nodes_map). > 2) use a method that returns reference space nodes coordinates for the > element. > 3) map the side quadrature points on the element's side using reference > space coordinates. Nodes ordering match map ordering. > > This works for boundary side integration. > > For internal side integration (DG) > 4) search for the neighbor local nodes indices on the element's side (the > local indices ordering will be different from side_nodes_map). > This could be done with: > loop over side nodes (side is the side of the element) > loop over neighbor nodes > if side node id is equal to neighbor node id store the neighbor > loop index. > > Maybe you have better ideas... Hi Lorenzo, It occurs to me that socalled "rotationalinvariant" quadrature rules could be a great optimization for interior DG integration and some of the integration routines in Kelly/JumpErrorEstimator. Such rules are invariant under rotations of the reference element in the sense that: if quadrature point q exists in the original rule, then it also exists (and with the same weight) under all possible symmetrypreserving rotations (and reflections, etc, in general) of the reference element. For example, the tensor product Gaussian quadrature rules on Quads have this property, and a number of the rules for triangles do as well. This implies that there is only a simple permutation matrix needed to map between the rule on one side of the interior face and the rule on the other. Since there are a finite number of possible orientations that two face neighbors can share, these permutation matrices could be precomputed and stored (as bitsets if you wanted) ahead of time. I had not bothered to implement such an optimization in the past because I did not see how to generalize it for adapted grids with hanging nodes/faces, but I think it could be valuable for uniform grid DG calculations. I'd actually be surprised if it wasn't fairly common practice...  John 