Beispiel #1
0
//==========================================================================
int Ifpack_ICT::SetParameters(Teuchos::ParameterList& List)
{

  try
  {
    LevelOfFill_ = List.get("fact: ict level-of-fill",LevelOfFill_);
    Athresh_ = List.get("fact: absolute threshold", Athresh_);
    Rthresh_ = List.get("fact: relative threshold", Rthresh_);
    Relax_ = List.get("fact: relax value", Relax_);
    DropTolerance_ = List.get("fact: drop tolerance", DropTolerance_);

    // set label
    Label_ = "ICT (fill=" + Ifpack_toString(LevelOfFill())
      + ", athr=" + Ifpack_toString(AbsoluteThreshold()) 
      + ", rthr=" + Ifpack_toString(RelativeThreshold())
      + ", relax=" + Ifpack_toString(RelaxValue())
      + ", droptol=" + Ifpack_toString(DropTolerance())
      + ")";

    return(0);
  }
  catch (...)
  {
    cerr << "Caught an exception while parsing the parameter list" << endl;
    cerr << "This typically means that a parameter was set with the" << endl;
    cerr << "wrong type (for example, int instead of double). " << endl;
    cerr << "please check the documentation for the type required by each parameer." << endl;
    IFPACK_CHK_ERR(-1);
  }
}
//==============================================================================
void Ifpack_PointRelaxation::SetLabel()
{
  string PT;
  if (PrecType_ == IFPACK_JACOBI)
    PT = "Jacobi";
  else if (PrecType_ == IFPACK_GS){
    PT = "GS";
    if(DoBackwardGS_)
      PT = "Backward " + PT;
  }    
  else if (PrecType_ == IFPACK_SGS)
    PT = "SGS";

  Label_ = "IFPACK (" + PT + ", sweeps=" + Ifpack_toString(NumSweeps_)
    + ", damping=" + Ifpack_toString(DampingFactor_) + ")";
}
//==========================================================================
int Ifpack_SPARSKIT::SetParameters(Teuchos::ParameterList& List)
{
  lfil_    = List.get("fact: sparskit: lfil", lfil_);
  tol_     = List.get("fact: sparskit: tol", tol_);
  droptol_ = List.get("fact: sparskit: droptol", droptol_);
  permtol_ = List.get("fact: sparskit: permtol", permtol_);
  alph_    = List.get("fact: sparskit: alph", alph_);
  mbloc_   = List.get("fact: sparskit: mbloc", mbloc_);
  Type_    = List.get("fact: sparskit: type", Type_);

  // set label
  Label_ = "IFPACK SPARSKIT (Type=" + Type_ + ", fill=" +
    Ifpack_toString(lfil_) + ")";

  return(0);
}
//==============================================================================
void Ifpack_Chebyshev::SetLabel()
{
  Label_ = "IFPACK (Chebyshev polynomial), degree=" + Ifpack_toString(PolyDegree_);
}
Beispiel #5
0
//==============================================================================
void Ifpack_Krylov::SetLabel()
{
  Label_ = "IFPACK (Krylov smoother), iterations=" + Ifpack_toString(Iterations_);
}