Exemple #1
0
        public static int[] GimmeAllBlocksWithSpec(MultigridMapping map, int DOF)
        {
            int        Bi0  = map.AggGrid.CellPartitioning.i0;
            List <int> hits = new List <int>();

            for (int i = 0; i < map.LocalNoOfBlocks; i++)
            {
                int iBlock   = Bi0 + i;
                int type     = map.GetBlockType(iBlock);
                int BlockDOF = map.GetSubblkLen(type)[0];
                if (BlockDOF == DOF)
                {
                    hits.Add(iBlock);
                }
            }

            int[] recvcnt = hits.Count().MPIAllGather();
            Debug.Assert(recvcnt.Length == map.MpiSize);
            int[] VecOfAllhits = hits.ToArray().MPIAllGatherv(recvcnt);

            return(VecOfAllhits);
        }