36 static struct unit_info_by_ctrl {
39 int is_specified_ranks;
41 struct unit_info_by_ctrl *next;
53 static struct couple_info_by_ctrl {
58 struct couple_info_by_ctrl *next;
59 } couple_info_root = {
74 static struct boundary_info_by_ctrl {
84 struct boundary_info_by_ctrl *next;
85 } boundary_info_root = {
110 static struct unit_info_by_ctrl *unit_info_current = &unit_info_root;
112 static struct couple_info_by_ctrl *couple_info_current = &couple_info_root;
114 static struct boundary_info_by_ctrl *boundary_info_current =
117 static int n_unit = 0;
119 static int n_couple = 0;
121 static int n_boundary = 0;
125 static void free_link_list_s(
struct link_list_s *r) {
128 for (p = r->
next; p; p = q) {
134 static void free_link_list_i(
struct link_list_i *r) {
137 for (p = r->
next; p; p = q) {
144 struct unit_info_by_ctrl *p;
147 for (p = unit_info_root.next; p; p = p->next) {
148 fprintf(fp,
"Unit ID: %s\n", p->unit_id);
149 fprintf(fp,
"Number of Processes: %d\n", p->n_proc);
150 fprintf(fp,
"Process rank is specified or not: %d\n",
151 p->is_specified_ranks);
152 for (q = p->ranks.next; q; q = q->
next) {
153 fprintf(fp,
"Process Number: %d\n", q->
rank);
159 struct couple_info_by_ctrl *p;
161 for (p = couple_info_root.next; p; p = p->next) {
162 fprintf(fp,
"Couple ID: %s\n", p->couple_id);
163 fprintf(fp,
"Unit1 ID: %s\n", p->unit1_id);
164 fprintf(fp,
"Unit2 ID: %s\n", p->unit2_id);
165 fprintf(fp,
"Couple Type: %d\n", p->couple_type);
170 struct boundary_info_by_ctrl *p;
173 for (p = boundary_info_root.next; p; p = p->next) {
174 fprintf(fp,
"Boundary ID: %s\n", p->boundary_id);
175 fprintf(fp,
"Couple ID: %s\n", p->couple_id);
176 fprintf(fp,
"Direction: %d\n", p->direction);
177 fprintf(fp,
"Interpolation: %d\n", p->interpolation);
178 fprintf(fp,
"Tolerance: %e\n", p->tolerance);
179 fprintf(fp,
"BBcoef: %e\n", p->bbcoef);
180 fprintf(fp,
"BGcoef: %e\n", p->bgcoef);
181 fprintf(fp,
"Unit1 Group: %d\n", p->unit1_grp.n_grp);
182 fprintf(fp,
"Unit1 Group Type (Geometry): %d\n", p->unit1_grp.geom_type);
183 fprintf(fp,
"Unit1 Group Type (Data): %d\n", p->unit1_grp.data_type);
184 for (q = p->unit1_grp.grp_name.next; q; q = q->
next) {
185 fprintf(fp,
"Unit1 Group Name: %s\n", q->
name);
187 fprintf(fp,
"Unit2 Group: %d\n", p->unit2_grp.n_grp);
188 fprintf(fp,
"Unit2 Group Type (Geometry): %d\n", p->unit2_grp.geom_type);
189 fprintf(fp,
"Unit2 Group Type (Data): %d\n", p->unit2_grp.data_type);
190 for (q = p->unit2_grp.grp_name.next; q; q = q->
next) {
191 fprintf(fp,
"Unit2 Group Name: %s\n", q->
name);
198 static struct couple_info_by_ctrl *get_couple_by_id(
const char *couple_id) {
199 struct couple_info_by_ctrl *p;
203 for (p = couple_info_root.next; p; p = p->next) {
204 if ((strcmp(p->couple_id, couple_id)) == 0)
return p;
210 static struct unit_info_by_ctrl *get_unit_by_id(
const char *unit_id) {
211 struct unit_info_by_ctrl *p;
215 for (p = unit_info_root.next; p; p = p->next) {
216 if ((strcmp(p->unit_id, unit_id)) == 0)
return p;
222 static struct boundary_info_by_ctrl *get_boundary_by_id(
223 const char *boundary_id) {
224 struct boundary_info_by_ctrl *p;
226 if (boundary_id ==
NULL)
return NULL;
228 for (p = boundary_info_root.next; p; p = p->next) {
229 if ((strcmp(p->boundary_id, boundary_id)) == 0)
return p;
241 if (unit_ids ==
NULL)
return;
244 for (i = 0; i < unit_ids->
n_unit; i++) {
257 if (couple_ids ==
NULL)
return;
259 if (couple_ids->
ids) {
260 for (i = 0; i < couple_ids->
n_couple; i++) {
273 if (boundary_ids ==
NULL)
return;
275 if (boundary_ids->
ids) {
276 for (i = 0; i < boundary_ids->
n_boundary; i++) {
287 if (proc_info ==
NULL)
return;
297 if (grp_info ==
NULL)
return;
299 for (i = 0; i < grp_info->
n_grp; i++) {
306 static void free_unit(
void) {
307 struct unit_info_by_ctrl *p, *q;
309 for (p = unit_info_root.next; p; p = q) {
311 free_link_list_i(&p->ranks);
314 unit_info_root.next =
NULL;
317 static void free_couple(
void) {
318 struct couple_info_by_ctrl *p, *q;
320 for (p = couple_info_root.next; p; p = q) {
324 couple_info_root.next =
NULL;
327 static void free_boundary(
void) {
328 struct boundary_info_by_ctrl *p, *q;
330 for (p = boundary_info_root.next; p; p = q) {
332 free_link_list_s(&p->unit1_grp.grp_name);
333 free_link_list_s(&p->unit2_grp.grp_name);
336 boundary_info_root.next =
NULL;
347 static int get_unit_name(
char *unit_id) {
354 "line %d: '=' is not found after 'NAME' in '!COUPLE UNIT'",
362 "line %d: Invalid 'NAME' is specified in '!COUPLE UNIT'",
369 "line %d: 'NAME' is too long in '!COUPLE UNIT'",
378 static int get_unit_nproc(
int *n_proc) {
384 "line %d: '=' is not found after 'NPROC' in '!COUPLE UNIT'",
392 "line %d: Invalid 'NPROC' is specified in '!COUPLE UNIT'",
400 "line %d: 'NPROC' in '!COUPLE UNIT' must be natural number (%d)",
408 static int get_unit_ranks(
struct link_list_i *p,
int *counter) {
418 "line %d: Invalid process number is found in '!COUPLE UNIT'",
425 "line %d: Process number in '!COUPLE UNIT' must be "
426 "natural number (%d)",
447 "line %d: Process number must be delimited by ',' in '!COUPLE UNIT'",
456 static int get_unit_1st_line(
struct unit_info_by_ctrl *p) {
458 int is_specified_name = 0;
459 int is_specified_nproc = 0;
473 if (is_specified_name) {
475 "line %d: 'NAME' is re-defined in !COUPLE UNIT",
479 if (get_unit_name(p->unit_id))
return -1;
480 is_specified_name = 1;
483 }
else if (token == HECMW_CTRLLEX_K_NPROC) {
484 if (is_specified_nproc) {
486 "line %d: 'NPROC' is re-defined in !COUPLE UNIT",
490 if (get_unit_nproc(&p->n_proc))
return -1;
491 is_specified_nproc = 1;
506 if (is_specified_name == 0) {
512 if (is_specified_nproc <= 0) {
521 static int get_unit_2nd_line(
struct unit_info_by_ctrl *p) {
535 if (get_unit_ranks(q, &counter))
return -1;
540 if (counter != p->n_proc) {
544 p->is_specified_ranks = 1;
552 struct unit_info_by_ctrl *p;
558 size =
sizeof(
struct unit_info_by_ctrl);
559 unit_info_current->next = (
struct unit_info_by_ctrl *)
HECMW_malloc(size);
560 if (unit_info_current->next ==
NULL) {
564 p = unit_info_current->next;
569 p->ranks.next =
NULL;
573 if (get_unit_1st_line(p))
return -1;
581 if (get_unit_2nd_line(p))
return -1;
583 unit_info_current = p;
591 static int get_couple_name(
char *couple_id) {
598 "line %d: '=' is not found after 'NAME' in '!COUPLE'",
606 "line %d: Invalid 'NAME' is specified in '!COUPLE'",
613 "line %d: 'NAME' in '!COUPLE' is too long",
617 strcpy(couple_id, s);
622 static int get_couple_type(
int *type) {
628 "line %d: '=' is not found after 'TYPE' in '!COUPLE'",
635 if (token == HECMW_CTRLLEX_K_MXN) {
637 }
else if (token == HECMW_CTRLLEX_K_MAXMN) {
639 }
else if (token == HECMW_CTRLLEX_K_MANUAL) {
643 "line %d: Invalid 'TYPE' is specified in '!COUPLE'",
651 static int get_couple_unit1(
char *unit1_id) {
658 "line %d: '=' is not found after 'UNIT1' in '!COUPLE'",
666 "line %d: Invalid 'UNIT1' is specified in '!COUPLE'",
673 "line %d: 'UNIT1' in '!COUPLE' is too long",
677 if (get_unit_by_id(s) ==
NULL) {
686 static int get_couple_unit2(
char *unit2_id) {
693 "line %d: '=' is not found after 'UNIT2' in '!COUPLE'",
701 "line %d: Invalid 'UNIT2' is specified in '!COUPLE'",
708 "line %d: 'UNIT2' in '!COUPLE' is too long",
712 if (get_unit_by_id(s) ==
NULL) {
721 static int get_couple_1st_line(
struct couple_info_by_ctrl *p) {
723 int is_specified_name = 0;
724 int is_specified_type = 0;
725 int is_specified_unit1 = 0;
726 int is_specified_unit2 = 0;
740 if (is_specified_name) {
742 "line %d: 'NAME' is re-defined in '!COUPLE'",
746 if (get_couple_name(p->couple_id))
return -1;
747 is_specified_name = 1;
751 if (is_specified_type) {
753 "line %d: 'TYPE' is re-defined in '!COUPLE'",
757 if (get_couple_type(&p->couple_type))
return -1;
758 is_specified_type = 1;
761 }
else if (token == HECMW_CTRLLEX_K_UNIT1) {
762 if (is_specified_unit1) {
764 "line %d: 'UNIT1' is re-defined in '!COUPLE'",
768 if (get_couple_unit1(p->unit1_id))
return -1;
769 is_specified_unit1 = 1;
772 }
else if (token == HECMW_CTRLLEX_K_UNIT2) {
773 if (is_specified_unit2) {
775 "line %d: 'UNIT2' is re-defined in '!COUPLE'",
779 if (get_couple_unit2(p->unit2_id))
return -1;
780 is_specified_unit2 = 1;
795 if (!is_specified_name) {
801 if (!is_specified_type) {
807 if (!is_specified_unit1) {
813 if (!is_specified_unit2) {
824 struct couple_info_by_ctrl *p;
830 size =
sizeof(
struct couple_info_by_ctrl);
831 couple_info_current->next = (
struct couple_info_by_ctrl *)
HECMW_malloc(size);
832 if (couple_info_current->next ==
NULL) {
836 p = couple_info_current->next;
844 if (get_couple_1st_line(p))
return -1;
846 couple_info_current = p;
854 static int get_boundary_name(
char *boundary_id) {
862 "line %d: '=' is not found after 'NAME' in '!COUPLE BOUNDARY'",
871 "line %d: Invalid 'NAME' is specified in '!COUPLE BOUNDARY'",
878 "line %d: 'NAME' in '!COUPLE BOUNDARY' is too long",
882 strcpy(boundary_id, s);
887 static int get_boundary_couple(
char *couple_id) {
895 "line %d: '=' is not found after 'COUPLE' in '!COUPLE BOUNDARY'",
904 "line %d: Invalid 'COUPLE' is specified in '!COUPLE BOUNDARY'",
911 "line %d: 'COUPLE' is too long in '!COUPLE BOUNDARY'",
915 if (get_couple_by_id(s) ==
NULL) {
919 strcpy(couple_id, s);
924 static int get_boundary_direction(
int *direction) {
931 "line %d: '=' is not found after 'DIRECTION' in '!COUPLE BOUNDARY'",
938 if (token == HECMW_CTRLLEX_K_UNIT1_TO_UNIT2) {
941 HECMW_CTRLLEX_K_UNIT2_TO_UNIT1) {
946 "line %d: Invalid 'DIRECTION' is specified in '!COUPLE BOUNDARY'",
954 static int get_boundary_interpolation(
int *interpolation) {
961 "line %d: '=' is not found after 'INTERPOLATION' in '!COUPLE BOUNDARY'",
974 static int get_boundary_tolerance(
double *tolerance) {
981 "line %d: '=' is not found after 'TOLERANCE' in '!COUPLE BOUNDARY'",
990 "line %d: Invalid 'TOLERANCE' is specified in '!COUPLE BOUNDARY'",
995 if (*tolerance < 0.0) {
997 "line %d: 'TOLERANCE' in '!COUPLE BOUNDARY' must be grater "
998 "than or equal 0 (%e)",
1006 static int get_boundary_bbcoef(
double *bbcoef) {
1013 "line %d: '=' is not found after 'BBCOEF' in '!COUPLE BOUNDARY'",
1022 "line %d: Invalid 'BBCOEF' is specified in '!COUPLE BOUNDARY'",
1027 if (*bbcoef <= 0.0) {
1030 "line %d: 'BBCOEF' in '!COUPLE BOUNDARY' must be grater than 0 (%e)",
1038 static int get_boundary_bgcoef(
double *bgcoef) {
1045 "line %d: '=' is not found after 'BGCOEF' in '!COUPLE BOUNDARY'",
1054 "line %d: Invalid 'BGCOEF' is specified in '!COUPLE BOUNDARY'",
1059 if (*bgcoef <= 0.0) {
1062 "line %d: 'BGCOEF' in '!COUPLE BOUNDARY' must be grater than 0 (%e)",
1070 static int get_boundary_1st_line(
struct boundary_info_by_ctrl *p) {
1072 int is_specified_name = 0;
1073 int is_specified_couple = 0;
1074 int is_specified_direction = 0;
1075 int is_specified_interpolation = 0;
1076 int is_specified_tolrance = 0;
1077 int is_specified_bbcoef = 0;
1078 int is_specified_bgcoef = 0;
1092 if (is_specified_name) {
1094 "line %d: 'NAME' is re-defined in '!COUPLE BOUNDARY'",
1098 if (get_boundary_name(p->boundary_id) !=
HECMW_SUCCESS)
return -1;
1099 is_specified_name = 1;
1102 }
else if (token == HECMW_CTRLLEX_K_COUPLE) {
1103 if (is_specified_couple) {
1105 "line %d: 'COUPLE' is re-defined in '!COUPLE BOUNDARY'",
1109 if (get_boundary_couple(p->couple_id) !=
HECMW_SUCCESS)
return -1;
1110 is_specified_couple = 1;
1113 }
else if (token == HECMW_CTRLLEX_K_DIRECTION) {
1114 if (is_specified_direction) {
1117 "line %d: 'DIRECTION' is re-defined in '!COUPLE BOUNDARY'",
1121 if (get_boundary_direction(&p->direction) !=
HECMW_SUCCESS)
return -1;
1122 is_specified_direction = 1;
1125 }
else if (token == HECMW_CTRLLEX_K_INTERPOLATION) {
1126 if (is_specified_interpolation) {
1129 "line %d: 'INTERPOLATION' is re-defined in '!COUPLE BOUNDARY'",
1133 if (get_boundary_interpolation(&p->interpolation) !=
HECMW_SUCCESS)
1135 is_specified_interpolation = 1;
1138 }
else if (token == HECMW_CTRLLEX_K_TOLERANCE) {
1139 if (is_specified_tolrance) {
1142 "line %d: 'TOLRANCE' is re-defined in '!COUPLE BOUNDARY'",
1146 if (get_boundary_tolerance(&p->tolerance) !=
HECMW_SUCCESS)
return -1;
1147 is_specified_tolrance = 1;
1150 }
else if (token == HECMW_CTRLLEX_K_BBCOEF) {
1151 if (is_specified_bbcoef) {
1153 "line %d: 'BBCOEF' is re-defined in '!COUPLE BOUNDARY'",
1157 if (get_boundary_bbcoef(&p->bbcoef) !=
HECMW_SUCCESS)
return -1;
1158 is_specified_bbcoef = 1;
1161 }
else if (token == HECMW_CTRLLEX_K_BGCOEF) {
1162 if (is_specified_bgcoef) {
1164 "line %d: 'BGCOEF' is re-defined in '!COUPLE BOUNDARY'",
1168 if (get_boundary_bgcoef(&p->bgcoef) !=
HECMW_SUCCESS)
return -1;
1169 is_specified_bgcoef = 1;
1184 if (!is_specified_name) {
1190 if (!is_specified_couple) {
1196 if (!is_specified_direction) {
1207 static int get_boundary_geom(
int *geom_type) {
1214 "line %d: '=' is not found after 'GEOM' in '!UNIT1' or '!UNIT2'",
1221 if (token == HECMW_CTRLLEX_K_NODE) {
1223 }
else if (token == HECMW_CTRLLEX_K_ELEMENT) {
1225 }
else if (token == HECMW_CTRLLEX_K_SURFACE) {
1230 "line %d: Invalid 'GEOM' is specified in '!UNIT1' or '!UNIT2'",
1238 static int get_boundary_data(
int *data_type) {
1245 "line %d: '=' is not found after 'DATA' in '!UNIT1' or '!UNIT2'",
1252 if (token == HECMW_CTRLLEX_K_NODE) {
1254 }
else if (token == HECMW_CTRLLEX_K_ELEMENT) {
1256 }
else if (token == HECMW_CTRLLEX_K_SURFACE) {
1261 "line %d: Invalid 'DATA' is specified in '!UNIT1' or '!UNIT2'",
1269 static int get_boundary_group_inner(
struct link_list_s *p,
int *counter) {
1280 "line %d: Invalid group name is found in '!COUPLE BOUNDARY'",
1287 "line %d: Group name in '!COUPLE BOUNDARY' is too long",
1308 "line %d: Group name must be delimited by ',' in '!COUPLE BOUNDARY'",
1330 if (get_boundary_group_inner(q, &counter) !=
HECMW_SUCCESS)
return -1;
1347 int is_specified_geom = 0;
1348 int is_specified_data = 0;
1361 if (token == HECMW_CTRLLEX_K_GEOM) {
1362 if (is_specified_geom) {
1364 "'GEOM' is re-defined in '!COUPLE BOUNDARY'",
1368 if (get_boundary_geom(&p->
geom_type))
return -1;
1369 is_specified_geom = 1;
1372 }
else if (token == HECMW_CTRLLEX_K_DATA) {
1373 if (is_specified_data) {
1375 "'DATA' is re-defined in '!COUPLE BOUNDARY'",
1379 if (get_boundary_data(&p->
data_type))
return -1;
1380 is_specified_data = 1;
1394 if (!is_specified_geom) {
1399 if (!is_specified_data) {
1409 "line %d: NODE is specified in 'GEOM', but 'DATA' is not NODE",
1417 "line %d: ELEMENT is specified in 'GEOM', but 'DATA' is "
1418 "not NODE or ELEMENT",
1426 "line %d: SURFACE is specified in 'GEOM', but 'DATA' is "
1427 "not NODE or SURFACE",
1438 static int get_boundary_2nd_line(
struct boundary_info_by_ctrl *p) {
1440 int is_specified_unit1 = 0;
1441 int is_specified_unit2 = 0;
1447 if (token == HECMW_CTRLLEX_H_UNIT1) {
1448 if (get_boundary_unit_1st_line(&p->unit1_grp))
return -1;
1449 if (get_boundary_unit_2nd_line(&p->unit1_grp))
return -1;
1450 is_specified_unit1 = 1;
1455 if (token == HECMW_CTRLLEX_H_UNIT2) {
1456 if (get_boundary_unit_1st_line(&p->unit2_grp))
return -1;
1457 if (get_boundary_unit_2nd_line(&p->unit2_grp))
return -1;
1458 is_specified_unit2 = 1;
1462 }
else if (token == HECMW_CTRLLEX_H_UNIT2) {
1463 if (get_boundary_unit_1st_line(&p->unit2_grp))
return -1;
1464 if (get_boundary_unit_2nd_line(&p->unit2_grp))
return -1;
1465 is_specified_unit2 = 1;
1470 if (token == HECMW_CTRLLEX_H_UNIT1) {
1471 if (get_boundary_unit_1st_line(&p->unit1_grp))
return -1;
1472 if (get_boundary_unit_1st_line(&p->unit2_grp))
return -1;
1473 is_specified_unit1 = 1;
1483 if (!is_specified_unit1) {
1488 if (!is_specified_unit2) {
1499 struct boundary_info_by_ctrl *p;
1502 HECMW_assert(token == HECMW_CTRLLEX_H_COUPLE_BOUNDARY);
1505 size =
sizeof(
struct boundary_info_by_ctrl);
1506 boundary_info_current->next =
1508 if (boundary_info_current->next ==
NULL) {
1512 p = boundary_info_current->next;
1521 p->unit1_grp.n_grp = 0;
1525 p->unit1_grp.grp_name.next =
NULL;
1526 p->unit2_grp.n_grp = 0;
1530 p->unit2_grp.grp_name.next =
NULL;
1534 if (get_boundary_1st_line(p))
return -1;
1541 if (get_boundary_2nd_line(p))
return -1;
1543 boundary_info_current = p;
1559 struct unit_info_by_ctrl *p;
1564 if (unit_ids ==
NULL) {
1571 if (
n_unit == 0)
return unit_ids;
1579 for (i = 0; i <
n_unit; i++) {
1582 for (n = 0, p = unit_info_root.next; p; p = p->next, n++) {
1584 if (unit_ids->
ids[n] ==
NULL) {
1596 struct couple_info_by_ctrl *p;
1601 if (couple_ids ==
NULL) {
1608 if (
n_couple == 0)
return couple_ids;
1611 if (couple_ids->
ids ==
NULL) {
1619 for (n = 0, p = couple_info_root.next; p; p = p->next, n++) {
1621 if (couple_ids->
ids[n] ==
NULL) {
1634 struct boundary_info_by_ctrl *p;
1639 if (boundary_ids ==
NULL) {
1649 if (boundary_ids->
ids ==
NULL) {
1657 for (n = 0, p = boundary_info_root.next; p; p = p->next, n++) {
1659 if (boundary_ids->
ids[n] ==
NULL) {
1666 return boundary_ids;
1670 int unit_specifier,
char *buf,
1673 char *retbuf, *unit_id;
1674 struct couple_info_by_ctrl *p;
1676 if (couple_id ==
NULL) {
1678 "Invalid NULL pointer is found (couple_id)");
1682 p = get_couple_by_id(couple_id);
1689 unit_id = p->unit1_id;
1691 unit_id = p->unit2_id;
1698 if (retbuf ==
NULL) {
1703 len = strlen(unit_id);
1704 if (bufsize <= len) {
1707 strncpy(buf, unit_id, len);
1719 struct boundary_info_by_ctrl *p;
1721 if (boundary_id ==
NULL) {
1723 "Invalid NULL pointer is found (boundary_id)");
1727 p = get_boundary_by_id(boundary_id);
1735 if (retbuf ==
NULL) {
1740 len = strlen(p->couple_id);
1741 if (bufsize <= len) {
1744 strncpy(buf, p->couple_id, len);
1753 const char *unit_id) {
1756 struct unit_info_by_ctrl *p;
1759 if (unit_id ==
NULL) {
1761 "Invalid NULL pointer is found (unit_id)");
1765 p = get_unit_by_id(unit_id);
1773 if (proc_info ==
NULL) {
1777 proc_info->
n_proc = p->n_proc;
1789 for (n = 0, q = p->ranks.next; q; q = q->
next, n++) {
1797 struct couple_info_by_ctrl *p;
1799 if (couple_id ==
NULL) {
1804 p = get_couple_by_id(couple_id);
1809 *couple_type = p->couple_type;
1816 struct boundary_info_by_ctrl *p;
1818 if (boundary_id ==
NULL) {
1820 "Invalid NULL pointer is found (boundary_id)");
1824 p = get_boundary_by_id(boundary_id);
1829 *direction = p->direction;
1835 double *tolerance) {
1836 struct boundary_info_by_ctrl *p;
1838 if (boundary_id ==
NULL) {
1840 "Invalid NULL pointer is found (boundary_id)");
1844 p = get_boundary_by_id(boundary_id);
1849 *tolerance = p->tolerance;
1856 struct boundary_info_by_ctrl *p;
1858 if (boundary_id ==
NULL) {
1860 "Invalid NULL pointer is found (boundary_id)");
1864 p = get_boundary_by_id(boundary_id);
1869 *bbcoef = p->bbcoef;
1876 struct boundary_info_by_ctrl *p;
1878 if (boundary_id ==
NULL) {
1880 "Invalid NULL pointer is found (boundary_id)");
1884 p = get_boundary_by_id(boundary_id);
1889 *bgcoef = p->bgcoef;
1895 const char *boundary_id,
int unit_specifier) {
1899 struct boundary_info_by_ctrl *p;
1902 if (boundary_id ==
NULL) {
1904 "Invalid NULL pointer is found (boundary_id)");
1910 "Unrecognized unit specifier is found (unit_specifier)");
1914 p = get_boundary_by_id(boundary_id);
1921 grp_info_ctrl = &p->unit1_grp;
1923 grp_info_ctrl = &p->unit2_grp;
1931 if (grp_info ==
NULL) {
1945 for (i = 0; i < grp_info->
n_grp; i++) {