message: Adding PA option to ex22p.
diff: // mpirun -np 4 ex22p -m ../data/inline-hex.mesh -o 2 -p 2
  // mpirun -np 4 ex22p -m ../data/star.mesh -o 2 -sigma 10.0
  //
  +// With partial assembly:
  +// mpirun -np 4 ex22p -m ../data/inline-quad.mesh -o 1 -p 1 -pa
  +// mpirun -np 4 ex22p -m ../data/inline-hex.mesh -o 1 -p 2 -pa
  +// mpirun -np 4 ex22p -m ../data/star.mesh -o 2 -sigma 10.0 -pa
  +//
  // Description: This example code demonstrates the use of MFEM to define and
  // solve simple complex-valued linear systems. It implements three
  // variants of a damped harmonic oscillator:
  @@ -84,6 +89,7 @@ int main(int argc, char *argv[])
  bool visualization = 1;
  bool herm_conv = true;
  bool exact_sol = true;
  + bool pa = false;
  OptionsParser args(argc, argv);
  args.AddOption(&mesh_file, "-m", "--mesh",
  @@ -116,6 +122,8 @@ int main(int argc, char *argv[])
  args.AddOption(&visualization, "-vis", "--visualization", "-no-vis",
  "--no-visualization",
  "Enable or disable GLVis visualization.");
  + args.AddOption(&pa, "-pa", "--partial-assembly", "-no-pa",
  + "--no-partial-assembly", "Enable Partial Assembly.");
  args.Parse();
  if (!args.Good())
  {
  @@ -315,6 +323,11 @@ int main(int argc, char *argv[])
  ConstantCoefficient negMassCoef(omega_ * omega_ * epsilon_);
  ParSesquilinearForm *a = new ParSesquilinearForm(fespace, conv);
  + if (pa)
  + {
  + a->real().SetAssemblyLevel(AssemblyLevel::PARTIAL);
  + a->imag().SetAssemblyLevel(AssemblyLevel::PARTIAL);
  + }
  switch (prob)
  {
  case 0:
  @@ -351,6 +364,10 @@ int main(int argc, char *argv[])
  // -Grad(a Div) - omega^2 b + omega c
  //
  ParBilinearForm *pcOp = new ParBilinearForm(fespace);
  + if (pa)
  + {
  + pcOp->SetAssemblyLevel(AssemblyLevel::PARTIAL);
  + }
  switch (prob)
  {
  case 0:
  @@ -388,7 +405,7 @@ int main(int argc, char *argv[])
  OperatorHandle PCOp;
  pcOp->FormSystemMatrix(ess_tdof_list, PCOp);
  - if (myid == 0)
  + if (myid == 0 && !pa)
  {
  ComplexHypreParMatrix * Ahyp =
  dynamic_cast<ComplexHypreParMatrix*>(A.Ptr());
  @@ -413,6 +430,12 @@ int main(int argc, char *argv[])
  Operator * pc_r = NULL;
  Operator * pc_i = NULL;
  + if (pa)
  + {
  + pc_r = new OperatorJacobiSmoother(*pcOp, ess_tdof_list);
  + }
  + else
  + {
  switch (prob)
  {
  case 0:
  @@ -433,6 +456,7 @@ int main(int argc, char *argv[])
  break;
  default: break; // This should be unreachable
  }
  + }
  pc_i = new ScaledOperator(pc_r,
  (conv == ComplexOperator::HERMITIAN) ?
  -1.0:1.0);
  