Skip to content

Commit dc726cb

Browse files
committed
fix: use concore.maxtime instead of hardcoded Nsim in C++ nodes
1 parent 0467ce5 commit dc726cb

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

testsou/cpymat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ int main()
2121
auto wallclock1 = chrono::high_resolution_clock::now();
2222

2323
vector<double> ym;
24-
while(concore.simtime<Nsim){
24+
while(concore.simtime<concore.maxtime){
2525
while (concore.unchanged()){
2626
ym = concore.read(1,"ym",init_simtime_ym);
2727
}

testsou/pmpymat.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@ int main()
1010
{
1111
Concore concore;
1212
concore.delay = 0.01;
13-
int Nsim = 100;
1413
string init_simtime_u = "[0.0,0.0,0.0]";
1514
string init_simtime_ym = "[0.0,0.0,0.0]";
1615

1716
vector<double> ym = concore.initval(init_simtime_ym);
1817
vector<double> u;
19-
while(concore.simtime<Nsim){
18+
while(concore.simtime<concore.maxtime){
2019
while (concore.unchanged()){
2120
u = concore.read(1,"u",init_simtime_u);
2221
}

testsou/powermeter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@ int main(){
1212
Concore concore2;
1313
concore.delay = 0.07;
1414
concore2.delay = 0.07;
15-
int Nsim = 100;
1615
string init_simtime_u = "[0.0,0.0,0.0]";
1716
string init_simtime_ym = "[0.0,0.0,0.0]";
1817
int energy = 0;
1918

2019
vector<double> ym = concore.initval(init_simtime_ym);
2120
vector<double> u;
22-
while(concore.simtime<Nsim){
21+
while(concore.simtime<concore.maxtime){
2322
while (concore.unchanged()){
2423
u = concore.read(concore.iport["VC"],"u",init_simtime_u);
2524
}

0 commit comments

Comments
 (0)