コード例 #1
0
    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)
コード例 #2
0
 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())
コード例 #3
0
 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())
コード例 #4
0
 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)
コード例 #5
0
 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
コード例 #6
0
 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)
コード例 #7
0
 def GetBackwardCouplingCounter(self):
     return SDP.Counter(
         1, 1, self.project_parameters["coupling"]
         ["coupling_level_type"].GetInt() > 1)
コード例 #8
0
 def GetRecoveryCounter(self):
     return SDP.Counter(
         1, 1, self.project_parameters["coupling"]
         ["coupling_level_type"].GetInt()
         or self.project_parameters.print_PRESSURE_GRADIENT_option)
コード例 #9
0
 def GetPrintCounter(self):
     return SDP.Counter(is_dead=True)
コード例 #10
0
 def GetParticlesResultsCounter(self):
     return SDP.Counter()
コード例 #11
0
 def GetDebugInfo(self):
     return SDP.Counter(
         self.project_parameters["debug_tool_cycle"].GetInt(), 1, is_dead=1)
コード例 #12
0
 def GetBackwardCouplingCounter(self):
     return SDP.Counter(1, 4, 0)
コード例 #13
0
 def GetEmbeddedCounter(self):
     return SDP.Counter(is_dead=True)
コード例 #14
0
 def GetDebugInfo(self):
     return SDP.Counter(is_dead=1)
コード例 #15
0
 def GetDebugInfo(self):
     return SDP.Counter(
         self.project_parameters["debug_tool_cycle"].GetInt(), 1,
         self.project_parameters["print_debug_info_option"].GetBool())
コード例 #16
0
 def GetParticlesResultsCounter(self):
     return SDP.Counter(
         self.project_parameters["print_particles_results_cycle"].GetInt(),
         1,
         self.project_parameters["print_particles_results_option"].GetBool(
         ))
コード例 #17
0
 def GetCationConcentrationCounter(self):
     return SDP.Counter(
         self.project_parameters['cation_concentration_frequence'].GetInt(),
         1)