Beispiel #1
0
    def next_iteration(self):
        """
        Updates the iteration count on the relevant element of the Jones chain. It will also handle 
        updating the active Jones term. Ultimately, this should handle any complicated 
        convergence/term switching functionality.
        """

        self.last_active_index = self.active_index
        major_step = False

        if self.active_term.has_converged or self.active_term.has_stalled:
            print("term {} {} ({} iters): {}".format(
                self.active_term.jones_label,
                "converged" if self.active_term.has_converged else "stalled",
                self.active_term.iters,
                self.active_term.final_convergence_status_string),
                  file=log(1))
            self._convergence_states.append(
                self.active_term.final_convergence_status_string)
            self._convergence_states_finalized = True
            self._next_chain_term()
            major_step = True

        self.active_term.next_iteration()

        return MasterMachine.next_iteration(self)[0], major_step
Beispiel #2
0
 def next_iteration(self):
     np.copyto(self.old_gains, self.gains)
     return MasterMachine.next_iteration(self)