add trim complement, boundaries, remove dofs