Xyce  6.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
N_ANP_ModelEvaluator_Stateless.h
Go to the documentation of this file.
1 //-------------------------------------------------------------------------
2 // Copyright Notice
3 //
4 // Copyright 2002 Sandia Corporation. Under the terms
5 // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S.
6 // Government retains certain rights in this software.
7 //
8 // Xyce(TM) Parallel Electrical Simulator
9 // Copyright (C) 2002-2014 Sandia Corporation
10 //
11 // This program is free software: you can redistribute it and/or modify
12 // it under the terms of the GNU General Public License as published by
13 // the Free Software Foundation, either version 3 of the License, or
14 // (at your option) any later version.
15 //
16 // This program is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, see <http://www.gnu.org/licenses/>.
23 //-------------------------------------------------------------------------
24 
25 //-------------------------------------------------------------------------
26 // Filename : $RCSfile: N_ANP_ModelEvaluator_Stateless.h,v $
27 //
28 // Purpose :
29 //
30 //
31 //
32 // Special Notes :
33 //
34 //
35 // Creator :
36 //
37 // Creation Date :
38 //
39 // Revision Information:
40 // ---------------------
41 //
42 // Revision Number: $Revision: 1.7 $
43 //
44 // Revision Date : $Date: 2014/02/24 23:49:12 $
45 //
46 // Current Owner : $Author: tvrusso $
47 //-------------------------------------------------------------------------
48 
49 #ifndef N_ANP_MODEL_EVALUATOR_STATELESS_H
50 #define N_ANP_MODEL_EVALUATOR_STATELESS_H
51 
52 #include <EpetraExt_ModelEvaluator.h>
53 #include <N_ANP_ModelEvaluator.h>
54 
55 // Forward Declarations
56 class Epetra_Map;
57 class Epetra_Vector;
58 class Epetra_CrsGraph;
59 class Epetra_Operator;
60 class N_LAS_Vector;
61 class N_LAS_BlockVector;
62 
63 using Teuchos::RCP;
64 
65 namespace Xyce {
66 namespace Analysis {
67 
68 // This defines the class ModelEvaluator_Stateless derived from
69 // EpetraExt:ModelEvaluator
70 class ModelEvaluator_Stateless : public EpetraExt::ModelEvaluator {
71 
72  public:
73  // (Default) Constructor of the class
75 
76  // Destructor of the class
77  virtual ~ModelEvaluator_Stateless();
78 
79  void set_XyceModelEvaluator(const RCP<Analysis::ModelEvaluator>& xyceME);
80 
81  /** \name Overridden from EpetraExt::ModelEvaluator . */
82  //@{
83  Teuchos::RCP<const Epetra_Map> get_x_map() const;
84  Teuchos::RCP<const Epetra_Map> get_f_map() const;
85  Teuchos::RCP<const Epetra_Map> get_p_map(int p) const;
86  Teuchos::RCP<const Epetra_Map> get_g_map(int p) const;
87  Teuchos::RCP<Epetra_Operator> create_W() const;
88  EpetraExt::ModelEvaluator::InArgs createInArgs() const;
89  EpetraExt::ModelEvaluator::OutArgs createOutArgs() const;
90  void evalModel( const InArgs& inArgs, const OutArgs& outArgs ) const;
91  //@}
92 
93  private:
94  // Private member functions:
95  void setupInOutArgs_();
96 
97  // Private data:
99 
100  //RCP<N_CIR_Xyce> xycePtr_;
101  RCP<Analysis::ModelEvaluator> xyceME_;
102 
103  EpetraExt::ModelEvaluator::InArgs inArgs_;
104  EpetraExt::ModelEvaluator::OutArgs outArgs_;
105  int Np_; // 0
106  int Ng_; // 0
107  RCP<Epetra_Vector> tempStateVector_;
108  RCP<Epetra_Vector> tempStateDotVector_;
109  RCP<Epetra_Vector> tempVoltLimFVector_;
110  RCP<Epetra_Vector> tempVoltLimQVector_;
111  RCP<Epetra_Vector> tempFVector_;
112  RCP<Epetra_Operator> tempWOperator_;
113 };
114 
115 // Nonmember constructor
116 RCP<ModelEvaluator_Stateless> N_ANP_modelEvaluator_Stateless();
117 
118 // Nonmember constructor
119 RCP<ModelEvaluator_Stateless> N_ANP_modelEvaluator_Stateless(
120  const RCP<N_ANP_ModelEvaluator>& xyceME);
121 
122 } // namespace Analysis
123 } // namespace Xyce
124 
126 
127 #endif // N_ANP_MODEL_EVALUATOR_STATELESS_H