00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef DECOMPOSITION_SYSTEM_STATE_STEP_BUILDER_STD_H
00030 #define DECOMPOSITION_SYSTEM_STATE_STEP_BUILDER_STD_H
00031
00032 #include "MoochoPack_Types.hpp"
00033 #ifndef MOOCHO_NO_BASIS_PERM_DIRECT_SOLVERS
00034 #include "AbstractLinAlgPack_BasisSystemPerm.hpp"
00035 #endif
00036 #include "MoochoPack_NewDecompositionSelection_Strategy.hpp"
00037
00038 namespace OptionsFromStreamPack {
00039 class OptionsFromStream;
00040 }
00041
00042 namespace MoochoPack {
00043
00052 class DecompositionSystemStateStepBuilderStd
00053 {
00054 public:
00055
00058
00060 enum ENullSpaceMatrixType {
00061 NULL_SPACE_MATRIX_AUTO, NULL_SPACE_MATRIX_EXPLICIT
00062 , NULL_SPACE_MATRIX_IMPLICIT };
00064 enum ERangeSpaceMatrixType {
00065 RANGE_SPACE_MATRIX_AUTO, RANGE_SPACE_MATRIX_COORDINATE
00066 , RANGE_SPACE_MATRIX_ORTHOGONAL };
00067
00069
00072
00074 struct SOptionValues {
00075
00076 SOptionValues();
00077 ENullSpaceMatrixType null_space_matrix_type_;
00078 ERangeSpaceMatrixType range_space_matrix_type_;
00079 int max_dof_quasi_newton_dense_;
00080 };
00081
00083
00085 typedef Teuchos::RCP<
00086 const OptionsFromStreamPack::OptionsFromStream> options_ptr_t;
00087
00089 DecompositionSystemStateStepBuilderStd();
00090
00099 void set_options( const options_ptr_t& options );
00101 const options_ptr_t& get_options() const;
00110 void process_nlp_and_options(
00111 std::ostream *trase_out
00112 ,NLP &nlp
00113 ,NLPFirstOrder **nlp_foi
00114 ,NLPSecondOrder **nlp_soi
00115 ,NLPDirect **nlp_fod
00116 ,bool *tailored_approach
00117 );
00122 void create_decomp_sys(
00123 std::ostream *trase_out
00124 ,NLP &nlp
00125 ,NLPFirstOrder *nlp_foi
00126 ,NLPSecondOrder *nlp_soi
00127 ,NLPDirect *nlp_fod
00128 ,bool tailored_approach
00129 ,Teuchos::RCP<DecompositionSystem> *decomp_sys
00130 );
00135 void add_iter_quantities(
00136 std::ostream *trase_out
00137 ,NLP &nlp
00138 ,NLPFirstOrder *nlp_foi
00139 ,NLPSecondOrder *nlp_soi
00140 ,NLPDirect *nlp_fod
00141 ,bool tailored_approach
00142 ,const Teuchos::RCP<DecompositionSystem> &decomp_sys
00143 ,const Teuchos::RCP<NLPAlgoState> &state
00144 );
00145
00150 void create_eval_new_point(
00151 std::ostream *trase_out
00152 ,NLP &nlp
00153 ,NLPFirstOrder *nlp_foi
00154 ,NLPSecondOrder *nlp_soi
00155 ,NLPDirect *nlp_fod
00156 ,bool tailored_approach
00157 ,const Teuchos::RCP<DecompositionSystem> &decomp_sys
00158 ,Teuchos::RCP<IterationPack::AlgorithmStep> *eval_new_point_step
00159 ,Teuchos::RCP<CalcFiniteDiffProd> *calc_fd_prod
00160 ,Teuchos::RCP<VariableBoundsTester> *bounds_tester
00161 ,Teuchos::RCP<NewDecompositionSelection_Strategy> *new_decomp_selection_strategy
00162 );
00163
00166 SOptionValues& current_option_values();
00167
00168 private:
00169
00170
00171
00172
00174 options_ptr_t options_;
00175
00177 SOptionValues uov_;
00178 SOptionValues cov_;
00179
00180 #ifndef MOOCHO_NO_BASIS_PERM_DIRECT_SOLVERS
00181 Teuchos::RCP<BasisSystemPerm> basis_sys_perm_;
00182 #endif
00183
00184
00185
00186
00188 static void readin_options(
00189 const OptionsFromStreamPack::OptionsFromStream& options
00190 ,SOptionValues *option_values, std::ostream* trase_out
00191 );
00192
00194 static void set_default_options(
00195 const SOptionValues& user_option_values
00196 ,SOptionValues *current_option_values
00197 ,std::ostream* trase_out
00198 );
00199
00200 };
00201
00202
00203
00204
00205 inline
00206 DecompositionSystemStateStepBuilderStd::SOptionValues&
00207 DecompositionSystemStateStepBuilderStd::current_option_values()
00208 {
00209 return cov_;
00210 }
00211
00212 }
00213
00214 #endif // DECOMPOSITION_SYSTEM_STATE_STEP_BUILDER_STD_H