public void Bla([Values(0, 1, 2, 3)] int refElementIndex, [Values(0, 1, 2)] int foreignTypeIndex) { RefElement Element = ListElementsMain.Elements[refElementIndex]; RefElement.ExchangeFormats ft = ListElementsMain.ForeignTypes[foreignTypeIndex]; foreach (var type in Element.SupportedCellTypes) { try { int fnum; string fname; Element.GetForeignElementType(type, ft, out fname, out fnum); } catch (NotSupportedException) { // Combination of element type and foreign convection // simply does not exist, swallow exception. } // Check any of these methods throws an exception MultidimensionalArray InterpolationNodes = Element.GetInterpolationNodes(type); int[] NodeType = Element.GetInterpolationNodes_NodeType(type); int[] EntityIndex = Element.GetInterpolationNodes_EntityIndices(type); int NoOfNodes = InterpolationNodes.GetLength(0); var R = Element.GetForeignElementMapping(type, ft); } }
/// <summary> /// Computes the bounding box of cell <paramref name="j"/>. /// </summary> /// <param name="j">local cell index.</param> /// <param name="bb"> /// on exit, the bounding box of cell j. /// </param> public void GetCellBoundingBox(int j, BoundingBox bb) { int D = bb.D; if (bb.D != m_owner.SpatialDimension) { throw new ArgumentException("wrong dimension of bounding box."); } bb.Clear(); Cell Cj = this.GetCell(j); RefElement Kref = this.GetRefElement(j); NodeSet verticesLoc = Kref.GetInterpolationNodes(Cj.Type); MultidimensionalArray verticesGlob = MultidimensionalArray.Create(1, verticesLoc.GetLength(0), verticesLoc.GetLength(1)); m_owner.TransformLocal2Global(verticesLoc, j, 1, verticesGlob, 0); bb.AddPoints(verticesGlob .ExtractSubArrayShallow(0, -1, -1)); }