preperations for test cases
This commit is contained in:
parent
838e1d8764
commit
99343d0dc6
2 changed files with 10 additions and 3 deletions
|
@ -84,6 +84,14 @@ class Simulation:
|
|||
"""
|
||||
return self.largest_aggregate_mass * self.largest_aggregate_water_fraction / self.initial_water_mass
|
||||
|
||||
@property
|
||||
def original_simulation(self) -> bool:
|
||||
return self.type == "original"
|
||||
|
||||
@property
|
||||
def testcase(self) -> bool:
|
||||
return not self.original_simulation and 489 <= self.runid <= 1000 # TODO: replace with real last testcase
|
||||
|
||||
@property
|
||||
def simulation_key(self):
|
||||
return "id{:04d}_v{:.1f}_a{:.0f}_m{:.0f}_g{:.1f}_wt{:.1f}_wp{:.1f}".format(
|
||||
|
|
|
@ -57,10 +57,9 @@ class SimulationList:
|
|||
def X(self):
|
||||
return np.array([
|
||||
[s.alpha, s.v, s.projectile_mass, s.gamma, s.target_water_fraction, s.projectile_water_fraction]
|
||||
for s in self.simlist
|
||||
for s in self.simlist if not s.testcase
|
||||
])
|
||||
|
||||
@property
|
||||
def Y(self):
|
||||
return np.array([s.water_retention_both for s in self.simlist ])
|
||||
|
||||
return np.array([s.water_retention_both for s in self.simlist if not s.testcase])
|
||||
|
|
Reference in a new issue