• Mark Olesen's avatar
    ENH: add simplified gather methods for globalIndex with default communicator · 3d4c4ea2
    Mark Olesen authored
    - when combining lists in processor order this simplifies code and
      reduces memory overhead.
    
      Write this:
        ----
        labelList collected;
    
        const globalIndex sizing(input.size());
        sizing.gather(input, collected);
        ----
    
      OR
    
        ----
        labelList collected;
        globalIndex::gatherOp(input, collected);
        ----
    
      Instead of this:
    
        ----
        labelList collected;
    
        List<labelList> scratch(Pstream::nProcs());
        scratch[Pstream::myProcNo()] = input;
        Pstream::gatherList(scratch);
    
        if (Pstream::master())
        {
            collected = ListListOps::combine<labelList>
            (
                scratch,
                accessOp<labelList>()
            );
        }
        scratch.clear();
        ----
    3d4c4ea2
Name
Last commit
Last update
..
AMIWeights.C Loading commit data...
AMIWeights.H Loading commit data...