42 #ifndef STRATIMIKOS_DEFAULT_LINEAR_SOLVER_BUILDING_BASE
43 #define STRATIMIKOS_DEFAULT_LINEAR_SOLVER_BUILDING_BASE
45 #include "Stratimikos_ConfigDefs.hpp"
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
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; }
69 namespace Stratimikos {
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"
178 &solveStrategyFactory,
179 const std::string &solveStrategyName,
180 const bool makeDefault =
false
185 const std::string &solveStrategyName);
190 &precStrategyFactory,
191 const std::string &precStrategyName,
192 const bool makeDefault =
false
197 const std::string &precStrategyName);
254 const std::string &outputXmlFileName =
""
291 const std::string &linearSolveStrategyName
296 const std::string &preconditioningStrategyName
317 std::string defaultLOWSF_;
320 std::string defaultPF_;
321 bool enableDelayedSolverConstruction_;
329 void initializeDefaults();
330 void justInTimeInitialize()
const;
338 #endif // STRATIMIKOS_DEFAULT_LINEAR_SOLVER_BUILDING_BASE
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 > getValidParameters() const
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 > getParameterList() const
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.
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< Thyra::LinearOpWithSolveFactoryBase< double > > createLinearSolveStrategy(const std::string &linearSolveStrategyName) const
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...
std::string getLinearSolveStrategyName() const
Get the name of the linear solver strategy that will be created on the next call to this->createLinea...
Concrete subclass of Thyra::LinearSolverBuilderBase for creating LinearOpWithSolveFactoryBase objects...
RCP< ParameterList > unsetParameterList()
~DefaultLinearSolverBuilder()
RCP< ParameterList > getNonconstParameterList()
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.
void setDefaultPreconditioningStrategyFactoryName(const std::string &precStrategyName)
Set the default linear solver factory name.
RCP< Thyra::PreconditionerFactoryBase< double > > createPreconditioningStrategy(const std::string &preconditioningStrategyName) const