Public Member Functions | Protected Attributes | Private Member Functions

Albany::SolverFactory Class Reference

A factory class to instantiate AbstractSolver objects. More...

#include <Albany_SolverFactory.hpp>

List of all members.

Public Member Functions

 SolverFactory (const std::string &inputfile, const int &mcomm)
 Default constructor.
 SolverFactory (const Teuchos::RCP< Teuchos::ParameterList > &input_appParams, const int &mcomm)
virtual ~SolverFactory ()
 Destructor.
virtual Teuchos::RCP
< EpetraExt::ModelEvaluator > 
create (const Teuchos::RCP< const Epetra_Comm > &appComm, const Teuchos::RCP< const Epetra_Comm > &solverComm, const Teuchos::RCP< const Epetra_Vector > &initial_guess=Teuchos::null)
 Create solver as response-only model evaluator.
Teuchos::RCP
< EpetraExt::ModelEvaluator > 
createAndGetAlbanyApp (Teuchos::RCP< Application > &albanyApp, const Teuchos::RCP< const Epetra_Comm > &appComm, const Teuchos::RCP< const Epetra_Comm > &solverComm, const Teuchos::RCP< const Epetra_Vector > &initial_guess=Teuchos::null)
Teuchos::RCP
< Thyra::ModelEvaluator
< double > > 
createThyraSolverAndGetAlbanyApp (Teuchos::RCP< Application > &albanyApp, const Teuchos::RCP< const Epetra_Comm > &appComm, const Teuchos::RCP< const Epetra_Comm > &solverComm, const Teuchos::RCP< const Epetra_Vector > &initial_guess=Teuchos::null)
Teuchos::RCP
< EpetraExt::ModelEvaluator > 
createAlbanyAppAndModel (Teuchos::RCP< Application > &albanyApp, const Teuchos::RCP< const Epetra_Comm > &appComm, const Teuchos::RCP< const Epetra_Vector > &initial_guess=Teuchos::null)
Teuchos::ParameterList & getAnalysisParameters () const
Teuchos::ParameterList & getParameters () const
Teuchos::RCP< const
Teuchos::ParameterList > 
getValidAppParameters () const
Teuchos::RCP< const
Teuchos::ParameterList > 
getValidParameterParameters () const
Teuchos::RCP< const
Teuchos::ParameterList > 
getValidResponseParameters () const
int checkSolveTestResults (int response_index, int parameter_index, const Epetra_Vector *g, const Epetra_MultiVector *dgdp) const
 Function that does regression testing for problem solves.
int checkDakotaTestResults (int response_index, const Teuchos::SerialDenseVector< int, double > *drdv) const
 Function that does regression testing for Dakota runs.
int checkAnalysisTestResults (int response_index, const Teuchos::RCP< Thyra::VectorBase< double > > &tvec) const
 Function that does regression testing for Analysis runs.
int checkSGTestResults (int response_index, const Teuchos::RCP< Stokhos::EpetraVectorOrthogPoly > &g_sg, const Epetra_Vector *g_mean=NULL, const Epetra_Vector *g_std_dev=NULL) const
 Function that does regression testing for SG runs.

Protected Attributes

Teuchos::RCP
< Teuchos::ParameterList > 
appParams
 Parameter list specifying what solver to create.
Teuchos::RCP
< Teuchos::FancyOStream > 
out
Teuchos::RCP
< AAdapt::AdaptiveModelFactory
thyraModelFactory

Private Member Functions

void setSolverParamDefaults (Teuchos::ParameterList *appParams, int myRank)
Teuchos::RCP< const
Teuchos::ParameterList > 
getValidRegressionResultsParameters () const
 SolverFactory (const SolverFactory &)
 Private to prohibit copying.
SolverFactoryoperator= (const SolverFactory &)
 Private to prohibit copying.
int scaledCompare (double x1, double x2, double relTol, double absTol) const
 Testing utility that compares two numbers using two tolerances.
Teuchos::ParameterList * getTestParameters (int response_index) const
void storeTestResults (Teuchos::ParameterList *testParams, int failures, int comparisons) const

Detailed Description

A factory class to instantiate AbstractSolver objects.

Definition at line 34 of file Albany_SolverFactory.hpp.


Constructor & Destructor Documentation

Albany::SolverFactory::SolverFactory ( const std::string &  inputfile,
const int &  mcomm 
)

Default constructor.

Definition at line 132 of file Albany_SolverFactory.cpp.

Albany::SolverFactory::SolverFactory ( const Teuchos::RCP< Teuchos::ParameterList > &  input_appParams,
const int &  mcomm 
)

Definition at line 155 of file Albany_SolverFactory.cpp.

Albany::SolverFactory::~SolverFactory (  )  [virtual]

Destructor.

Definition at line 172 of file Albany_SolverFactory.cpp.

Albany::SolverFactory::SolverFactory ( const SolverFactory  )  [private]

Private to prohibit copying.


Member Function Documentation

Teuchos::RCP< EpetraExt::ModelEvaluator > Albany::SolverFactory::create ( const Teuchos::RCP< const Epetra_Comm > &  appComm,
const Teuchos::RCP< const Epetra_Comm > &  solverComm,
const Teuchos::RCP< const Epetra_Vector > &  initial_guess = Teuchos::null 
) [virtual]

Create solver as response-only model evaluator.

Definition at line 185 of file Albany_SolverFactory.cpp.

Teuchos::RCP<EpetraExt::ModelEvaluator> Albany::SolverFactory::createAndGetAlbanyApp ( Teuchos::RCP< Application > &  albanyApp,
const Teuchos::RCP< const Epetra_Comm > &  appComm,
const Teuchos::RCP< const Epetra_Comm > &  solverComm,
const Teuchos::RCP< const Epetra_Vector > &  initial_guess = Teuchos::null 
)
Teuchos::RCP< Thyra::ModelEvaluator< double > > Albany::SolverFactory::createThyraSolverAndGetAlbanyApp ( Teuchos::RCP< Application > &  albanyApp,
const Teuchos::RCP< const Epetra_Comm > &  appComm,
const Teuchos::RCP< const Epetra_Comm > &  solverComm,
const Teuchos::RCP< const Epetra_Vector > &  initial_guess = Teuchos::null 
)

Definition at line 302 of file Albany_SolverFactory.cpp.

Teuchos::RCP<EpetraExt::ModelEvaluator> Albany::SolverFactory::createAlbanyAppAndModel ( Teuchos::RCP< Application > &  albanyApp,
const Teuchos::RCP< const Epetra_Comm > &  appComm,
const Teuchos::RCP< const Epetra_Vector > &  initial_guess = Teuchos::null 
)
Teuchos::ParameterList& Albany::SolverFactory::getAnalysisParameters (  )  const [inline]

Definition at line 71 of file Albany_SolverFactory.hpp.

Teuchos::ParameterList& Albany::SolverFactory::getParameters (  )  const [inline]

Definition at line 74 of file Albany_SolverFactory.hpp.

RCP< const ParameterList > Albany::SolverFactory::getValidAppParameters (  )  const

Definition at line 678 of file Albany_SolverFactory.cpp.

RCP< const ParameterList > Albany::SolverFactory::getValidParameterParameters (  )  const

Definition at line 764 of file Albany_SolverFactory.cpp.

RCP< const ParameterList > Albany::SolverFactory::getValidResponseParameters (  )  const

Definition at line 777 of file Albany_SolverFactory.cpp.

void Albany::SolverFactory::setSolverParamDefaults ( Teuchos::ParameterList *  appParams,
int  myRank 
) [private]
RCP< const ParameterList > Albany::SolverFactory::getValidRegressionResultsParameters (  )  const [private]

Definition at line 697 of file Albany_SolverFactory.cpp.

SolverFactory& Albany::SolverFactory::operator= ( const SolverFactory  )  [private]

Private to prohibit copying.

int Albany::SolverFactory::checkSolveTestResults ( int  response_index,
int  parameter_index,
const Epetra_Vector *  g,
const Epetra_MultiVector *  dgdp 
) const

Function that does regression testing for problem solves.

Definition at line 383 of file Albany_SolverFactory.cpp.

int Albany::SolverFactory::checkDakotaTestResults ( int  response_index,
const Teuchos::SerialDenseVector< int, double > *  drdv 
) const

Function that does regression testing for Dakota runs.

Definition at line 442 of file Albany_SolverFactory.cpp.

int Albany::SolverFactory::checkAnalysisTestResults ( int  response_index,
const Teuchos::RCP< Thyra::VectorBase< double > > &  tvec 
) const

Function that does regression testing for Analysis runs.

Definition at line 476 of file Albany_SolverFactory.cpp.

int Albany::SolverFactory::checkSGTestResults ( int  response_index,
const Teuchos::RCP< Stokhos::EpetraVectorOrthogPoly > &  g_sg,
const Epetra_Vector *  g_mean = NULL,
const Epetra_Vector *  g_std_dev = NULL 
) const

Function that does regression testing for SG runs.

Definition at line 512 of file Albany_SolverFactory.cpp.

int Albany::SolverFactory::scaledCompare ( double  x1,
double  x2,
double  relTol,
double  absTol 
) const [private]

Testing utility that compares two numbers using two tolerances.

Definition at line 611 of file Albany_SolverFactory.cpp.

ParameterList * Albany::SolverFactory::getTestParameters ( int  response_index  )  const [private]

Definition at line 582 of file Albany_SolverFactory.cpp.

void Albany::SolverFactory::storeTestResults ( Teuchos::ParameterList *  testParams,
int  failures,
int  comparisons 
) const [private]

Member Data Documentation

Teuchos::RCP<Teuchos::ParameterList> Albany::SolverFactory::appParams [protected]

Parameter list specifying what solver to create.

Definition at line 145 of file Albany_SolverFactory.hpp.

Teuchos::RCP<Teuchos::FancyOStream> Albany::SolverFactory::out [protected]

Definition at line 147 of file Albany_SolverFactory.hpp.

Definition at line 149 of file Albany_SolverFactory.hpp.


The documentation for this class was generated from the following files: