Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
d4e77d90
Commit
d4e77d90
authored
Apr 29, 2019
by
Uwe Schulzweida
Browse files
gridDefXsize: refactor error message.
parent
3fe8560c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/grid.c
View file @
d4e77d90
...
...
@@ -1194,8 +1194,10 @@ void gridDefXsize(int gridID, size_t xsize)
Error
(
"xsize %zu is greater then gridsize %zu"
,
xsize
,
gridSize
);
const
int
gridType
=
gridInqType
(
gridID
);
if
(
(
gridType
==
GRID_UNSTRUCTURED
||
gridType
==
GRID_GAUSSIAN_REDUCED
)
&&
xsize
!=
gridSize
)
Error
(
"xsize %zu must be equal to gridsize %zu for gridtype: %s"
,
gridNamePtr
(
gridType
),
xsize
,
gridSize
);
if
(
gridType
==
GRID_UNSTRUCTURED
&&
xsize
!=
gridSize
)
Error
(
"xsize %zu must be equal to gridsize %zu for gridtype: %s"
,
xsize
,
gridSize
,
gridNamePtr
(
gridType
));
if
(
gridType
==
GRID_GAUSSIAN_REDUCED
&&
xsize
!=
2
&&
xsize
!=
gridSize
)
Error
(
"xsize %zu must be equal to gridsize %zu for gridtype: %s"
,
xsize
,
gridSize
,
gridNamePtr
(
gridType
));
if
(
gridptr
->
x
.
size
!=
xsize
)
{
...
...
Write
Preview
Markdown
is supported
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