Example #1
0
 /// <summary>
 /// ctor
 /// </summary>
 protected ConventionalDGField(Basis b, string name) :
     base(b, name)
 {
     if (b.GetType() != typeof(Basis))
     {
         throw new ArgumentException("type " + b.GetType().FullName + " is not allowed as a basis for single phase fields", "b");
     }
 }
Example #2
0
        private static void CheckArgs(int j0, int L, NodeSet NS, Basis basis, MultidimensionalArray Coördinates, MultidimensionalArray ResultAcc, out int D, out int N, out int M, out bool AffineLinear)
        {
            D            = basis.GridDat.SpatialDimension; // spatial dimension
            N            = basis.GetLength(j0);            // number of coordinates per cell
            M            = NS.NoOfNodes;                   // number of nodes
            AffineLinear = basis.GridDat.iGeomCells.IsCellAffineLinear(j0);

            Debug.Assert(basis.GetType() == typeof(Basis));

            Debug.Assert(Coördinates.Dimension == 2);
            Debug.Assert(Coördinates.GetLength(0) == L);
            Debug.Assert(Coördinates.GetLength(1) == N);

#if DEBUG
            for (int i = 1; i < L; i++)
            {
                int jCell = j0 + i;
                Debug.Assert(basis.GridDat.iGeomCells.IsCellAffineLinear(jCell) == AffineLinear);
                Debug.Assert(basis.GetLength(jCell) == N);
            }
#endif
        }
Example #3
0
        private static void CheckArgs(int j0, int L, NodeSet NS, Basis basis, MultidimensionalArray Coördinates, MultidimensionalArray ResultAcc, out int D, out int N, out int M, out bool AffineLinear)
        {
            int[] g2l = basis.GridDat.iGeomCells.GeomCell2LogicalCell;

            D = basis.GridDat.SpatialDimension; // spatial dimension
            if (g2l == null)
            {
                N = basis.GetLength(j0);      // number of coordinates per cell -- standard grid
            }
            else
            {
                N = basis.GetLength(g2l[j0]); // number of coordinates per cell -- aggregation grid
            }
            M            = NS.NoOfNodes;      // number of nodes
            AffineLinear = basis.GridDat.iGeomCells.IsCellAffineLinear(j0);

            Debug.Assert(basis.GetType() == typeof(Basis));

            Debug.Assert(Coördinates.Dimension == 2);
            Debug.Assert(Coördinates.GetLength(1) == N);

#if DEBUG
            for (int i = 1; i < L; i++)
            {
                int jCell = j0 + i;
                Debug.Assert(basis.GridDat.iGeomCells.IsCellAffineLinear(jCell) == AffineLinear);

                if (g2l == null)
                {
                    Debug.Assert(basis.GetLength(jCell) == N);
                }
                else
                {
                    Debug.Assert(basis.GetLength(g2l[jCell]) == N);
                }
            }
#endif
        }