MOOCHO (Single Doxygen Collection) Version of the Day
RTOpPack_initRTOpStdOpsLibCpp.cpp
Go to the documentation of this file.
00001 #if 0
00002 
00003 // @HEADER
00004 // ***********************************************************************
00005 // 
00006 // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
00007 //                  Copyright (2003) Sandia Corporation
00008 // 
00009 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00010 // license for use of this work by or on behalf of the U.S. Government.
00011 // 
00012 // Redistribution and use in source and binary forms, with or without
00013 // modification, are permitted provided that the following conditions are
00014 // met:
00015 //
00016 // 1. Redistributions of source code must retain the above copyright
00017 // notice, this list of conditions and the following disclaimer.
00018 //
00019 // 2. Redistributions in binary form must reproduce the above copyright
00020 // notice, this list of conditions and the following disclaimer in the
00021 // documentation and/or other materials provided with the distribution.
00022 //
00023 // 3. Neither the name of the Corporation nor the names of the
00024 // contributors may be used to endorse or promote products derived from
00025 // this software without specific prior written permission.
00026 //
00027 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
00028 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00030 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
00031 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00032 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00033 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00034 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00035 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00036 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00037 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00038 //
00039 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov) 
00040 // 
00041 // ***********************************************************************
00042 // @HEADER
00043 
00044 // ////////////////////////////////////////////////
00045 // initRTOpStdOpsLibCpp.cpp
00046 
00047 #include "RTOpPack_initRTOpStdOpsLibCpp.hpp"
00048 #include "RTOpPack_RTOpCPostMod.hpp"
00049 #include "Teuchos_AbstractFactoryStd.hpp"
00050 #include "RTOp_ROp_combined_nu_comp_err.h"
00051 #include "RTOp_ROp_max_rel_step.h"
00052 #include "RTOp_TOp_ele_wise_sqrt.h"
00053 #include "RTOp_ROp_comp_err_with_mu.h"
00054 #include "RTOp_ROp_max_step.h"
00055 #include "RTOp_TOp_force_in_bounds.h"
00056 #include "RTOp_ROp_dot_prod.h"
00057 #include "RTOp_ROp_norms.h"
00058 #include "RTOp_TOp_inv_of_difference.h"
00059 #include "RTOp_ROp_find_nan_inf.h"
00060 #include "RTOp_ROp_num_bounded.h"
00061 #include "RTOp_TOp_max_abs_vec_scalar.h"
00062 #include "RTOp_ROp_fraction_to_boundary.h"
00063 #include "RTOp_ROp_num_nonzeros.h"
00064 #include "RTOp_TOp_max_vec_scalar.h"
00065 #include "RTOp_ROp_fraction_to_zero_boundary.h"
00066 #include "RTOp_ROp_sum.h"
00067 #include "RTOp_ROp_sum_abs.h"
00068 #include "RTOp_TOp_multiplier_step.h"
00069 #include "RTOp_ROp_get_ele.h"
00070 #include "RTOp_TOp_add_scalar.h"
00071 #include "RTOp_TOp_random_vector.h"
00072 #include "RTOp_ROp_get_sub_vector.h"
00073 #include "RTOp_TOp_assign_scalar.h"
00074 #include "RTOp_TOp_scale_vector.h"
00075 #include "RTOp_ROp_log_bound_barrier.h"
00076 #include "RTOp_TOp_assign_vectors.h"
00077 #include "RTOp_TOp_set_ele.h"
00078 #include "RTOp_ROp_max_abs_ele.h"
00079 #include "RTOp_TOp_axpy.h"
00080 #include "RTOp_TOp_set_sub_vector.h"
00081 #include "RTOp_ROp_max.h"
00082 #include "RTOp_TOp_correct_multipliers.h"
00083 #include "RTOp_TOp_sign.h"
00084 #include "RTOp_ROp_max_inequ_viol.h"
00085 #include "RTOp_TOp_ele_wise_divide.h"
00086 #include "RTOp_ROp_max_near_feas_step.h"
00087 #include "RTOp_TOp_ele_wise_prod.h"
00088 
00089 namespace {
00090 
00091 void add_op_factory(RTOpPack::RTOpServer<RTOp_value_type> *op_server, const RTOp_RTOp_vtbl_t &op_vtbl )
00092 {
00093   namespace mmp = MemMngPack;
00094   namespace rtop = RTOpPack;
00095   typedef Teuchos::AbstractFactoryStd<rtop::RTOp,rtop::RTOpC,rtop::RTOpCPostMod>  OpFactory_t;
00096   op_server->add_op_factory(
00097     Teuchos::rcp(
00098       new OpFactory_t(
00099         rtop::RTOpCPostMod(&op_vtbl)
00100         ,Teuchos::AllocatorNew<rtop::RTOpC>() // RAB: 2003/10/03: MipsPro needs this *$&%^#&!!!
00101         )
00102       )
00103     );
00104 }
00105 
00106 } // namespace
00107 
00108 void RTOpPack::initRTOpStdOpsLibCpp( RTOpPack::RTOpServer<RTOp_value_type> *op_server )
00109 {
00110   namespace mmp = MemMngPack;
00111   typedef Teuchos::AbstractFactoryStd<RTOp,RTOpC,RTOpCPostMod>  OpFactory_t;
00112   
00113   add_op_factory(op_server,RTOp_ROp_combined_nu_comp_err_vtbl);
00114   add_op_factory(op_server,RTOp_ROp_combined_nu_comp_err_one_only_vtbl);
00115   add_op_factory(op_server,RTOp_ROp_comp_err_with_mu_vtbl);
00116   add_op_factory(op_server,RTOp_ROp_dot_prod_vtbl);
00117   add_op_factory(op_server,RTOp_ROp_find_nan_inf_vtbl);
00118   add_op_factory(op_server,RTOp_ROp_fraction_to_boundary_vtbl);
00119   add_op_factory(op_server,RTOp_ROp_fraction_to_zero_boundary_vtbl);
00120   add_op_factory(op_server,RTOp_ROp_get_ele_vtbl);
00121   add_op_factory(op_server,RTOp_ROp_get_sub_vector_vtbl);
00122   add_op_factory(op_server,RTOp_ROp_log_bound_barrier_vtbl);
00123   add_op_factory(op_server,RTOp_ROp_max_abs_ele_vtbl);
00124   add_op_factory(op_server,RTOp_ROp_max_vtbl);
00125   add_op_factory(op_server,RTOp_ROp_max_inequ_viol_vtbl);
00126   add_op_factory(op_server,RTOp_ROp_max_near_feas_step_vtbl);
00127   add_op_factory(op_server,RTOp_ROp_max_rel_step_vtbl);
00128   add_op_factory(op_server,RTOp_ROp_max_step_vtbl);
00129   add_op_factory(op_server,RTOp_ROp_norm_1_vtbl);
00130   add_op_factory(op_server,RTOp_ROp_norm_2_vtbl);
00131   add_op_factory(op_server,RTOp_ROp_norm_inf_vtbl);
00132   add_op_factory(op_server,RTOp_ROp_num_bounded_vtbl);
00133   add_op_factory(op_server,RTOp_ROp_num_nonzeros_vtbl);
00134   add_op_factory(op_server,RTOp_ROp_sum_vtbl);
00135   add_op_factory(op_server,RTOp_ROp_sum_abs_vtbl);
00136   add_op_factory(op_server,RTOp_TOp_add_scalar_vtbl);
00137   add_op_factory(op_server,RTOp_TOp_assign_scalar_vtbl);
00138   add_op_factory(op_server,RTOp_TOp_assign_vectors_vtbl);
00139   add_op_factory(op_server,RTOp_TOp_axpy_vtbl);
00140   add_op_factory(op_server,RTOp_TOp_Correct_Multipliers_vtbl);
00141   add_op_factory(op_server,RTOp_TOp_ele_wise_divide_vtbl);
00142   add_op_factory(op_server,RTOp_TOp_ele_wise_prod_vtbl);
00143   add_op_factory(op_server,RTOp_TOp_ele_wise_sqrt_vtbl);
00144   add_op_factory(op_server,RTOp_TOp_force_in_bounds_vtbl);
00145   add_op_factory(op_server,RTOp_TOp_force_in_bounds_buffer_vtbl);
00146   add_op_factory(op_server,RTOp_TOp_inv_of_difference_vtbl);
00147   add_op_factory(op_server,RTOp_TOp_max_abs_vec_scalar_vtbl);
00148   add_op_factory(op_server,RTOp_TOp_max_vec_scalar_vtbl);
00149   add_op_factory(op_server,RTOp_TOp_multiplier_step_vtbl);
00150   add_op_factory(op_server,RTOp_TOp_random_vector_vtbl);
00151   add_op_factory(op_server,RTOp_TOp_scale_vector_vtbl);
00152   add_op_factory(op_server,RTOp_TOp_set_ele_vtbl);
00153   add_op_factory(op_server,RTOp_TOp_set_sub_vector_vtbl);
00154   add_op_factory(op_server,RTOp_TOp_sign_vtbl);
00155 }
00156 
00157 #endif // 0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines