ReFRACtor
|
This is an implementation of L2FpConfiguration that uses Lua. More...
#include <l2_fp_configuration_lua.h>
Public Member Functions | |
L2FpConfigurationLua (const std::string &Fname, const std::string &Out_file="out.h5") | |
Read the given Lua configuration file. More... | |
L2FpConfigurationLua (const boost::shared_ptr< LuaState > &Ls, const std::string &Out_file="out.h5") | |
Take a LuaState that we've already generated the configuration stuff (e.g., this was created in python script). More... | |
L2FpConfigurationLua (int Argc, char **Argv) | |
Parse the arguments passed to the executable to set up configuration. More... | |
virtual | ~L2FpConfigurationLua () |
virtual boost::shared_ptr< ForwardModel > | forward_model () const |
Forward model. Everything should be initialized to the initial guess. More... | |
virtual boost::shared_ptr< InitialGuess > | initial_guess () const |
Initial guess. More... | |
virtual boost::shared_ptr< IterativeSolver > | iterative_solver () const |
Iterative solver. More... | |
virtual boost::shared_ptr< LogImp > | logger () const |
Logger to use. More... | |
LuaState & | lua_state () |
virtual boost::shared_ptr< MaxAPosteriori > | max_a_posteriori () const |
Maximum a posteriori. More... | |
virtual void | output (boost::shared_ptr< Output > &Regular_output, boost::shared_ptr< Output > &Error_output) const |
Create output, for both a normal run and for an error run (either or both can be null if we don't want output). More... | |
const std::string & | output_name () const |
Output file name. More... | |
void | output_name (const std::string &F) |
virtual void | print (std::ostream &Os) const |
std::string | print_to_string () const |
Print to string. More... | |
virtual boost::shared_ptr< ConnorSolver > | solver () const |
Solver. More... | |
virtual boost::shared_ptr< StateVector > | state_vector () const |
This is an implementation of L2FpConfiguration that uses Lua.
Note that this class is very specific to the L2 Full Physics main, with a minimal interface. A more general class LuaFile may be of more interest to you unless you are specifically working with L2 main.
The interface is purposely minimal, there are a handleful of global variables that the Lua file need to define. It can do this in any way it wishes.
In practice, our runs tend to be similiar. There is a file config_common.lua and base_config.lua that sets up a "standard" run, you can then create a configuration file that uses these two other files and just specifies what is different from this. But this is merely meant for convience, there is no requirement at all that you use these files. You can do anything you like as long as in the end you produce the set of global variables.
The require variables are:
Definition at line 45 of file l2_fp_configuration_lua.h.
|
inline |
Read the given Lua configuration file.
See the class description for what this file needs to define.
Definition at line 52 of file l2_fp_configuration_lua.h.
|
inline |
Take a LuaState that we've already generated the configuration stuff (e.g., this was created in python script).
See the class description for what this state needs to define.
Definition at line 62 of file l2_fp_configuration_lua.h.
|
inline |
Parse the arguments passed to the executable to set up configuration.
Definition at line 71 of file l2_fp_configuration_lua.h.
|
inlinevirtual |
Definition at line 76 of file l2_fp_configuration_lua.h.
|
inlinevirtual |
Forward model. Everything should be initialized to the initial guess.
Implements FullPhysics::L2FpConfiguration.
Definition at line 81 of file l2_fp_configuration_lua.h.
|
inlinevirtual |
Initial guess.
Implements FullPhysics::L2FpConfiguration.
Definition at line 96 of file l2_fp_configuration_lua.h.
|
inlinevirtual |
Iterative solver.
Implements FullPhysics::L2FpConfiguration.
Definition at line 105 of file l2_fp_configuration_lua.h.
|
inlinevirtual |
Logger to use.
Implements FullPhysics::L2FpConfiguration.
Definition at line 77 of file l2_fp_configuration_lua.h.
|
inline |
Definition at line 103 of file l2_fp_configuration_lua.h.
|
inlinevirtual |
Maximum a posteriori.
Implements FullPhysics::L2FpConfiguration.
Definition at line 112 of file l2_fp_configuration_lua.h.
|
virtual |
Create output, for both a normal run and for an error run (either or both can be null if we don't want output).
This should have all the RegisterOutputBase applied to it that the configuration says should be.
Implements FullPhysics::L2FpConfiguration.
Definition at line 10 of file l2_fp_configuration_lua.cc.
|
inline |
Output file name.
Definition at line 123 of file l2_fp_configuration_lua.h.
|
inline |
Definition at line 124 of file l2_fp_configuration_lua.h.
|
inlinevirtual |
Reimplemented from FullPhysics::L2FpConfiguration.
Definition at line 102 of file l2_fp_configuration_lua.h.
|
inlineinherited |
Print to string.
This is primarily useful for SWIG wrappers to this class, e.g. a to_s method in ruby.
Definition at line 31 of file printable.h.
|
inlinevirtual |
Solver.
Implements FullPhysics::L2FpConfiguration.
Definition at line 89 of file l2_fp_configuration_lua.h.
|
inlinevirtual |
Definition at line 85 of file l2_fp_configuration_lua.h.