RTOpPack_initRTOpStdOpsLibCpp.cpp

00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
00005 //                  Copyright (2003) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //  
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov) 
00025 // 
00026 // ***********************************************************************
00027 // @HEADER
00028 
00029 // ////////////////////////////////////////////////
00030 // initRTOpStdOpsLibCpp.cpp
00031 
00032 #include "RTOpPack_initRTOpStdOpsLibCpp.hpp"
00033 #include "RTOpPack_RTOpCPostMod.hpp"
00034 #include "Teuchos_AbstractFactoryStd.hpp"
00035 #include "RTOp_ROp_combined_nu_comp_err.h"
00036 #include "RTOp_ROp_max_rel_step.h"
00037 #include "RTOp_TOp_ele_wise_sqrt.h"
00038 #include "RTOp_ROp_comp_err_with_mu.h"
00039 #include "RTOp_ROp_max_step.h"
00040 #include "RTOp_TOp_force_in_bounds.h"
00041 #include "RTOp_ROp_dot_prod.h"
00042 #include "RTOp_ROp_norms.h"
00043 #include "RTOp_TOp_inv_of_difference.h"
00044 #include "RTOp_ROp_find_nan_inf.h"
00045 #include "RTOp_ROp_num_bounded.h"
00046 #include "RTOp_TOp_max_abs_vec_scalar.h"
00047 #include "RTOp_ROp_fraction_to_boundary.h"
00048 #include "RTOp_ROp_num_nonzeros.h"
00049 #include "RTOp_TOp_max_vec_scalar.h"
00050 #include "RTOp_ROp_fraction_to_zero_boundary.h"
00051 #include "RTOp_ROp_sum.h"
00052 #include "RTOp_ROp_sum_abs.h"
00053 #include "RTOp_TOp_multiplier_step.h"
00054 #include "RTOp_ROp_get_ele.h"
00055 #include "RTOp_TOp_add_scalar.h"
00056 #include "RTOp_TOp_random_vector.h"
00057 #include "RTOp_ROp_get_sub_vector.h"
00058 #include "RTOp_TOp_assign_scalar.h"
00059 #include "RTOp_TOp_scale_vector.h"
00060 #include "RTOp_ROp_log_bound_barrier.h"
00061 #include "RTOp_TOp_assign_vectors.h"
00062 #include "RTOp_TOp_set_ele.h"
00063 #include "RTOp_ROp_max_abs_ele.h"
00064 #include "RTOp_TOp_axpy.h"
00065 #include "RTOp_TOp_set_sub_vector.h"
00066 #include "RTOp_ROp_max.h"
00067 #include "RTOp_TOp_correct_multipliers.h"
00068 #include "RTOp_TOp_sign.h"
00069 #include "RTOp_ROp_max_inequ_viol.h"
00070 #include "RTOp_TOp_ele_wise_divide.h"
00071 #include "RTOp_ROp_max_near_feas_step.h"
00072 #include "RTOp_TOp_ele_wise_prod.h"
00073 
00074 namespace {
00075 
00076 void add_op_factory(RTOpPack::RTOpServer<RTOp_value_type> *op_server, const RTOp_RTOp_vtbl_t &op_vtbl )
00077 {
00078   namespace mmp = MemMngPack;
00079   namespace rtop = RTOpPack;
00080   typedef Teuchos::AbstractFactoryStd<rtop::RTOp,rtop::RTOpC,rtop::RTOpCPostMod>  OpFactory_t;
00081   op_server->add_op_factory(
00082     Teuchos::rcp(
00083       new OpFactory_t(
00084         rtop::RTOpCPostMod(&op_vtbl)
00085         ,Teuchos::AllocatorNew<rtop::RTOpC>() // RAB: 2003/10/03: MipsPro needs this *$&%^#&!!!
00086         )
00087       )
00088     );
00089 }
00090 
00091 } // namespace
00092 
00093 void RTOpPack::initRTOpStdOpsLibCpp( RTOpPack::RTOpServer<RTOp_value_type> *op_server )
00094 {
00095   namespace mmp = MemMngPack;
00096   typedef Teuchos::AbstractFactoryStd<RTOp,RTOpC,RTOpCPostMod>  OpFactory_t;
00097   
00098   add_op_factory(op_server,RTOp_ROp_combined_nu_comp_err_vtbl);
00099   add_op_factory(op_server,RTOp_ROp_combined_nu_comp_err_one_only_vtbl);
00100   add_op_factory(op_server,RTOp_ROp_comp_err_with_mu_vtbl);
00101   add_op_factory(op_server,RTOp_ROp_dot_prod_vtbl);
00102   add_op_factory(op_server,RTOp_ROp_find_nan_inf_vtbl);
00103   add_op_factory(op_server,RTOp_ROp_fraction_to_boundary_vtbl);
00104   add_op_factory(op_server,RTOp_ROp_fraction_to_zero_boundary_vtbl);
00105   add_op_factory(op_server,RTOp_ROp_get_ele_vtbl);
00106   add_op_factory(op_server,RTOp_ROp_get_sub_vector_vtbl);
00107   add_op_factory(op_server,RTOp_ROp_log_bound_barrier_vtbl);
00108   add_op_factory(op_server,RTOp_ROp_max_abs_ele_vtbl);
00109   add_op_factory(op_server,RTOp_ROp_max_vtbl);
00110   add_op_factory(op_server,RTOp_ROp_max_inequ_viol_vtbl);
00111   add_op_factory(op_server,RTOp_ROp_max_near_feas_step_vtbl);
00112   add_op_factory(op_server,RTOp_ROp_max_rel_step_vtbl);
00113   add_op_factory(op_server,RTOp_ROp_max_step_vtbl);
00114   add_op_factory(op_server,RTOp_ROp_norm_1_vtbl);
00115   add_op_factory(op_server,RTOp_ROp_norm_2_vtbl);
00116   add_op_factory(op_server,RTOp_ROp_norm_inf_vtbl);
00117   add_op_factory(op_server,RTOp_ROp_num_bounded_vtbl);
00118   add_op_factory(op_server,RTOp_ROp_num_nonzeros_vtbl);
00119   add_op_factory(op_server,RTOp_ROp_sum_vtbl);
00120   add_op_factory(op_server,RTOp_ROp_sum_abs_vtbl);
00121   add_op_factory(op_server,RTOp_TOp_add_scalar_vtbl);
00122   add_op_factory(op_server,RTOp_TOp_assign_scalar_vtbl);
00123   add_op_factory(op_server,RTOp_TOp_assign_vectors_vtbl);
00124   add_op_factory(op_server,RTOp_TOp_axpy_vtbl);
00125   add_op_factory(op_server,RTOp_TOp_Correct_Multipliers_vtbl);
00126   add_op_factory(op_server,RTOp_TOp_ele_wise_divide_vtbl);
00127   add_op_factory(op_server,RTOp_TOp_ele_wise_prod_vtbl);
00128   add_op_factory(op_server,RTOp_TOp_ele_wise_sqrt_vtbl);
00129   add_op_factory(op_server,RTOp_TOp_force_in_bounds_vtbl);
00130   add_op_factory(op_server,RTOp_TOp_force_in_bounds_buffer_vtbl);
00131   add_op_factory(op_server,RTOp_TOp_inv_of_difference_vtbl);
00132   add_op_factory(op_server,RTOp_TOp_max_abs_vec_scalar_vtbl);
00133   add_op_factory(op_server,RTOp_TOp_max_vec_scalar_vtbl);
00134   add_op_factory(op_server,RTOp_TOp_multiplier_step_vtbl);
00135   add_op_factory(op_server,RTOp_TOp_random_vector_vtbl);
00136   add_op_factory(op_server,RTOp_TOp_scale_vector_vtbl);
00137   add_op_factory(op_server,RTOp_TOp_set_ele_vtbl);
00138   add_op_factory(op_server,RTOp_TOp_set_sub_vector_vtbl);
00139   add_op_factory(op_server,RTOp_TOp_sign_vtbl);
00140 }

Generated on Thu Sep 18 12:33:39 2008 for RTOpPack: Extra C/C++ Code for Vector Reduction/Transformation Operators by doxygen 1.3.9.1