def return_results(self, Pc):
        r"""
        This method determines which pores and throats are filled with non-
        wetting phase at the specified capillary pressure, and creates or
        updates 'pore.occupancy' and 'throat.occupancy' arrays on the
        associated Phase objects. Invasion pressure and sequence are also sent
        to the invading phase.

        Parameters
        ----------
        Pc : scalar
            The capillary pressure for which an invading phase configuration is
            required.

        Returns
        -------

        Notes
        -----
        The Phase object that receives the updated occupancy arrays is the
        one that was specified as the 'invading_phase' when ``setup`` was
        called. The defending phase has the opposite occupancy values and
        partial occupancy so that summing occupancy for both phases equals
        1.0 for every pore.
        """
        Psatn = self['pore.inv_Pc'] <= Pc
        Tsatn = self['throat.inv_Pc'] <= Pc
        self._inv_phase['pore.occupancy'] = sp.array(Psatn, dtype=float)
        self._inv_phase['throat.occupancy'] = sp.array(Tsatn, dtype=float)
        self._def_phase['pore.occupancy'] = sp.array(~Psatn, dtype=float)
        self._def_phase['throat.occupancy'] = sp.array(~Tsatn, dtype=float)
        self._inv_phase['pore.inv_Pc'] = self['pore.inv_Pc']
        self._inv_phase['pore.inv_seq'] = self['pore.inv_seq']
        self._inv_phase['throat.inv_Pc'] = self['throat.inv_Pc']
        self._inv_phase['throat.inv_seq'] = self['throat.inv_seq']
        if self._pore_filling:
            Vp = self._calc_fractional_filling(element='pore', pressure=Pc)
            Sp = Vp/self._net[self._pore_volume]
            # For pores that have zero volume (i.e. boundary pores in some cases)
            # fractional filling is meaningless so use the standard occupancy
            zero_ps = self._net[self._pore_volume] == 0.0
            Sp[zero_ps] = self._inv_phase['pore.occupancy'][zero_ps]
            self._inv_phase['pore.partial_occupancy'] = Sp
            self._def_phase['pore.partial_occupancy'] = 1 - Sp
        if self._throat_filling:
            Vt = self._calc_fractional_filling(element='throat', pressure=Pc)
            St = Vt/self._net[self._throat_volume]
            # For throats that have zero volume (i.e. boundary throats in some cases)
            # fractional filling is meaningless so use the standard occupancy
            zero_ts = self._net[self._throat_volume] == 0.0
            St[zero_ts] = self._inv_phase['throat.occupancy'][zero_ts]
            self._inv_phase['throat.partial_occupancy'] = St
            self._def_phase['throat.partial_occupancy'] = 1 - St
dataset/ETHPy150Open PMEAL/OpenPNM/OpenPNM/Algorithms/__Drainage__.py/Drainage.return_results/original