message: Simplifying ex22 and correcting preconditioner diag policy.
diff: @@ -362,17 +362,7 @@ int main(int argc, char *argv[])
  u = 0.0;
  U = 0.0;
  - OperatorHandle PCOp;
  - pcOp->FormSystemMatrix(ess_tdof_list, PCOp);
  -
  - if (!pa)
  - {
  - ComplexSparseMatrix * Asp =
  - dynamic_cast<ComplexSparseMatrix*>(A.Ptr());
  -
  - cout << "Size of linear system: "
  - << 2 * Asp->real().Width() << endl << endl;
  - }
  + cout << "Size of linear system: " << A.Ptr()->Width() << endl << endl;
  // 10. Define and apply a GMRES solver for AU=B with a block diagonal
  // preconditioner based on the appropriate sparse smoother.
  @@ -380,8 +370,8 @@ int main(int argc, char *argv[])
  Array<int> blockOffsets;
  blockOffsets.SetSize(3);
  blockOffsets[0] = 0;
  - blockOffsets[1] = PCOp.Ptr()->Height();
  - blockOffsets[2] = PCOp.Ptr()->Height();
  + blockOffsets[1] = A.Ptr()->Height() / 2;
  + blockOffsets[2] = A.Ptr()->Height() / 2;
  blockOffsets.PartialSum();
  BlockDiagonalPreconditioner BDP(blockOffsets);
  @@ -395,6 +385,9 @@ int main(int argc, char *argv[])
  }
  else
  {
  + OperatorHandle PCOp;
  + pcOp->SetDiagonalPolicy(mfem::Operator::DIAG_ONE);
  + pcOp->FormSystemMatrix(ess_tdof_list, PCOp);
  switch (prob)
  {
  case 0:
  @@ -406,8 +399,8 @@ int main(int argc, char *argv[])
  case 2:
  pc_r = new DSmoother(*PCOp.As<SparseMatrix>());
  break;
  -
  - default: break; // This should be unreachable
  + default:
  + break; // This should be unreachable
  }
  }
  double s = (prob != 1) ? 1.0 : -1.0;
  