MOOCHO/Thyra Adapter Software  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
List of all members
MoochoPack::MoochoThyraSolver Class Reference

MOOCHO NLP Solver class for models represented through Thyra::ModelEvaluator. More...

#include <MoochoPack_MoochoThyraSolver.hpp>

Inheritance diagram for MoochoPack::MoochoThyraSolver:
Inheritance graph
[legend]

Public types

enum  ESolveMode { SOLVE_MODE_FORWARD, SOLVE_MODE_OPTIMIZE }
 

Constructors/initialization.

 MoochoThyraSolver (const std::string &paramsXmlFileName="", const std::string &extraParamsXmlString="", const std::string &paramsUsedXmlOutFileName="", const std::string &paramsXmlFileNameOption="moocho-thyra-params-file", const std::string &extraParamsXmlStringOption="extra-moocho-thyra-params", const std::string &paramsUsedXmlOutFileNameOption="moocho-thyra-params-used-file")
 Construct with default settings. More...
 
 ~MoochoThyraSolver ()
 
 STANDARD_MEMBER_COMPOSITION_MEMBERS (std::string, paramsXmlFileName)
 The name an XML file that will be read to get XML parameters (if not ""). More...
 
 STANDARD_MEMBER_COMPOSITION_MEMBERS (std::string, extraParamsXmlString)
 An XML string that will be used to update the parameters (if not ""). More...
 
 STANDARD_MEMBER_COMPOSITION_MEMBERS (std::string, paramsUsedXmlOutFileName)
 The name of an XML file that will be written (if not "") for the parameters actually used. More...
 
 STANDARD_MEMBER_COMPOSITION_MEMBERS (std::string, paramsXmlFileNameOption)
 The name of the option that will be added the the commandline processor that will set paramsXmlFileName() . More...
 
 STANDARD_MEMBER_COMPOSITION_MEMBERS (std::string, extraParamsXmlStringOption)
 The name of the option that will be added the the commandline processor that will set extraParamsXmlString() . More...
 
 STANDARD_MEMBER_COMPOSITION_MEMBERS (std::string, paramsUsedXmlOutFileNameOption)
 The name of the option that will be added the the commandline processor that will set paramsUsedXmlOutFileName() . More...
 
 STANDARD_NONCONST_COMPOSITION_MEMBERS (Thyra::MultiVectorFileIOBase< value_type >, stateVectorIO)
 MultiVectorFileIOBase object used to read and write state vectors to and from files. More...
 
 STANDARD_NONCONST_COMPOSITION_MEMBERS (Thyra::MultiVectorFileIOBase< value_type >, parameterVectorIO)
 MultiVectorFileIOBase object used to read and write parameter vectors to and from files. More...
 
void setupCLP (Teuchos::CommandLineProcessor *clp)
 Sets up the commandline for reading in the parameter list for this object (minus the options for MoochoSolver). More...
 
void readParameters (std::ostream *out)
 Force the parameters to be read from a file or from the commandline arguments. More...
 

Overridden from ParameterListAcceptor

void setParameterList (RCP< Teuchos::ParameterList > const &paramList)
 
RCP< Teuchos::ParameterListgetNonconstParameterList ()
 
RCP< Teuchos::ParameterListunsetParameterList ()
 
RCP< const Teuchos::ParameterListgetParameterList () const
 
RCP< const Teuchos::ParameterListgetValidParameters () const
 

Misc Access/Setup

void setSolveMode (const ESolveMode solveMode)
 
ESolveMode getSolveMode () const
 
MoochoSolvergetSolver ()
 
const MoochoSolvergetSolver () const
 

Model specification, setup, solve, and solution extraction.

void setModel (const RCP< Thyra::ModelEvaluator< value_type > > &origModel, const int p_idx=0, const int g_idx=0)
 
const RCP
< Thyra::ModelEvaluator
< value_type > > 
getOrigModel () const
 
const RCP
< Thyra::ModelEvaluator
< value_type > > 
getOuterModel () const
 
void readInitialGuess (std::ostream *out=NULL)
 
void setInitialGuess (const RCP< const Thyra::ModelEvaluatorBase::InArgs< value_type > > &initialGuess)
 
void setInitialGuess (const Thyra::ModelEvaluatorBase::InArgs< value_type > &initialGuess)
 
MoochoSolver::ESolutionStatus solve ()
 
const
Thyra::ModelEvaluatorBase::InArgs
< value_type > & 
getFinalPoint () const
 Return the final point. More...
 
void writeFinalSolution (std::ostream *out=NULL) const
 Write the final solution to a file specified by the parameter list option ???. More...
 
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 defaults and create a new list for input the next time. More...
 

Detailed Description

MOOCHO NLP Solver class for models represented through Thyra::ModelEvaluator.

The parameters this class accepts are shown below in different format:

Human readable format (with documentation) for valid parameters accepted by this class

  Forward Newton Dampening : bool = 1
   # If true, then the state elimination nonlinear solver will
   # use a dampened line search.  Otherwise, it will just take fulls steps.
  Forward Newton Max Iters : int = 20
   # Maximum number of iterations allowed for the forward state
   # solver in eliminating the state equations/variables.
  Forward Newton Max Line Search Iters : int = 20
   # Maximum number of linea search iterations per newton iteration
   # allowed for the forward state solver in eliminating the state equations/variables.
  Forward Newton Tolerance : double = -1
   # Tolarance used for the forward state solver in eliminating
   # the state equations/variables.
  NLP Type : string = First Order
   # The type of MOOCHO NLP subclass to use.
   #   Valid std::string values:
   #     {
   #       "First Order"
   #          Support the NLPInterfacePack::NLPFirstOrder interface which assumes
   #          that full adjoints for the objective and constraint derivatives are
   #          available.
   #       "Direct"
   #          Support the NLPInterfacePack::NLPDirect interface which only assumes
   #          that forward or direct sensitivities and state solves are supported.
   #     }
  Nonlinearly Eliminate States : bool = 0
   # If true, then the model's state equations and state variables
   # are nonlinearlly eliminated using a forward solver.
  Output File Tag : string = 
   # A tag that is attached to every output file that is created by the
   # solver.  If empty "", then no tag is used.  This option simply is
   # passed into the set_output_context(...) function on the underlying
   # MoochoPack::MoochoSolver object.  Therefore, this same parameter
   # can be set in code as well without going through the parameter list.
  Parameters Solution File Base Name : string = 
   # If specified, a file with this basename will be written to with
   # the final value of the parameters.  A different file for each
   # process will be created.  Note that these files can be used for the
   # initial guess for the parameters.
  Show Model Evaluator Trace : bool = 1
   # Determine if a trace of the objective function will be shown or not
   # when the NLP is evaluated.
  Solve Mode : string = Optimize
   # The type of solve to perform.
   #   Valid std::string values:
   #     {
   #       "Forward Solve"
   #          Only solve state equaitons f(x,p)=0 for states x
   #          given fixed parameters values p.
   #       "Optimize"
   #          Solve the simulation constrained optimization problem
   #            min  g(x,p)
   #            s.t. f(x,p)=0
   #          for the state varaibles x and parameters p.
   #     }
  State Solution File Base Name : string = 
   # If specified, a file with this basename will be written to with
   # the final value of the state variables.  A different file for each
   # process will be created.  Note that these files can be used for the
   # initial guess for the state variables.
  Use Built-in Inverse Objective Function : bool = 0
   # Use a built-in form of a simple inverse objection function instead
   # of a a response function contained in the underlying model evaluator
   # object itself.  The settings are contained in the sublist
   # "Inverse Objective Function Settings".
   # Note that this feature allows the client to form a useful type
   # of optimization problem just with a model that supports only the
   # parameterized state function f(x,p)=0.
  Use Finite Differences For Constraints : bool = 0
   # Use  finite differences for missing constraint derivatives (Direct NLP only).
   # See the   options in the sublist "Constraints Finite Difference Settings".
  Use Finite Differences For Objective : bool = 0
   # Use finite differences for missing objective function derivatives (Direct NLP only).
   # See the options in the sublist "Objective Finite Difference Settings".
  Use Parameter Lumping : bool = 0
   # Use a reduced basis to lump optimization parameters as
   # p_orig = P_basis * p.  If set to true, then the settings
   # in "Lumped Parameters Settings" determine how the
   # parameter basis is set.  This feature can be used to safely
   # regularize a problem if there are linearly dependent parameters
   # and will generally speed up the optimiztation algorithms.
  Constraints Finite Difference Settings -> 
   FD Method : string = order-one
    # The method used to compute the finite differences.
    #   Valid std::string values:
    #     {
    #       "order-one"
    #          Use O(eps) one sided finite differences (cramped bounds)
    #       "order-two"
    #          Use O(eps^2) one sided finite differences (cramped bounds)
    #       "order-two-central"
    #          Use O(eps^2) two sided central finite differences
    #       "order-two-auto"
    #          Use "order-two-central" when not cramped by bounds, otherwise use "order-two"
    #       "order-four"
    #          Use O(eps^4) one sided finite differences (cramped bounds)
    #       "order-four-central"
    #          Use O(eps^4) two sided central finite differences
    #       "order-four-auto"
    #          Use "order-four-central" when not cramped by bounds, otherwise use "order-four"
    #     }
   FD Step Length : double = -1
    # The length of the finite difference step to take.
    # A value of < 0.0 means that the step length will be determined automatically.
   FD Step Select Type : string = Absolute
    # Method used to select the finite difference step length.
    #   Valid std::string values:
    #     {
    #       "Absolute"
    #          Use absolute step size "FD Step Length"
    #       "Relative"
    #          Use relative step size "FD Step Length"*||xo||inf
    #     }
   VerboseObject -> 
    Output File : string = none
     # The file to send output to.  If the value "none" is used, then
     # whatever is set in code will be used.  However, any other std::string value
     # will be used to create an std::ofstream object to a file with the given name.
     # Therefore, any valid file name is a valid std::string value for this parameter.
    Verbosity Level : string = default
     # The verbosity level to use to override whatever is set in code.
     # The value of "default" will allow the level set in code to be used.
     #   Valid std::string values:
     #     {
     #       "default"
     #          Use level set in code
     #       "none"
     #          Produce no output
     #       "low"
     #          Produce minimal output
     #       "medium"
     #          Produce a little more output
     #       "high"
     #          Produce a higher level of output
     #       "extreme"
     #          Produce the highest level of output
     #     }
  Inverse Objective Function Settings -> 
   # Settings for the built-in inverse objective function.
   # See the outer parameter "Use Built-in Inverse Objective Function".
   Local Verbosity Level : string = default
    # Overriding verbosity level for this model evaluator object.
    # This level will not propagate to nested model evaluator objects
    # The value of "default" result in the object verbosity level being
    # used instead.
    #   Valid std::string values:
    #     {
    #       "default"
    #          Use level set in code
    #       "none"
    #          Produce no output
    #       "low"
    #          Produce minimal output
    #       "medium"
    #          Produce a little more output
    #       "high"
    #          Produce a higher level of output
    #       "extreme"
    #          Produce the highest level of output
    #     }
   Observation Index : int = -1
    # The index of the observation function, obs_idx.
    # If obs_idx < 0, then the observation will be the state vector x.
    # If obs_idx >= 0, then the observation will be the response function g(obs_idx).
   Observation Multiplier : double = 1
    # observationMultiplier
   Observation Pass Through : bool = 0
    # If true, then the observation will just be used instead of the least-squares
    # function.  This allows you to add a parameter regularization term to any existing
    # response function!
   Observation Target as Parameter : bool = 0
    # If true, then a parameter will be accepted for the state observation vector
    # to allow it to be set by an external client through the InArgs object.
   Parameter Multiplier : double = 1e-06
    # parameterMultiplier
   Parameter Subvector Index : int = 0
    # The index of the parameter subvector that will be used in the
    # regularization term.
   Observation Target Vector -> 
    Add Scalar : double = 0
     # A scalar that will added to the read in vector after it
     # optionally scaled.
    Explicit Array : string = {}
     # The vector specified explicitly as a string interpreted as a Teuchos::Array
     # object.  If this array is set, it will override the vector specified
     # by the above "File Name Base" parameter.
     # Note that a VectorSpaceBase object
     # must be set internally for this to work.
    File Name Base : string = 
     # Base-name of file(s) that will be used to read in the vector.
     # If this parameter is empty "", no file(s) will be read.
     # Note that a MultiVectorFileIOBase object and a VectorSpaceBase object
     # must be set internally for this to work.
    Scale By : double = 1
     # A factor by which the read in vector will be scaled by.
   Parameter Base Vector -> 
    Add Scalar : double = 0
     # A scalar that will added to the read in vector after it
     # optionally scaled.
    Explicit Array : string = {}
     # The vector specified explicitly as a string interpreted as a Teuchos::Array
     # object.  If this array is set, it will override the vector specified
     # by the above "File Name Base" parameter.
     # Note that a VectorSpaceBase object
     # must be set internally for this to work.
    File Name Base : string = 
     # Base-name of file(s) that will be used to read in the vector.
     # If this parameter is empty "", no file(s) will be read.
     # Note that a MultiVectorFileIOBase object and a VectorSpaceBase object
     # must be set internally for this to work.
    Scale By : double = 1
     # A factor by which the read in vector will be scaled by.
   VerboseObject -> 
    Output File : string = none
     # The file to send output to.  If the value "none" is used, then
     # whatever is set in code will be used.  However, any other std::string value
     # will be used to create an std::ofstream object to a file with the given name.
     # Therefore, any valid file name is a valid std::string value for this parameter.
    Verbosity Level : string = default
     # The verbosity level to use to override whatever is set in code.
     # The value of "default" will allow the level set in code to be used.
     #   Valid std::string values:
     #     {
     #       "default"
     #          Use level set in code
     #       "none"
     #          Produce no output
     #       "low"
     #          Produce minimal output
     #       "medium"
     #          Produce a little more output
     #       "high"
     #          Produce a higher level of output
     #       "extreme"
     #          Produce the highest level of output
     #     }
  Lumped Parameters Settings -> 
   # Settings for parameter lumping.
   # See the outer parameter "Use Parameter Lumping".
   Auto-generate Basis Matrix : bool = 1
    # If true, then a basis matrix will be auto-generated for a given number
    #  of basis vectors.
   Dump Basis Matrix : bool = 0
    # If true, then the basis matrix will be printed the first time it is created
    # as part of the verbose output and as part of the Describable::describe(...)
    # output for any verbositiy level >= "low".
   Ignore Parameter Bounds : bool = 0
    # If true, then any bounds on the parameter subvector will be ignored.
   Local Verbosity Level : string = default
    # Overriding verbosity level for this model evaluator object.
    # This level will not propagate to nested model evaluator objects
    # The value of "default" result in the object verbosity level being
    # used instead.
    #   Valid std::string values:
    #     {
    #       "default"
    #          Use level set in code
    #       "none"
    #          Produce no output
    #       "low"
    #          Produce minimal output
    #       "medium"
    #          Produce a little more output
    #       "high"
    #          Produce a higher level of output
    #       "extreme"
    #          Produce the highest level of output
    #     }
   Nominal Value is Parameter Base : bool = 1
    # If true, then the nominal values for the full parameter subvector from the
    # underlying model will be used for p_orig_base.  This allows p==0 to give
    # the nominal values for the parameters.
   Number of Basis Columns : int = 1
    # If a basis is auto-generated, then this parameter gives the number
    # of columns in the basis matrix that will be created.  Warning!  This
    # number must be less than or equal to the number of original parameters
    # or an exception will be thrown!
   Parameter Subvector Index : int = 0
    # Determines the index of the parameter subvector in the underlying model
    # for which the reduced basis representation will be determined.
   VerboseObject -> 
    Output File : string = none
     # The file to send output to.  If the value "none" is used, then
     # whatever is set in code will be used.  However, any other std::string value
     # will be used to create an std::ofstream object to a file with the given name.
     # Therefore, any valid file name is a valid std::string value for this parameter.
    Verbosity Level : string = default
     # The verbosity level to use to override whatever is set in code.
     # The value of "default" will allow the level set in code to be used.
     #   Valid std::string values:
     #     {
     #       "default"
     #          Use level set in code
     #       "none"
     #          Produce no output
     #       "low"
     #          Produce minimal output
     #       "medium"
     #          Produce a little more output
     #       "high"
     #          Produce a higher level of output
     #       "extreme"
     #          Produce the highest level of output
     #     }
  Objective Finite Difference Settings -> 
   FD Method : string = order-one
    # The method used to compute the finite differences.
    #   Valid std::string values:
    #     {
    #       "order-one"
    #          Use O(eps) one sided finite differences (cramped bounds)
    #       "order-two"
    #          Use O(eps^2) one sided finite differences (cramped bounds)
    #       "order-two-central"
    #          Use O(eps^2) two sided central finite differences
    #       "order-two-auto"
    #          Use "order-two-central" when not cramped by bounds, otherwise use "order-two"
    #       "order-four"
    #          Use O(eps^4) one sided finite differences (cramped bounds)
    #       "order-four-central"
    #          Use O(eps^4) two sided central finite differences
    #       "order-four-auto"
    #          Use "order-four-central" when not cramped by bounds, otherwise use "order-four"
    #     }
   FD Step Length : double = -1
    # The length of the finite difference step to take.
    # A value of < 0.0 means that the step length will be determined automatically.
   FD Step Select Type : string = Absolute
    # Method used to select the finite difference step length.
    #   Valid std::string values:
    #     {
    #       "Absolute"
    #          Use absolute step size "FD Step Length"
    #       "Relative"
    #          Use relative step size "FD Step Length"*||xo||inf
    #     }
   VerboseObject -> 
    Output File : string = none
     # The file to send output to.  If the value "none" is used, then
     # whatever is set in code will be used.  However, any other std::string value
     # will be used to create an std::ofstream object to a file with the given name.
     # Therefore, any valid file name is a valid std::string value for this parameter.
    Verbosity Level : string = default
     # The verbosity level to use to override whatever is set in code.
     # The value of "default" will allow the level set in code to be used.
     #   Valid std::string values:
     #     {
     #       "default"
     #          Use level set in code
     #       "none"
     #          Produce no output
     #       "low"
     #          Produce minimal output
     #       "medium"
     #          Produce a little more output
     #       "high"
     #          Produce a higher level of output
     #       "extreme"
     #          Produce the highest level of output
     #     }
  Parameter Guess -> 
   Add Scalar : double = 0
    # A scalar that will added to the read in vector after it
    # optionally scaled.
   Explicit Array : string = {}
    # The vector specified explicitly as a string interpreted as a Teuchos::Array
    # object.  If this array is set, it will override the vector specified
    # by the above "File Name Base" parameter.
    # Note that a VectorSpaceBase object
    # must be set internally for this to work.
   File Name Base : string = 
    # Base-name of file(s) that will be used to read in the vector.
    # If this parameter is empty "", no file(s) will be read.
    # Note that a MultiVectorFileIOBase object and a VectorSpaceBase object
    # must be set internally for this to work.
   Scale By : double = 1
    # A factor by which the read in vector will be scaled by.
  Parameter Lower Bounds -> 
   Add Scalar : double = 0
    # A scalar that will added to the read in vector after it
    # optionally scaled.
   Explicit Array : string = {}
    # The vector specified explicitly as a string interpreted as a Teuchos::Array
    # object.  If this array is set, it will override the vector specified
    # by the above "File Name Base" parameter.
    # Note that a VectorSpaceBase object
    # must be set internally for this to work.
   File Name Base : string = 
    # Base-name of file(s) that will be used to read in the vector.
    # If this parameter is empty "", no file(s) will be read.
    # Note that a MultiVectorFileIOBase object and a VectorSpaceBase object
    # must be set internally for this to work.
   Scale By : double = 1
    # A factor by which the read in vector will be scaled by.
  Parameter Upper Bounds -> 
   Add Scalar : double = 0
    # A scalar that will added to the read in vector after it
    # optionally scaled.
   Explicit Array : string = {}
    # The vector specified explicitly as a string interpreted as a Teuchos::Array
    # object.  If this array is set, it will override the vector specified
    # by the above "File Name Base" parameter.
    # Note that a VectorSpaceBase object
    # must be set internally for this to work.
   File Name Base : string = 
    # Base-name of file(s) that will be used to read in the vector.
    # If this parameter is empty "", no file(s) will be read.
    # Note that a MultiVectorFileIOBase object and a VectorSpaceBase object
    # must be set internally for this to work.
   Scale By : double = 1
    # A factor by which the read in vector will be scaled by.
  State Guess -> 
   Add Scalar : double = 0
    # A scalar that will added to the read in vector after it
    # optionally scaled.
   Explicit Array : string = {}
    # The vector specified explicitly as a string interpreted as a Teuchos::Array
    # object.  If this array is set, it will override the vector specified
    # by the above "File Name Base" parameter.
    # Note that a VectorSpaceBase object
    # must be set internally for this to work.
   File Name Base : string = 
    # Base-name of file(s) that will be used to read in the vector.
    # If this parameter is empty "", no file(s) will be read.
    # Note that a MultiVectorFileIOBase object and a VectorSpaceBase object
    # must be set internally for this to work.
   Scale By : double = 1
    # A factor by which the read in vector will be scaled by.

Human readable format (without documentation) for valid parameters accepted by this class

  Forward Newton Dampening : bool = 1
  Forward Newton Max Iters : int = 20
  Forward Newton Max Line Search Iters : int = 20
  Forward Newton Tolerance : double = -1
  NLP Type : string = First Order
  Nonlinearly Eliminate States : bool = 0
  Output File Tag : string = 
  Parameters Solution File Base Name : string = 
  Show Model Evaluator Trace : bool = 1
  Solve Mode : string = Optimize
  State Solution File Base Name : string = 
  Use Built-in Inverse Objective Function : bool = 0
  Use Finite Differences For Constraints : bool = 0
  Use Finite Differences For Objective : bool = 0
  Use Parameter Lumping : bool = 0
  Constraints Finite Difference Settings -> 
   FD Method : string = order-one
   FD Step Length : double = -1
   FD Step Select Type : string = Absolute
   VerboseObject -> 
    Output File : string = none
    Verbosity Level : string = default
  Inverse Objective Function Settings -> 
   Local Verbosity Level : string = default
   Observation Index : int = -1
   Observation Multiplier : double = 1
   Observation Pass Through : bool = 0
   Observation Target as Parameter : bool = 0
   Parameter Multiplier : double = 1e-06
   Parameter Subvector Index : int = 0
   Observation Target Vector -> 
    Add Scalar : double = 0
    Explicit Array : string = {}
    File Name Base : string = 
    Scale By : double = 1
   Parameter Base Vector -> 
    Add Scalar : double = 0
    Explicit Array : string = {}
    File Name Base : string = 
    Scale By : double = 1
   VerboseObject -> 
    Output File : string = none
    Verbosity Level : string = default
  Lumped Parameters Settings -> 
   Auto-generate Basis Matrix : bool = 1
   Dump Basis Matrix : bool = 0
   Ignore Parameter Bounds : bool = 0
   Local Verbosity Level : string = default
   Nominal Value is Parameter Base : bool = 1
   Number of Basis Columns : int = 1
   Parameter Subvector Index : int = 0
   VerboseObject -> 
    Output File : string = none
    Verbosity Level : string = default
  Objective Finite Difference Settings -> 
   FD Method : string = order-one
   FD Step Length : double = -1
   FD Step Select Type : string = Absolute
   VerboseObject -> 
    Output File : string = none
    Verbosity Level : string = default
  Parameter Guess -> 
   Add Scalar : double = 0
   Explicit Array : string = {}
   File Name Base : string = 
   Scale By : double = 1
  Parameter Lower Bounds -> 
   Add Scalar : double = 0
   Explicit Array : string = {}
   File Name Base : string = 
   Scale By : double = 1
  Parameter Upper Bounds -> 
   Add Scalar : double = 0
   Explicit Array : string = {}
   File Name Base : string = 
   Scale By : double = 1
  State Guess -> 
   Add Scalar : double = 0
   Explicit Array : string = {}
   File Name Base : string = 
   Scale By : double = 1

XML format for valid parameters accepted by this class

Teuchos::GlobalMPISession::GlobalMPISession(): started serial run
<ParameterList>
  <ParameterList name="Constraints Finite Difference Settings">
    <Parameter name="FD Method" type="string" value="order-one"/>
    <Parameter name="FD Step Length" type="double" value="-1"/>
    <Parameter name="FD Step Select Type" type="string" value="Absolute"/>
    <ParameterList name="VerboseObject">
      <Parameter name="Output File" type="string" value="none"/>
      <Parameter name="Verbosity Level" type="string" value="default"/>
    </ParameterList>
  </ParameterList>
  <Parameter name="Forward Newton Dampening" type="bool" value="true"/>
  <Parameter name="Forward Newton Max Iters" type="int" value="20"/>
  <Parameter name="Forward Newton Max Line Search Iters" type="int" value="20"/>
  <Parameter name="Forward Newton Tolerance" type="double" value="-1"/>
  <ParameterList name="Inverse Objective Function Settings">
    <Parameter name="Local Verbosity Level" type="string" value="default"/>
    <Parameter name="Observation Index" type="int" value="-1"/>
    <Parameter name="Observation Multiplier" type="double" value="1"/>
    <Parameter name="Observation Pass Through" type="bool" value="false"/>
    <ParameterList name="Observation Target Vector">
      <Parameter name="Add Scalar" type="double" value="0"/>
      <Parameter name="Explicit Array" type="string" value="{}"/>
      <Parameter name="File Name Base" type="string" value=""/>
      <Parameter name="Scale By" type="double" value="1"/>
    </ParameterList>
    <Parameter name="Observation Target as Parameter" type="bool" value="false"/>
    <ParameterList name="Parameter Base Vector">
      <Parameter name="Add Scalar" type="double" value="0"/>
      <Parameter name="Explicit Array" type="string" value="{}"/>
      <Parameter name="File Name Base" type="string" value=""/>
      <Parameter name="Scale By" type="double" value="1"/>
    </ParameterList>
    <Parameter name="Parameter Multiplier" type="double" value="1e-06"/>
    <Parameter name="Parameter Subvector Index" type="int" value="0"/>
    <ParameterList name="VerboseObject">
      <Parameter name="Output File" type="string" value="none"/>
      <Parameter name="Verbosity Level" type="string" value="default"/>
    </ParameterList>
  </ParameterList>
  <ParameterList name="Lumped Parameters Settings">
    <Parameter name="Auto-generate Basis Matrix" type="bool" value="true"/>
    <Parameter name="Dump Basis Matrix" type="bool" value="false"/>
    <Parameter name="Ignore Parameter Bounds" type="bool" value="false"/>
    <Parameter name="Local Verbosity Level" type="string" value="default"/>
    <Parameter name="Nominal Value is Parameter Base" type="bool" value="true"/>
    <Parameter name="Number of Basis Columns" type="int" value="1"/>
    <Parameter name="Parameter Subvector Index" type="int" value="0"/>
    <ParameterList name="VerboseObject">
      <Parameter name="Output File" type="string" value="none"/>
      <Parameter name="Verbosity Level" type="string" value="default"/>
    </ParameterList>
  </ParameterList>
  <Parameter name="NLP Type" type="string" value="First Order"/>
  <Parameter name="Nonlinearly Eliminate States" type="bool" value="false"/>
  <ParameterList name="Objective Finite Difference Settings">
    <Parameter name="FD Method" type="string" value="order-one"/>
    <Parameter name="FD Step Length" type="double" value="-1"/>
    <Parameter name="FD Step Select Type" type="string" value="Absolute"/>
    <ParameterList name="VerboseObject">
      <Parameter name="Output File" type="string" value="none"/>
      <Parameter name="Verbosity Level" type="string" value="default"/>
    </ParameterList>
  </ParameterList>
  <Parameter name="Output File Tag" type="string" value=""/>
  <ParameterList name="Parameter Guess">
    <Parameter name="Add Scalar" type="double" value="0"/>
    <Parameter name="Explicit Array" type="string" value="{}"/>
    <Parameter name="File Name Base" type="string" value=""/>
    <Parameter name="Scale By" type="double" value="1"/>
  </ParameterList>
  <ParameterList name="Parameter Lower Bounds">
    <Parameter name="Add Scalar" type="double" value="0"/>
    <Parameter name="Explicit Array" type="string" value="{}"/>
    <Parameter name="File Name Base" type="string" value=""/>
    <Parameter name="Scale By" type="double" value="1"/>
  </ParameterList>
  <ParameterList name="Parameter Upper Bounds">
    <Parameter name="Add Scalar" type="double" value="0"/>
    <Parameter name="Explicit Array" type="string" value="{}"/>
    <Parameter name="File Name Base" type="string" value=""/>
    <Parameter name="Scale By" type="double" value="1"/>
  </ParameterList>
  <Parameter name="Parameters Solution File Base Name" type="string" value=""/>
  <Parameter name="Show Model Evaluator Trace" type="bool" value="true"/>
  <Parameter name="Solve Mode" type="string" value="Optimize"/>
  <ParameterList name="State Guess">
    <Parameter name="Add Scalar" type="double" value="0"/>
    <Parameter name="Explicit Array" type="string" value="{}"/>
    <Parameter name="File Name Base" type="string" value=""/>
    <Parameter name="Scale By" type="double" value="1"/>
  </ParameterList>
  <Parameter name="State Solution File Base Name" type="string" value=""/>
  <Parameter name="Use Built-in Inverse Objective Function" type="bool" value="false"/>
  <Parameter name="Use Finite Differences For Constraints" type="bool" value="false"/>
  <Parameter name="Use Finite Differences For Objective" type="bool" value="false"/>
  <Parameter name="Use Parameter Lumping" type="bool" value="false"/>
</ParameterList>

ToDo: Finish documetation!

Definition at line 83 of file MoochoPack_MoochoThyraSolver.hpp.

Member Enumeration Documentation

Enumerator
SOLVE_MODE_FORWARD 

Do a forward solve for the states only.

SOLVE_MODE_OPTIMIZE 

Solve an optimization problem for states and parameters.

Definition at line 92 of file MoochoPack_MoochoThyraSolver.hpp.

Constructor & Destructor Documentation

MoochoPack::MoochoThyraSolver::MoochoThyraSolver ( const std::string &  paramsXmlFileName = "",
const std::string &  extraParamsXmlString = "",
const std::string &  paramsUsedXmlOutFileName = "",
const std::string &  paramsXmlFileNameOption = "moocho-thyra-params-file",
const std::string &  extraParamsXmlStringOption = "extra-moocho-thyra-params",
const std::string &  paramsUsedXmlOutFileNameOption = "moocho-thyra-params-used-file" 
)

Construct with default settings.

Warning! Do not change the defaults by passing then into this constructor. Instead, use the member functions to set them after *this is constructed. This will help to avoid problems with updates to the ordering of the arguments.

Definition at line 184 of file MoochoPack_MoochoThyraSolver.cpp.

MoochoPack::MoochoThyraSolver::~MoochoThyraSolver ( )

Definition at line 217 of file MoochoPack_MoochoThyraSolver.cpp.

Member Function Documentation

MoochoPack::MoochoThyraSolver::STANDARD_MEMBER_COMPOSITION_MEMBERS ( std::string  ,
paramsXmlFileName   
)

The name an XML file that will be read to get XML parameters (if not "").

MoochoPack::MoochoThyraSolver::STANDARD_MEMBER_COMPOSITION_MEMBERS ( std::string  ,
extraParamsXmlString   
)

An XML string that will be used to update the parameters (if not "").

MoochoPack::MoochoThyraSolver::STANDARD_MEMBER_COMPOSITION_MEMBERS ( std::string  ,
paramsUsedXmlOutFileName   
)

The name of an XML file that will be written (if not "") for the parameters actually used.

MoochoPack::MoochoThyraSolver::STANDARD_MEMBER_COMPOSITION_MEMBERS ( std::string  ,
paramsXmlFileNameOption   
)

The name of the option that will be added the the commandline processor that will set paramsXmlFileName() .

MoochoPack::MoochoThyraSolver::STANDARD_MEMBER_COMPOSITION_MEMBERS ( std::string  ,
extraParamsXmlStringOption   
)

The name of the option that will be added the the commandline processor that will set extraParamsXmlString() .

MoochoPack::MoochoThyraSolver::STANDARD_MEMBER_COMPOSITION_MEMBERS ( std::string  ,
paramsUsedXmlOutFileNameOption   
)

The name of the option that will be added the the commandline processor that will set paramsUsedXmlOutFileName() .

MoochoPack::MoochoThyraSolver::STANDARD_NONCONST_COMPOSITION_MEMBERS ( Thyra::MultiVectorFileIOBase< value_type >  ,
stateVectorIO   
)

MultiVectorFileIOBase object used to read and write state vectors to and from files.

The default implementation used is Thyra::DefaultSpmdMultiVectorFileIO. See Thyra::DefaultSpmdMultiVectorFileIO::DefaultSpmdMultiVectorFileIO() for the default conditions of such an object.

MoochoPack::MoochoThyraSolver::STANDARD_NONCONST_COMPOSITION_MEMBERS ( Thyra::MultiVectorFileIOBase< value_type >  ,
parameterVectorIO   
)

MultiVectorFileIOBase object used to read and write parameter vectors to and from files.

The default implementation used is Thyra::DefaultSpmdMultiVectorFileIO. See Thyra::DefaultSpmdMultiVectorFileIO::DefaultSpmdMultiVectorFileIO() for the default conditions.

ToDo: You may need to change this to set different the MultiVectorFileIOBase objects for each parameter subvector for each index l=0...Np-1!

void MoochoPack::MoochoThyraSolver::setupCLP ( Teuchos::CommandLineProcessor clp)

Sets up the commandline for reading in the parameter list for this object (minus the options for MoochoSolver).

The commandline arguments –moocho-thyra-params-file and –moocho-thyra-extra-params will be added to *clp that will allow the parameters to be read from a file or from the commandline itself in XML format.

Definition at line 220 of file MoochoPack_MoochoThyraSolver.cpp.

void MoochoPack::MoochoThyraSolver::readParameters ( std::ostream *  out)

Force the parameters to be read from a file or from the commandline arguments.

If no parameter XML file name or parameters XML string was specified on the commandline, then this function will exist immediately and do nothing.

If an XML file name or XML parameter list string was specified on the commandline.

If this->getParameterList().get()==0 before this function is called then

Postconditions:

  • If the parameters were read from a file or a commandline argument string then this->getParameterList() will be non-NULL and will contain the updated parameters.

Definition at line 240 of file MoochoPack_MoochoThyraSolver.cpp.

void MoochoPack::MoochoThyraSolver::setParameterList ( RCP< Teuchos::ParameterList > const &  paramList)
virtual

Implements Teuchos::ParameterListAcceptor.

Definition at line 276 of file MoochoPack_MoochoThyraSolver.cpp.

Teuchos::RCP< Teuchos::ParameterList > MoochoPack::MoochoThyraSolver::getNonconstParameterList ( )
virtual

Implements Teuchos::ParameterListAcceptor.

Definition at line 338 of file MoochoPack_MoochoThyraSolver.cpp.

Teuchos::RCP< Teuchos::ParameterList > MoochoPack::MoochoThyraSolver::unsetParameterList ( )
virtual

Implements Teuchos::ParameterListAcceptor.

Definition at line 344 of file MoochoPack_MoochoThyraSolver.cpp.

Teuchos::RCP< const Teuchos::ParameterList > MoochoPack::MoochoThyraSolver::getParameterList ( ) const
virtual

Reimplemented from Teuchos::ParameterListAcceptor.

Definition at line 352 of file MoochoPack_MoochoThyraSolver.cpp.

Teuchos::RCP< const Teuchos::ParameterList > MoochoPack::MoochoThyraSolver::getValidParameters ( ) const
virtual

Reimplemented from Teuchos::ParameterListAcceptor.

Definition at line 358 of file MoochoPack_MoochoThyraSolver.cpp.

void MoochoPack::MoochoThyraSolver::setSolveMode ( const ESolveMode  solveMode)

Definition at line 503 of file MoochoPack_MoochoThyraSolver.cpp.

MoochoThyraSolver::ESolveMode MoochoPack::MoochoThyraSolver::getSolveMode ( ) const

Definition at line 509 of file MoochoPack_MoochoThyraSolver.cpp.

MoochoSolver & MoochoPack::MoochoThyraSolver::getSolver ( )

Definition at line 514 of file MoochoPack_MoochoThyraSolver.cpp.

const MoochoSolver & MoochoPack::MoochoThyraSolver::getSolver ( ) const

Definition at line 519 of file MoochoPack_MoochoThyraSolver.cpp.

void MoochoPack::MoochoThyraSolver::setModel ( const RCP< Thyra::ModelEvaluator< value_type > > &  origModel,
const int  p_idx = 0,
const int  g_idx = 0 
)

Definition at line 526 of file MoochoPack_MoochoThyraSolver.cpp.

const Teuchos::RCP< Thyra::ModelEvaluator< value_type > > MoochoPack::MoochoThyraSolver::getOrigModel ( ) const

Definition at line 713 of file MoochoPack_MoochoThyraSolver.cpp.

const Teuchos::RCP< Thyra::ModelEvaluator< value_type > > MoochoPack::MoochoThyraSolver::getOuterModel ( ) const

Definition at line 719 of file MoochoPack_MoochoThyraSolver.cpp.

void MoochoPack::MoochoThyraSolver::readInitialGuess ( std::ostream *  out = NULL)

Definition at line 724 of file MoochoPack_MoochoThyraSolver.cpp.

void MoochoPack::MoochoThyraSolver::setInitialGuess ( const RCP< const Thyra::ModelEvaluatorBase::InArgs< value_type > > &  initialGuess)

Definition at line 790 of file MoochoPack_MoochoThyraSolver.cpp.

void MoochoPack::MoochoThyraSolver::setInitialGuess ( const Thyra::ModelEvaluatorBase::InArgs< value_type > &  initialGuess)

Definition at line 797 of file MoochoPack_MoochoThyraSolver.cpp.

MoochoSolver::ESolutionStatus MoochoPack::MoochoThyraSolver::solve ( )

Definition at line 806 of file MoochoPack_MoochoThyraSolver.cpp.

const Thyra::ModelEvaluatorBase::InArgs< value_type > & MoochoPack::MoochoThyraSolver::getFinalPoint ( ) const

Return the final point.

Definition at line 834 of file MoochoPack_MoochoThyraSolver.cpp.

void MoochoPack::MoochoThyraSolver::writeFinalSolution ( std::ostream *  out = NULL) const

Write the final solution to a file specified by the parameter list option ???.

Definition at line 839 of file MoochoPack_MoochoThyraSolver.cpp.

void MoochoPack::MoochoThyraSolver::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 defaults and create a new list for input the next time.

If outputXmlFileName!="" then the parameter list with be written to the file outputXmlFileName in XML format. If outputXmlFileName=="", but this->paramsUsedXmlOutFileNameOption()!="" then the parameter list will be written to the file this->paramsUsedXmlOutFileNameOption(). If both outputXmlFileName=="" and this->paramsUsedXmlOutFileNameOption()=="" then no file is written.

Definition at line 867 of file MoochoPack_MoochoThyraSolver.cpp.


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