def GetHistoryForceQuadratureCounter(self): for prop in self.project_parameters["properties"].values(): if prop["hydrodynamic_law_parameters"].Has( "history_force_parameters"): history_force_parameters = prop["hydrodynamic_law_parameters"][ "history_force_parameters"] if history_force_parameters.Has( "time_steps_per_quadrature_step"): time_steps_per_quadrature_step = history_force_parameters[ "time_steps_per_quadrature_step"].GetInt() return SDP.Counter( steps_in_cycle=time_steps_per_quadrature_step, beginning_step=1) return SDP.Counter(is_dead=True)
def GetStationarityCounter(self): return SDP.Counter( steps_in_cycle=self.project_parameters["stationarity"] ["time_steps_per_stationarity_step"].GetInt(), beginning_step=1, is_active=self.project_parameters["stationarity"] ["stationary_problem_option"].GetBool())
def ProcessAnalyticDataCounter(self): return SDP.Counter( steps_in_cycle=self.project_parameters["stationarity"] ["time_steps_per_analytic_processing_step"].GetInt(), beginning_step=1, is_active=self.project_parameters["do_process_analytic_data"]. GetBool())
def __init__(self, model_part, Dt, end_time, variables_to_measure, steps_between_measurements, activity=True): self.model_part = model_part self.steps_between_measurements = steps_between_measurements self.Dt = Dt * steps_between_measurements self.end_time = end_time self.variables = variables_to_measure self.n_vars = len(variables_to_measure) self.n_instants = int(math.ceil(self.end_time / self.Dt + 1)) self.current_instant = 0 self.counter = swimming_DEM_procedures.Counter( steps_between_measurements, 1, activity)
def GetPrintCounter(self): counter = SDP.Counter( steps_in_cycle=int(self.output_time / self.time_step + 0.5), beginning_step=int(self.output_time / self.time_step), is_dead=not self.do_print_results) return counter
def GetRecoveryCounter(self): there_is_something_to_recover = ( self.project_parameters["coupling"] ["coupling_level_type"].GetInt() or self. project_parameters["print_PRESSURE_GRADIENT_option"].GetBool()) return SDP.Counter(1, 1, there_is_something_to_recover)
def GetBackwardCouplingCounter(self): return SDP.Counter( 1, 1, self.project_parameters["coupling"] ["coupling_level_type"].GetInt() > 1)
def GetRecoveryCounter(self): return SDP.Counter( 1, 1, self.project_parameters["coupling"] ["coupling_level_type"].GetInt() or self.project_parameters.print_PRESSURE_GRADIENT_option)
def GetPrintCounter(self): return SDP.Counter(is_dead=True)
def GetParticlesResultsCounter(self): return SDP.Counter()
def GetDebugInfo(self): return SDP.Counter( self.project_parameters["debug_tool_cycle"].GetInt(), 1, is_dead=1)
def GetBackwardCouplingCounter(self): return SDP.Counter(1, 4, 0)
def GetEmbeddedCounter(self): return SDP.Counter(is_dead=True)
def GetDebugInfo(self): return SDP.Counter(is_dead=1)
def GetDebugInfo(self): return SDP.Counter( self.project_parameters["debug_tool_cycle"].GetInt(), 1, self.project_parameters["print_debug_info_option"].GetBool())
def GetParticlesResultsCounter(self): return SDP.Counter( self.project_parameters["print_particles_results_cycle"].GetInt(), 1, self.project_parameters["print_particles_results_option"].GetBool( ))
def GetCationConcentrationCounter(self): return SDP.Counter( self.project_parameters['cation_concentration_frequence'].GetInt(), 1)