Commit 30a62a2c authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Add assertion.

parent e03e8c82
......@@ -2,6 +2,7 @@
# include "config.h"
#endif
#include <assert.h>
#include <string.h>
#include <float.h> /* FLT_EPSILON */
#include <limits.h> /* INT_MAX */
......@@ -2580,6 +2581,8 @@ static void gridComplete(grid_t *grid)
}
else if ( grid->xdef == 2 )
{
assert(gridtype != GRID_UNSTRUCTURED
&& gridtype != GRID_CURVILINEAR);
double *xvals
= (double *) Malloc((size_t)grid->xsize * sizeof (double));
gridGenXvals(grid->xsize, grid->xfirst, grid->xlast, grid->xinc, xvals);
......@@ -2602,6 +2605,8 @@ static void gridComplete(grid_t *grid)
}
else if ( grid->ydef == 2 )
{
assert(gridtype != GRID_UNSTRUCTURED
&& gridtype != GRID_CURVILINEAR);
double *yvals
= (double *) Malloc((size_t)grid->ysize * sizeof (double));
gridGenYvals(gridtype, grid->ysize, grid->yfirst, grid->ylast, grid->yinc, yvals);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment