42 #ifndef STRATIMIKOS_DEFAULT_LINEAR_SOLVER_BUILDING_BASE 43 #define STRATIMIKOS_DEFAULT_LINEAR_SOLVER_BUILDING_BASE 46 #include "Thyra_LinearSolverBuilderBase.hpp" 47 #include "Teuchos_AbstractFactory.hpp" 48 #include "Teuchos_StandardMemberCompositionMacros.hpp" 49 #include "Teuchos_StandardParameterEntryValidators.hpp" 52 #ifdef HAVE_STRATIMIKOS_THYRAEPETRAADAPTERS 53 #include "Thyra_EpetraThyraWrappers.hpp" 54 #include "Thyra_EpetraLinearOp.hpp" 56 #include "Thyra_LinearOpWithSolveFactoryHelpers.hpp" 57 #include "Thyra_LinearOpWithSolveBase.hpp" 58 #include "Thyra_PreconditionerFactoryHelpers.hpp" 59 #include "Thyra_DefaultScaledAdjointLinearOp.hpp" 60 #include "Thyra_DefaultPreconditioner.hpp" 61 #include "Thyra_MultiVectorStdOps.hpp" 62 #include "Thyra_VectorStdOps.hpp" 63 #include "Thyra_VectorBase.hpp" 66 namespace Teuchos {
class CommandLineProcessor; }
77 using Teuchos::AbstractFactory;
79 using Teuchos::ParameterList;
119 :
public Thyra::LinearSolverBuilderBase<double>
134 const std::string ¶msXmlFileName =
"" 135 ,
const std::string &extraParamsXmlString =
"" 136 ,
const std::string ¶msUsedXmlOutFileName =
"" 137 ,
const std::string ¶msXmlFileNameOption =
"linear-solver-params-file" 138 ,
const std::string &extraParamsXmlStringOption =
"extra-linear-solver-params" 139 ,
const std::string ¶msUsedXmlOutFileNameOption =
"linear-solver-params-used-file" 177 const RCP<
const AbstractFactory<Thyra::LinearOpWithSolveFactoryBase<double> > >
178 &solveStrategyFactory,
179 const std::string &solveStrategyName,
180 const bool makeDefault =
false 185 const std::string &solveStrategyName);
189 const RCP<
const AbstractFactory<Thyra::PreconditionerFactoryBase<double> > >
190 &precStrategyFactory,
191 const std::string &precStrategyName,
192 const bool makeDefault =
false 197 const std::string &precStrategyName);
215 void setupCLP( Teuchos::CommandLineProcessor *clp );
253 const Thyra::LinearOpWithSolveFactoryBase<double> &lowsFactory,
254 const std::string &outputXmlFileName =
"" 289 RCP<Thyra::LinearOpWithSolveFactoryBase<double> >
291 const std::string &linearSolveStrategyName
294 RCP<Thyra::PreconditionerFactoryBase<double> >
296 const std::string &preconditioningStrategyName
306 typedef RCP<const AbstractFactory<Thyra::LinearOpWithSolveFactoryBase<double> > >
308 typedef RCP<const AbstractFactory<Thyra::PreconditionerFactoryBase<double> > >
323 mutable RCP<const Teuchos::StringToIntegralParameterEntryValidator<int> >
lowsfValidator_;
324 mutable RCP<const Teuchos::StringToIntegralParameterEntryValidator<int> >
pfValidator_;
338 #endif // STRATIMIKOS_DEFAULT_LINEAR_SOLVER_BUILDING_BASE RCP< Thyra::PreconditionerFactoryBase< double > > createPreconditioningStrategy(const std::string &preconditioningStrategyName) const
RCP< const AbstractFactory< Thyra::LinearOpWithSolveFactoryBase< double > > > lowsf_fcty_t
Array< pf_fcty_t > pfArray_
void setPreconditioningStrategyFactory(const RCP< const AbstractFactory< Thyra::PreconditionerFactoryBase< double > > > &precStrategyFactory, const std::string &precStrategyName, const bool makeDefault=false)
Set a new preconditioner strategy factory object.
RCP< const ParameterList > getValidParameters() const
Array< std::string > validLowsfNames_
STANDARD_MEMBER_COMPOSITION_MEMBERS(std::string, paramsXmlFileName)
The name an XML file that will be read to get XML parameters (if not "").
void setupCLP(Teuchos::CommandLineProcessor *clp)
Setup the command-line processor to read in the needed data to extra the parameters from...
void setDefaultLinearSolveStrategyFactoryName(const std::string &solveStrategyName)
Set the default linear solver factory name.
Array< std::string > validPfNames_
RCP< const AbstractFactory< Thyra::PreconditionerFactoryBase< double > > > pf_fcty_t
Array< lowsf_fcty_t > lowsfArray_
RCP< Thyra::LinearOpWithSolveFactoryBase< double > > createLinearSolveStrategy(const std::string &linearSolveStrategyName) const
std::string defaultLOWSF_
void setParameterList(RCP< ParameterList > const ¶mList)
void readParameters(std::ostream *out)
Force the parameters to be read from a file and/or an extra XML string.
RCP< ParameterList > paramList_
void initializeDefaults()
void justInTimeInitialize() const
std::string getPreconditionerStrategyName() const
Get the name of the preconditioner strategy that will be created on the next call to this->createPrec...
RCP< const ParameterList > getParameterList() const
bool enableDelayedSolverConstruction_
Concrete subclass of Thyra::LinearSolverBuilderBase for creating LinearOpWithSolveFactoryBase objects...
RCP< const Teuchos::StringToIntegralParameterEntryValidator< int > > lowsfValidator_
RCP< ParameterList > unsetParameterList()
~DefaultLinearSolverBuilder()
RCP< ParameterList > getNonconstParameterList()
RCP< const ParameterList > validParamList_
RCP< const Teuchos::StringToIntegralParameterEntryValidator< int > > pfValidator_
void writeParamsFile(const Thyra::LinearOpWithSolveFactoryBase< double > &lowsFactory, const std::string &outputXmlFileName="") const
Write the parameters list for a LinearOpWithSolveFactoryBase object to a file after the parameters ar...
DefaultLinearSolverBuilder(const std::string ¶msXmlFileName="", const std::string &extraParamsXmlString="", const std::string ¶msUsedXmlOutFileName="", const std::string ¶msXmlFileNameOption="linear-solver-params-file", const std::string &extraParamsXmlStringOption="extra-linear-solver-params", const std::string ¶msUsedXmlOutFileNameOption="linear-solver-params-used-file")
Construct with default parameters.
void setLinearSolveStrategyFactory(const RCP< const AbstractFactory< Thyra::LinearOpWithSolveFactoryBase< double > > > &solveStrategyFactory, const std::string &solveStrategyName, const bool makeDefault=false)
Set a new linear solver strategy factory object.
std::string getLinearSolveStrategyName() const
Get the name of the linear solver strategy that will be created on the next call to this->createLinea...
void setDefaultPreconditioningStrategyFactoryName(const std::string &precStrategyName)
Set the default linear solver factory name.