private double[] GetAuxAccVec(BlockMaskBase mask, IList <double> fullVector, int iCell)
        {
            int nCell = mask.GetType() == typeof(BlockMaskExt)? iCell - BMLoc.m_StructuredNi0.Length:iCell;

            double[] subVector = new double[mask.GetLengthOfCell(nCell)];
            var      Cidx      = mask.GetLocalidcOfCell(nCell);

            Debug.Assert(subVector.Length == Cidx.Length);
            ArrayTools.GetSubVector <int[], int[], double>(fullVector, subVector, Cidx);
            return(subVector);
        }
        private void AuxAcc <V, W>(BlockMaskBase mask, W subVector, int iCell, V fullVector)
            where V : IList <double>
            where W : IList <double>
        {
            int nCell = mask.GetType() == typeof(BlockMaskExt) ? iCell - BMLoc.m_StructuredNi0.Length : iCell;

            if (nCell >= mask.m_StructuredNi0.Length)
            {
                throw new ArgumentOutOfRangeException("iCell is greater than Cells in mask");
            }
            if (subVector.Count() != mask.GetLengthOfCell(nCell))
            {
                throw new ArgumentException("accVector length is not equal to length of mask");
            }

            var Cidx = mask.GetLocalidcOfCell(nCell);

            Debug.Assert(subVector.Count() == Cidx.Count());
            fullVector.AccV(1.0, subVector, Cidx, default(int[]));
        }