MoochoPack_EvalNewPointTailoredApproachCoordinate_Step.cpp

Go to the documentation of this file.
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 #include "MoochoPack_EvalNewPointTailoredApproachCoordinate_Step.hpp"
00030 #include "ConstrainedOptPack_MatrixIdentConcatStd.hpp"
00031 #include "NLPInterfacePack_NLPDirect.hpp"
00032 #include "AbstractLinAlgPack_MatrixOp.hpp"
00033 #include "AbstractLinAlgPack_MatrixZero.hpp"
00034 #include "AbstractLinAlgPack_VectorMutable.hpp"
00035 #include "Teuchos_dyn_cast.hpp"
00036 
00037 namespace MoochoPack {
00038 
00039 EvalNewPointTailoredApproachCoordinate_Step::EvalNewPointTailoredApproachCoordinate_Step(
00040   const deriv_tester_ptr_t&     deriv_tester
00041   ,const bounds_tester_ptr_t&   bounds_tester
00042   ,EFDDerivTesting              fd_deriv_testing
00043   )
00044   :EvalNewPointTailoredApproach_Step(deriv_tester,bounds_tester,fd_deriv_testing)
00045 {}
00046 
00047 // protected
00048 
00049 void EvalNewPointTailoredApproachCoordinate_Step::uninitialize_Y_Uy(
00050   MatrixOp         *Y
00051   ,MatrixOp        *Uy
00052   )
00053 {
00054   // Nothing to free
00055 }
00056 
00057 void EvalNewPointTailoredApproachCoordinate_Step::calc_py_Y_Uy(
00058   const NLPDirect       &nlp
00059   ,const D_ptr_t        &D
00060   ,VectorMutable        *py
00061   ,MatrixOp             *Y
00062   ,MatrixOp             *Uy
00063   ,EJournalOutputLevel  olevel
00064   ,std::ostream         &out
00065   )
00066 {
00067   namespace rcp = MemMngPack;
00068   using Teuchos::dyn_cast;
00069 
00070   MatrixIdentConcatStd
00071     &cY = dyn_cast<MatrixIdentConcatStd>(*Y);
00072   //
00073   // Y = [      I     ] space_xD  
00074   //     [    Zero    ] space_xI
00075   //        space_xD
00076   //
00077   VectorSpace::space_ptr_t
00078     space_x  = nlp.space_x(),
00079     space_xD = space_x->sub_space(nlp.var_dep())->clone(),
00080     space_xI = space_x->sub_space(nlp.var_indep())->clone();
00081   cY.initialize(
00082     space_x                                                // space_cols
00083     ,space_xD                                              // space_rows
00084     ,MatrixIdentConcatStd::BOTTOM                          // top_or_bottom
00085     ,1.0                                                   // alpha
00086     ,Teuchos::rcp(
00087       new MatrixZero(
00088         space_xI    // space_cols
00089         ,space_xD   // space_rows
00090         ) )                                            // D_ptr
00091     ,BLAS_Cpp::no_trans                                    // D_trans
00092     );
00093   // py is not altered here!
00094 }
00095 
00096 void EvalNewPointTailoredApproachCoordinate_Step::recalc_py(
00097   const MatrixOp          &D
00098   ,VectorMutable          *py
00099   ,EJournalOutputLevel    olevel
00100   ,std::ostream           &out
00101   )
00102 {
00103   // py is not altered here!
00104 }
00105 
00106 void EvalNewPointTailoredApproachCoordinate_Step::print_calc_py_Y_Uy(
00107   std::ostream& out, const std::string& L
00108   ) const
00109 {
00110   out
00111     << L << "*** Coordinate decomposition\n"
00112     << L << "py_k = py_k\n"
00113     << L << "Y = [ I ; 0 ] <: R^(n x m) [0 represented using MatrixZero]\n"
00114     << L << "Uy = Gc(var_dep,con_undecomp)\'\n"
00115     ;
00116 }
00117 
00118 } // end namespace MoochoPack 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Apr 13 10:10:59 2011 for MOOCHO (Single Doxygen Collection) by  doxygen 1.6.3