Xyce  6.1
N_DEV_Op.C
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_DEV_Op.C,v $
27 //
28 // Purpose : Provide tools for accessing output data in parallel or
29 // serial
30 //
31 // Special Notes :
32 //
33 // Creator : David Baur
34 //
35 // Creation Date : 11/15/2013
36 //
37 // Revision Information:
38 // ---------------------
39 //
40 // Revision Number: $Revision: 1.3.2.1 $
41 //
42 // Revision Date : $Date: 2015/04/02 18:20:09 $
43 //
44 // Current Owner : $Author: tvrusso $
45 //-----------------------------------------------------------------------------
46 
47 #include <Xyce_config.h>
48 
49 #include <N_DEV_Op.h>
50 #include <N_DEV_DeviceEntity.h>
51 #include <N_DEV_DeviceMgr.h>
52 
53 namespace Xyce {
54 namespace Device {
55 
56 //-----------------------------------------------------------------------------
57 // Function : DeviceMgrGlobalParameterOp::get
58 // Purpose : get the current value of a global param from the device
59 // package
60 // Special Notes : It is inappropriate for the Device package to be in charge
61 // of global params, but that's where they are right now.
62 // Scope : public
63 // Creator : David Baur, Raytheon
64 // Creation Date : 11/15/2013
65 //-----------------------------------------------------------------------------
66 complex
67 DeviceMgrGlobalParameterOp::get(const DeviceMgrGlobalParameterOp &op, const Util::Op::OpData &op_data)
68 {
70 }
71 
72 //-----------------------------------------------------------------------------
73 // Function : DeviceEntityParameterOp::get
74 // Purpose : get the current value of a device parameter from a device
75 // entity
76 // Special Notes :
77 // Scope : public
78 // Creator : David Baur, Raytheon
79 // Creation Date : 11/15/2013
80 //-----------------------------------------------------------------------------
81 complex
82 DeviceEntityParameterOp::get(const DeviceEntityParameterOp &op, const Util::Op::OpData &op_data)
83 {
84  double result;
85 
86  const_cast<DeviceEntity &>(op.deviceEntity_).getParam(op.deviceParameterName_, result);
87 
88  return result;
89 }
90 
91 //-----------------------------------------------------------------------------
92 // Function : DeviceMgrParameterOp::get
93 // Purpose : get the current value of a device parameter from the device
94 // package
95 // Special Notes :
96 // Scope : public
97 // Creator : David Baur, Raytheon
98 // Creation Date : 11/15/2013
99 //-----------------------------------------------------------------------------
100 complex
101 DeviceMgrParameterOp::get(const DeviceMgrParameterOp &op, const Util::Op::OpData &op_data)
102 {
104 }
105 
106 //-----------------------------------------------------------------------------
107 // Function : DeviceMgrParameterOp::get
108 // Purpose : get the current value of a device parameter from the device
109 // package
110 // Special Notes :
111 // Scope : public
112 // Creator : David Baur, Raytheon
113 // Creation Date : 11/15/2013
114 //-----------------------------------------------------------------------------
115 complex
116 DeviceOptionsOp::get(const DeviceOptionsOp &op, const Util::Op::OpData &op_data)
117 {
118  return op.deviceOptions_.gmin;
119 }
120 
121 } // namespace Device
122 } // namespace Xyce
double getParamNoReduce(const std::string &name) const
Pure virtual class to augment a linear system.
static complex get(const DeviceMgrParameterOp &op, const Util::Op::OpData &op_data)
Definition: N_DEV_Op.C:101
static complex get(const DeviceOptionsOp &op, const Util::Op::OpData &op_data)
Definition: N_DEV_Op.C:116
const std::string deviceParameterName_
Definition: N_DEV_Op.h:72
const std::string deviceParameterName_
Definition: N_DEV_Op.h:110
const DeviceOptions & deviceOptions_
Definition: N_DEV_Op.h:130
const DeviceEntity & deviceEntity_
Definition: N_DEV_Op.h:92
const DeviceMgr & deviceManager_
Definition: N_DEV_Op.h:111
static complex get(const DeviceMgrGlobalParameterOp &op, const Util::Op::OpData &op_data)
Definition: N_DEV_Op.C:67
double getGlobalPar(const std::string &parName) const
const std::string deviceParameterName_
Definition: N_DEV_Op.h:91
static complex get(const DeviceEntityParameterOp &op, const Util::Op::OpData &op_data)
Definition: N_DEV_Op.C:82