mirror of
				https://github.com/smyalygames/FiniteVolumeGPU.git
				synced 2025-10-31 20:17:41 +01:00 
			
		
		
		
	fix(simulator): set the correct total for progress bar
This commit is contained in:
		
							parent
							
								
									638e2a4ea8
								
							
						
					
					
						commit
						cc9937c752
					
				| @ -106,7 +106,7 @@ class BaseSimulator(object): | ||||
|         if tolerance is None: | ||||
|             tolerance = 0.000000001 | ||||
| 
 | ||||
|         with tqdm(total=t_end, desc="Running Simulator") as pbar: | ||||
|         with tqdm(total=t, desc="Running Simulator", leave=False) as pbar: | ||||
|             while self.sim_time() < t_end: | ||||
|                 # Prevent an infinite loop from occurring from tiny numbers | ||||
|                 if abs(t_end - self.sim_time()) < tolerance: | ||||
| @ -123,12 +123,9 @@ class BaseSimulator(object): | ||||
|                     self.logger.warning(f"Timestep size {self.sim_steps()} is less than or equal to zero!") | ||||
|                     break | ||||
| 
 | ||||
|                 prev_time = self.sim_time() | ||||
|                 # Step forward in time | ||||
|                 self.step(current_dt) | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|                 # Update the progress bar | ||||
|                 pbar.update(float(current_dt)) | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Anthony Berg
						Anthony Berg