Xyce  6.1
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-2015 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.12 $
43 //
44 // Revision Date : $Date: 2015/10/27 19:24:39 $
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 
54 #include <N_LAS_fwd.h>
55 #include <N_ANP_ModelEvaluator.h>
56 
57 // Forward Declarations
58 class Epetra_Map;
59 class Epetra_Vector;
60 class Epetra_CrsGraph;
61 class Epetra_Operator;
62 
63 #include <Teuchos_RCP.hpp>
64 using Teuchos::RCP;
65 
66 namespace Xyce {
67 namespace Analysis {
68 
69 // This defines the class ModelEvaluator_Stateless derived from
70 // EpetraExt:ModelEvaluator
71 class ModelEvaluator_Stateless : public EpetraExt::ModelEvaluator
72 {
73 
74  public:
75  // (Default) Constructor of the class
77 
78  // Destructor of the class
79  virtual ~ModelEvaluator_Stateless();
80 
81  void set_XyceModelEvaluator(const RCP<Analysis::ModelEvaluator>& xyceME);
82 
83  /** \name Overridden from EpetraExt::ModelEvaluator . */
84  //@{
85  Teuchos::RCP<const Epetra_Map> get_x_map() const;
86  Teuchos::RCP<const Epetra_Map> get_f_map() const;
87  Teuchos::RCP<const Epetra_Map> get_p_map(int p) const;
88  Teuchos::RCP<const Epetra_Map> get_g_map(int p) const;
89  Teuchos::RCP<Epetra_Operator> create_W() const;
90  EpetraExt::ModelEvaluator::InArgs createInArgs() const;
91  EpetraExt::ModelEvaluator::OutArgs createOutArgs() const;
92  void evalModel( const InArgs& inArgs, const OutArgs& outArgs ) const;
93  //@}
94 
95  private:
96  // Private member functions:
97  void setupInOutArgs_();
98 
99  // Private data:
101 
102  //RCP<N_CIR_Xyce> xycePtr_;
103  RCP<Analysis::ModelEvaluator> xyceME_;
104 
105  EpetraExt::ModelEvaluator::InArgs inArgs_;
106  EpetraExt::ModelEvaluator::OutArgs outArgs_;
107  int Np_; // 0
108  int Ng_; // 0
109  RCP<Epetra_Vector> tempStateVector_;
110  RCP<Epetra_Vector> tempStateDotVector_;
111  RCP<Epetra_Vector> tempVoltLimFVector_;
112  RCP<Epetra_Vector> tempVoltLimQVector_;
113  RCP<Epetra_Vector> tempFVector_;
114  RCP<Epetra_Operator> tempWOperator_;
115 };
116 
117 // Nonmember constructor
118 RCP<ModelEvaluator_Stateless> N_ANP_modelEvaluator_Stateless();
119 
120 // Nonmember constructor
121 RCP<ModelEvaluator_Stateless> N_ANP_modelEvaluator_Stateless(
122  const RCP<ModelEvaluator>& xyceME);
123 
124 } // namespace Analysis
125 } // namespace Xyce
126 
127 #endif // N_ANP_MODEL_EVALUATOR_STATELESS_H
Pure virtual class to augment a linear system.
Teuchos::RCP< const Epetra_Map > get_f_map() const
EpetraExt::ModelEvaluator::OutArgs createOutArgs() const
EpetraExt::ModelEvaluator::InArgs createInArgs() const
RCP< ModelEvaluator_Stateless > N_ANP_modelEvaluator_Stateless()
Teuchos::RCP< Epetra_Operator > create_W() const
Teuchos::RCP< const Epetra_Map > get_p_map(int p) const
Teuchos::RCP< const Epetra_Map > get_g_map(int p) const
void evalModel(const InArgs &inArgs, const OutArgs &outArgs) const
Teuchos::RCP< const Epetra_Map > get_x_map() const
void set_XyceModelEvaluator(const RCP< Analysis::ModelEvaluator > &xyceME)