EpetraExt  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EpetraExt_DiagonalQuadraticResponseOnlyModelEvaluator.hpp
Go to the documentation of this file.
1 /*
2 //@HEADER
3 // ***********************************************************************
4 //
5 // EpetraExt: Epetra Extended - Linear Algebra Services Package
6 // Copyright (2011) Sandia Corporation
7 //
8 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9 // the U.S. Government retains certain rights in this software.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 //
15 // 1. Redistributions of source code must retain the above copyright
16 // notice, this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright
19 // notice, this list of conditions and the following disclaimer in the
20 // documentation and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of the Corporation nor the names of the
23 // contributors may be used to endorse or promote products derived from
24 // this software without specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
39 //
40 // ***********************************************************************
41 //@HEADER
42 */
43 
44 #ifndef EPETRA_EXT_DIAGONAL_RESPONSE_ONLY_MODEL_EVALUATOR_HPP
45 #define EPETRA_EXT_DIAGONAL_RESPONSE_ONLY_MODEL_EVALUATOR_HPP
46 
47 
49 #include "Epetra_Map.h"
50 #include "Epetra_Vector.h"
51 #include "Epetra_Comm.h"
52 #include "Epetra_CrsGraph.h"
53 
54 
55 namespace EpetraExt {
56 
57 
71 public:
72 
75  const Teuchos::RCP<Epetra_Comm> &comm,
76  const int localDim, const double &pt, const double &p0, const double &scale );
77 
80 
82  Teuchos::RCP<const Epetra_Map> get_x_map() const;
84  Teuchos::RCP<const Epetra_Map> get_f_map() const;
86  Teuchos::RCP<const Epetra_Map> get_p_map(int l) const;
88  Teuchos::RCP<const Epetra_Map> get_g_map(int j) const;
90  Teuchos::RCP<const Epetra_Vector> get_p_init(int l) const;
92  InArgs createInArgs() const;
94  OutArgs createOutArgs() const;
96  void evalModel( const InArgs& inArgs, const OutArgs& outArgs ) const;
97 
99 
100 private:
101 
102  // /////////////////////////////////////
103  // Private member data
104 
105  Teuchos::RCP<const Epetra_Comm> epetra_comm_;
106  Teuchos::RCP<const Epetra_Map> map_p_;
107  Teuchos::RCP<const Epetra_Map> map_g_;
108 
109  double scale_;
110 
111  Teuchos::RCP<Epetra_Vector> pt_;
112  Teuchos::RCP<Epetra_Vector> p0_;
113 
114  // Note defined and not to be called
116 
117 };
118 
119 
124 inline
125 Teuchos::RCP<DiagonalQuadraticResponseOnlyModelEvaluator>
127  const Teuchos::RCP<Epetra_Comm> &comm,
128  const int localDim, const double &pt, const double &p0, const double &scale
129  )
130 {
131  return Teuchos::rcp(
133  comm, localDim, pt, p0, scale
134  )
135  );
136 }
137 
138 
139 } // namespace EpetraExt
140 
141 
142 #endif // EPETRA_EXT_DIAGONAL_RESPONSE_ONLY_MODEL_EVALUATOR_HPP
Teuchos::RCP< DiagonalQuadraticResponseOnlyModelEvaluator > diagonalQuadraticResponseOnlyModelEvaluator(const Teuchos::RCP< Epetra_Comm > &comm, const int localDim, const double &pt, const double &p0, const double &scale)
Nonmember constructor.
Base interface for evaluating a stateless &quot;model&quot;.