コード例 #1
0
ファイル: SteadyRunner.py プロジェクト: floli/tools
 def addOptions(self):
     CommonClearCase.addOptions(self)
     CommonRestart.addOptions(self)
     CommonReportUsage.addOptions(self)
     CommonReportRunnerData.addOptions(self)
     CommonStandardOutput.addOptions(self)
     CommonParallel.addOptions(self)
     CommonPlotLines.addOptions(self)
     CommonSafeTrigger.addOptions(self)
     CommonWriteAllTrigger.addOptions(self)
     CommonServer.addOptions(self)
     CommonVCSCommit.addOptions(self)
コード例 #2
0
ファイル: PotentialRunner.py プロジェクト: floli/tools
 def addOptions(self):
     pot=OptionGroup(self.parser,
                     "Solver settings",
                     "Basic settings for the potentialFoam-solver")
     
     pot.add_option("--non-orthogonal-correctors",
                    type="int",
                    dest="noCorr",
                    default=None,
                    help="The number of non-orthogonal corrections")
     pot.add_option("--tolerance",
                    type="float",
                    dest="tolerance",
                    default=None,
                    help="Overwrite the tolerance of the linear solver")
     pot.add_option("--relTol",
                    type="float",
                    dest="relTol",
                    default=None,
                    help="Overwrite the relative tolerance of the linear solver")
     pot.add_option("--no-write-p",
                    action="store_false",
                    dest="writep",
                    default=True,
                    help="Don't write pressure p")
     pot.add_option("--pRefCell",
                    type="int",
                    dest="pRefCell",
                    default=None,
                    help="Sets the number of the reference cell for closed cases")
     pot.add_option("--pRefValue",
                            type="int",
                            dest="pRefValue",
                            default=None,
                            help="Sets the pressure reference value for closed cases")
     self.parser.add_option_group(pot)
     
     CommonParallel.addOptions(self)
     CommonStandardOutput.addOptions(self)
     CommonServer.addOptions(self,False)
     CommonVCSCommit.addOptions(self)
コード例 #3
0
ファイル: PlotRunner.py プロジェクト: floli/tools
    def addOptions(self):
        CommonClearCase.addOptions(self)

        CommonPlotOptions.addOptions(self)
        
        self.parser.add_option("--steady-run",
                               action="store_true",
                               default=False,
                               dest="steady",
                               help="This is a steady run. Stop it after convergence")
        
        CommonReportUsage.addOptions(self)
        CommonReportRunnerData.addOptions(self)
        CommonStandardOutput.addOptions(self)
        CommonParallel.addOptions(self)
        CommonRestart.addOptions(self)
        CommonPlotLines.addOptions(self)
        CommonSafeTrigger.addOptions(self)
        CommonWriteAllTrigger.addOptions(self)
        CommonLibFunctionTrigger.addOptions(self)
        CommonServer.addOptions(self)
        CommonVCSCommit.addOptions(self)
コード例 #4
0
ファイル: MeshUtilityRunner.py プロジェクト: floli/tools
 def addOptions(self):
     CommonLibFunctionTrigger.addOptions(self)
     CommonServer.addOptions(self,False)
     CommonVCSCommit.addOptions(self)
コード例 #5
0
ファイル: Decomposer.py プロジェクト: floli/tools
    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)