(a) The court, on appearance or default, shall declare the rights, titles, and interests of the parties in the premises, and give judgment that partition be made between such of them as have any right therein, according to such right.
(b) The court may, in a proper case, where there are unknown parties or unknown shares, give judgment that partition be made, so far as the rights or interests of the parties or shares are known and ascertained, and the residue of the premises shall remain for the parties whose interests have not been ascertained, subject to division at any future time.