@@ -19,10 +19,10 @@ namespace GridKit
1919{
2020 namespace PhasorDynamics
2121 {
22- template <class ScalarT , typename IdxT >
22+ template <typename scalar_type , typename index_type >
2323 class BusBase ;
2424
25- template <class ScalarT , typename IdxT >
25+ template <typename scalar_type , typename index_type >
2626 class SignalNode ;
2727 } // namespace PhasorDynamics
2828} // namespace GridKit
@@ -59,37 +59,39 @@ namespace GridKit
5959 MAXIMUM ,
6060 };
6161
62- template <class ScalarT , typename IdxT >
63- class Regca : public Component <ScalarT, IdxT >
62+ template <typename scalar_type , typename index_type >
63+ class Regca : public Component <scalar_type, index_type >
6464 {
65- using Component<ScalarT, IdxT >::gridkit_component_id_;
66- using Component<ScalarT, IdxT >::alpha_;
67- using Component<ScalarT, IdxT >::f_;
68- using Component<ScalarT, IdxT >::h_;
69- using Component<ScalarT, IdxT >::J_ ;
70- using Component<ScalarT, IdxT >::J_cols_buffer_;
71- using Component<ScalarT, IdxT >::J_rows_buffer_;
72- using Component<ScalarT, IdxT >::J_vals_buffer_;
73- using Component<ScalarT, IdxT >::nnz_;
74- using Component<ScalarT, IdxT >::residual_indices_;
75- using Component<ScalarT, IdxT >::size_;
76- using Component<ScalarT, IdxT >::tag_;
77- using Component<ScalarT, IdxT >::time_;
78- using Component<ScalarT, IdxT >::va_system_base_;
79- using Component<ScalarT, IdxT >::variable_indices_;
80- using Component<ScalarT, IdxT >::wb_;
81- using Component<ScalarT, IdxT >::y_;
82- using Component<ScalarT, IdxT >::yp_;
65+ using Component<scalar_type, index_type >::gridkit_component_id_;
66+ using Component<scalar_type, index_type >::alpha_;
67+ using Component<scalar_type, index_type >::f_;
68+ using Component<scalar_type, index_type >::h_;
69+ using Component<scalar_type, index_type >::J_ ;
70+ using Component<scalar_type, index_type >::J_cols_buffer_;
71+ using Component<scalar_type, index_type >::J_rows_buffer_;
72+ using Component<scalar_type, index_type >::J_vals_buffer_;
73+ using Component<scalar_type, index_type >::nnz_;
74+ using Component<scalar_type, index_type >::residual_indices_;
75+ using Component<scalar_type, index_type >::size_;
76+ using Component<scalar_type, index_type >::tag_;
77+ using Component<scalar_type, index_type >::time_;
78+ using Component<scalar_type, index_type >::va_system_base_;
79+ using Component<scalar_type, index_type >::variable_indices_;
80+ using Component<scalar_type, index_type >::wb_;
81+ using Component<scalar_type, index_type >::y_;
82+ using Component<scalar_type, index_type >::yp_;
8383
8484 public:
85- using RealT = typename Component<ScalarT, IdxT>::RealT;
86- using bus_type = BusBase<ScalarT, IdxT>;
87- using signal_type = SignalNode<ScalarT, IdxT>;
88- using model_data_type = RegcaData<RealT, IdxT>;
89- using MonitorT = Model::VariableMonitor<Regca, RegcaData>;
90-
91- Regca (bus_type* bus);
92- Regca (bus_type* bus, const model_data_type& data);
85+ using ScalarT = scalar_type;
86+ using IdxT = index_type;
87+ using RealT = typename Component<ScalarT, IdxT>::RealT;
88+ using BusT = BusBase<ScalarT, IdxT>;
89+ using SignalT = SignalNode<ScalarT, IdxT>;
90+ using ModelDataT = RegcaData<RealT, IdxT>;
91+ using MonitorT = Model::VariableMonitor<Regca, RegcaData>;
92+
93+ Regca (BusT* bus);
94+ Regca (BusT* bus, const ModelDataT& data);
9395 ~Regca ();
9496
9597 int setGridKitComponentID (IdxT) override final ;
@@ -117,7 +119,7 @@ namespace GridKit
117119 ScalarT*, ScalarT*, ScalarT*, ScalarT*);
118120
119121 private:
120- void initializeParameters (const model_data_type & data);
122+ void initializeParameters (const ModelDataT & data);
121123 void initializeMonitor ();
122124 void setDerivedParameters ();
123125
@@ -154,7 +156,7 @@ namespace GridKit
154156 return bus_->Ii ();
155157 }
156158
157- bus_type * bus_{nullptr };
159+ BusT * bus_{nullptr };
158160
159161 RealT P0_ {0 };
160162 RealT Q0_ {0 };
0 commit comments