Skip to content

Commit

Permalink
fix for 0 input wind speed mass solver run cases, that was causing vo…
Browse files Browse the repository at this point in the history
…lVtk to seg fault for any 0 input wind speeds. The velocityGrid and angleGrid were being allocated properly, but the u,v,w allocation was getting skipped, just had to add it back in before the breakout. For issue #526
  • Loading branch information
latwood committed Aug 23, 2024
1 parent 7de0caf commit a624325
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/ninja/ninja.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,20 @@ do
/* CHECK FOR "NULL" RUN */
/* ----------------------------------------*/
if(checkForNullRun()) //if it's a run with all zero velocity...
{
// still need to set initial values and sizing of u,v,w for output volVtk
// Note that u,v,w are allocated normally for diurnal runs
u.allocate(&mesh); //u is positive toward East
v.allocate(&mesh); //v is positive toward North
w.allocate(&mesh); //w is positive up
for(int i=0;i<mesh.NUMNP;i++)
{
u(i)=0.;
v(i)=0.;
w(i)=0.;
}
break;
}

/* ----------------------------------------*/
/* BUILD "A" ARRAY OF AX=B */
Expand Down

0 comments on commit a624325

Please sign in to comment.