CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Pre-Processing (
-   -   The preservePatches Option in decomposePar (

Hisham November 12, 2012 06:01

The preservePatches Option in decomposePar
Dear Foamers,

It seems that the preservePatches option of the decomposePar utility actually means that for all faces of a preserved patch have the owner and neighbor on the same processor (as commented in code)?

What if I want to preserve a complete patch (or two identical patches) in one processor using the scotch method, is it doable?

I can do it with the simple method but I thought there maybe a lazier way to do it and to somehow preserve processor weights? :)

Best regards

Ralph M November 18, 2012 05:39

Dear Hisham,

I'm also trying to get a certain patch preserved. PreservePatches doesn't seem to work right now so I'm looking forward to the result of your 'experiment'. Did you also try to use manual instead of scotch?



wyldckat November 18, 2012 20:22

Greetings to both!

There was a bug report on this that hasn't been closed yet:

Best regards,

Ralph M November 19, 2012 06:14

Dear Bruno, thanks for your reply.

I tried to test this option yesterday (OF2.1) but unfortunately I don't have cyclic patches so this option doesn't seem to work for me or am I wrong?

Would there be another way to preserve non-cyclic patches? Maybe a manual decomposition?


wyldckat November 19, 2012 18:45

Hi Ralph,

I don't have much time to go into details, so here is the summary:
  1. Use the decomposition method you wish to use and add to the decomposePar command the argument described in the help:

    $ decomposePar -help

    Usage: decomposePar [OPTIONS]
      -cellDist        write cell distribution as a labelList - for use with
                        'manual' decomposition method or as a volScalarField for

  2. Look into the main example file for the dictionary at "applications/utilities/parallelProcessing/decomposePar/decomposeParDict".
  3. Test if the manual decomposition actually works.
  4. Manipulate the "weights" as if you manipulating a field, namely by using setSet or topoSet, along with setFields. For drawing ideas, run the following commands for tracking down examples:

    find $FOAM_TUTORIALS -name topoSetDict
    find $FOAM_TUTORIALS -name setFieldsDict

:confused: Looks like you were already half-way there already:
Best regards,

All times are GMT -4. The time now is 18:07.