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,
16 args=args,
17 description=description,
18 usage="%prog <caseDirectory>",
19 interspersed=True,
20 changeVersion=False,
21 nr=1,
22 exactNr=False)
23
25 self.parser.add_option("--after",
26 type="float",
27 dest="after",
28 default=None,
29 help="Only remove timesteps after this time")
30 self.parser.add_option("--processor",
31 action="store_true",
32 dest="processor",
33 default=False,
34 help="Keep the processor directories")
35 self.parser.add_option("--no-pyfoam",
36 action="store_false",
37 dest="pyfoam",
38 default=True,
39 help="Keep the PyFoam-specific directories and logfiles")
40 self.parser.add_option("--keep-last",
41 action="store_true",
42 dest="latest",
43 default=False,
44 help="Keep the data from the last time-step")
45
53