Skip to content

Commit b866d36

Browse files
committed
Remove tests for low-Re grader (irrelevant atm)
1 parent abb641c commit b866d36

File tree

2 files changed

+14
-54
lines changed

2 files changed

+14
-54
lines changed

src/classy_blocks/grading/autograding/params.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ def sum_length(start_size: float, count: int, c2c_expansion: float) -> float:
2020
return length
2121

2222

23+
def sum_count(lengths: List[float], chops: List[Chop]):
24+
count = 0
25+
26+
for i, chop in enumerate(chops):
27+
length = lengths[i]
28+
count += chop.calculate(length).count
29+
30+
return count
31+
32+
2333
class ChopParams(abc.ABC):
2434
@abc.abstractmethod
2535
def get_count(self, length: float) -> int:
@@ -154,17 +164,16 @@ def get_count(self, length: float):
154164

155165
if remaining_length <= 0:
156166
warnings.warn("Stopping chops at boundary layer (not enough space)!", stacklevel=1)
157-
# return chops
158-
return 0
167+
return sum_count([length], chops)
159168

160169
# buffer
161170
buffer, buffer_size = self._get_buffer_chop(last_bl_size)
162171
buffer.length_ratio = buffer_size / length
163172
chops.append(buffer)
164173
if buffer_size >= remaining_length:
165174
warnings.warn("Stopping chops at buffer layer (not enough space)!", stacklevel=1)
166-
# return chops
167-
return 1
175+
176+
return sum_count([self.boundary_layer_thickness, buffer_size], chops)
168177

169178
# bulk
170179
remaining_length = remaining_length - buffer_size
@@ -173,7 +182,7 @@ def get_count(self, length: float):
173182
chops.append(bulk)
174183

175184
# return chops
176-
return 1
185+
return sum_count([self.boundary_layer_thickness, buffer_size, remaining_length], chops)
177186

178187
def get_chops(self, count: int, length: float) -> List[Chop]:
179188
raise NotImplementedError("TODO!")

tests/test_grading/test_auto.py

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)