Esempio n. 1
0
 def addOptions(self):
     CommonClearCase.addOptions(self)
     CommonReportUsage.addOptions(self)
     CommonReportRunnerData.addOptions(self)
     CommonRestart.addOptions(self)
     CommonStandardOutput.addOptions(self)
     CommonParallel.addOptions(self)
     CommonPlotLines.addOptions(self)
     CommonWriteAllTrigger.addOptions(self)
     CommonLibFunctionTrigger.addOptions(self)
     CommonMultiRegion.addOptions(self)
     CommonServer.addOptions(self)
     CommonVCSCommit.addOptions(self)
Esempio n. 2
0
    def addOptions(self):
        if foamVersion()>=(1,6):
            self.defaultMethod="scotch"
            self.decomposeChoices+=[self.defaultMethod]
            self.decomposeChoices+=["parMetis"]
            
        spec=OptionGroup(self.parser,
                         "Decomposition Specification",
                         "How the case should be decomposed")
        spec.add_option("--method",
                        type="choice",
                        default=self.defaultMethod,
                        dest="method",
                        action="store",
                        choices=self.decomposeChoices,
                        help="The method used for decomposing (Choices: "+string.join(self.decomposeChoices,", ")+") Default: %default")
        
        spec.add_option("--n",
                        dest="n",
                        action="store",
                        default=None,
                        help="Number of subdivisions in coordinate directions. A python list or tuple (for simple and hierarchical)")
        
        spec.add_option("--delta",
                        dest="delta",
                        action="store",
                        type="float",
                        default=None,
                        help="Cell skew factor (for simple and hierarchical)")
        
        spec.add_option("--order",
                        dest="order",
                        action="store",
                        default=None,
                        help="Order of decomposition (for hierarchical)")
        
        spec.add_option("--processorWeights",
                        dest="processorWeights",
                        action="store",
                        default=None,
                        help="The weights of the processors. A python list. Used for metis, scotch and parMetis")
        
        spec.add_option("--globalFaceZones",
                        dest="globalFaceZones",
                        action="store",
                        default=None,
                        help="""Global face zones. A string with a python list or an OpenFOAM-list of words. Used for the GGI interface. Ex: '["GGI_Z1","GGI_Z2"]' or '(GGI_Z1 GGI_Z2)'""")
        
        spec.add_option("--dataFile",
                        dest="dataFile",
                        action="store",
                        default=None,
                        help="File with the allocations. (for manual)")
        self.parser.add_option_group(spec)

        behave=OptionGroup(self.parser,
                           "Decomposition behaviour",
                           "How the program should behave during decomposition")
        behave.add_option("--test",
                          dest="test",
                          action="store_true",
                          default=False,
                          help="Just print the resulting dictionary")

        behave.add_option("--clear",
                          dest="clear",
                          action="store_true",
                          default=False,
                          help="Clear the case of previous processor directories")
        
        behave.add_option("--no-decompose",
                          dest="doDecompose",
                          action="store_false",
                          default=True,
                          help="Don't run the decomposer (only writes the dictionary")
        
        behave.add_option("--decomposer",
                               dest="decomposer",
                               action="store",
                               default="decomposePar",
                               help="The decompose Utility that should be used")
        self.parser.add_option_group(behave)

        work=OptionGroup(self.parser,
                           "Additional work",
                           "What else should be done in addition to decomposing")
        work.add_option("--constant-link",
                        dest="doConstantLinks",
                        action="store_true",
                        default=False,
                        help="Add links to the contents of the constant directory to the constant directories of the processor-directories")        
        self.parser.add_option_group(work)
        
        CommonMultiRegion.addOptions(self)
        CommonStandardOutput.addOptions(self)
        CommonServer.addOptions(self,False)
        CommonVCSCommit.addOptions(self)