44 if (p ==
NULL)
return;
62 if (mapped_point ==
NULL)
return NULL;
64 mapped_point->
n = boundary_dst->
node->
n;
84 for (i = 0; i < boundary_dst->
node->
n; i++) {
86 mapped_point->
item[i] = node;
87 mapped_point->
id[i] = i;
88 mapped_point->
coord[3 * i] = mesh_dst->
node[3 * (node - 1)];
89 mapped_point->
coord[3 * i + 1] = mesh_dst->
node[3 * (node - 1) + 1];
90 mapped_point->
coord[3 * i + 2] = mesh_dst->
node[3 * (node - 1) + 2];
104 double coord_x_sum, coord_y_sum, coord_z_sum;
105 int elem, node, max_node, i, j;
108 if (mapped_point ==
NULL)
return NULL;
110 mapped_point->
n = boundary_dst->
elem->
n;
119 if (mapped_point->
id ==
NULL) {
123 mapped_point->
coord =
130 for (i = 0; i < mapped_point->
n; i++) {
131 coord_x_sum = coord_y_sum = coord_z_sum = 0.0;
135 j < mesh_dst->elem_node_index[elem]; j++) {
137 coord_x_sum += mesh_dst->
node[3 * (node - 1)];
138 coord_y_sum += mesh_dst->
node[3 * (node - 1) + 1];
139 coord_z_sum += mesh_dst->
node[3 * (node - 1) + 2];
141 mapped_point->
item[i] = elem;
142 mapped_point->
id[i] = i;
143 mapped_point->
coord[3 * i] = coord_x_sum / max_node;
144 mapped_point->
coord[3 * i + 1] = coord_x_sum / max_node;
145 mapped_point->
coord[3 * i + 2] = coord_x_sum / max_node;
176 if (mesh_dst ==
NULL) {
178 "Invalid NULL pointer is found (mesh_dst)");
181 if (boundary_dst ==
NULL) {
183 "Invalid NULL pointer is found (boundary_dst)");
190 if ((mapped_point = set_mapped_point_by_node(mesh_dst, boundary_dst)) ==