42 #ifndef MOOCHOPACK_MOOCHO_THYRA_SOLVER_HPP
43 #define MOOCHOPACK_MOOCHO_THYRA_SOLVER_HPP
46 #include "Thyra_ModelEvaluator.hpp"
47 #include "Thyra_DirectionalFiniteDiffCalculator.hpp"
48 #include "Thyra_DefaultNominalBoundsOverrideModelEvaluator.hpp"
49 #include "Thyra_DefaultFinalPointCaptureModelEvaluator.hpp"
50 #include "Thyra_MultiVectorFileIOBase.hpp"
51 #include "Thyra_ParameterDrivenMultiVectorInput.hpp"
54 namespace MoochoPack {
110 const std::string ¶msXmlFileName =
""
111 ,
const std::string &extraParamsXmlString =
""
112 ,
const std::string ¶msUsedXmlOutFileName =
""
113 ,
const std::string ¶msXmlFileNameOption =
"moocho-thyra-params-file"
114 ,
const std::string &extraParamsXmlStringOption =
"extra-moocho-thyra-params"
115 ,
const std::string ¶msUsedXmlOutFileNameOption =
"moocho-thyra-params-used-file"
248 const RCP<Thyra::ModelEvaluator<value_type> > &origModel,
263 std::ostream *
out = NULL
268 const RCP<
const Thyra::ModelEvaluatorBase::InArgs<value_type> > &initialGuess
273 const Thyra::ModelEvaluatorBase::InArgs<value_type> &initialGuess
280 const Thyra::ModelEvaluatorBase::InArgs<value_type>&
getFinalPoint()
const;
286 std::ostream *
out = NULL
304 const std::string &outputXmlFileName =
""
325 mutable Thyra::ParameterDrivenMultiVectorInput<value_type>
x_reader_;
326 mutable Thyra::ParameterDrivenMultiVectorInput<value_type>
p_reader_;
327 mutable Thyra::ParameterDrivenMultiVectorInput<value_type>
p_l_reader_;
328 mutable Thyra::ParameterDrivenMultiVectorInput<value_type>
p_u_reader_;
360 #endif // MOOCHOPACK_MOOCHO_THYRA_SOLVER_HPP
void setParameterList(RCP< Teuchos::ParameterList > const ¶mList)
bool useParameterLumping_
ESolveMode getSolveMode() const
RCP< Teuchos::ParameterList > unsetParameterList()
const RCP< Thyra::ModelEvaluator< value_type > > getOrigModel() const
void readParameters(std::ostream *out)
Force the parameters to be read from a file or from the commandline arguments.
std::string paramSoluFileBase_
Thyra::ParameterDrivenMultiVectorInput< value_type > x_reader_
int fwd_newton_max_ls_iters_
RCP< Thyra::ModelEvaluator< value_type > > outerModel_
void setupCLP(Teuchos::CommandLineProcessor *clp)
Sets up the commandline for reading in the parameter list for this object (minus the options for Mooc...
RCP< Teuchos::ParameterList > paramList_
bool use_finite_diff_for_con_
MoochoSolver & getSolver()
RCP< const Teuchos::ParameterList > getValidParameters() const
MoochoThyraSolver(const std::string ¶msXmlFileName="", const std::string &extraParamsXmlString="", const std::string ¶msUsedXmlOutFileName="", const std::string ¶msXmlFileNameOption="moocho-thyra-params-file", const std::string &extraParamsXmlStringOption="extra-moocho-thyra-params", const std::string ¶msUsedXmlOutFileNameOption="moocho-thyra-params-used-file")
Construct with default settings.
MOOCHO NLP Solver class for models represented through Thyra::ModelEvaluator.
MoochoSolver::ESolutionStatus solve()
bool use_finite_diff_for_obj_
RCP< Thyra::DefaultFinalPointCaptureModelEvaluator< value_type > > finalPointModel_
const RCP< Thyra::ModelEvaluator< value_type > > getOuterModel() const
Thyra::ParameterDrivenMultiVectorInput< value_type > p_reader_
void writeFinalSolution(std::ostream *out=NULL) const
Write the final solution to a file specified by the parameter list option ???.
RCP< Teuchos::ParameterList > getNonconstParameterList()
int fwd_newton_max_iters_
STANDARD_NONCONST_COMPOSITION_MEMBERS(Thyra::MultiVectorFileIOBase< value_type >, stateVectorIO)
MultiVectorFileIOBase object used to read and write state vectors to and from files.
std::string outputFileTag_
RCP< Thyra::ModelEvaluator< value_type > > origModel_
void setSolveMode(const ESolveMode solveMode)
Universal interface to a MOOCHO solver.
std::string stateSoluFileBase_
void writeParamsFile(const std::string &outputXmlFileName="") const
Write the parameters list for a this object to a file after the parameters are read in order to show ...
Solve an optimization problem for states and parameters.
void setModel(const RCP< Thyra::ModelEvaluator< value_type > > &origModel, const int p_idx=0, const int g_idx=0)
RCP< Thyra::DefaultNominalBoundsOverrideModelEvaluator< value_type > > nominalModel_
const Thyra::ModelEvaluatorBase::InArgs< value_type > & getFinalPoint() const
Return the final point.
void readInitialGuess(std::ostream *out=NULL)
AbstractLinAlgPack::value_type value_type
RCP< const Teuchos::ParameterList > getParameterList() const
Thyra::ParameterDrivenMultiVectorInput< value_type > p_u_reader_
STANDARD_MEMBER_COMPOSITION_MEMBERS(std::string, paramsXmlFileName)
The name an XML file that will be read to get XML parameters (if not "").
void setInitialGuess(const RCP< const Thyra::ModelEvaluatorBase::InArgs< value_type > > &initialGuess)
Do a forward solve for the states only.
bool showModelEvaluatorTrace_
bool nonlinearlyElimiateStates_
Thyra::ParameterDrivenMultiVectorInput< value_type > p_l_reader_
bool fwd_newton_dampening_