@@ -95,47 +95,27 @@ class WallBase
95
95
// ! Build the Jacobian terms specific to the flow device for the given connected
96
96
// ! reactor.
97
97
// ! @param r a pointer to the calling reactor
98
- // ! @param jacVector a vector of triplets to be added to the jacobian for the
99
- // ! reactor
98
+ // ! @param jacVector a vector of triplets to be added to the reactor Jacobian
100
99
// ! @warning This function is an experimental part of the %Cantera API and may be
101
- // ! changed
102
- // ! or removed without notice.
103
- // ! @since New in %Cantera 3.0.
100
+ // ! changed or removed without notice.
101
+ // ! @since New in %Cantera 3.1.
104
102
// !
105
- virtual void buildReactorJacobian (ReactorBase* r, vector<Eigen::Triplet<double >>& jacVector) {
103
+ virtual void buildReactorJacobian (ReactorBase* r,
104
+ vector<Eigen::Triplet<double >>& jacVector) {
106
105
throw NotImplementedError (" WallBase::buildReactorJacobian" );
107
106
}
108
107
109
- // ! Build the Jacobian terms specific to the flow device for the network. These
110
- // ! terms
111
- // ! will be adjusted to the networks indexing system outside of the reactor.
112
- // ! @param jacVector a vector of triplets to be added to the jacobian for the
113
- // ! reactor
108
+ // ! Build the Jacobian cross-reactor terms specific to the flow device for the
109
+ // ! network.
110
+ // ! @param jacVector a vector of triplets to be added to the network Jacobian
114
111
// ! @warning This function is an experimental part of the %Cantera API and may be
115
- // ! changed
116
- // ! or removed without notice.
117
- // ! @since New in %Cantera 3.0.
112
+ // ! changed or removed without notice.
113
+ // ! @since New in %Cantera 3.1.
118
114
// !
119
115
virtual void buildNetworkJacobian (vector<Eigen::Triplet<double >>& jacVector) {
120
116
throw NotImplementedError (" WallBase::buildNetworkJacobian" );
121
117
}
122
118
123
- // ! Specify the jacobian terms have been calculated and should not be recalculated.
124
- // ! @warning This function is an experimental part of the %Cantera API and may be
125
- // ! changed
126
- // ! or removed without notice.
127
- // ! @since New in %Cantera 3.0.
128
- // !
129
- void jacobianCalculated () { m_jac_calculated = true ; };
130
-
131
- // ! Specify that jacobian terms have not been calculated and should be recalculated.
132
- // ! @warning This function is an experimental part of the %Cantera API and may be
133
- // ! changed
134
- // ! or removed without notice.
135
- // ! @since New in %Cantera 3.0.
136
- // !
137
- void jacobianNotCalculated () { m_jac_calculated = false ; };
138
-
139
119
protected:
140
120
ReactorBase* m_left = nullptr ;
141
121
ReactorBase* m_right = nullptr ;
@@ -144,10 +124,6 @@ class WallBase
144
124
double m_time = 0.0 ;
145
125
146
126
double m_area = 1.0 ;
147
-
148
- // ! a variable to switch on and off so calculations are not doubled by the calling
149
- // ! reactor or network
150
- bool m_jac_calculated = false ;
151
127
};
152
128
153
129
// ! Represents a wall between between two ReactorBase objects.
@@ -252,9 +228,11 @@ class Wall : public WallBase
252
228
return m_k;
253
229
}
254
230
255
- virtual void buildReactorJacobian (ReactorBase* r, vector<Eigen::Triplet<double >>& jacVector) override ;
231
+ void buildReactorJacobian (ReactorBase* r,
232
+ vector<Eigen::Triplet<double >>& jacVector) override ;
256
233
257
- virtual void buildNetworkJacobian (vector<Eigen::Triplet<double >>& jacVector) override ;
234
+ void buildNetworkJacobian (vector<Eigen::Triplet<double >>& jacVector)
235
+ override ;
258
236
259
237
protected:
260
238
0 commit comments