def add_instrumentation(self, mgr, observer): Depositor.add_instrumentation(self, mgr, observer) # instrumentation from pytools.log import IntervalTimer, EventCounter self.element_activation_counter = EventCounter( "n_el_activations", "#Advective rec. elements activated this timestep") self.element_kill_counter = EventCounter( "n_el_kills", "#Advective rec. elements retired this timestep") self.advective_rhs_timer = IntervalTimer( "t_advective_rhs", "Time spent evaluating advective RHS") self.active_elements_log = ActiveAdvectiveElements(observer) mgr.add_quantity(self.element_activation_counter) mgr.add_quantity(self.element_kill_counter) mgr.add_quantity(self.advective_rhs_timer) mgr.add_quantity(self.active_elements_log) mgr.set_constant("el_activation_threshold", self.activation_threshold) mgr.set_constant("el_kill_threshold", self.kill_threshold) mgr.set_constant("adv_upwind_alpha", self.upwind_alpha) mgr.set_constant("filter_amp", self.filter_amp) mgr.set_constant("filter_amp", self.filter_order)
def add_instrumentation(self, mgr, observer): Depositor.add_instrumentation(self, mgr, observer) # instrumentation from pytools.log import IntervalTimer, EventCounter self.element_activation_counter = EventCounter( "n_el_activations", "#Advective rec. elements activated this timestep") self.element_kill_counter = EventCounter( "n_el_kills", "#Advective rec. elements retired this timestep") self.advective_rhs_timer = IntervalTimer( "t_advective_rhs", "Time spent evaluating advective RHS") self.active_elements_log = ActiveAdvectiveElements(observer) mgr.add_quantity(self.element_activation_counter) mgr.add_quantity(self.element_kill_counter) mgr.add_quantity(self.advective_rhs_timer) mgr.add_quantity(self.active_elements_log) mgr.set_constant("el_activation_threshold", self.activation_threshold) mgr.set_constant("el_kill_threshold", self.kill_threshold) mgr.set_constant("adv_upwind_alpha", self.upwind_alpha) mgr.set_constant("filter_amp", self.filter_amp) mgr.set_constant("filter_amp", self.filter_order)
def add_instrumentation(self, mgr, observer): Depositor.add_instrumentation(self, mgr, observer) mgr.set_constant("rec_grid_el_tolerance", self.el_tolerance) mgr.set_constant("rec_grid_enforce_continuity", self.enforce_continuity) mgr.set_constant("rec_grid_method", self.submethod) mgr.set_constant("rec_grid_jiggle_radius", self.jiggle_radius) self.brick_generator.log_data(mgr)
def add_instrumentation(self, mgr, observer): Depositor.add_instrumentation(self, mgr, observer) mgr.set_constant("rec_grid_el_tolerance", self.el_tolerance) mgr.set_constant("rec_grid_enforce_continuity", self.enforce_continuity) mgr.set_constant("rec_grid_method", self.submethod) mgr.set_constant("rec_grid_jiggle_radius", self.jiggle_radius) self.brick_generator.log_data(mgr)
def add_instrumentation(self, mgr, observer): Depositor.add_instrumentation(self, mgr, observer) from pyrticle.log import StatsGathererLogQuantity mgr.add_quantity(StatsGathererLogQuantity( lambda : observer.state.depositor_state.stats.normalization_stats, "normshape_norm", "1", "normalization constants applied during deposition")) mgr.add_quantity(StatsGathererLogQuantity( lambda : observer.state.depositor_state.stats.centroid_distance_stats, "normshape_centroid_dist", "m", "distance of shape center from element centroid")) mgr.add_quantity(StatsGathererLogQuantity( lambda : observer.state.depositor_state.stats.el_per_particle_stats, "normshape_el_per_particle", "1", "number of elements per particle"))
def add_instrumentation(self, mgr, observer): Depositor.add_instrumentation(self, mgr, observer) from pyrticle.log import StatsGathererLogQuantity mgr.add_quantity( StatsGathererLogQuantity( lambda: observer.state.depositor_state.stats. normalization_stats, "normshape_norm", "1", "normalization constants applied during deposition")) mgr.add_quantity( StatsGathererLogQuantity( lambda: observer.state.depositor_state.stats. centroid_distance_stats, "normshape_centroid_dist", "m", "distance of shape center from element centroid")) mgr.add_quantity( StatsGathererLogQuantity( lambda: observer.state.depositor_state.stats. el_per_particle_stats, "normshape_el_per_particle", "1", "number of elements per particle"))