本文整理汇总了C++中teuchos::ParameterList::isParameter方法的典型用法代码示例。如果您正苦于以下问题:C++ ParameterList::isParameter方法的具体用法?C++ ParameterList::isParameter怎么用?C++ ParameterList::isParameter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类teuchos::ParameterList
的用法示例。
在下文中一共展示了ParameterList::isParameter方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
panzer::ScatterDirichletResidual_Tpetra<panzer::Traits::Residual, TRAITS,LO,GO,NodeT>::
ScatterDirichletResidual_Tpetra(const Teuchos::RCP<const UniqueGlobalIndexer<LO,GO> > & indexer,
const Teuchos::ParameterList& p)
: globalIndexer_(indexer)
, globalDataKey_("Residual Scatter Container")
{
std::string scatterName = p.get<std::string>("Scatter Name");
scatterHolder_ =
Teuchos::rcp(new PHX::Tag<ScalarT>(scatterName,Teuchos::rcp(new PHX::MDALayout<Dummy>(0))));
// get names to be evaluated
const std::vector<std::string>& names =
*(p.get< Teuchos::RCP< std::vector<std::string> > >("Dependent Names"));
// grab map from evaluated names to field names
fieldMap_ = p.get< Teuchos::RCP< std::map<std::string,std::string> > >("Dependent Map");
// determine if we are scattering an initial condition
scatterIC_ = p.isParameter("Scatter Initial Condition") ? p.get<bool>("Scatter Initial Condition") : false;
Teuchos::RCP<PHX::DataLayout> dl = (!scatterIC_) ?
p.get< Teuchos::RCP<panzer::PureBasis> >("Basis")->functional :
p.get< Teuchos::RCP<const panzer::PureBasis> >("Basis")->functional ;
if (!scatterIC_) {
side_subcell_dim_ = p.get<int>("Side Subcell Dimension");
local_side_id_ = p.get<int>("Local Side ID");
}
// build the vector of fields that this is dependent on
scatterFields_.resize(names.size());
for (std::size_t eq = 0; eq < names.size(); ++eq) {
scatterFields_[eq] = PHX::MDField<const ScalarT,Cell,NODE>(names[eq],dl);
// tell the field manager that we depend on this field
this->addDependentField(scatterFields_[eq]);
}
checkApplyBC_ = p.isParameter("Check Apply BC") ? p.get<bool>("Check Apply BC") : false;
if (checkApplyBC_) {
applyBC_.resize(names.size());
for (std::size_t eq = 0; eq < names.size(); ++eq) {
applyBC_[eq] = PHX::MDField<const bool,Cell,NODE>(std::string("APPLY_BC_")+fieldMap_->find(names[eq])->second,dl);
this->addDependentField(applyBC_[eq]);
}
}
// this is what this evaluator provides
this->addEvaluatedField(*scatterHolder_);
if (p.isType<std::string>("Global Data Key"))
globalDataKey_ = p.get<std::string>("Global Data Key");
this->setName(scatterName+" Scatter Residual");
}
示例2: setParameters
//---------------------------------------------------------------------------//
// Set parameters for mapping.
void MoabEntityLocalMap::setParameters(
const Teuchos::ParameterList& parameters )
{
if ( parameters.isParameter("Point Inclusion Tolerance") )
{
d_inclusion_tol = parameters.get<double>("Point Inclusion Tolerance");
}
if ( parameters.isParameter("Newton Tolerance") )
{
d_newton_tol = parameters.get<double>("Newton Tolerance");
}
}
示例3: Material
PeridigmNS::ElasticPlasticMaterial::ElasticPlasticMaterial(const Teuchos::ParameterList & params)
: Material(params),
m_disablePlasticity(false),
m_applyAutomaticDifferentiationJacobian(true),
m_isPlanarProblem(false),
m_volumeFieldId(-1), m_damageFieldId(-1), m_weightedVolumeFieldId(-1), m_dilatationFieldId(-1), m_modelCoordinatesFieldId(-1),
m_coordinatesFieldId(-1), m_forceDensityFieldId(-1), m_bondDamageFieldId(-1), m_deviatoricPlasticExtensionFieldId(-1),
m_lambdaFieldId(-1)
{
//! \todo Add meaningful asserts on material properties.
m_bulkModulus = calculateBulkModulus(params);
m_shearModulus = calculateShearModulus(params);
m_horizon = params.get<double>("Horizon");
m_density = params.get<double>("Density");
m_yieldStress = params.get<double>("Yield Stress");
if(params.isParameter("Disable Plasticity"))
m_disablePlasticity = params.get<bool>("Disable Plasticity");
if(params.isParameter("Apply Automatic Differentiation Jacobian"))
m_applyAutomaticDifferentiationJacobian = params.get<bool>("Apply Automatic Differentiation Jacobian");
if(params.isParameter("Planar Problem")){
m_isPlanarProblem= params.get<bool>("Planar Problem");
m_thickness= params.get<double>("Thickness");
}
TEUCHOS_TEST_FOR_EXCEPT_MSG(params.isParameter("Thermal Expansion Coefficient"), "**** Error: Thermal expansion is not currently supported for the Elastic Plastic material model.\n");
if(m_disablePlasticity)
m_yieldStress = std::numeric_limits<double>::max();
if(!m_isPlanarProblem)
m_thickness = std::numeric_limits<double>::max();
PeridigmNS::FieldManager& fieldManager = PeridigmNS::FieldManager::self();
m_volumeFieldId = fieldManager.getFieldId(PeridigmField::ELEMENT, PeridigmField::SCALAR, PeridigmField::CONSTANT, "Volume");
m_damageFieldId = fieldManager.getFieldId(PeridigmField::ELEMENT, PeridigmField::SCALAR, PeridigmField::TWO_STEP, "Damage");
m_weightedVolumeFieldId = fieldManager.getFieldId(PeridigmField::ELEMENT, PeridigmField::SCALAR, PeridigmField::CONSTANT, "Weighted_Volume");
m_dilatationFieldId = fieldManager.getFieldId(PeridigmField::ELEMENT, PeridigmField::SCALAR, PeridigmField::TWO_STEP, "Dilatation");
m_modelCoordinatesFieldId = fieldManager.getFieldId(PeridigmField::NODE, PeridigmField::VECTOR, PeridigmField::CONSTANT, "Model_Coordinates");
m_coordinatesFieldId = fieldManager.getFieldId(PeridigmField::NODE, PeridigmField::VECTOR, PeridigmField::TWO_STEP, "Coordinates");
m_forceDensityFieldId = fieldManager.getFieldId(PeridigmField::NODE, PeridigmField::VECTOR, PeridigmField::TWO_STEP, "Force_Density");
m_bondDamageFieldId = fieldManager.getFieldId(PeridigmField::BOND, PeridigmField::SCALAR, PeridigmField::TWO_STEP, "Bond_Damage");
m_deviatoricPlasticExtensionFieldId = fieldManager.getFieldId(PeridigmField::BOND, PeridigmField::SCALAR, PeridigmField::TWO_STEP, "Deviatoric_Plastic_Extension");
m_lambdaFieldId = fieldManager.getFieldId(PeridigmField::ELEMENT, PeridigmField::SCALAR, PeridigmField::TWO_STEP, "Lambda");
m_fieldIds.push_back(m_volumeFieldId);
m_fieldIds.push_back(m_damageFieldId);
m_fieldIds.push_back(m_weightedVolumeFieldId);
m_fieldIds.push_back(m_dilatationFieldId);
m_fieldIds.push_back(m_modelCoordinatesFieldId);
m_fieldIds.push_back(m_coordinatesFieldId);
m_fieldIds.push_back(m_forceDensityFieldId);
m_fieldIds.push_back(m_bondDamageFieldId);
m_fieldIds.push_back(m_deviatoricPlasticExtensionFieldId);
m_fieldIds.push_back(m_lambdaFieldId);
}
示例4:
Teuchos::ParameterList TrilinosSmoother<Scalar, LocalOrdinal, GlobalOrdinal, Node>::Ifpack2ToIfpack1Param(const Teuchos::ParameterList& ifpack2List) {
Teuchos::ParameterList ifpack1List = ifpack2List;
if (ifpack2List.isParameter("relaxation: type") && ifpack2List.get<std::string>("relaxation: type") == "Symmetric Gauss-Seidel")
ifpack1List.set("relaxation: type", "symmetric Gauss-Seidel");
if (ifpack2List.isParameter("fact: iluk level-of-fill")) {
ifpack1List.remove("fact: iluk level-of-fill");
ifpack1List.set("fact: level-of-fill", ifpack2List.get<int>("fact: iluk level-of-fill"));
}
return ifpack1List;
}
示例5:
bool
ComparisonHelper::metricComparisonTest(const RCP<const Comm<int> > &comm,
const Zoltan2::MetricValues<zscalar_t> & metric,
const Zoltan2::MetricValues<zscalar_t> & ref_metric,
const Teuchos::ParameterList & metricPlist,
ostringstream &msg)
{
// run a comparison of min and max agains a given metric
// return an error message on failure
bool pass = true;
string test_name = metricPlist.name() + " test";
double ref_value = ref_metric.getMaxImbalance();
double value = metric.getMaxImbalance();
// want to reduce value to max value for all procs
if (metricPlist.isParameter("lower"))
{
double min = metricPlist.get<double>("lower")*ref_value;
if(value < min)
{
msg << test_name << " FAILED: imbalance per part, "
<< value << ", less than specified allowable minimum, " << min << ".\n";
pass = false;
}else{
msg << test_name << " PASSED: imbalance per part, "
<< value << ", greater than specified allowable minimum, " << min << ".\n";
}
}
if(metricPlist.isParameter("upper" ) && pass != false) {
double max = metricPlist.get<double>("upper") * ref_value;
if (value > max)
{
msg << test_name << " FAILED: imbalance per part, "
<< value << ", greater than specified allowable maximum, " << max << ".\n";
pass = false;
}else{
msg << test_name << " PASSED: imbalance per part, "
<< value << ", less than specified allowable maximum, " << max << ".\n";
}
}
return pass;
}
示例6: DamageModel
PeridigmNS::InterfaceAwareDamageModel::InterfaceAwareDamageModel(const Teuchos::ParameterList& params)
: DamageModel(params), m_applyThermalStrains(false), m_modelCoordinatesFieldId(-1), m_coordinatesFieldId(-1), m_damageFieldId(-1), m_bondDamageFieldId(-1), m_criticalStretchFieldId(-1), m_deltaTemperatureFieldId(-1)
{
m_criticalStretch = params.get<double>("Critical Stretch");
if(params.isParameter("Thermal Expansion Coefficient")){
m_alpha = params.get<double>("Thermal Expansion Coefficient");
m_applyThermalStrains = true;
}
PeridigmNS::FieldManager& fieldManager = PeridigmNS::FieldManager::self();
m_modelCoordinatesFieldId = fieldManager.getFieldId("Model_Coordinates");
m_coordinatesFieldId = fieldManager.getFieldId("Coordinates");
m_damageFieldId = fieldManager.getFieldId(PeridigmNS::PeridigmField::ELEMENT, PeridigmNS::PeridigmField::SCALAR, PeridigmNS::PeridigmField::TWO_STEP, "Damage");
m_bondDamageFieldId = fieldManager.getFieldId(PeridigmNS::PeridigmField::BOND, PeridigmNS::PeridigmField::SCALAR, PeridigmNS::PeridigmField::TWO_STEP, "Bond_Damage");
if(m_applyThermalStrains)
m_deltaTemperatureFieldId = fieldManager.getFieldId(PeridigmField::NODE, PeridigmField::SCALAR, PeridigmField::TWO_STEP, "Temperature_Change");
m_criticalStretchFieldId = fieldManager.getFieldId(PeridigmNS::PeridigmField::ELEMENT, PeridigmNS::PeridigmField::SCALAR, PeridigmNS::PeridigmField::CONSTANT, "Critical_Stretch");
m_fieldIds.push_back(m_modelCoordinatesFieldId);
m_fieldIds.push_back(m_coordinatesFieldId);
m_fieldIds.push_back(m_damageFieldId);
m_fieldIds.push_back(m_bondDamageFieldId);
if(m_applyThermalStrains)
m_fieldIds.push_back(m_deltaTemperatureFieldId);
m_fieldIds.push_back(m_criticalStretchFieldId);
}
示例7: SetParameters
//=============================================================================
int Amesos_Klu::SetParameters( Teuchos::ParameterList &ParameterList ) {
// ========================================= //
// retrive KLU's parameters from list. //
// default values defined in the constructor //
// ========================================= //
// retrive general parameters
SetStatusParameters( ParameterList );
SetControlParameters( ParameterList );
if (ParameterList.isParameter("TrustMe") )
TrustMe_ = ParameterList.get<bool>( "TrustMe" );
#if 0
unused for now
if (ParameterList.isSublist("Klu") ) {
Teuchos::ParameterList KluParams = ParameterList.sublist("Klu") ;
}
#endif
return 0;
}
示例8: numNodes
XZHydrostatic_GeoPotential<EvalT, Traits>::
XZHydrostatic_GeoPotential(const Teuchos::ParameterList& p,
const Teuchos::RCP<Aeras::Layouts>& dl) :
density (p.get<std::string> ("Density") , dl->node_scalar_level),
Pi (p.get<std::string> ("Pi") , dl->node_scalar_level),
Phi (p.get<std::string> ("GeoPotential"), dl->node_scalar_level),
PhiSurf (p.get<std::string> ("SurfaceGeopotential") , dl->node_scalar),
numNodes ( dl->node_scalar ->dimension(1)),
numLevels( dl->node_scalar_level ->dimension(2)),
Phi0(0.0)
{
Teuchos::ParameterList* xzhydrostatic_params =
p.isParameter("XZHydrostatic Problem") ?
p.get<Teuchos::ParameterList*>("XZHydrostatic Problem"):
p.get<Teuchos::ParameterList*>("Hydrostatic Problem");
Phi0 = xzhydrostatic_params->get<double>("Phi0", 0.0); //Default: Phi0=0.0
//std::cout << "XZHydrostatic_GeoPotential: Phi0 = " << Phi0 << std::endl;
this->addDependentField(density);
this->addDependentField(Pi);
this->addDependentField(PhiSurf);
this->addEvaluatedField(Phi);
this->setName("Aeras::XZHydrostatic_GeoPotential" );
}
示例9: search
/*!
* \brief Find the set of entities a point neighbors.
*/
void CoarseLocalSearch::search( const Teuchos::ArrayView<const double>& point,
const Teuchos::ParameterList& parameters,
Teuchos::Array<Entity>& neighbors ) const
{
// Find the leaf of nearest neighbors.
int num_neighbors = 100;
if ( parameters.isParameter("Coarse Local Search kNN") )
{
num_neighbors = parameters.get<int>("Coarse Local Search kNN");
}
num_neighbors =
std::min( num_neighbors, Teuchos::as<int>(d_entity_map.size()) );
Teuchos::Array<unsigned> local_neighbors =
d_tree->nnSearch( point, num_neighbors );
// Extract the neighbors.
neighbors.resize( local_neighbors.size() );
Teuchos::Array<unsigned>::const_iterator local_it;
Teuchos::Array<Entity>::iterator entity_it;
for ( local_it = local_neighbors.begin(),
entity_it = neighbors.begin();
local_it != local_neighbors.end();
++local_it, ++entity_it )
{
DTK_CHECK( d_entity_map.count(*local_it) );
*entity_it = d_entity_map.find(*local_it)->second;
}
}
示例10: numNodes
XZHydrostatic_GeoPotential<EvalT, Traits>::
XZHydrostatic_GeoPotential(const Teuchos::ParameterList& p,
const Teuchos::RCP<Aeras::Layouts>& dl) :
density (p.get<std::string> ("Density") , dl->node_scalar_level),
Pi (p.get<std::string> ("Pi") , dl->node_scalar_level),
Phi (p.get<std::string> ("GeoPotential"), dl->node_scalar_level),
PhiSurf (p.get<std::string> ("SurfaceGeopotential") , dl->node_scalar),
numNodes ( dl->node_scalar ->dimension(1)),
numLevels( dl->node_scalar_level ->dimension(2)),
Phi0(0.0),
E (Eta<EvalT>::self())
{
Teuchos::ParameterList* xzhydrostatic_params =
p.isParameter("XZHydrostatic Problem") ?
p.get<Teuchos::ParameterList*>("XZHydrostatic Problem"):
p.get<Teuchos::ParameterList*>("Hydrostatic Problem");
Phi0 = xzhydrostatic_params->get<double>("Phi0", 0.0); //Default: Phi0=0.0
//std::cout << "XZHydrostatic_GeoPotential: Phi0 = " << Phi0 << std::endl;
this->addDependentField(density);
this->addDependentField(Pi);
this->addDependentField(PhiSurf);
this->addEvaluatedField(Phi);
this->setName("Aeras::XZHydrostatic_GeoPotential" + PHX::typeAsString<EvalT>());
#ifdef ALBANY_KOKKOS_UNDER_DEVELOPMENT
delta = E.delta_kokkos;
#endif
}
示例11: Velocity
XZHydrostatic_Omega<EvalT, Traits>::
XZHydrostatic_Omega(const Teuchos::ParameterList& p,
const Teuchos::RCP<Aeras::Layouts>& dl) :
Velocity (p.get<std::string> ("Velocity"), dl->node_vector_level),
density (p.get<std::string> ("Density"), dl->node_scalar_level),
Cpstar (p.get<std::string> ("QP Cpstar"), dl->node_scalar_level),
gradp (p.get<std::string> ("Gradient QP Pressure"), dl->qp_gradient_level),
divpivelx (p.get<std::string> ("Divergence QP PiVelx"), dl->qp_scalar_level),
omega (p.get<std::string> ("Omega") , dl->node_scalar_level),
numQPs (dl->node_qp_scalar ->dimension(2)),
numDims (dl->node_qp_gradient ->dimension(3)),
numLevels (dl->node_scalar_level ->dimension(2)),
Cp (p.isParameter("XZHydrostatic Problem") ?
p.get<Teuchos::ParameterList*>("XZHydrostatic Problem")->get<double>("Cp", 1005.7):
p.get<Teuchos::ParameterList*>("Hydrostatic Problem")->get<double>("Cp", 1005.7)),
E (Eta<EvalT>::self())
{
this->addDependentField(Velocity);
this->addDependentField(gradp);
this->addDependentField(density);
this->addDependentField(Cpstar);
this->addDependentField(divpivelx);
this->addEvaluatedField(omega);
this->setName("Aeras::XZHydrostatic_Omega" + PHX::typeAsString<EvalT>());
#ifdef ALBANY_KOKKOS_UNDER_DEVELOPMENT
delta = E.delta_kokkos;
#endif
}
示例12: assembleBoundingBox
//---------------------------------------------------------------------------//
// Constructor.
CoarseGlobalSearch::CoarseGlobalSearch(
const Teuchos::RCP<const Teuchos::Comm<int> >& comm,
const int physical_dimension,
const EntityIterator& domain_iterator,
const Teuchos::ParameterList& parameters )
: d_comm( comm )
, d_space_dim( physical_dimension )
, d_track_missed_range_entities( false )
, d_missed_range_entity_ids( 0 )
, d_inclusion_tol( 1.0e-6 )
{
// Determine if we are tracking missed range entities.
if ( parameters.isParameter("Track Missed Range Entities") )
{
d_track_missed_range_entities =
parameters.get<bool>("Track Missed Range Entities");
}
// Get the point inclusion tolerance.
if ( parameters.isParameter("Point Inclusion Tolerance") )
{
d_inclusion_tol =
parameters.get<double>("Point Inclusion Tolerance");
}
// Assemble the local domain bounding box.
Teuchos::Tuple<double,6> domain_box;
assembleBoundingBox( domain_iterator, domain_box );
// Gather the bounding boxes from all domains.
int comm_size = d_comm->getSize();
Teuchos::Array<double> all_bounds( 6*comm_size );
Teuchos::gatherAll<int,double>(
*d_comm, 6, domain_box.getRawPtr(),
all_bounds.size(), all_bounds.getRawPtr() );
// Extract the bounding boxes.
d_domain_boxes.resize( comm_size );
int id = 0;
for ( int n = 0; n < comm_size; ++n )
{
id = 6*n;
d_domain_boxes[n] = Teuchos::tuple(
all_bounds[id], all_bounds[id+1], all_bounds[id+2],
all_bounds[id+3], all_bounds[id+4], all_bounds[id+5] );
}
}
示例13: MetricBoundsTest
/// \brief Preforms the analysis
///
/// @param comm RCP for a communicator
/// @param metric the metrics for the problem
/// @param metricsPlist parameter list defining tolerances
/// @param[out] msg_stream a std::ostringstream stream to return information from the analysis
///
/// @return returns a boolean value indicated pass/failure.
static bool MetricBoundsTest( zscalar_t value,
const std::string &test_name,
const Teuchos::ParameterList & metricPlist,
const RCP<const Comm<int>> &comm,
ostringstream &msg)
{
// run a comparison of min and max agains a given metric
// return an error message on failure
bool pass = true;
// Perfom tests
if (metricPlist.isParameter("lower")) {
double min = metricPlist.get<double>("lower");
if(value < min) {
if (comm->getRank() == 0)
msg << test_name << " FAILED: " + test_name + ": "
<< value << ", less than specified allowable minimum, "
<< min << ".\n";
pass = false;
} else {
if (comm->getRank() == 0)
msg << test_name << " PASSED: " + test_name + ": "
<< value << ", greater than specified allowable minimum, "
<< min << ".\n";
}
}
if(metricPlist.isParameter("upper" ) && pass != false) {
double max = metricPlist.get<double>("upper");
if (value > max) {
if (comm->getRank() == 0)
msg << test_name << " FAILED: " + test_name + ": "
<< value << ", greater than specified allowable maximum, "
<< max << ".\n";
pass = false;
} else {
if (comm->getRank() == 0)
msg << test_name << " PASSED: " + test_name + ": "
<< value << ", less than specified allowable maximum, "
<< max << ".\n";
}
}
return pass;
}
示例14: getDiagonalType
/** \brief This function builds the internals of the state from a parameter list.
*
* This function builds the internals of the LU 2x2 state
* from a parameter list. Furthermore, it allows a
* developer to easily add a factory to the build system.
*
* \param[in] settings Parameter list to use as the internal settings
* \param[in] invLib Inverse library to use for building inverse factory objects
*
* \note The default implementation does nothing.
*/
void LU2x2DiagonalStrategy::initializeFromParameterList(const Teuchos::ParameterList & pl,
const InverseLibrary & invLib)
{
Teko_DEBUG_SCOPE("LU2x2DiagonalStrategy::initializeFromParameterList",10);
std::string invStr="Amesos", invA00Str="", invSStr="";
// "parse" the parameter list
if(pl.isParameter("Inverse Type"))
invStr = pl.get<std::string>("Inverse Type");
if(pl.isParameter("Inverse A00 Type"))
invA00Str = pl.get<std::string>("Inverse A00 Type");
if(pl.isParameter("Inverse Schur Type"))
invSStr = pl.get<std::string>("Inverse Schur Type");
if(pl.isParameter("Diagonal Type")) {
std::string massInverseStr = pl.get<std::string>("Diagonal Type");
// build inverse types
a00InverseType_ = getDiagonalType(massInverseStr);
}
// set defaults as needed
if(invA00Str=="") invA00Str = invStr;
if(invSStr=="") invSStr = invStr;
Teko_DEBUG_MSG_BEGIN(5)
DEBUG_STREAM << "LU2x2 Diagonal Strategy Parameters: " << std::endl;
DEBUG_STREAM << " inv type = \"" << invStr << "\"" << std::endl;
DEBUG_STREAM << " inv A00 type = \"" << invA00Str << "\"" << std::endl;
DEBUG_STREAM << " inv S type = \"" << invSStr << "\"" << std::endl;
DEBUG_STREAM << "LU2x2 Diagonal Strategy Parameter list: " << std::endl;
pl.print(DEBUG_STREAM);
Teko_DEBUG_MSG_END()
// build velocity inverse factory
invFactoryA00_ = invLib.getInverseFactory(invA00Str);
if(invA00Str==invSStr)
invFactoryS_ = invFactoryA00_;
else
invFactoryS_ = invLib.getInverseFactory(invSStr);
}
示例15: initializeFromParameterList
/** \brief This function builds the internals of the preconditioner factory
* from a parameter list.
*/
void IterativePreconditionerFactory::initializeFromParameterList(const Teuchos::ParameterList & settings)
{
correctionNum_ = 1;
if(settings.isParameter("Iteration Count"))
correctionNum_ = settings.get<int>("Iteration Count");
TEUCHOS_TEST_FOR_EXCEPTION(not settings.isParameter("Preconditioner Type"),std::runtime_error,
"Parameter \"Preconditioner Type\" is required by a Teko::IterativePreconditionerFactory");
// grab library and preconditioner name
Teuchos::RCP<const InverseLibrary> il = getInverseLibrary();
std::string precName = settings.get<std::string>("Preconditioner Type");
// build preconditioner factory
precFactory_ = il->getInverseFactory(precName);
TEUCHOS_TEST_FOR_EXCEPTION(precFactory_==Teuchos::null,std::runtime_error,
"ERROR: \"Preconditioner Type\" = " << precName
<< " could not be found");
}