def _do_one_outer_iteration(self, **kwargs):
        r"""
        One iteration of an outer iteration loop for an algorithm
        (e.g. time or parametric study)
        """
        # Checking for the necessary values in Picard algorithm
        nan_tol = sp.isnan(self['pore.source_tol'])
        nan_max = sp.isnan(self['pore.source_maxiter'])
        self._tol_for_all = sp.amin(self['pore.source_tol'][~nan_tol])
        self._maxiter_for_all = sp.amax(self['pore.source_maxiter'][~nan_max])
        if self._guess is None:
            self._guess = sp.zeros(self._coeff_dimension)
        t = 1
        step = 0
        # The main Picard loop
        while t > self._tol_for_all and step <= self._maxiter_for_all:
            X, t, A, b = self._do_inner_iteration_stage(guess=self._guess,
                                                        **kwargs)
            logger.info('tol for Picard source_algorithm in step ' +
                        str(step) + ' : ' + str(t))
            self._guess = X
            step += 1
        # Check for divergence
        self._steps = step
        if t >= self._tol_for_all and step > self._maxiter_for_all:
            raise Exception('Iterative algorithm for the source term reached '
                            'to the maxiter: ' + str(self._maxiter_for_all) +
                            ' without achieving tol: ' +
                            str(self._tol_for_all))
        logger.info('Picard algorithm for source term converged!')
        self.A = A
        self.b = b
        self._tol_reached = t
        return X
dataset/ETHPy150Open PMEAL/OpenPNM/OpenPNM/Algorithms/__GenericLinearTransport__.py/GenericLinearTransport._do_one_outer_iteration/original