def METHOD_NAME(self):
    print("Testing DistributeByXPosition2d on domain %i of %i domains" % \
          (domainID, nDomains))
    # Record how many nodes we're starting with.
    nNodesGlobal = []
    for nodeList in self.dataBase.nodeLists():
        nNodesGlobal.append(mpi.allreduce(nodeList.numInternalNodes,
                                          mpi.SUM))
    # Go ahead and redistribute those nodes!
    repartition = DistributeByXPosition2d()
    repartition.redistributeNodes(self.dataBase)
    # Make sure that the numbers of nodes are correct.
    assert self.dataBase.numNodeLists == len(nNodesGlobal)
    i = 0
    for nodeList in self.dataBase.nodeLists():
        n = mpi.allreduce(nodeList.numInternalNodes, mpi.SUM)
        nGlobal = nNodesGlobal[i]
        if n != nGlobal:
            self.fail("Wrong number of nodes: %i != %i" % (n, nGlobal))
        i += 1
    # Have each domain figure out it's min and max x.
    localxmin = 1e10
    localxmax = -1e10
    for nodeList in self.dataBase.nodeLists():
        if nodeList.numInternalNodes > 0:
            localxmin = min(localxmin, min([nodeList.positions()[i].x for i in range(nodeList.numNodes)]))
            localxmax = max(localxmax, max([nodeList.positions()[i].x for i in range(nodeList.numNodes)]))
    # Now make sure that our (xmin,xmax) range is greater than any processor
    # less than us, and less than any processor greater.
    localDomRange = [(domainID, localxmin, localxmax)]
    globalDomRange = mpi.allreduce(localDomRange, mpi.SUM)
    globalDomRange.sort()
    for i in range(1, len(globalDomRange)):
        if globalDomRange[i][1] < globalDomRange[i-1][1]:
            self.fail("(proc,xmin) not in order")
        if globalDomRange[i][2] < globalDomRange[i-1][2]:
            self.fail("(proc,xmax) not in order")