VNGL4VMTW6GP4UVJ5XADXTHMLZ65DTFXJUARM4KPRZCZD346JNDQC for(int n=0; n<nmax; n++) {for(int j=0; j<jmax; j++) {for(int i=0; i<imax; i++) {int index = i + j*imax + n*imax*jmax;test1[index] = 1+i*j*n;test2[index] = 1+7*i*j*n;test3[index] = 1+13*i*j*n;
for (int n = 0; n < nmax; n++) {for (int j = 0; j < jmax; j++) {for (int i = 0; i < imax; i++) {int index = i + j * imax + n * imax * jmax;test1[index] = 1 + i * j * n;test2[index] = 1 + 7 * i * j * n;test3[index] = 1 + 13 * i * j * n;
for(int k=0; k < lsh[2]; k++) {for(int j=0; j < lsh[1]; j++) {for(int i=0; i < lsh[0]; i++) {int index = CCTK_GFINDEX3D(cctkGH, i, j, k);test_gf[index] = i*j*k;}}}
for (int k = 0; k < lsh[2]; k++) {for (int j = 0; j < lsh[1]; j++) {for (int i = 0; i < lsh[0]; i++) {int index = CCTK_GFINDEX3D(cctkGH, i, j, k);test_gf[index] = i * j * k;}}}
CCTK_REAL *var3 = (CCTK_REAL *)CCTK_VarDataPtr(cctkGH,0,vname.c_str());for(int j=0; j<jmax; j++) {for(int i=0; i<imax; i++) {int index = i + j*imax;if (var1[index] != 1+i*j*n) error_count[0] += 1;if (var2[index] != 1+7*i*j*n) error_count[1] += 1;if (var3[index] != 1+13*i*j*n) error_count[2] += 1;
CCTK_REAL *var3 = (CCTK_REAL *)CCTK_VarDataPtr(cctkGH, 0, vname.c_str());for (int j = 0; j < jmax; j++) {for (int i = 0; i < imax; i++) {int index = i + j * imax;if (var1[index] != 1 + i * j * n)error_count[0] += 1;if (var2[index] != 1 + 7 * i * j * n)error_count[1] += 1;if (var3[index] != 1 + 13 * i * j * n)error_count[2] += 1;
msg = "TestArrayGroup: grid array test1 failed in " + std::to_string(error_count[0]) +" of " + std::to_string(size) + " elements.";
msg = "TestArrayGroup: grid array test1 failed in " +std::to_string(error_count[0]) + " of " + std::to_string(size) +" elements.";
msg = "TestArrayGroup: grid array test2 failed in " + std::to_string(error_count[1]) +" of " + std::to_string(size) + " elements.";
msg = "TestArrayGroup: grid array test2 failed in " +std::to_string(error_count[1]) + " of " + std::to_string(size) +" elements.";
msg = "TestArrayGroup: grid array test3 failed in " + std::to_string(error_count[2]) +" of " + std::to_string(size) + " elements.";
msg = "TestArrayGroup: grid array test3 failed in " +std::to_string(error_count[2]) + " of " + std::to_string(size) +" elements.";
if (gf_data.dim != gf_group.dim || gf_data.dim <= 0) CCTK_ERROR("TestArrayGroup: incorrect dimension in grid function dynamic data");if (gf_data.activetimelevels != CCTK_ActiveTimeLevelsGI(cctkGH, gf_gi)) CCTK_ERROR("TestArrayGroup: incorrect activetimelevels in grid function dynamic data");
if (gf_data.dim != gf_group.dim || gf_data.dim <= 0)CCTK_ERROR("TestArrayGroup: incorrect dimension in grid function dynamic data");if (gf_data.activetimelevels != CCTK_ActiveTimeLevelsGI(cctkGH, gf_gi))CCTK_ERROR("TestArrayGroup: incorrect activetimelevels in grid function ""dynamic data");
if (gf_data.lsh[i] != cctkGH->cctk_lsh[i]) error.at("lsh") += 1;if (gf_data.ash[i] != cctkGH->cctk_ash[i]) error.at("ash") += 1;if (gf_data.gsh[i] != cctkGH->cctk_gsh[i]) error.at("gsh") += 1;if (gf_data.lbnd[i] != cctkGH->cctk_lbnd[i]) error.at("lbnd") += 1;if (gf_data.ubnd[i] != cctkGH->cctk_ubnd[i]) error.at("lbnd") += 1;if (gf_data.bbox[2*i] != cctkGH->cctk_bbox[2*i]) error.at("bbox") += 1;if (gf_data.bbox[2*i+1] != cctkGH->cctk_bbox[2*i+1]) error.at("bbox") += 1;if (gf_data.nghostzones[i] != cctkGH->cctk_nghostzones[i]) error.at("nghostzones") += 1;
if (gf_data.lsh[i] != cctkGH->cctk_lsh[i])error.at("lsh") += 1;if (gf_data.ash[i] != cctkGH->cctk_ash[i])error.at("ash") += 1;if (gf_data.gsh[i] != cctkGH->cctk_gsh[i])error.at("gsh") += 1;if (gf_data.lbnd[i] != cctkGH->cctk_lbnd[i])error.at("lbnd") += 1;if (gf_data.ubnd[i] != cctkGH->cctk_ubnd[i])error.at("lbnd") += 1;if (gf_data.bbox[2 * i] != cctkGH->cctk_bbox[2 * i])error.at("bbox") += 1;if (gf_data.bbox[2 * i + 1] != cctkGH->cctk_bbox[2 * i + 1])error.at("bbox") += 1;if (gf_data.nghostzones[i] != cctkGH->cctk_nghostzones[i])error.at("nghostzones") += 1;
if (error.at("lsh")) CCTK_ERROR("TestArrayGroup: incorrect lsh data in grid function dynamic data");if (error.at("ash")) CCTK_ERROR("TestArrayGroup: incorrect ash data in grid function dynamic data");if (error.at("gsh")) CCTK_ERROR("TestArrayGroup: incorrect gsh data in grid function dynamic data");if (error.at("lbnd")) CCTK_ERROR("TestArrayGroup: incorrect lbnd data in grid function dynamic data");if (error.at("ubnd")) CCTK_ERROR("TestArrayGroup: incorrect ubnd data in grid function dynamic data");if (error.at("bbox")) CCTK_ERROR("TestArrayGroup: incorrect bbox data in grid function dynamic data");if (error.at("nghostzones")) CCTK_ERROR("TestArrayGroup: incorrect nghostzones data in grid function dynamic data");
if (error.at("lsh"))CCTK_ERROR("TestArrayGroup: incorrect lsh data in grid function dynamic data");if (error.at("ash"))CCTK_ERROR("TestArrayGroup: incorrect ash data in grid function dynamic data");if (error.at("gsh"))CCTK_ERROR("TestArrayGroup: incorrect gsh data in grid function dynamic data");if (error.at("lbnd"))CCTK_ERROR("TestArrayGroup: incorrect lbnd data in grid function dynamic data");if (error.at("ubnd"))CCTK_ERROR("TestArrayGroup: incorrect ubnd data in grid function dynamic data");if (error.at("bbox"))CCTK_ERROR("TestArrayGroup: incorrect bbox data in grid function dynamic data");if (error.at("nghostzones"))CCTK_ERROR("TestArrayGroup: incorrect nghostzones data in grid function ""dynamic data");
if (scalar_data.dim != 0) CCTK_ERROR("TestArrayGroup: incorrect dimension in scalar dynamic data");if (scalar_data.activetimelevels != 1) CCTK_ERROR("TestArrayGroup: incorrect activetimelevels in scalar dynamic data");
if (scalar_data.dim != 0)CCTK_ERROR("TestArrayGroup: incorrect dimension in scalar dynamic data");if (scalar_data.activetimelevels != 1)CCTK_ERROR("TestArrayGroup: incorrect activetimelevels in scalar dynamic data");
if (scalar_data.lsh[i] != -1) error.at("lsh") += 1;if (scalar_data.ash[i] != -1) error.at("ash") += 1;if (scalar_data.gsh[i] != -1) error.at("gsh") += 1;if (scalar_data.lbnd[i] != -1) error.at("lbnd") += 1;if (scalar_data.ubnd[i] != -1) error.at("lbnd") += 1;if (scalar_data.bbox[2*i] != -1) error.at("bbox") += 1;if (scalar_data.bbox[2*i+1] != -1) error.at("bbox") += 1;if (scalar_data.nghostzones[i] != -1) error.at("nghostzones") += 1;
if (scalar_data.lsh[i] != -1)error.at("lsh") += 1;if (scalar_data.ash[i] != -1)error.at("ash") += 1;if (scalar_data.gsh[i] != -1)error.at("gsh") += 1;if (scalar_data.lbnd[i] != -1)error.at("lbnd") += 1;if (scalar_data.ubnd[i] != -1)error.at("lbnd") += 1;if (scalar_data.bbox[2 * i] != -1)error.at("bbox") += 1;if (scalar_data.bbox[2 * i + 1] != -1)error.at("bbox") += 1;if (scalar_data.nghostzones[i] != -1)error.at("nghostzones") += 1;
if (error.at("lsh")) CCTK_ERROR("TestArrayGroup: incorrect lsh data in scalar dynamic data");if (error.at("ash")) CCTK_ERROR("TestArrayGroup: incorrect ash data in scalar dynamic data");if (error.at("gsh")) CCTK_ERROR("TestArrayGroup: incorrect gsh data in scalar dynamic data");if (error.at("lbnd")) CCTK_ERROR("TestArrayGroup: incorrect lbnd data in scalar dynamic data");if (error.at("ubnd")) CCTK_ERROR("TestArrayGroup: incorrect ubnd data in scalar dynamic data");if (error.at("bbox")) CCTK_ERROR("TestArrayGroup: incorrect bbox data in scalar dynamic data");if (error.at("nghostzones")) CCTK_ERROR("TestArrayGroup: incorrect nghostzones data in scalar dynamic data");
if (error.at("lsh"))CCTK_ERROR("TestArrayGroup: incorrect lsh data in scalar dynamic data");if (error.at("ash"))CCTK_ERROR("TestArrayGroup: incorrect ash data in scalar dynamic data");if (error.at("gsh"))CCTK_ERROR("TestArrayGroup: incorrect gsh data in scalar dynamic data");if (error.at("lbnd"))CCTK_ERROR("TestArrayGroup: incorrect lbnd data in scalar dynamic data");if (error.at("ubnd"))CCTK_ERROR("TestArrayGroup: incorrect ubnd data in scalar dynamic data");if (error.at("bbox"))CCTK_ERROR("TestArrayGroup: incorrect bbox data in scalar dynamic data");if (error.at("nghostzones"))CCTK_ERROR("TestArrayGroup: incorrect nghostzones data in scalar dynamic data");
if (array_data.dim != array_group.dim || array_data.dim <= 0) CCTK_ERROR("TestArrayGroup: incorrect dimension in array dynamic data");if (scalar_data.activetimelevels != 1) CCTK_ERROR("TestArrayGroup: incorrect activetimelevels in array dynamic data");
if (array_data.dim != array_group.dim || array_data.dim <= 0)CCTK_ERROR("TestArrayGroup: incorrect dimension in array dynamic data");if (scalar_data.activetimelevels != 1)CCTK_ERROR("TestArrayGroup: incorrect activetimelevels in array dynamic data");
if (array_data.lsh[i] != sz[i]) error.at("lsh") += 1;if (array_data.ash[i] != sz[i]) error.at("ash") += 1;if (array_data.gsh[i] != sz[i]) error.at("gsh") += 1;if (array_data.lbnd[i] != 0) error.at("lbnd") += 1;if (array_data.ubnd[i] != sz[i]-1) error.at("lbnd") += 1;if (array_data.bbox[2*i] != 1) error.at("bbox") += 1;if (array_data.bbox[2*i+1] != 1) error.at("bbox") += 1;if (array_data.nghostzones[i] != 0) error.at("nghostzones") += 1;
if (array_data.lsh[i] != sz[i])error.at("lsh") += 1;if (array_data.ash[i] != sz[i])error.at("ash") += 1;if (array_data.gsh[i] != sz[i])error.at("gsh") += 1;if (array_data.lbnd[i] != 0)error.at("lbnd") += 1;if (array_data.ubnd[i] != sz[i] - 1)error.at("lbnd") += 1;if (array_data.bbox[2 * i] != 1)error.at("bbox") += 1;if (array_data.bbox[2 * i + 1] != 1)error.at("bbox") += 1;if (array_data.nghostzones[i] != 0)error.at("nghostzones") += 1;
if (error.at("lsh")) CCTK_ERROR("TestArrayGroup: incorrect lsh data in array dynamic data");if (error.at("ash")) CCTK_ERROR("TestArrayGroup: incorrect ash data in array dynamic data");if (error.at("gsh")) CCTK_ERROR("TestArrayGroup: incorrect gsh data in array dynamic data");if (error.at("lbnd")) CCTK_ERROR("TestArrayGroup: incorrect lbnd data in array dynamic data");if (error.at("ubnd")) CCTK_ERROR("TestArrayGroup: incorrect ubnd data in array dynamic data");if (error.at("bbox")) CCTK_ERROR("TestArrayGroup: incorrect bbox data in array dynamic data");if (error.at("nghostzones")) CCTK_ERROR("TestArrayGroup: incorrect nghostzones data in array dynamic data");
if (error.at("lsh"))CCTK_ERROR("TestArrayGroup: incorrect lsh data in array dynamic data");if (error.at("ash"))CCTK_ERROR("TestArrayGroup: incorrect ash data in array dynamic data");if (error.at("gsh"))CCTK_ERROR("TestArrayGroup: incorrect gsh data in array dynamic data");if (error.at("lbnd"))CCTK_ERROR("TestArrayGroup: incorrect lbnd data in array dynamic data");if (error.at("ubnd"))CCTK_ERROR("TestArrayGroup: incorrect ubnd data in array dynamic data");if (error.at("bbox"))CCTK_ERROR("TestArrayGroup: incorrect bbox data in array dynamic data");if (error.at("nghostzones"))CCTK_ERROR("TestArrayGroup: incorrect nghostzones data in array dynamic data");