Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
30a62a2c
Commit
30a62a2c
authored
Dec 07, 2015
by
Thomas Jahns
🤸
Browse files
Add assertion.
parent
e03e8c82
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/grid.c
View file @
30a62a2c
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment