Ejemplo n.º 1
0
Archivo: Point.cs Proyecto: xyuan/BoSSS
        /// <summary>
        /// <see cref="RefElement.GetForeignElementType"/>
        /// </summary>
        public override void GetForeignElementType(CellType Type, RefElement.ExchangeFormats conv, out string ForeignName, out int ForeignTypeConstant)
        {
            ForeignName         = "Point";
            ForeignTypeConstant = 0;

            if (Type != CellType.Point)
            {
                throw new ArgumentException();
            }

            if (conv == ExchangeFormats.Gmsh)
            {
                throw new NotSupportedException("Wrong minor cell type");
            }
            else if (conv == ExchangeFormats.CGNS)
            {
                ForeignTypeConstant = 2;
            }
            else if (conv == ExchangeFormats.GambitNeutral)
            {
                throw new NotSupportedException("Wrong minor cell type");
            }
            else
            {
                throw new NotSupportedException("Wrong foreign convention type");
            }
        }
Ejemplo n.º 2
0
        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);
            }
        }