Skip to content

Commit e63d80e

Browse files
Krishnan IyerKrishnan Iyer
authored andcommitted
fix formatting
1 parent a07b36a commit e63d80e

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

toolchain/mfc/build.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ def build(self, case: input.MFCInputFile):
163163
"--target", self.name,
164164
"--parallel", ARG("jobs"),
165165
"--config", 'Debug' if ARG('debug') else 'Release']
166-
167166
if ARG('verbose'):
168167
command.append("--verbose")
169168

toolchain/mfc/test/case.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -213,25 +213,16 @@ def __str__(self) -> str:
213213
return f"tests/[bold magenta]{self.get_uuid()}[/bold magenta]: {self.trace}"
214214

215215
def compute_tolerance(self) -> float:
216-
217-
if ARG('single'):
218-
return 1e-5
219-
220216
if self.params.get("hypoelasticity", 'F') == 'T':
221217
return 1e-7
222-
223218
if any(self.params.get(key, 'F') == 'T' for key in ['relax', 'ib', 'qbmm', 'bubbles']):
224219
return 1e-10
225-
226220
if self.params.get("low_Mach", 'F') == 1 or self.params.get("low_Mach", 'F') == 2:
227221
return 1e-10
228-
229222
if self.params.get("acoustic_source", 'F') == 'T':
230223
if "acoustic(1)%pulse" in self.params and self.params["acoustic(1)%pulse"] == 3: # Square wave
231224
return 1e-5
232225
return 3e-12
233-
234-
235226
return 1e-12
236227

237228
@dataclasses.dataclass

toolchain/mfc/test/test.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,17 +130,18 @@ def test():
130130
exit(nFAIL)
131131

132132

133-
# pylint: disable=too-many-locals, too-many-branches, too-many-statements
133+
# pylint: disable=too-many-locals, too-many-branches, too-many-statements, trailing-whitespace
134134
def _handle_case(case: TestCase, devices: typing.Set[int]):
135135
start_time = time.time()
136136

137-
tol = case.compute_tolerance()
137+
if ARG("single"):
138+
tol = 1e-5
139+
else:
140+
tol = case.compute_tolerance()
138141

139142
case.delete_output()
140143
case.create_directory()
141-
142144
cmd = case.run([PRE_PROCESS, SIMULATION], gpus=devices)
143-
144145
out_filepath = os.path.join(case.get_dirpath(), "out_pre_sim.txt")
145146

146147
common.file_write(out_filepath, cmd.stdout)

0 commit comments

Comments
 (0)