void 
hypre_F90_IFACE(hypre_structbicgstabdestroy, HYPRE_STRUCTBICGSTABDESTROY)
   ( hypre_F90_Obj *solver,
     hypre_F90_Int *ierr   )
{
   *ierr = (hypre_F90_Int)
      ( HYPRE_StructBiCGSTABDestroy(
           hypre_F90_PassObj (HYPRE_StructSolver, solver) ) );
}
void
CCDivGradHypreLevelSolver::destroyHypreSolver()
{
    // Destroy the solver.
    if (d_solver_type == "PFMG")
    {
        HYPRE_StructPFMGDestroy(d_solver);
    }
    else if (d_solver_type == "SMG")
    {
        HYPRE_StructSMGDestroy(d_solver);
    }
    else if (d_solver_type == "PCG")
    {
        HYPRE_StructPCGDestroy(d_solver);
    }
    else if (d_solver_type == "GMRES")
    {
        HYPRE_StructGMRESDestroy(d_solver);
    }
    else if (d_solver_type == "FlexGMRES")
    {
        HYPRE_StructFlexGMRESDestroy(d_solver);
    }
    else if (d_solver_type == "LGMRES")
    {
        HYPRE_StructLGMRESDestroy(d_solver);
    }
    else if (d_solver_type == "BiCGSTAB")
    {
        HYPRE_StructBiCGSTABDestroy(d_solver);
    }

    // When using a Krylov method, destroy the preconditioner.
    if (d_solver_type == "PCG" || d_solver_type == "GMRES" || d_solver_type == "FlexGMRES" || d_solver_type == "LGMRES" || d_solver_type == "BiCGSTAB")
    {
        if (d_precond_type == "PFMG")
        {
            HYPRE_StructPFMGDestroy(d_precond);
        }
        else if (d_precond_type == "SMG")
        {
            HYPRE_StructSMGDestroy(d_precond);
        }
        else if (d_precond_type == "Jacobi")
        {
            HYPRE_StructJacobiDestroy(d_precond);
        }
    }

    // Set the solver and preconditioner pointers to NULL.
    d_solver  = NULL;
    d_precond = NULL;
    return;
}// destroyHypreSolver