Skip to content
Snippets Groups Projects
Commit 13b1c4ba authored by Moritz Hanke's avatar Moritz Hanke
Browse files

adds test for routine yac_generate_cubed_sphere_basic_grid

parent 030a90a1
No related branches found
No related tags found
No related merge requests found
......@@ -3,6 +3,7 @@
// SPDX-License-Identifier: BSD-3-Clause
#include <unistd.h>
#include <string.h>
#include "tests.h"
#include "generate_cubed_sphere.h"
......@@ -31,6 +32,24 @@ int main(void) {
yac_basic_grid_data_free(cube_grid);
}
{
unsigned n = 10;
struct yac_basic_grid * cube_grid =
yac_generate_cubed_sphere_basic_grid("cube_10", n);
if (yac_basic_grid_get_data_size(cube_grid, YAC_LOC_CELL) != n * n * 6)
PUT_ERR("ERROR: wrong number of cells\n");
if (yac_basic_grid_get_data_size(cube_grid, YAC_LOC_CORNER) != n * n * 6 + 2)
PUT_ERR("ERROR: wrong number of grid vertices\n")
if (strcmp(yac_basic_grid_get_name(cube_grid), "cube_10"))
PUT_ERR("ERROR: wrong name\n");
yac_basic_grid_delete(cube_grid);
}
{
unsigned n = 32;
unsigned ref_num_core_cells = n * n * 6;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment