1 """
2 Application-class that implements pyFoamClearCase.py
3 """
4
5 from PyFoamApplication import PyFoamApplication
6
7 from PyFoam.RunDictionary.SolutionDirectory import SolutionDirectory
8
11 description="""
12 Removes all timesteps but the first from a case-directory.
13 Also removes other data that is generated by sovers/utilities/PyFoam
14 """
15 PyFoamApplication.__init__(self,args=args,description=description,usage="%prog <caseDirectory>",interspersed=True,nr=1)
16
18 self.parser.add_option("--after",
19 type="float",
20 dest="after",
21 default=None,
22 help="Only remove timesteps after this time")
23 self.parser.add_option("--processor",
24 action="store_true",
25 dest="processor",
26 default=False,
27 help="Keep the processor directories")
28 self.parser.add_option("--no-pyfoam",
29 action="store_false",
30 dest="pyfoam",
31 default=True,
32 help="Keep the PyFoam-specific directories and logfiles")
33 self.parser.add_option("--keep-last",
34 action="store_true",
35 dest="latest",
36 default=False,
37 help="Keep the data from the last time-step")
38
47