====================================
ArchDom in ScotchPy
====================================

ArchDomains are implemented in ScotchPy with the ArchDom class.

The ArchDom class
#################



.. class:: ArchDom()

    The ArchDom constructor itself calls libscotch's ``archDomAlloc`` function.
    This object doesn't need to be initialized.

  |

    **The following routines, which need to be called from an :class:`ArchDom` object are relayed to the ArchDom class but not present in the class itself:**

  |

.. method:: dom_size(domn)

    This routine returns the size of the domain.

    :param domn: Domain to be considered.
    :type domn: :class:`ArchDom`
    :returns: The size of the domain.
    :rtype: Integer

  |

  .. method:: dom_wght(domn)

    This routine returns the weight of the domain.

    :param domn: Domain to be considered.
    :type domn: :class:`ArchDom`
    :returns: The weight of the domain.
    :rtype: Integer

  |

  .. method:: dom_dist(domn0, domn1)

    This routine returns the distance of the domain.

    :param domn0: First domain.
    :type domn0: :class:`ArchDom`
    :param domn1: Second domain.
    :type domn1: :class:`ArchDom`
    :returns: The distance between the two domains.
    :rtype: Integer

  |

  .. method:: dom_frst(domn)

    This routine initializes the domain with the biggest domain of the architecture.

    :param domn: Domain to be initialized.
    :type domn: :class:`ArchDom`

  |

  .. method:: dom_term(domn,domnum)

    This routine initializes the domain to correspond to the terminal domain of index ``domnum`` in the architecture.

    :param domn: Domain to be initialized.
    :type domn: :class:`ArchDom`
    :param domnum: Index of the terminal domain.
    :type domnum: Integer

  |

  .. method:: dom_num(domn)

    This routine returns the number of the domain.

    :param domn: Domain to be considered.
    :type domn: :class:`ArchDom`
    :returns: The number of the domain.
    :rtype: Integer

  |

  .. method:: dom_bipart(domn, dom0, dom1)

    This routine initializes the two subdomains to correspond to the two parts of the bipartition of the ``domn`` domain.

    :param domn: Domain to be considered.
    :type domn: :class:`ArchDom`
    :param dom0: First subdomain.
    :type dom0: :class:`ArchDom`
    :param dom1: Second subdomain.
    :type dom1: :class:`ArchDom`
