<ParameterList name="MueLu">

  <!-- Factory collection -->
  <ParameterList name="Factories">

    <!-- Note that ParameterLists must be defined prior to being used -->
    <ParameterList name="myCoalesceDropFact">
      <Parameter name="factory"                             type="string" value="CoalesceDropFactory"/>
      <Parameter name="lightweight wrap"                    type="bool"   value="true"/>
      <!-- for aggregation dropping -->
      <Parameter name="aggregation: drop tol"               type="double" value="0.01"/>
    </ParameterList>

    <ParameterList name="UncoupledAggregationFact">
      <Parameter name="factory"                             type="string" value="UncoupledAggregationFactory"/>
      <Parameter name="aggregation: ordering"               type="string" value="natural"/>
      <Parameter name="aggregation: max selected neighbors" type="int"    value="0"/>
      <Parameter name="aggregation: min agg size"           type="int"    value="4"/>
      <Parameter name="Graph"                               type="string" value="myCoalesceDropFact"/>
      <Parameter name="DofsPerNode"                         type="string" value="myCoalesceDropFact"/>
    </ParameterList>

    <ParameterList name="myTentativePFact">
      <Parameter name="factory"                             type="string" value="TentativePFactory"/>
    </ParameterList>
    <ParameterList name="myProlongatorFact">
      <Parameter name="factory"                             type="string" value="PgPFactory"/>
      <Parameter name="P"                                   type="string" value="myTentativePFact"/>
    </ParameterList>
    <ParameterList name="myRestrictorFact">
      <Parameter name="factory"                             type="string" value="GenericRFactory"/>
      <Parameter name="P"                                   type="string" value="myProlongatorFact"/>
    </ParameterList>

    <ParameterList name="myCoordTransferFact">
      <Parameter name="factory"                             type="string" value="CoordinatesTransferFactory"/>
    </ParameterList>

    <ParameterList name="myAggExportFact">
      <Parameter name="factory"                             type="string" value="AggregationExportFactory"/>
      <Parameter name="aggregation: output filename"        type="string" value="aggs_level%LEVELID_proc%PROCID.out"/>
      <Parameter name="aggregation: output file: agg style" type="string" value="Convex Hulls"/>
    </ParameterList>

    <ParameterList name="myRAPFact">
      <Parameter name="factory"                             type="string" value="RAPFactory"/>
      <Parameter name="P"                                   type="string" value="myProlongatorFact"/>
      <Parameter name="R"                                   type="string" value="myRestrictorFact"/>
      <ParameterList name="TransferFactories">
        <Parameter name="CoordinateTransfer"                type="string" value="myCoordTransferFact"/>
        <Parameter name="Visualization"                     type="string" value="myAggExportFact"/>
      </ParameterList>
    </ParameterList>

    <!-- =======================  SMOOTHERS  ======================= -->
    <ParameterList name="SymGaussSeidel">
      <Parameter name="factory"                             type="string" value="TrilinosSmoother"/>
      <Parameter name="type"                                type="string" value="RELAXATION"/>
      <ParameterList name="ParameterList">
        <Parameter name="relaxation: type"                  type="string" value="Symmetric Gauss-Seidel"/>
        <Parameter name="relaxation: sweeps"                type="int"    value="1"/>
        <Parameter name="relaxation: damping factor"        type="double" value="1.0"/>
      </ParameterList>
    </ParameterList>

  </ParameterList>

  <!-- Definition of the multigrid preconditioner -->
  <ParameterList name="Hierarchy">

    <Parameter name="max levels"       type="int"    value="10"/>
    <Parameter name="coarse: max size" type="int"    value="10"/>
    <Parameter name="verbosity"        type="string" value="High"/>

    <ParameterList name="All">
      <Parameter name="Smoother"       type="string" value="SymGaussSeidel"/>
      <Parameter name="Graph"          type="string" value="myCoalesceDropFact"/>
      <Parameter name="Aggregates"     type="string" value="UncoupledAggregationFact"/>
      <Parameter name="Nullspace"      type="string" value="myTentativePFact"/>
      <Parameter name="P"              type="string" value="myProlongatorFact"/>
      <Parameter name="R"              type="string" value="myRestrictorFact"/>
      <Parameter name="A"              type="string" value="myRAPFact"/>
      <Parameter name="CoarseSolver"   type="string" value="DirectSolver"/>
      <Parameter name="Coordinates"    type="string" value="myCoordTransferFact"/>
    </ParameterList>
  </ParameterList>
</ParameterList>
