Xyce
6.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
N_NLS_ParamMgr.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_NLS_ParamMgr.h,v $
27
//
28
// Purpose :
29
//
30
// Special Notes :
31
//
32
// Creator : Eric R. Keiter
33
//
34
// Creation Date : 10/25/02
35
//
36
// Revision Information:
37
// ----------------------
38
//
39
// Revision Number: $Revision: 1.14 $
40
//
41
// Revision Date : $Date: 2014/02/24 23:49:24 $
42
//
43
// Current Owner : $Author $
44
//-------------------------------------------------------------------------
45
46
#ifndef Xyce_N_NLS_ParamMgr_h
47
#define Xyce_N_NLS_ParamMgr_h
48
49
#include <vector>
50
51
#include <N_IO_fwd.h>
52
53
#include <
N_NLS_NLParams.h
>
54
55
56
//-----------------------------------------------------------------------------
57
// Class : N_NLS_ParamMgr
58
//
59
// Purpose : It is not unusual for a Xyce simulation to have several
60
// different parameter sets. Each parameter set (for dcop,
61
// transient, etc.) is stored in a N_NLS_NLParams data
62
// structure.
63
//
64
// The management of which parameter set is currently being
65
// used is handled by this class.
66
//
67
// Special Notes :
68
// Creator : Eric Keiter, SNL, Parallel Computational Sciences
69
// Creation Date : 10/26/02
70
//-----------------------------------------------------------------------------
71
class
N_NLS_ParamMgr
72
{
73
public
:
74
N_NLS_ParamMgr
(N_IO_CmdParse & cp);
75
~N_NLS_ParamMgr
();
76
77
bool
addParameterSet
(
AnalysisMode
mode,
N_NLS_NLParams
& nlp);
78
79
bool
getParams
(
AnalysisMode
mode,
N_NLS_NLParams
& nlp);
80
81
bool
getCurrentParams
(
N_NLS_NLParams
& nlp);
82
inline
bool
setAnalysisMode
(
AnalysisMode
mode);
83
inline
void
resetAnalysisMode
();
84
inline
AnalysisMode
getAnalysisMode
()
const
;
85
86
protected
:
87
private
:
88
89
public
:
90
91
protected
:
92
93
private
:
94
std::vector<N_NLS_NLParams>
paramVector_
;
95
AnalysisMode
currentMode_
;
96
97
bool
modeToggled_
;
98
bool
gcp_calledBefore_
;
99
bool
paramsChanged_
;
100
};
101
102
//-----------------------------------------------------------------------------
103
// Function : N_NLS_ParamMgr::setAnalysisMode
104
// Purpose :
105
// Special Notes :
106
// Scope : public
107
// Creator : Eric R. Keiter, SNL, Computational Sciences
108
// Creation Date : 10/26/02
109
//-----------------------------------------------------------------------------
110
inline
bool
N_NLS_ParamMgr::setAnalysisMode
(
AnalysisMode
mode)
111
{
112
if
(
currentMode_
!= mode)
113
{
114
paramsChanged_
=
true
;
115
currentMode_
= mode;
116
}
117
return
true
;
118
}
119
120
//-----------------------------------------------------------------------------
121
// Function : N_NLS_ParamMgr::resetAnalysisMode
122
// Purpose :
123
// Special Notes :
124
// Scope : public
125
// Creator : Eric R. Keiter, SNL, Computational Sciences
126
// Creation Date : 10/26/02
127
//-----------------------------------------------------------------------------
128
inline
void
N_NLS_ParamMgr::resetAnalysisMode
()
129
{
130
if
(
currentMode_
!=
DC_OP
)
131
{
132
paramsChanged_
=
true
;
133
currentMode_
=
DC_OP
;
134
}
135
}
136
137
//-----------------------------------------------------------------------------
138
// Function : N_NLS_ParamMgr::getAnalysisMode
139
// Purpose :
140
// Special Notes :
141
// Scope : public
142
// Creator : Eric R. Keiter, SNL, Computational Sciences
143
// Creation Date : 10/26/02
144
//-----------------------------------------------------------------------------
145
inline
AnalysisMode
N_NLS_ParamMgr::getAnalysisMode
()
const
146
{
147
return
currentMode_
;
148
}
149
150
#endif
151
src
NonlinearSolverPKG
include
N_NLS_ParamMgr.h
Generated on Mon Mar 24 2014 10:54:40 for Xyce by
1.8.3.1