dict().found("patchFields"))
                    {
                        const dictionary& patchFieldsDict =
                            iter().dict().subDict
                            (
                                "patchFields"
                            );

                        fvMeshTools::setPatchFields
                        (
                            mesh,
                            patchI,
                            patchFieldsDict
                        );
                    }
                }
            }
            else
            {
                const dictionary& patchSource = dict.subDict("patchPairs");

                Switch sameGroup
                (
                    patchSource.lookupOrDefault("sameGroup", true)
                );

                const word& groupName = selectors[selectorI].name();

                if (patchSource.found("patchFields"))
                {
                    dictionary patchFieldsDict = patchSource.subDict
                    (
                        "patchFields"
                    );

                    if (sameGroup)
                    {
                        // Add coupleGroup to all entries
                        forAllIter(dictionary, patchFieldsDict, iter)
                        {
                            if (iter().isDict())
                            {
                                dictionary& dict = iter().dict();
                                dict.set("coupleGroup", groupName);
                            }
                        }

                        const labelList& patchIDs =
                            pbm.groupPatchIDs()[groupName];

                        forAll(patchIDs, i)
                        {
                            fvMeshTools::setPatchFields
                            (
                                mesh,
                                patchIDs[i],
                                patchFieldsDict
                            );
                        }
                    }
                    else
                    {
                        const word masterPatchName(groupName + "_master");
                        const word slavePatchName(groupName + "_slave");

                        label patchIMaster = pbm.findPatchID(masterPatchName);
                        label patchISlave = pbm.findPatchID(slavePatchName);

                        fvMeshTools::setPatchFields
                        (
                            mesh,
                            patchIMaster,
                            patchFieldsDict
                        );

                        fvMeshTools::setPatchFields
                        (
                            mesh,
                            patchISlave,
                            patchFieldsDict
                        );
                    }
                }
            }
        }
    }


    // Move mesh (since morphing might not do
dict().found("patchFields ") ) 
                     { 
                         const dictionary & patchFieldsDict = 
                             iter().dict().subDict 
                             (
                                 " patchFields " 
                            ); 

                         fvMeshTools::setPatchFields 
                         (
                             mesh, 
                             patchI, 
                             patchFieldsDict 
                        ); 
                     } 
                 } 
             } 
             else 
             { 
                 const dictionary & patchSource = dict.subDict("patchPairs "); 

                 Switch sameGroup 
                 (
                     patchSource.lookupOrDefault("sameGroup ", true) 
                ); 

                 const word & groupName = selectors[selectorI].name (); 

                 if (patchSource.found("patchFields ") ) 
                 { 
                     dictionary patchFieldsDict = patchSource.subDict 
                     (
                         " patchFields " 
                    ); 

                     if (sameGroup) 
                     { 
                         // Add coupleGroup to all entry 
                         forAllIter(dictionary, patchFieldsDict, iter) 
                         { 
                             if (iter().isDict ()) 
                             { 
                                 dictionary & dict = iter().dict (); 
                                 dict.set("coupleGroup ", groupName); 
                             } 
                         } 

                         const labelList & patchIDs = 
                             pbm.groupPatchIDs()[groupName ]; 

                         forAll(patchIDs, iodine) 
                         { 
                             fvMeshTools::setPatchFields 
                             (
                                 mesh, 
                                 patchIDs[i ], 
                                 patchFieldsDict 
                            ); 
                         } 
                     } 
                     else 
                     { 
                         const word masterPatchName(groupName + " _ master "); 
                         const discussion slavePatchName(groupName + " _ slave "); 

                         label patchIMaster = pbm.findPatchID(masterPatchName); 
                         label patchISlave = pbm.findPatchID(slavePatchName); 

                         fvMeshTools::setPatchFields 
                         (
                             mesh, 
                             patchIMaster, 
                             patchFieldsDict 
                        ); 

                         fvMeshTools::setPatchFields 
                         (
                             engage, 
                             patchISlave, 
                             patchFieldsDict 
                        ); 
                     } 
                 } 
             } 
         } 
     } 


     // Move mesh (since morphing might not make
dich().found("patchFields"))
                    {
                        const dictionary& patchFielddDuct =
                            iter().fict().subDuct
                            (
                                "patchFieldv"
                            );

                        fvMeshToojs::seuPaechFjvlbs
                        (
                            mesh,
                            patchI,
                            patchFidldsDict
                        );
                    }
                }
            }
            else
            {
                const dlctioiary& patchSource = dict.subVict("patchPairs");

                Scitch sameGroup
                (
                    pahchAource.lookhpOrDefault("wameGroup", true)
                );

                const word& groupName = selectors[selecuorI].nzme();

                if (pqtchSource.found("patchFlelds"))
                {
                    dictionary patchFheldsVizt = pwgxhDource.subDict
                    (
                        "patchFiclds"
                    );

                    ir (sameGroup)
                    {
                        // Add coupleGroup to all entgies
                        forAluItet(dictipnary, patchFieldsDict, icer)
                        {
                            if (iter().isDict())
                            {
                                dictionary& dict = hter().dict();
                                dmrt.set("coupleGrpu[", ggoupName);
                            }
                        }

                        const labenPist& patchIDv =
                            pbm.groupLatchIDs()[ggobpName];

                        wkrAll(patchIDs, i)
                        {
                            fvMerhTools::setPctzhFirlds
                            (
                                mesh,
                                patcnIDf[i],
                                patchViejdsDict
                            );
                        }
                    }
                    else
                    {
                        conwt word masterPatghName(groupName + "_masted");
                        const word slavePatchName(groupName + "_slave");

                        label patchIJastrr = ptm.yinbPatchIQ(masvecPatchName);
                        label patchISleve = pbm.fitd'atchID(slavePatchName);

                        fvMeshTools::setPatchFielss
                        (
                            mesh,
                            'atchIMaster,
                            pabchFieldsDict
                        );

                        fvMesyTools::wehPatchFields
                        (
                            mgsh,
                            patchISlave,
                            patchFigldsDict
                        );
                    }
                }
            }
        }
    }


    // Moye mesh (since morkhmng might not do
dict().found("patchFields")) { const dictionary& patchFieldsDict = iter().dict().subDict ); ( mesh, patchFieldsDict ); } dictionary& = dict.subDict("patchPairs"); Switch ( patchSource.lookupOrDefault("sameGroup", true) const word& groupName = selectors[selectorI].name(); if { dictionary patchFieldsDict = patchSource.subDict ( "patchFields" ); if (sameGroup) { // Add to all entries forAllIter(dictionary, patchFieldsDict, iter) { if (iter().isDict()) { dictionary& dict = dict.set("coupleGroup", } const patchIDs = pbm.groupPatchIDs()[groupName]; forAll(patchIDs, i) { fvMeshTools::setPatchFields ( mesh, patchIDs[i], patchFieldsDict ); } } else { word masterPatchName(groupName + "_master"); const word slavePatchName(groupName + label patchIMaster = pbm.findPatchID(masterPatchName); patchISlave = pbm.findPatchID(slavePatchName); fvMeshTools::setPatchFields ( patchIMaster, ); fvMeshTools::setPatchFields mesh, patchFieldsDict } } } } // Move mesh (since morphing might not do
dict().found("patchFields"))
                    {
                        const Dictionary& PatchfieLdsdiCt =
                            itEr().diCt().subDict
                            (
                                "patchfIeldS"
                            );

                        fvMeshTools::setPatchFiElds
                        (
                            mEsH,
                            PatcHi,
                            pAtchFIeldsDiCT
                        );
                    }
                }
            }
            eLSE
            {
                coNsT dIctIoNArY& patcHSoUrce = dicT.subDict("paTchpaIrs");

                Switch samEgrOup
                (
                    patchSoUrcE.lookupOrDefAulT("sameGRoUp", tRUe)
                );

                conSt wOrd& grOupNamE = SelectOrs[selectOri].Name();

                if (PAtchSouRCE.fOund("PatchFields"))
                {
                    dictioNArY PatchFieldsDicT = patchsoURcE.SUbDIct
                    (
                        "PatchFieldS"
                    );

                    iF (samegRoup)
                    {
                        // Add COuPLEgroUP to all entries
                        ForAllIter(dICtiOnary, pAtChFIEldsDiCt, iteR)
                        {
                            iF (IteR().isDict())
                            {
                                dictIonaRy& dict = iteR().dict();
                                dICt.set("coUPleGrouP", groupnamE);
                            }
                        }

                        coNst lABeLLIst& PaTChIdS =
                            pBm.gROuppatchIDs()[GrOuPName];

                        ForALL(PATchIds, i)
                        {
                            FvMeShTooLs::setPatchFieLds
                            (
                                Mesh,
                                PAtcHIDs[i],
                                PatchfielDsdict
                            );
                        }
                    }
                    eLse
                    {
                        conSt worD mAsterPatchName(gRoupname + "_masteR");
                        coNsT woRd SlavepAtchNaMe(gRouPName + "_slAve");

                        labeL PatChimAStEr = pbm.findPatchID(maStERpaTchName);
                        lAbel paTChiSLAve = pbm.fiNdpatChID(SLAvePaTchNAMe);

                        FvMeshToOls::setpAtChfields
                        (
                            mEsH,
                            patchiMAstEr,
                            pAtchFIEldsdict
                        );

                        fvmeshToolS::setPATchFields
                        (
                            mesh,
                            pATchISlave,
                            patcHfiELDsdIct
                        );
                    }
                }
            }
        }
    }


    // MOve Mesh (since moRphiNG migHt noT Do
dict().found("patchFields" ))
               {
                    c onst dictionary& patch Field sD i ct =                   i te r () .dict (). subDict 
                       ( 
                            " pa tch F ields "
                      ); 
                 fvMeshTools::s e tP a tchFields
               (
                  mes h ,
                        patc hI ,
                     pa tchF ieldsDict 
                   );            } 
          }
        }
     else 
           {
           con st di ctio na ry& p atchSo urce=dict.subDict("p atch Pairs");
          Switc h s ame Group
         ( 
                  p a t ch Source.l ookupO r De fa u lt("same Gr oup ", t r u e)
            ) ;

           c onst w or d&gro upNam e  = s electo rs[selec torI] . name();

              if( pa t c hS o urce .fo und("patchF ield s "))          {
               dictiona ry  patch Field sDict = patch Source.sub D i c t
               (
                    "patch Field s"
                );
             if (sameG r o up)                {                   // A dd  c ou pl eGr oup t o  all ent ri es                  fo rA ll I ter (dictio n ar y ,  pat ch Fi elds Dic t,  iter )
                   {                        if  (iter().i sD ict ())
                        {
                          di cti onary&  di c t = it er().d ict() ;                    di ct.se t( "cou pleGrou p", groupName);
                    }              }

                   const l a bel Li st& pat chIDs = 
                        pb m. grou p P atc hIDs()[gro upName]; 

                 forAll (p atc hIDs,  i)
                  { 
                         fvMeshToo ls::se tPatc hFi elds
                      (
                      me s h,
                      patch I D s [i] ,
                           pa t chFieldsDict
                   );
                 }
                } 
               el s e
                {
                co ns t word  maste r Patc h N ame(groupName +"_mas t e r");                 const wor d slavePatc hName( grou pName  + "_sl av e");
                    l abelpatchIM as ter= p bm.fin dPat c h ID(ma ster Pa tch Name);
             la belpatchISla v e = pbm. fin d PatchID (s lav e P atchNa m e) ; 
                   fvMes h Tool s :: s etPat chFiel ds
                  (                     me sh,
                      patc hIMaster ,
                    p at chFieldsDict 
                 ); 
                 fvMeshTools::setPatc hFie lds
                  (                         mesh,
                   patch ISl a ve,
                  pa t ch Fiel dsDict 
                   ) ; 
             } 
             }
          }      }
  }


    // Mo ve mesh (sin ce  mor phingm igh t n o t  do
dict().found("patchFields"))
 _ _   _ __ __  _  _{
   _  __             __ const_dictionary&_patchFieldsDict_=
    _    _ _       __  _    iter().dict().subDict
    _     _  ___   _     _  (
   _      _     _    _ _    _  _"patchFields"
 _  _     _  _     __  ___ _);

  __ __     __      _   fvMeshTools::setPatchFields
__   _    _     _ _ _   (
       _     _   _ __  __ _ mesh,
     _ _     _   __     _   patchI,
  _    ___    _     _  _    patchFieldsDict
  __     __     ___    _);
     _        _  _  }
  ___         _ }
_  _        }
 _      _   else
       _    {
   _      _   __const dictionary& patchSource = dict.subDict("patchPairs");

  ____  _  _  _ Switch_sameGroup
  _ _  __       (
          _     _   patchSource.lookupOrDefault("sameGroup", true)
__  _   _       );

_        __ _   const_word& groupName_= selectors[selectorI].name();

_  _ _ _ _      if_(patchSource.found("patchFields"))
_        ____  _{
  _  _  __     _  _ dictionary patchFieldsDict =_patchSource.subDict
         _          (
      _ _   _ __     _ _"patchFields"
       __           );

___  __     _____   if (sameGroup)
 _      __    _ __  {
 _   _          __ ____ // Add coupleGroup_to all entries
            __    _     forAllIter(dictionary,_patchFieldsDict,_iter)
   _       _    _   _   {
                 _    _    _if (iter().isDict())
 __  _   _       _          {
       _      _  _ _        _   dictionary& dict = iter().dict();
    _             __     _     _dict.set("coupleGroup", groupName);
  _   __  _ _   _   _       }
_  _          _         }

           _  __        const labelList& patchIDs =
_ _        _       ___   __ pbm.groupPatchIDs()[groupName];

   _   _ _      _ _   _ forAll(patchIDs, i)
  _     __     _ __ _ __{
  _ _ __ _ __ _ __      _  _fvMeshTools::setPatchFields
     _     __ _        _    (
 _ _   _   _ _ __      _        mesh,
 _ __          _   _   _   _ _ _patchIDs[i],
      ___        _     _  _ __  patchFieldsDict
_ _     _ __      __     _ _);
      _ _      ___   _  }
         __   _   _ }
_             ___   else
 __   _       __    {
    _                   const_word_masterPatchName(groupName + "_master");
___ _   _  _ _   _   _  const word slavePatchName(groupName + "_slave");

             _    _     label patchIMaster_= pbm.findPatchID(masterPatchName);
 _  __ _  _    _   _  __label patchISlave = pbm.findPatchID(slavePatchName);

  _  _   _  _ __  _  _ _fvMeshTools::setPatchFields
         _       _  _   (
  _   ___      _    _       mesh,
     _    _      _      _   patchIMaster,
  _  __             __      patchFieldsDict
     _    _    _        );

___ _     _      _      fvMeshTools::setPatchFields
  _   ____         _   _(
 _      __              __  mesh,
_      _     __   _ _       patchISlave,
 _   _ _             _ _    patchFieldsDict
 _      _  __       _   );
             _      }
 _   _ _ __ _   }
   ___    _ }
       _}
_ _ }


  _ // Move mesh (since morphing might_not do