MOOCHO (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NLPInterfacePack_NLPDirect.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
5 // Copyright (2003) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov)
38 //
39 // ***********************************************************************
40 // @HEADER
41 
42 #ifndef NLP_FIRST_ORDER_DIRECT_H
43 #define NLP_FIRST_ORDER_DIRECT_H
44 
47 
48 namespace NLPInterfacePack {
49 
111 class NLPDirect : virtual public NLPObjGrad
112 {
113 public:
114 
116  typedef Teuchos::RCP<
119  typedef Teuchos::RCP<
122  typedef Teuchos::RCP<
124 
132  void set_factories(
135  );
136 
139 
149  virtual size_type r() const;
150 
152 
156 
165  virtual Range1D var_dep() const;
174  virtual Range1D var_indep() const;
183  virtual Range1D con_decomp() const;
192  virtual Range1D con_undecomp() const;
193 
195 
198 
213  virtual const mat_fcty_ptr_t factory_GcU() const;
220  virtual const mat_fcty_ptr_t factory_D() const = 0;
232  virtual const mat_fcty_ptr_t factory_Uz() const;
245  virtual const mat_fcty_ptr_t factory_GcUD() const;
246 
251  virtual const mat_sym_fcty_ptr_t factory_transDtD() const;
252 
257  virtual const mat_sym_nonsing_fcty_ptr_t factory_S() const;
258 
260 
263 
315  virtual void calc_point(
316  const Vector &x
317  ,value_type *f
318  ,VectorMutable *c
319  ,bool recalc_c
320  ,VectorMutable *Gf
321  ,VectorMutable *py
322  ,VectorMutable *rGf
323  ,MatrixOp *GcU
324  ,MatrixOp *D
325  ,MatrixOp *Uz
326  ) const = 0;
327 
355  virtual void calc_semi_newton_step(
356  const Vector &x
357  ,VectorMutable *c
358  ,bool recalc_c
359  ,VectorMutable *py
360  ) const = 0;
361 
363 
366 
377  void initialize(bool test_setup);
378 
380 
381 private:
384 
385 }; // end class NLPDirect
386 
387 } // end namespace NLPInterfacePack
388 
389 #endif // NLP_FIRST_ORDER_DIRECT_H
NLP interface class that adds gradient information for the objective function {abstract}.
virtual value_type & f()
Returns non-const *this->get_f().
AbstractLinAlgPack::size_type size_type
virtual Range1D con_decomp() const
Return the range of decomposed equality constraints.
Abstract interface for immutable, finite dimensional, coordinate vectors {abstract}.
virtual const mat_fcty_ptr_t factory_GcU() const
Return a matrix factory object for creating GcU.
virtual const mat_fcty_ptr_t factory_Uz() const
Return a matrix factory object for Uz = F + E * D.
void set_factories(const mat_sym_fcty_ptr_t &factory_transDtD, const mat_sym_nonsing_fcty_ptr_t &factory_S)
Initialize the factory objects for the special matrices for D'*D and S = I + D'*D.
virtual void calc_point(const Vector &x, value_type *f, VectorMutable *c, bool recalc_c, VectorMutable *Gf, VectorMutable *py, VectorMutable *rGf, MatrixOp *GcU, MatrixOp *D, MatrixOp *Uz) const =0
Compute all of the needed quanities for direct sensitivities.
virtual size_type r() const
Returns the number of decomposed equality constraints (r <= m).
Interface providing only direct first order sensitivity information.
virtual const mat_fcty_ptr_t factory_GcUD() const
Return a matrix factory object for a mutable matrix compatible with GcU(var_dep). ...
Teuchos::RCP< const Teuchos::AbstractFactory< MatrixOp > > mat_fcty_ptr_t
virtual const mat_sym_fcty_ptr_t factory_transDtD() const
Returns a matrix factory for the result of J = D'*D
virtual Range1D con_undecomp() const
Return the range of undecomposed equality constraints.
void initialize(bool test_setup)
Initialize the NLP for its first use.
Teuchos::RCP< const Teuchos::AbstractFactory< MatrixSymOpNonsing > > mat_sym_nonsing_fcty_ptr_t
Teuchos::RCP< const Teuchos::AbstractFactory< MatrixSymOp > > mat_sym_fcty_ptr_t
virtual Range1D var_dep() const
Return the range of dependent (i.e. basic) variables.
virtual Range1D var_indep() const
Return the range of independent (i.e. nonbasic) variables.
virtual const mat_fcty_ptr_t factory_D() const =0
Return a matrix factory object for D = -inv(C)*N {abstract}.
virtual void calc_semi_newton_step(const Vector &x, VectorMutable *c, bool recalc_c, VectorMutable *py) const =0
Calculate an approximate newton step given the Jacobian computed for the last call to calc_point()...
mat_sym_nonsing_fcty_ptr_t factory_S_
AbstractLinAlgPack::value_type value_type
Abstract interface for mutable coordinate vectors {abstract}.
virtual const mat_sym_nonsing_fcty_ptr_t factory_S() const
Returns a matrix factory for the result of S = I + D'*D
virtual VectorMutable & Gf()
Returns non-const *this->get_Gf().
virtual VectorMutable & c()
Returns non-const *this->get_c().