Skip to content

Commit c87d8f8

Browse files
committed
keep the same pseudo_step and physical_step column order in the output coefficient csv file
1 parent 60a4d9f commit c87d8f8

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

flow360/component/results/results_utils.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,10 @@ def _build_coeff_env(params) -> Dict[str, Any]:
177177

178178
def _copy_time_columns(src: Dict[str, list]) -> Dict[str, list]:
179179
out: Dict[str, list] = {}
180-
out[_PSEUDO_STEP] = src[_PSEUDO_STEP]
181-
out[_PHYSICAL_STEP] = src[_PHYSICAL_STEP]
180+
for key in src.keys():
181+
if key in [_PSEUDO_STEP, _PHYSICAL_STEP]:
182+
out[key] = src[key]
183+
continue
182184
return out
183185

184186

@@ -326,13 +328,6 @@ class PorousMediumCoefficientsComputation:
326328
# pylint:disable=too-few-public-methods
327329
"""Static utilities for porous medium coefficient computations."""
328330

329-
@staticmethod
330-
def _copy_time_columns(src: Dict[str, list]) -> Dict[str, list]:
331-
out: Dict[str, list] = {}
332-
out[_PSEUDO_STEP] = src[_PSEUDO_STEP]
333-
out[_PHYSICAL_STEP] = src[_PHYSICAL_STEP]
334-
return out
335-
336331
@staticmethod
337332
def _iter_zones(values: Dict[str, list]):
338333
zone_names = np.unique(

0 commit comments

Comments
 (0)