// ============================================================================
int ML_Epetra::MultiLevelPreconditioner::
VisualizeSmoothers(int NumPreCycles, int NumPostCycles)
{

  bool viz = List_.get("viz: enable",false);
  if (viz) {
    if (IsPreconditionerComputed() == false)
      ML_CHK_ERR(-1); // need an already computed preconditioner

    bool VizPreSmoother = false;
    bool VizPostSmoother = false;

    if (NumPreCycles != 0)
      VizPreSmoother = true;
    if (NumPostCycles != 0)
      VizPostSmoother = true;

    int ierr = Visualize(false, VizPreSmoother, VizPostSmoother,
                 false, NumPreCycles, NumPostCycles, -1);

    ML_CHK_ERR(ierr);
  }
  else
  {
    std::cout << PrintMsg_ << "You need to specify `viz: enable' = true" << std::endl;
    std::cout << PrintMsg_ << "in the parameter list before building the ML" << std::endl;
    std::cout << PrintMsg_ << "preconditioner in order to visualize" << std::endl;
    ML_CHK_ERR(-1);
  }

  return(0);
}
// ============================================================================
int ML_Epetra::MultiLevelPreconditioner::
VisualizeAggregates()
{
  bool viz = List_.get("viz: enable",false);
  if (viz) {
    if (IsPreconditionerComputed() == false)
      ML_CHK_ERR(-1); // need an already computed preconditioner

    ML_CHK_ERR(Visualize(true, false, false, false, -1, -1, -1));

  }
  return(0);
}
// ============================================================================
int ML_Epetra::MultiLevelPreconditioner::
VisualizeCycle(int NumCycles)
{

  bool viz = List_.get("viz: enable",false);
  if (viz) {
    if (IsPreconditionerComputed() == false)
      ML_CHK_ERR(-1); // need an already computed preconditioner

    int ierr = Visualize(false, false, false, true,
               -1, -1, NumCycles);

    ML_CHK_ERR(ierr);
  }
  else
  {
    cout << PrintMsg_ << "You need to specify `viz: enable' = true" << endl;
    cout << PrintMsg_ << "in the parameter list before building the ML" << endl;
    cout << PrintMsg_ << "preconditioner in order to visualize" << endl;
    ML_CHK_ERR(-1);
  }
  return(0);
}