00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #include "Teuchos_ParameterList.hpp"
00043
00044 #include "LOCA_LAPACK_Factory.H"
00045 #include "LOCA_Parameter_SublistParser.H"
00046 #include "LOCA_BorderedSolver_LAPACKDirectSolve.H"
00047 #include "LOCA_Eigensolver_DGGEVStrategy.H"
00048
00049 LOCA::LAPACK::Factory::Factory() :
00050 globalData()
00051 {
00052 }
00053
00054 LOCA::LAPACK::Factory::~Factory()
00055 {
00056 }
00057
00058 void
00059 LOCA::LAPACK::Factory::init(
00060 const Teuchos::RCP<LOCA::GlobalData>& global_data)
00061 {
00062 globalData = global_data;
00063 }
00064
00065 bool
00066 LOCA::LAPACK::Factory::createBorderedSolverStrategy(
00067 const string& strategyName,
00068 const Teuchos::RCP<LOCA::Parameter::SublistParser>& topParams,
00069 const Teuchos::RCP<Teuchos::ParameterList>& solverParams,
00070 Teuchos::RCP<LOCA::BorderedSolver::AbstractStrategy>& strategy)
00071 {
00072
00073 if (strategyName == "LAPACK Direct Solve") {
00074 strategy =
00075 Teuchos::rcp(new LOCA::BorderedSolver::LAPACKDirectSolve(globalData,
00076 topParams,
00077 solverParams));
00078 return true;
00079 }
00080 else
00081 return false;
00082 }
00083
00084 bool
00085 LOCA::LAPACK::Factory::createEigensolverStrategy(
00086 const string& strategyName,
00087 const Teuchos::RCP<LOCA::Parameter::SublistParser>& topParams,
00088 const Teuchos::RCP<Teuchos::ParameterList>& eigenParams,
00089 Teuchos::RCP<LOCA::Eigensolver::AbstractStrategy>& strategy)
00090 {
00091
00092 if (strategyName == "DGGEV") {
00093 strategy =
00094 Teuchos::rcp(new LOCA::Eigensolver::DGGEVStrategy(globalData,
00095 topParams,
00096 eigenParams));
00097 return true;
00098 }
00099 else
00100 return false;
00101 }
00102