26 #ifndef OOMPH_BRICK_FROM_TET_MESH_TEMPLATE_CC
27 #define OOMPH_BRICK_FROM_TET_MESH_TEMPLATE_CC
38 template<
class ELEMENT>
43 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(3, 3);
46 bool tet_mesh_is_solid_mesh =
false;
49 tet_mesh_is_solid_mesh =
true;
57 for (
unsigned i = 0;
i < 19;
i++)
133 s_face[
i][0] = 1.0 / 3.0;
134 s_face[
i][1] = 1.0 / 3.0;
141 s_face[
i][0] = 5.0 / 24.0;
142 s_face[
i][1] = 5.0 / 24.0;
146 s_face[
i][0] = 5.0 / 12.0;
147 s_face[
i][1] = 5.0 / 12.0;
153 s_face[
i][1] = 5.0 / 24.0;
154 s_face[
i][0] = 7.0 / 12.0;
158 s_face[
i][1] = 5.0 / 12.0;
159 s_face[
i][0] = 1.0 / 6.0;
166 s_face[
i][0] = 5.0 / 24.0;
167 s_face[
i][1] = 7.0 / 12.0;
171 s_face[
i][0] = 5.0 / 12.0;
172 s_face[
i][1] = 1.0 / 6.0;
178 unsigned nb = tet_mesh_pt->nboundary();
182 Boundary_element_pt.resize(nb);
183 Face_index_at_boundary.resize(nb);
188 std::map<Node*, Node*> tet_node_node_pt;
191 std::map<Edge, Node*> brick_edge_node_pt;
194 std::map<TFace, Node*> tet_face_node_pt;
199 for (
unsigned e = 0;
e < 4;
e++)
202 for (
unsigned j = 0; j < 8; j++)
204 dummy_q_el_pt[
e]->construct_node(j);
209 unsigned n_el_tet = tet_mesh_pt->nelement();
210 for (
unsigned e_tet = 0; e_tet < n_el_tet; e_tet++)
219 std::ostringstream error_stream;
221 <<
"BrickFromTetMesh can only built from tet mesh containing\n"
222 <<
"ten-noded tets.\n";
224 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
229 Node* centroid_node_pt = 0;
232 Node* top_mid_face_node0_pt = 0;
233 Node* right_mid_face_node0_pt = 0;
234 Node* back_mid_face_node0_pt = 0;
236 Node* top_mid_face_node1_pt = 0;
237 Node* right_mid_face_node1_pt = 0;
239 Node* top_mid_face_node2_pt = 0;
252 for (
unsigned j = 0; j < 8; j++)
254 Node* nod_pt = dummy_q_el_pt[0]->node_pt(j);
260 tet_el_pt->local_coordinate_of_node(0, s_tet);
264 tet_el_pt->interpolated_x(s_tet, x_tet);
265 nod_pt->
x(0) = x_tet[0];
266 nod_pt->
x(1) = x_tet[1];
267 nod_pt->
x(2) = x_tet[2];
270 tet_el_pt->local_coordinate_of_node(4, s_tet);
274 tet_el_pt->interpolated_x(s_tet, x_tet);
275 nod_pt->
x(0) = x_tet[0];
276 nod_pt->
x(1) = x_tet[1];
277 nod_pt->
x(2) = x_tet[2];
280 tet_el_pt->local_coordinate_of_node(6, s_tet);
284 tet_el_pt->interpolated_x(s_tet, x_tet);
285 nod_pt->
x(0) = x_tet[0];
286 nod_pt->
x(1) = x_tet[1];
287 nod_pt->
x(2) = x_tet[2];
292 s_tet[0] = 1.0 / 3.0;
293 s_tet[1] = 1.0 / 3.0;
298 tet_el_pt->interpolated_x(s_tet, x_tet);
299 nod_pt->
x(0) = x_tet[0];
300 nod_pt->
x(1) = x_tet[1];
301 nod_pt->
x(2) = x_tet[2];
304 tet_el_pt->local_coordinate_of_node(5, s_tet);
308 tet_el_pt->interpolated_x(s_tet, x_tet);
309 nod_pt->
x(0) = x_tet[0];
310 nod_pt->
x(1) = x_tet[1];
311 nod_pt->
x(2) = x_tet[2];
316 s_tet[0] = 1.0 / 3.0;
317 s_tet[1] = 1.0 / 3.0;
318 s_tet[2] = 1.0 / 3.0;
322 tet_el_pt->interpolated_x(s_tet, x_tet);
323 nod_pt->
x(0) = x_tet[0];
324 nod_pt->
x(1) = x_tet[1];
325 nod_pt->
x(2) = x_tet[2];
330 s_tet[0] = 1.0 / 3.0;
332 s_tet[2] = 1.0 / 3.0;
336 tet_el_pt->interpolated_x(s_tet, x_tet);
337 nod_pt->
x(0) = x_tet[0];
338 nod_pt->
x(1) = x_tet[1];
339 nod_pt->
x(2) = x_tet[2];
349 tet_el_pt->interpolated_x(s_tet, x_tet);
350 nod_pt->
x(0) = x_tet[0];
351 nod_pt->
x(1) = x_tet[1];
352 nod_pt->
x(2) = x_tet[2];
360 brick_el0_pt = el_pt;
361 Element_pt.push_back(el_pt);
364 tet_el_pt->node_pt(0), tet_el_pt->node_pt(1), tet_el_pt->node_pt(2));
367 tet_el_pt->node_pt(0), tet_el_pt->node_pt(2), tet_el_pt->node_pt(3));
370 tet_el_pt->node_pt(0), tet_el_pt->node_pt(1), tet_el_pt->node_pt(3));
375 tet_edge_node[0].resize(2);
376 tet_edge_node[0][0] = 4;
377 tet_edge_node[0][1] = 1;
378 tet_edge_node[1].resize(2);
379 tet_edge_node[1][0] = 6;
380 tet_edge_node[1][1] = 3;
381 tet_edge_node[2].resize(2);
382 tet_edge_node[2][0] = 5;
383 tet_edge_node[2][1] = 2;
386 unsigned central_tet_vertex = 0;
388 Node* tet_node_pt = 0;
389 Node* old_node_pt = 0;
396 tet_node_pt = tet_el_pt->node_pt(central_tet_vertex);
397 old_node_pt = tet_node_node_pt[tet_node_pt];
398 if (old_node_pt == 0)
400 Node* new_node_pt = 0;
409 tet_node_node_pt[tet_node_pt] = new_node_pt;
410 Node_pt.push_back(new_node_pt);
415 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
416 tet_el_pt->interpolated_x(s_tet, x_tet);
417 new_node_pt->
x(0) = x_tet[0];
418 new_node_pt->
x(1) = x_tet[1];
419 new_node_pt->
x(2) = x_tet[2];
424 el_pt->
node_pt(j) = old_node_pt;
434 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[0][0]);
435 old_node_pt = tet_node_node_pt[tet_node_pt];
436 if (old_node_pt == 0)
438 Node* new_node_pt = 0;
447 tet_node_node_pt[tet_node_pt] = new_node_pt;
448 Node_pt.push_back(new_node_pt);
453 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
454 tet_el_pt->interpolated_x(s_tet, x_tet);
455 new_node_pt->
x(0) = x_tet[0];
456 new_node_pt->
x(1) = x_tet[1];
457 new_node_pt->
x(2) = x_tet[2];
462 el_pt->
node_pt(j) = old_node_pt;
472 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[1][0]);
473 old_node_pt = tet_node_node_pt[tet_node_pt];
474 if (old_node_pt == 0)
476 Node* new_node_pt = 0;
485 tet_node_node_pt[tet_node_pt] = new_node_pt;
486 Node_pt.push_back(new_node_pt);
491 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
492 tet_el_pt->interpolated_x(s_tet, x_tet);
493 new_node_pt->
x(0) = x_tet[0];
494 new_node_pt->
x(1) = x_tet[1];
495 new_node_pt->
x(2) = x_tet[2];
500 el_pt->
node_pt(j) = old_node_pt;
510 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[2][0]);
511 old_node_pt = tet_node_node_pt[tet_node_pt];
512 if (old_node_pt == 0)
514 Node* new_node_pt = 0;
523 tet_node_node_pt[tet_node_pt] = new_node_pt;
524 Node_pt.push_back(new_node_pt);
529 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
530 tet_el_pt->interpolated_x(s_tet, x_tet);
531 new_node_pt->
x(0) = x_tet[0];
532 new_node_pt->
x(1) = x_tet[1];
533 new_node_pt->
x(2) = x_tet[2];
538 el_pt->
node_pt(j) = old_node_pt;
549 old_node_pt = tet_face_node_pt[
face0];
550 if (old_node_pt == 0)
552 Node* new_node_pt = 0;
553 if (
face0.is_boundary_face())
561 tet_face_node_pt[
face0] = new_node_pt;
562 Node_pt.push_back(new_node_pt);
567 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
568 tet_el_pt->interpolated_x(s_tet, x_tet);
569 new_node_pt->
x(0) = x_tet[0];
570 new_node_pt->
x(1) = x_tet[1];
571 new_node_pt->
x(2) = x_tet[2];
576 el_pt->
node_pt(j) = old_node_pt;
586 old_node_pt = tet_face_node_pt[
face1];
587 if (old_node_pt == 0)
589 Node* new_node_pt = 0;
590 if (
face1.is_boundary_face())
598 tet_face_node_pt[
face1] = new_node_pt;
599 Node_pt.push_back(new_node_pt);
604 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
605 tet_el_pt->interpolated_x(s_tet, x_tet);
606 new_node_pt->
x(0) = x_tet[0];
607 new_node_pt->
x(1) = x_tet[1];
608 new_node_pt->
x(2) = x_tet[2];
613 el_pt->
node_pt(j) = old_node_pt;
623 old_node_pt = tet_face_node_pt[
face2];
624 if (old_node_pt == 0)
626 Node* new_node_pt = 0;
627 if (
face2.is_boundary_face())
635 tet_face_node_pt[
face2] = new_node_pt;
636 Node_pt.push_back(new_node_pt);
641 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
642 tet_el_pt->interpolated_x(s_tet, x_tet);
643 new_node_pt->
x(0) = x_tet[0];
644 new_node_pt->
x(1) = x_tet[1];
645 new_node_pt->
x(2) = x_tet[2];
650 el_pt->
node_pt(j) = old_node_pt;
662 centroid_node_pt = new_node_pt;
663 Node_pt.push_back(new_node_pt);
668 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
669 tet_el_pt->interpolated_x(s_tet, x_tet);
670 new_node_pt->
x(0) = x_tet[0];
671 new_node_pt->
x(1) = x_tet[1];
672 new_node_pt->
x(2) = x_tet[2];
684 Node_pt.push_back(new_node_pt);
689 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
690 tet_el_pt->interpolated_x(s_tet, x_tet);
691 new_node_pt->
x(0) = x_tet[0];
692 new_node_pt->
x(1) = x_tet[1];
693 new_node_pt->
x(2) = x_tet[2];
703 old_node_pt = brick_edge_node_pt[edge];
704 if (old_node_pt == 0)
706 Node* new_node_pt = 0;
715 brick_edge_node_pt[edge] = new_node_pt;
716 Node_pt.push_back(new_node_pt);
721 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
722 tet_el_pt->interpolated_x(s_tet, x_tet);
723 new_node_pt->
x(0) = x_tet[0];
724 new_node_pt->
x(1) = x_tet[1];
725 new_node_pt->
x(2) = x_tet[2];
730 el_pt->
node_pt(j) = old_node_pt;
741 old_node_pt = brick_edge_node_pt[edge];
742 if (old_node_pt == 0)
744 Node* new_node_pt = 0;
753 brick_edge_node_pt[edge] = new_node_pt;
754 Node_pt.push_back(new_node_pt);
759 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
760 tet_el_pt->interpolated_x(s_tet, x_tet);
761 new_node_pt->
x(0) = x_tet[0];
762 new_node_pt->
x(1) = x_tet[1];
763 new_node_pt->
x(2) = x_tet[2];
768 el_pt->
node_pt(j) = old_node_pt;
778 old_node_pt = brick_edge_node_pt[edge];
779 if (old_node_pt == 0)
781 Node* new_node_pt = 0;
790 brick_edge_node_pt[edge] = new_node_pt;
791 Node_pt.push_back(new_node_pt);
796 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
797 tet_el_pt->interpolated_x(s_tet, x_tet);
798 new_node_pt->
x(0) = x_tet[0];
799 new_node_pt->
x(1) = x_tet[1];
800 new_node_pt->
x(2) = x_tet[2];
805 el_pt->
node_pt(j) = old_node_pt;
815 old_node_pt = brick_edge_node_pt[edge];
816 if (old_node_pt == 0)
818 Node* new_node_pt = 0;
827 brick_edge_node_pt[edge] = new_node_pt;
828 Node_pt.push_back(new_node_pt);
833 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
834 tet_el_pt->interpolated_x(s_tet, x_tet);
835 new_node_pt->
x(0) = x_tet[0];
836 new_node_pt->
x(1) = x_tet[1];
837 new_node_pt->
x(2) = x_tet[2];
842 el_pt->
node_pt(j) = old_node_pt;
852 old_node_pt = brick_edge_node_pt[edge];
853 if (old_node_pt == 0)
855 Node* new_node_pt = 0;
864 brick_edge_node_pt[edge] = new_node_pt;
865 Node_pt.push_back(new_node_pt);
870 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
871 tet_el_pt->interpolated_x(s_tet, x_tet);
872 new_node_pt->
x(0) = x_tet[0];
873 new_node_pt->
x(1) = x_tet[1];
874 new_node_pt->
x(2) = x_tet[2];
879 el_pt->
node_pt(j) = old_node_pt;
890 old_node_pt = brick_edge_node_pt[edge];
891 if (old_node_pt == 0)
893 Node* new_node_pt = 0;
902 brick_edge_node_pt[edge] = new_node_pt;
903 Node_pt.push_back(new_node_pt);
908 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
909 tet_el_pt->interpolated_x(s_tet, x_tet);
910 new_node_pt->
x(0) = x_tet[0];
911 new_node_pt->
x(1) = x_tet[1];
912 new_node_pt->
x(2) = x_tet[2];
917 el_pt->
node_pt(j) = old_node_pt;
927 old_node_pt = brick_edge_node_pt[edge];
928 if (old_node_pt == 0)
930 Node* new_node_pt = 0;
939 brick_edge_node_pt[edge] = new_node_pt;
940 Node_pt.push_back(new_node_pt);
945 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
946 tet_el_pt->interpolated_x(s_tet, x_tet);
947 new_node_pt->
x(0) = x_tet[0];
948 new_node_pt->
x(1) = x_tet[1];
949 new_node_pt->
x(2) = x_tet[2];
954 el_pt->
node_pt(j) = old_node_pt;
965 old_node_pt = brick_edge_node_pt[edge];
966 if (old_node_pt == 0)
968 Node* new_node_pt = 0;
977 brick_edge_node_pt[edge] = new_node_pt;
978 Node_pt.push_back(new_node_pt);
983 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
984 tet_el_pt->interpolated_x(s_tet, x_tet);
985 new_node_pt->
x(0) = x_tet[0];
986 new_node_pt->
x(1) = x_tet[1];
987 new_node_pt->
x(2) = x_tet[2];
992 el_pt->
node_pt(j) = old_node_pt;
1002 old_node_pt = brick_edge_node_pt[edge];
1003 if (old_node_pt == 0)
1005 Node* new_node_pt = 0;
1014 brick_edge_node_pt[edge] = new_node_pt;
1015 Node_pt.push_back(new_node_pt);
1020 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
1021 tet_el_pt->interpolated_x(s_tet, x_tet);
1022 new_node_pt->
x(0) = x_tet[0];
1023 new_node_pt->
x(1) = x_tet[1];
1024 new_node_pt->
x(2) = x_tet[2];
1029 el_pt->
node_pt(j) = old_node_pt;
1040 old_node_pt = brick_edge_node_pt[edge];
1041 if (old_node_pt == 0)
1043 Node* new_node_pt = 0;
1052 brick_edge_node_pt[edge] = new_node_pt;
1053 Node_pt.push_back(new_node_pt);
1058 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
1059 tet_el_pt->interpolated_x(s_tet, x_tet);
1060 new_node_pt->
x(0) = x_tet[0];
1061 new_node_pt->
x(1) = x_tet[1];
1062 new_node_pt->
x(2) = x_tet[2];
1067 el_pt->
node_pt(j) = old_node_pt;
1078 old_node_pt = brick_edge_node_pt[edge];
1079 if (old_node_pt == 0)
1081 Node* new_node_pt = 0;
1090 brick_edge_node_pt[edge] = new_node_pt;
1091 Node_pt.push_back(new_node_pt);
1096 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
1097 tet_el_pt->interpolated_x(s_tet, x_tet);
1098 new_node_pt->
x(0) = x_tet[0];
1099 new_node_pt->
x(1) = x_tet[1];
1100 new_node_pt->
x(2) = x_tet[2];
1105 el_pt->
node_pt(j) = old_node_pt;
1116 old_node_pt = brick_edge_node_pt[edge];
1117 if (old_node_pt == 0)
1119 Node* new_node_pt = 0;
1128 brick_edge_node_pt[edge] = new_node_pt;
1129 Node_pt.push_back(new_node_pt);
1134 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
1135 tet_el_pt->interpolated_x(s_tet, x_tet);
1136 new_node_pt->
x(0) = x_tet[0];
1137 new_node_pt->
x(1) = x_tet[1];
1138 new_node_pt->
x(2) = x_tet[2];
1143 el_pt->
node_pt(j) = old_node_pt;
1154 TFace face(tet_el_pt->node_pt(central_tet_vertex),
1155 tet_el_pt->node_pt(tet_edge_node[0][0]),
1156 tet_el_pt->node_pt(tet_edge_node[2][0]));
1158 old_node_pt = tet_face_node_pt[face];
1159 if (old_node_pt == 0)
1161 Node* new_node_pt = 0;
1170 tet_face_node_pt[face] = new_node_pt;
1171 Node_pt.push_back(new_node_pt);
1176 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
1177 tet_el_pt->interpolated_x(s_tet, x_tet);
1178 new_node_pt->
x(0) = x_tet[0];
1179 new_node_pt->
x(1) = x_tet[1];
1180 new_node_pt->
x(2) = x_tet[2];
1185 el_pt->
node_pt(j) = old_node_pt;
1196 TFace face(tet_el_pt->node_pt(central_tet_vertex),
1197 tet_el_pt->node_pt(tet_edge_node[1][0]),
1198 tet_el_pt->node_pt(tet_edge_node[2][0]));
1200 old_node_pt = tet_face_node_pt[face];
1201 if (old_node_pt == 0)
1203 Node* new_node_pt = 0;
1212 tet_face_node_pt[face] = new_node_pt;
1213 Node_pt.push_back(new_node_pt);
1218 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
1219 tet_el_pt->interpolated_x(s_tet, x_tet);
1220 new_node_pt->
x(0) = x_tet[0];
1221 new_node_pt->
x(1) = x_tet[1];
1222 new_node_pt->
x(2) = x_tet[2];
1227 el_pt->
node_pt(j) = old_node_pt;
1238 TFace face(tet_el_pt->node_pt(central_tet_vertex),
1239 tet_el_pt->node_pt(tet_edge_node[0][0]),
1240 tet_el_pt->node_pt(tet_edge_node[1][0]));
1242 old_node_pt = tet_face_node_pt[face];
1243 if (old_node_pt == 0)
1245 Node* new_node_pt = 0;
1254 tet_face_node_pt[face] = new_node_pt;
1255 Node_pt.push_back(new_node_pt);
1260 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
1261 tet_el_pt->interpolated_x(s_tet, x_tet);
1262 new_node_pt->
x(0) = x_tet[0];
1263 new_node_pt->
x(1) = x_tet[1];
1264 new_node_pt->
x(2) = x_tet[2];
1269 el_pt->
node_pt(j) = old_node_pt;
1278 Node_pt.push_back(new_node_pt);
1283 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
1284 top_mid_face_node0_pt = new_node_pt;
1285 tet_el_pt->interpolated_x(s_tet, x_tet);
1286 new_node_pt->
x(0) = x_tet[0];
1287 new_node_pt->
x(1) = x_tet[1];
1288 new_node_pt->
x(2) = x_tet[2];
1296 Node_pt.push_back(new_node_pt);
1301 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
1302 right_mid_face_node0_pt = new_node_pt;
1303 tet_el_pt->interpolated_x(s_tet, x_tet);
1304 new_node_pt->
x(0) = x_tet[0];
1305 new_node_pt->
x(1) = x_tet[1];
1306 new_node_pt->
x(2) = x_tet[2];
1314 Node_pt.push_back(new_node_pt);
1319 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
1320 back_mid_face_node0_pt = new_node_pt;
1321 tet_el_pt->interpolated_x(s_tet, x_tet);
1322 new_node_pt->
x(0) = x_tet[0];
1323 new_node_pt->
x(1) = x_tet[1];
1324 new_node_pt->
x(2) = x_tet[2];
1333 for (
unsigned j = 0; j < 8; j++)
1335 Node* nod_pt = dummy_q_el_pt[1]->node_pt(j);
1341 tet_el_pt->local_coordinate_of_node(1, s_tet);
1345 tet_el_pt->interpolated_x(s_tet, x_tet);
1346 nod_pt->
x(0) = x_tet[0];
1347 nod_pt->
x(1) = x_tet[1];
1348 nod_pt->
x(2) = x_tet[2];
1351 tet_el_pt->local_coordinate_of_node(9, s_tet);
1355 tet_el_pt->interpolated_x(s_tet, x_tet);
1356 nod_pt->
x(0) = x_tet[0];
1357 nod_pt->
x(1) = x_tet[1];
1358 nod_pt->
x(2) = x_tet[2];
1361 tet_el_pt->local_coordinate_of_node(4, s_tet);
1365 tet_el_pt->interpolated_x(s_tet, x_tet);
1366 nod_pt->
x(0) = x_tet[0];
1367 nod_pt->
x(1) = x_tet[1];
1368 nod_pt->
x(2) = x_tet[2];
1373 s_tet[0] = 1.0 / 3.0;
1374 s_tet[1] = 1.0 / 3.0;
1379 tet_el_pt->interpolated_x(s_tet, x_tet);
1380 nod_pt->
x(0) = x_tet[0];
1381 nod_pt->
x(1) = x_tet[1];
1382 nod_pt->
x(2) = x_tet[2];
1385 tet_el_pt->local_coordinate_of_node(7, s_tet);
1389 tet_el_pt->interpolated_x(s_tet, x_tet);
1390 nod_pt->
x(0) = x_tet[0];
1391 nod_pt->
x(1) = x_tet[1];
1392 nod_pt->
x(2) = x_tet[2];
1398 s_tet[1] = 1.0 / 3.0;
1399 s_tet[2] = 1.0 / 3.0;
1403 tet_el_pt->interpolated_x(s_tet, x_tet);
1404 nod_pt->
x(0) = x_tet[0];
1405 nod_pt->
x(1) = x_tet[1];
1406 nod_pt->
x(2) = x_tet[2];
1411 s_tet[0] = 1.0 / 3.0;
1412 s_tet[1] = 1.0 / 3.0;
1413 s_tet[2] = 1.0 / 3.0;
1417 tet_el_pt->interpolated_x(s_tet, x_tet);
1418 nod_pt->
x(0) = x_tet[0];
1419 nod_pt->
x(1) = x_tet[1];
1420 nod_pt->
x(2) = x_tet[2];
1430 tet_el_pt->interpolated_x(s_tet, x_tet);
1431 nod_pt->
x(0) = x_tet[0];
1432 nod_pt->
x(1) = x_tet[1];
1433 nod_pt->
x(2) = x_tet[2];
1441 brick_el1_pt = el_pt;
1442 Element_pt.push_back(el_pt);
1445 tet_el_pt->node_pt(1), tet_el_pt->node_pt(3), tet_el_pt->node_pt(2));
1448 tet_el_pt->node_pt(1), tet_el_pt->node_pt(0), tet_el_pt->node_pt(2));
1451 tet_el_pt->node_pt(1), tet_el_pt->node_pt(0), tet_el_pt->node_pt(3));
1455 tet_edge_node[0].resize(2);
1456 tet_edge_node[0][0] = 9;
1457 tet_edge_node[0][1] = 3;
1458 tet_edge_node[1].resize(2);
1459 tet_edge_node[1][0] = 4;
1460 tet_edge_node[1][1] = 0;
1461 tet_edge_node[2].resize(2);
1462 tet_edge_node[2][0] = 7;
1463 tet_edge_node[2][1] = 2;
1466 unsigned central_tet_vertex = 1;
1468 Node* tet_node_pt = 0;
1469 Node* old_node_pt = 0;
1476 tet_node_pt = tet_el_pt->node_pt(central_tet_vertex);
1477 old_node_pt = tet_node_node_pt[tet_node_pt];
1478 if (old_node_pt == 0)
1480 Node* new_node_pt = 0;
1489 tet_node_node_pt[tet_node_pt] = new_node_pt;
1490 Node_pt.push_back(new_node_pt);
1495 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
1496 tet_el_pt->interpolated_x(s_tet, x_tet);
1497 new_node_pt->
x(0) = x_tet[0];
1498 new_node_pt->
x(1) = x_tet[1];
1499 new_node_pt->
x(2) = x_tet[2];
1504 el_pt->
node_pt(j) = old_node_pt;
1514 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[0][0]);
1515 old_node_pt = tet_node_node_pt[tet_node_pt];
1516 if (old_node_pt == 0)
1518 Node* new_node_pt = 0;
1527 tet_node_node_pt[tet_node_pt] = new_node_pt;
1528 Node_pt.push_back(new_node_pt);
1533 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
1534 tet_el_pt->interpolated_x(s_tet, x_tet);
1535 new_node_pt->
x(0) = x_tet[0];
1536 new_node_pt->
x(1) = x_tet[1];
1537 new_node_pt->
x(2) = x_tet[2];
1542 el_pt->
node_pt(j) = old_node_pt;
1552 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[1][0]);
1553 old_node_pt = tet_node_node_pt[tet_node_pt];
1554 if (old_node_pt == 0)
1556 Node* new_node_pt = 0;
1565 tet_node_node_pt[tet_node_pt] = new_node_pt;
1566 Node_pt.push_back(new_node_pt);
1571 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
1572 tet_el_pt->interpolated_x(s_tet, x_tet);
1573 new_node_pt->
x(0) = x_tet[0];
1574 new_node_pt->
x(1) = x_tet[1];
1575 new_node_pt->
x(2) = x_tet[2];
1580 el_pt->
node_pt(j) = old_node_pt;
1590 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[2][0]);
1591 old_node_pt = tet_node_node_pt[tet_node_pt];
1592 if (old_node_pt == 0)
1594 Node* new_node_pt = 0;
1603 tet_node_node_pt[tet_node_pt] = new_node_pt;
1604 Node_pt.push_back(new_node_pt);
1609 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
1610 tet_el_pt->interpolated_x(s_tet, x_tet);
1611 new_node_pt->
x(0) = x_tet[0];
1612 new_node_pt->
x(1) = x_tet[1];
1613 new_node_pt->
x(2) = x_tet[2];
1618 el_pt->
node_pt(j) = old_node_pt;
1628 old_node_pt = tet_face_node_pt[
face0];
1629 if (old_node_pt == 0)
1631 Node* new_node_pt = 0;
1632 if (
face0.is_boundary_face())
1640 tet_face_node_pt[
face0] = new_node_pt;
1641 Node_pt.push_back(new_node_pt);
1646 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
1647 tet_el_pt->interpolated_x(s_tet, x_tet);
1648 new_node_pt->
x(0) = x_tet[0];
1649 new_node_pt->
x(1) = x_tet[1];
1650 new_node_pt->
x(2) = x_tet[2];
1655 el_pt->
node_pt(j) = old_node_pt;
1664 old_node_pt = tet_face_node_pt[
face1];
1665 if (old_node_pt == 0)
1667 Node* new_node_pt = 0;
1668 if (
face1.is_boundary_face())
1676 tet_face_node_pt[
face1] = new_node_pt;
1677 Node_pt.push_back(new_node_pt);
1682 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
1683 tet_el_pt->interpolated_x(s_tet, x_tet);
1684 new_node_pt->
x(0) = x_tet[0];
1685 new_node_pt->
x(1) = x_tet[1];
1686 new_node_pt->
x(2) = x_tet[2];
1691 el_pt->
node_pt(j) = old_node_pt;
1700 old_node_pt = tet_face_node_pt[
face2];
1701 if (old_node_pt == 0)
1703 Node* new_node_pt = 0;
1704 if (
face2.is_boundary_face())
1712 tet_face_node_pt[
face2] = new_node_pt;
1713 Node_pt.push_back(new_node_pt);
1718 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
1719 tet_el_pt->interpolated_x(s_tet, x_tet);
1720 new_node_pt->
x(0) = x_tet[0];
1721 new_node_pt->
x(1) = x_tet[1];
1722 new_node_pt->
x(2) = x_tet[2];
1727 el_pt->
node_pt(j) = old_node_pt;
1738 el_pt->
node_pt(j) = centroid_node_pt;
1749 Node_pt.push_back(new_node_pt);
1754 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
1755 tet_el_pt->interpolated_x(s_tet, x_tet);
1756 new_node_pt->
x(0) = x_tet[0];
1757 new_node_pt->
x(1) = x_tet[1];
1758 new_node_pt->
x(2) = x_tet[2];
1769 old_node_pt = brick_edge_node_pt[edge];
1770 if (old_node_pt == 0)
1772 Node* new_node_pt = 0;
1781 brick_edge_node_pt[edge] = new_node_pt;
1782 Node_pt.push_back(new_node_pt);
1787 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
1788 tet_el_pt->interpolated_x(s_tet, x_tet);
1789 new_node_pt->
x(0) = x_tet[0];
1790 new_node_pt->
x(1) = x_tet[1];
1791 new_node_pt->
x(2) = x_tet[2];
1796 el_pt->
node_pt(j) = old_node_pt;
1807 old_node_pt = brick_edge_node_pt[edge];
1808 if (old_node_pt == 0)
1810 Node* new_node_pt = 0;
1819 brick_edge_node_pt[edge] = new_node_pt;
1820 Node_pt.push_back(new_node_pt);
1825 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
1826 tet_el_pt->interpolated_x(s_tet, x_tet);
1827 new_node_pt->
x(0) = x_tet[0];
1828 new_node_pt->
x(1) = x_tet[1];
1829 new_node_pt->
x(2) = x_tet[2];
1834 el_pt->
node_pt(j) = old_node_pt;
1845 old_node_pt = brick_edge_node_pt[edge];
1846 if (old_node_pt == 0)
1848 Node* new_node_pt = 0;
1857 brick_edge_node_pt[edge] = new_node_pt;
1858 Node_pt.push_back(new_node_pt);
1863 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
1864 tet_el_pt->interpolated_x(s_tet, x_tet);
1865 new_node_pt->
x(0) = x_tet[0];
1866 new_node_pt->
x(1) = x_tet[1];
1867 new_node_pt->
x(2) = x_tet[2];
1872 el_pt->
node_pt(j) = old_node_pt;
1882 old_node_pt = brick_edge_node_pt[edge];
1883 if (old_node_pt == 0)
1885 Node* new_node_pt = 0;
1894 brick_edge_node_pt[edge] = new_node_pt;
1895 Node_pt.push_back(new_node_pt);
1900 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
1901 tet_el_pt->interpolated_x(s_tet, x_tet);
1902 new_node_pt->
x(0) = x_tet[0];
1903 new_node_pt->
x(1) = x_tet[1];
1904 new_node_pt->
x(2) = x_tet[2];
1909 el_pt->
node_pt(j) = old_node_pt;
1919 old_node_pt = brick_edge_node_pt[edge];
1920 if (old_node_pt == 0)
1922 Node* new_node_pt = 0;
1931 brick_edge_node_pt[edge] = new_node_pt;
1932 Node_pt.push_back(new_node_pt);
1937 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
1938 tet_el_pt->interpolated_x(s_tet, x_tet);
1939 new_node_pt->
x(0) = x_tet[0];
1940 new_node_pt->
x(1) = x_tet[1];
1941 new_node_pt->
x(2) = x_tet[2];
1946 el_pt->
node_pt(j) = old_node_pt;
1957 old_node_pt = brick_edge_node_pt[edge];
1958 if (old_node_pt == 0)
1960 Node* new_node_pt = 0;
1969 brick_edge_node_pt[edge] = new_node_pt;
1970 Node_pt.push_back(new_node_pt);
1975 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
1976 tet_el_pt->interpolated_x(s_tet, x_tet);
1977 new_node_pt->
x(0) = x_tet[0];
1978 new_node_pt->
x(1) = x_tet[1];
1979 new_node_pt->
x(2) = x_tet[2];
1984 el_pt->
node_pt(j) = old_node_pt;
1994 old_node_pt = brick_edge_node_pt[edge];
1995 if (old_node_pt == 0)
1997 Node* new_node_pt = 0;
2006 brick_edge_node_pt[edge] = new_node_pt;
2007 Node_pt.push_back(new_node_pt);
2012 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
2013 tet_el_pt->interpolated_x(s_tet, x_tet);
2014 new_node_pt->
x(0) = x_tet[0];
2015 new_node_pt->
x(1) = x_tet[1];
2016 new_node_pt->
x(2) = x_tet[2];
2021 el_pt->
node_pt(j) = old_node_pt;
2032 old_node_pt = brick_edge_node_pt[edge];
2033 if (old_node_pt == 0)
2035 Node* new_node_pt = 0;
2044 brick_edge_node_pt[edge] = new_node_pt;
2045 Node_pt.push_back(new_node_pt);
2050 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
2051 tet_el_pt->interpolated_x(s_tet, x_tet);
2052 new_node_pt->
x(0) = x_tet[0];
2053 new_node_pt->
x(1) = x_tet[1];
2054 new_node_pt->
x(2) = x_tet[2];
2059 el_pt->
node_pt(j) = old_node_pt;
2069 old_node_pt = brick_edge_node_pt[edge];
2070 if (old_node_pt == 0)
2072 Node* new_node_pt = 0;
2081 brick_edge_node_pt[edge] = new_node_pt;
2082 Node_pt.push_back(new_node_pt);
2087 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
2088 tet_el_pt->interpolated_x(s_tet, x_tet);
2089 new_node_pt->
x(0) = x_tet[0];
2090 new_node_pt->
x(1) = x_tet[1];
2091 new_node_pt->
x(2) = x_tet[2];
2096 el_pt->
node_pt(j) = old_node_pt;
2107 old_node_pt = brick_edge_node_pt[edge];
2108 if (old_node_pt == 0)
2110 Node* new_node_pt = 0;
2119 brick_edge_node_pt[edge] = new_node_pt;
2120 Node_pt.push_back(new_node_pt);
2125 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
2126 tet_el_pt->interpolated_x(s_tet, x_tet);
2127 new_node_pt->
x(0) = x_tet[0];
2128 new_node_pt->
x(1) = x_tet[1];
2129 new_node_pt->
x(2) = x_tet[2];
2134 el_pt->
node_pt(j) = old_node_pt;
2145 old_node_pt = brick_edge_node_pt[edge];
2146 if (old_node_pt == 0)
2148 Node* new_node_pt = 0;
2157 brick_edge_node_pt[edge] = new_node_pt;
2158 Node_pt.push_back(new_node_pt);
2163 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
2164 tet_el_pt->interpolated_x(s_tet, x_tet);
2165 new_node_pt->
x(0) = x_tet[0];
2166 new_node_pt->
x(1) = x_tet[1];
2167 new_node_pt->
x(2) = x_tet[2];
2172 el_pt->
node_pt(j) = old_node_pt;
2183 old_node_pt = brick_edge_node_pt[edge];
2184 if (old_node_pt == 0)
2186 Node* new_node_pt = 0;
2195 brick_edge_node_pt[edge] = new_node_pt;
2196 Node_pt.push_back(new_node_pt);
2201 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
2202 tet_el_pt->interpolated_x(s_tet, x_tet);
2203 new_node_pt->
x(0) = x_tet[0];
2204 new_node_pt->
x(1) = x_tet[1];
2205 new_node_pt->
x(2) = x_tet[2];
2210 el_pt->
node_pt(j) = old_node_pt;
2221 TFace face(tet_el_pt->node_pt(central_tet_vertex),
2222 tet_el_pt->node_pt(tet_edge_node[0][0]),
2223 tet_el_pt->node_pt(tet_edge_node[2][0]));
2225 old_node_pt = tet_face_node_pt[face];
2226 if (old_node_pt == 0)
2228 Node* new_node_pt = 0;
2237 tet_face_node_pt[face] = new_node_pt;
2238 Node_pt.push_back(new_node_pt);
2243 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
2244 tet_el_pt->interpolated_x(s_tet, x_tet);
2245 new_node_pt->
x(0) = x_tet[0];
2246 new_node_pt->
x(1) = x_tet[1];
2247 new_node_pt->
x(2) = x_tet[2];
2252 el_pt->
node_pt(j) = old_node_pt;
2263 TFace face(tet_el_pt->node_pt(central_tet_vertex),
2264 tet_el_pt->node_pt(tet_edge_node[1][0]),
2265 tet_el_pt->node_pt(tet_edge_node[2][0]));
2267 old_node_pt = tet_face_node_pt[face];
2268 if (old_node_pt == 0)
2270 Node* new_node_pt = 0;
2279 tet_face_node_pt[face] = new_node_pt;
2280 Node_pt.push_back(new_node_pt);
2285 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
2286 tet_el_pt->interpolated_x(s_tet, x_tet);
2287 new_node_pt->
x(0) = x_tet[0];
2288 new_node_pt->
x(1) = x_tet[1];
2289 new_node_pt->
x(2) = x_tet[2];
2294 el_pt->
node_pt(j) = old_node_pt;
2305 TFace face(tet_el_pt->node_pt(central_tet_vertex),
2306 tet_el_pt->node_pt(tet_edge_node[0][0]),
2307 tet_el_pt->node_pt(tet_edge_node[1][0]));
2309 old_node_pt = tet_face_node_pt[face];
2310 if (old_node_pt == 0)
2312 Node* new_node_pt = 0;
2321 tet_face_node_pt[face] = new_node_pt;
2322 Node_pt.push_back(new_node_pt);
2327 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
2328 tet_el_pt->interpolated_x(s_tet, x_tet);
2329 new_node_pt->
x(0) = x_tet[0];
2330 new_node_pt->
x(1) = x_tet[1];
2331 new_node_pt->
x(2) = x_tet[2];
2336 el_pt->
node_pt(j) = old_node_pt;
2345 Node_pt.push_back(new_node_pt);
2350 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
2351 top_mid_face_node1_pt = new_node_pt;
2352 tet_el_pt->interpolated_x(s_tet, x_tet);
2353 new_node_pt->
x(0) = x_tet[0];
2354 new_node_pt->
x(1) = x_tet[1];
2355 new_node_pt->
x(2) = x_tet[2];
2363 Node_pt.push_back(new_node_pt);
2368 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
2369 right_mid_face_node1_pt = new_node_pt;
2370 tet_el_pt->interpolated_x(s_tet, x_tet);
2371 new_node_pt->
x(0) = x_tet[0];
2372 new_node_pt->
x(1) = x_tet[1];
2373 new_node_pt->
x(2) = x_tet[2];
2382 el_pt->
node_pt(j) = right_mid_face_node0_pt;
2391 for (
unsigned j = 0; j < 8; j++)
2393 Node* nod_pt = dummy_q_el_pt[2]->node_pt(j);
2399 tet_el_pt->local_coordinate_of_node(3, s_tet);
2403 tet_el_pt->interpolated_x(s_tet, x_tet);
2404 nod_pt->
x(0) = x_tet[0];
2405 nod_pt->
x(1) = x_tet[1];
2406 nod_pt->
x(2) = x_tet[2];
2409 tet_el_pt->local_coordinate_of_node(6, s_tet);
2413 tet_el_pt->interpolated_x(s_tet, x_tet);
2414 nod_pt->
x(0) = x_tet[0];
2415 nod_pt->
x(1) = x_tet[1];
2416 nod_pt->
x(2) = x_tet[2];
2419 tet_el_pt->local_coordinate_of_node(9, s_tet);
2423 tet_el_pt->interpolated_x(s_tet, x_tet);
2424 nod_pt->
x(0) = x_tet[0];
2425 nod_pt->
x(1) = x_tet[1];
2426 nod_pt->
x(2) = x_tet[2];
2431 s_tet[0] = 1.0 / 3.0;
2432 s_tet[1] = 1.0 / 3.0;
2437 tet_el_pt->interpolated_x(s_tet, x_tet);
2438 nod_pt->
x(0) = x_tet[0];
2439 nod_pt->
x(1) = x_tet[1];
2440 nod_pt->
x(2) = x_tet[2];
2443 tet_el_pt->local_coordinate_of_node(8, s_tet);
2447 tet_el_pt->interpolated_x(s_tet, x_tet);
2448 nod_pt->
x(0) = x_tet[0];
2449 nod_pt->
x(1) = x_tet[1];
2450 nod_pt->
x(2) = x_tet[2];
2455 s_tet[0] = 1.0 / 3.0;
2457 s_tet[2] = 1.0 / 3.0;
2461 tet_el_pt->interpolated_x(s_tet, x_tet);
2462 nod_pt->
x(0) = x_tet[0];
2463 nod_pt->
x(1) = x_tet[1];
2464 nod_pt->
x(2) = x_tet[2];
2470 s_tet[1] = 1.0 / 3.0;
2471 s_tet[2] = 1.0 / 3.0;
2475 tet_el_pt->interpolated_x(s_tet, x_tet);
2476 nod_pt->
x(0) = x_tet[0];
2477 nod_pt->
x(1) = x_tet[1];
2478 nod_pt->
x(2) = x_tet[2];
2488 tet_el_pt->interpolated_x(s_tet, x_tet);
2489 nod_pt->
x(0) = x_tet[0];
2490 nod_pt->
x(1) = x_tet[1];
2491 nod_pt->
x(2) = x_tet[2];
2499 brick_el2_pt = el_pt;
2500 Element_pt.push_back(el_pt);
2503 tet_el_pt->node_pt(3), tet_el_pt->node_pt(0), tet_el_pt->node_pt(2));
2506 tet_el_pt->node_pt(3), tet_el_pt->node_pt(1), tet_el_pt->node_pt(2));
2509 tet_el_pt->node_pt(3), tet_el_pt->node_pt(1), tet_el_pt->node_pt(0));
2513 tet_edge_node[0].resize(2);
2514 tet_edge_node[0][0] = 6;
2515 tet_edge_node[0][1] = 0;
2516 tet_edge_node[1].resize(2);
2517 tet_edge_node[1][0] = 9;
2518 tet_edge_node[1][1] = 1;
2519 tet_edge_node[2].resize(2);
2520 tet_edge_node[2][0] = 8;
2521 tet_edge_node[2][1] = 2;
2524 unsigned central_tet_vertex = 3;
2526 Node* tet_node_pt = 0;
2527 Node* old_node_pt = 0;
2534 tet_node_pt = tet_el_pt->node_pt(central_tet_vertex);
2535 old_node_pt = tet_node_node_pt[tet_node_pt];
2536 if (old_node_pt == 0)
2538 Node* new_node_pt = 0;
2547 tet_node_node_pt[tet_node_pt] = new_node_pt;
2548 Node_pt.push_back(new_node_pt);
2553 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
2554 tet_el_pt->interpolated_x(s_tet, x_tet);
2555 new_node_pt->
x(0) = x_tet[0];
2556 new_node_pt->
x(1) = x_tet[1];
2557 new_node_pt->
x(2) = x_tet[2];
2562 el_pt->
node_pt(j) = old_node_pt;
2572 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[0][0]);
2573 old_node_pt = tet_node_node_pt[tet_node_pt];
2574 if (old_node_pt == 0)
2576 Node* new_node_pt = 0;
2585 tet_node_node_pt[tet_node_pt] = new_node_pt;
2586 Node_pt.push_back(new_node_pt);
2591 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
2592 tet_el_pt->interpolated_x(s_tet, x_tet);
2593 new_node_pt->
x(0) = x_tet[0];
2594 new_node_pt->
x(1) = x_tet[1];
2595 new_node_pt->
x(2) = x_tet[2];
2600 el_pt->
node_pt(j) = old_node_pt;
2610 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[1][0]);
2611 old_node_pt = tet_node_node_pt[tet_node_pt];
2612 if (old_node_pt == 0)
2614 Node* new_node_pt = 0;
2623 tet_node_node_pt[tet_node_pt] = new_node_pt;
2624 Node_pt.push_back(new_node_pt);
2629 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
2630 tet_el_pt->interpolated_x(s_tet, x_tet);
2631 new_node_pt->
x(0) = x_tet[0];
2632 new_node_pt->
x(1) = x_tet[1];
2633 new_node_pt->
x(2) = x_tet[2];
2638 el_pt->
node_pt(j) = old_node_pt;
2648 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[2][0]);
2649 old_node_pt = tet_node_node_pt[tet_node_pt];
2650 if (old_node_pt == 0)
2652 Node* new_node_pt = 0;
2661 tet_node_node_pt[tet_node_pt] = new_node_pt;
2662 Node_pt.push_back(new_node_pt);
2667 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
2668 tet_el_pt->interpolated_x(s_tet, x_tet);
2669 new_node_pt->
x(0) = x_tet[0];
2670 new_node_pt->
x(1) = x_tet[1];
2671 new_node_pt->
x(2) = x_tet[2];
2676 el_pt->
node_pt(j) = old_node_pt;
2686 old_node_pt = tet_face_node_pt[
face0];
2687 if (old_node_pt == 0)
2689 Node* new_node_pt = 0;
2690 if (
face0.is_boundary_face())
2698 tet_face_node_pt[
face0] = new_node_pt;
2699 Node_pt.push_back(new_node_pt);
2704 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
2705 tet_el_pt->interpolated_x(s_tet, x_tet);
2706 new_node_pt->
x(0) = x_tet[0];
2707 new_node_pt->
x(1) = x_tet[1];
2708 new_node_pt->
x(2) = x_tet[2];
2713 el_pt->
node_pt(j) = old_node_pt;
2722 old_node_pt = tet_face_node_pt[
face1];
2723 if (old_node_pt == 0)
2725 Node* new_node_pt = 0;
2726 if (
face1.is_boundary_face())
2734 tet_face_node_pt[
face1] = new_node_pt;
2735 Node_pt.push_back(new_node_pt);
2740 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
2741 tet_el_pt->interpolated_x(s_tet, x_tet);
2742 new_node_pt->
x(0) = x_tet[0];
2743 new_node_pt->
x(1) = x_tet[1];
2744 new_node_pt->
x(2) = x_tet[2];
2749 el_pt->
node_pt(j) = old_node_pt;
2758 old_node_pt = tet_face_node_pt[
face2];
2759 if (old_node_pt == 0)
2761 Node* new_node_pt = 0;
2762 if (
face2.is_boundary_face())
2770 tet_face_node_pt[
face2] = new_node_pt;
2771 Node_pt.push_back(new_node_pt);
2776 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
2777 tet_el_pt->interpolated_x(s_tet, x_tet);
2778 new_node_pt->
x(0) = x_tet[0];
2779 new_node_pt->
x(1) = x_tet[1];
2780 new_node_pt->
x(2) = x_tet[2];
2785 el_pt->
node_pt(j) = old_node_pt;
2796 el_pt->
node_pt(j) = centroid_node_pt;
2807 Node_pt.push_back(new_node_pt);
2812 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
2813 tet_el_pt->interpolated_x(s_tet, x_tet);
2814 new_node_pt->
x(0) = x_tet[0];
2815 new_node_pt->
x(1) = x_tet[1];
2816 new_node_pt->
x(2) = x_tet[2];
2826 old_node_pt = brick_edge_node_pt[edge];
2827 if (old_node_pt == 0)
2829 Node* new_node_pt = 0;
2838 brick_edge_node_pt[edge] = new_node_pt;
2839 Node_pt.push_back(new_node_pt);
2844 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
2845 tet_el_pt->interpolated_x(s_tet, x_tet);
2846 new_node_pt->
x(0) = x_tet[0];
2847 new_node_pt->
x(1) = x_tet[1];
2848 new_node_pt->
x(2) = x_tet[2];
2853 el_pt->
node_pt(j) = old_node_pt;
2864 old_node_pt = brick_edge_node_pt[edge];
2865 if (old_node_pt == 0)
2867 Node* new_node_pt = 0;
2876 brick_edge_node_pt[edge] = new_node_pt;
2877 Node_pt.push_back(new_node_pt);
2882 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
2883 tet_el_pt->interpolated_x(s_tet, x_tet);
2884 new_node_pt->
x(0) = x_tet[0];
2885 new_node_pt->
x(1) = x_tet[1];
2886 new_node_pt->
x(2) = x_tet[2];
2891 el_pt->
node_pt(j) = old_node_pt;
2901 old_node_pt = brick_edge_node_pt[edge];
2902 if (old_node_pt == 0)
2904 Node* new_node_pt = 0;
2913 brick_edge_node_pt[edge] = new_node_pt;
2914 Node_pt.push_back(new_node_pt);
2919 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
2920 tet_el_pt->interpolated_x(s_tet, x_tet);
2921 new_node_pt->
x(0) = x_tet[0];
2922 new_node_pt->
x(1) = x_tet[1];
2923 new_node_pt->
x(2) = x_tet[2];
2928 el_pt->
node_pt(j) = old_node_pt;
2938 old_node_pt = brick_edge_node_pt[edge];
2939 if (old_node_pt == 0)
2941 Node* new_node_pt = 0;
2950 brick_edge_node_pt[edge] = new_node_pt;
2951 Node_pt.push_back(new_node_pt);
2956 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
2957 tet_el_pt->interpolated_x(s_tet, x_tet);
2958 new_node_pt->
x(0) = x_tet[0];
2959 new_node_pt->
x(1) = x_tet[1];
2960 new_node_pt->
x(2) = x_tet[2];
2965 el_pt->
node_pt(j) = old_node_pt;
2975 old_node_pt = brick_edge_node_pt[edge];
2976 if (old_node_pt == 0)
2978 Node* new_node_pt = 0;
2987 brick_edge_node_pt[edge] = new_node_pt;
2988 Node_pt.push_back(new_node_pt);
2993 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
2994 tet_el_pt->interpolated_x(s_tet, x_tet);
2995 new_node_pt->
x(0) = x_tet[0];
2996 new_node_pt->
x(1) = x_tet[1];
2997 new_node_pt->
x(2) = x_tet[2];
3002 el_pt->
node_pt(j) = old_node_pt;
3013 old_node_pt = brick_edge_node_pt[edge];
3014 if (old_node_pt == 0)
3016 Node* new_node_pt = 0;
3025 brick_edge_node_pt[edge] = new_node_pt;
3026 Node_pt.push_back(new_node_pt);
3031 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
3032 tet_el_pt->interpolated_x(s_tet, x_tet);
3033 new_node_pt->
x(0) = x_tet[0];
3034 new_node_pt->
x(1) = x_tet[1];
3035 new_node_pt->
x(2) = x_tet[2];
3040 el_pt->
node_pt(j) = old_node_pt;
3050 old_node_pt = brick_edge_node_pt[edge];
3051 if (old_node_pt == 0)
3053 Node* new_node_pt = 0;
3062 brick_edge_node_pt[edge] = new_node_pt;
3063 Node_pt.push_back(new_node_pt);
3068 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
3069 tet_el_pt->interpolated_x(s_tet, x_tet);
3070 new_node_pt->
x(0) = x_tet[0];
3071 new_node_pt->
x(1) = x_tet[1];
3072 new_node_pt->
x(2) = x_tet[2];
3077 el_pt->
node_pt(j) = old_node_pt;
3088 old_node_pt = brick_edge_node_pt[edge];
3089 if (old_node_pt == 0)
3091 Node* new_node_pt = 0;
3100 brick_edge_node_pt[edge] = new_node_pt;
3101 Node_pt.push_back(new_node_pt);
3106 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
3107 tet_el_pt->interpolated_x(s_tet, x_tet);
3108 new_node_pt->
x(0) = x_tet[0];
3109 new_node_pt->
x(1) = x_tet[1];
3110 new_node_pt->
x(2) = x_tet[2];
3115 el_pt->
node_pt(j) = old_node_pt;
3125 old_node_pt = brick_edge_node_pt[edge];
3126 if (old_node_pt == 0)
3128 Node* new_node_pt = 0;
3137 brick_edge_node_pt[edge] = new_node_pt;
3138 Node_pt.push_back(new_node_pt);
3143 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
3144 tet_el_pt->interpolated_x(s_tet, x_tet);
3145 new_node_pt->
x(0) = x_tet[0];
3146 new_node_pt->
x(1) = x_tet[1];
3147 new_node_pt->
x(2) = x_tet[2];
3152 el_pt->
node_pt(j) = old_node_pt;
3163 old_node_pt = brick_edge_node_pt[edge];
3164 if (old_node_pt == 0)
3166 Node* new_node_pt = 0;
3175 brick_edge_node_pt[edge] = new_node_pt;
3176 Node_pt.push_back(new_node_pt);
3181 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
3182 tet_el_pt->interpolated_x(s_tet, x_tet);
3183 new_node_pt->
x(0) = x_tet[0];
3184 new_node_pt->
x(1) = x_tet[1];
3185 new_node_pt->
x(2) = x_tet[2];
3190 el_pt->
node_pt(j) = old_node_pt;
3201 old_node_pt = brick_edge_node_pt[edge];
3202 if (old_node_pt == 0)
3204 Node* new_node_pt = 0;
3213 brick_edge_node_pt[edge] = new_node_pt;
3214 Node_pt.push_back(new_node_pt);
3219 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
3220 tet_el_pt->interpolated_x(s_tet, x_tet);
3221 new_node_pt->
x(0) = x_tet[0];
3222 new_node_pt->
x(1) = x_tet[1];
3223 new_node_pt->
x(2) = x_tet[2];
3228 el_pt->
node_pt(j) = old_node_pt;
3239 old_node_pt = brick_edge_node_pt[edge];
3240 if (old_node_pt == 0)
3242 Node* new_node_pt = 0;
3251 brick_edge_node_pt[edge] = new_node_pt;
3252 Node_pt.push_back(new_node_pt);
3257 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
3258 tet_el_pt->interpolated_x(s_tet, x_tet);
3259 new_node_pt->
x(0) = x_tet[0];
3260 new_node_pt->
x(1) = x_tet[1];
3261 new_node_pt->
x(2) = x_tet[2];
3266 el_pt->
node_pt(j) = old_node_pt;
3277 TFace face(tet_el_pt->node_pt(central_tet_vertex),
3278 tet_el_pt->node_pt(tet_edge_node[0][0]),
3279 tet_el_pt->node_pt(tet_edge_node[2][0]));
3281 old_node_pt = tet_face_node_pt[face];
3282 if (old_node_pt == 0)
3284 Node* new_node_pt = 0;
3293 tet_face_node_pt[face] = new_node_pt;
3294 Node_pt.push_back(new_node_pt);
3299 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
3300 tet_el_pt->interpolated_x(s_tet, x_tet);
3301 new_node_pt->
x(0) = x_tet[0];
3302 new_node_pt->
x(1) = x_tet[1];
3303 new_node_pt->
x(2) = x_tet[2];
3308 el_pt->
node_pt(j) = old_node_pt;
3319 TFace face(tet_el_pt->node_pt(central_tet_vertex),
3320 tet_el_pt->node_pt(tet_edge_node[1][0]),
3321 tet_el_pt->node_pt(tet_edge_node[2][0]));
3322 old_node_pt = tet_face_node_pt[face];
3323 if (old_node_pt == 0)
3325 Node* new_node_pt = 0;
3334 tet_face_node_pt[face] = new_node_pt;
3335 Node_pt.push_back(new_node_pt);
3340 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
3341 tet_el_pt->interpolated_x(s_tet, x_tet);
3342 new_node_pt->
x(0) = x_tet[0];
3343 new_node_pt->
x(1) = x_tet[1];
3344 new_node_pt->
x(2) = x_tet[2];
3349 el_pt->
node_pt(j) = old_node_pt;
3360 TFace face(tet_el_pt->node_pt(central_tet_vertex),
3361 tet_el_pt->node_pt(tet_edge_node[0][0]),
3362 tet_el_pt->node_pt(tet_edge_node[1][0]));
3364 old_node_pt = tet_face_node_pt[face];
3365 if (old_node_pt == 0)
3367 Node* new_node_pt = 0;
3376 tet_face_node_pt[face] = new_node_pt;
3377 Node_pt.push_back(new_node_pt);
3382 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
3383 tet_el_pt->interpolated_x(s_tet, x_tet);
3384 new_node_pt->
x(0) = x_tet[0];
3385 new_node_pt->
x(1) = x_tet[1];
3386 new_node_pt->
x(2) = x_tet[2];
3391 el_pt->
node_pt(j) = old_node_pt;
3400 Node_pt.push_back(new_node_pt);
3405 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
3406 top_mid_face_node2_pt = new_node_pt;
3407 tet_el_pt->interpolated_x(s_tet, x_tet);
3408 new_node_pt->
x(0) = x_tet[0];
3409 new_node_pt->
x(1) = x_tet[1];
3410 new_node_pt->
x(2) = x_tet[2];
3419 el_pt->
node_pt(j) = back_mid_face_node0_pt;
3428 el_pt->
node_pt(j) = right_mid_face_node1_pt;
3437 for (
unsigned j = 0; j < 8; j++)
3439 Node* nod_pt = dummy_q_el_pt[3]->node_pt(j);
3445 tet_el_pt->local_coordinate_of_node(2, s_tet);
3449 tet_el_pt->interpolated_x(s_tet, x_tet);
3450 nod_pt->
x(0) = x_tet[0];
3451 nod_pt->
x(1) = x_tet[1];
3452 nod_pt->
x(2) = x_tet[2];
3455 tet_el_pt->local_coordinate_of_node(7, s_tet);
3459 tet_el_pt->interpolated_x(s_tet, x_tet);
3460 nod_pt->
x(0) = x_tet[0];
3461 nod_pt->
x(1) = x_tet[1];
3462 nod_pt->
x(2) = x_tet[2];
3465 tet_el_pt->local_coordinate_of_node(5, s_tet);
3469 tet_el_pt->interpolated_x(s_tet, x_tet);
3470 nod_pt->
x(0) = x_tet[0];
3471 nod_pt->
x(1) = x_tet[1];
3472 nod_pt->
x(2) = x_tet[2];
3477 s_tet[0] = 1.0 / 3.0;
3478 s_tet[1] = 1.0 / 3.0;
3479 s_tet[2] = 1.0 / 3.0;
3483 tet_el_pt->interpolated_x(s_tet, x_tet);
3484 nod_pt->
x(0) = x_tet[0];
3485 nod_pt->
x(1) = x_tet[1];
3486 nod_pt->
x(2) = x_tet[2];
3489 tet_el_pt->local_coordinate_of_node(8, s_tet);
3493 tet_el_pt->interpolated_x(s_tet, x_tet);
3494 nod_pt->
x(0) = x_tet[0];
3495 nod_pt->
x(1) = x_tet[1];
3496 nod_pt->
x(2) = x_tet[2];
3502 s_tet[1] = 1.0 / 3.0;
3503 s_tet[2] = 1.0 / 3.0;
3507 tet_el_pt->interpolated_x(s_tet, x_tet);
3508 nod_pt->
x(0) = x_tet[0];
3509 nod_pt->
x(1) = x_tet[1];
3510 nod_pt->
x(2) = x_tet[2];
3515 s_tet[0] = 1.0 / 3.0;
3517 s_tet[2] = 1.0 / 3.0;
3521 tet_el_pt->interpolated_x(s_tet, x_tet);
3522 nod_pt->
x(0) = x_tet[0];
3523 nod_pt->
x(1) = x_tet[1];
3524 nod_pt->
x(2) = x_tet[2];
3534 tet_el_pt->interpolated_x(s_tet, x_tet);
3535 nod_pt->
x(0) = x_tet[0];
3536 nod_pt->
x(1) = x_tet[1];
3537 nod_pt->
x(2) = x_tet[2];
3545 brick_el3_pt = el_pt;
3546 Element_pt.push_back(el_pt);
3549 tet_el_pt->node_pt(1), tet_el_pt->node_pt(2), tet_el_pt->node_pt(3));
3552 tet_el_pt->node_pt(0), tet_el_pt->node_pt(2), tet_el_pt->node_pt(3));
3555 tet_el_pt->node_pt(0), tet_el_pt->node_pt(1), tet_el_pt->node_pt(2));
3559 tet_edge_node[0].resize(2);
3560 tet_edge_node[0][0] = 7;
3561 tet_edge_node[0][1] = 1;
3562 tet_edge_node[1].resize(2);
3563 tet_edge_node[1][0] = 5;
3564 tet_edge_node[1][1] = 0;
3565 tet_edge_node[2].resize(2);
3566 tet_edge_node[2][0] = 8;
3567 tet_edge_node[2][1] = 3;
3570 unsigned central_tet_vertex = 2;
3572 Node* tet_node_pt = 0;
3573 Node* old_node_pt = 0;
3580 tet_node_pt = tet_el_pt->node_pt(central_tet_vertex);
3581 old_node_pt = tet_node_node_pt[tet_node_pt];
3582 if (old_node_pt == 0)
3584 Node* new_node_pt = 0;
3593 tet_node_node_pt[tet_node_pt] = new_node_pt;
3594 Node_pt.push_back(new_node_pt);
3599 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
3600 tet_el_pt->interpolated_x(s_tet, x_tet);
3601 new_node_pt->
x(0) = x_tet[0];
3602 new_node_pt->
x(1) = x_tet[1];
3603 new_node_pt->
x(2) = x_tet[2];
3608 el_pt->
node_pt(j) = old_node_pt;
3618 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[0][0]);
3619 old_node_pt = tet_node_node_pt[tet_node_pt];
3620 if (old_node_pt == 0)
3622 Node* new_node_pt = 0;
3631 tet_node_node_pt[tet_node_pt] = new_node_pt;
3632 Node_pt.push_back(new_node_pt);
3637 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
3638 tet_el_pt->interpolated_x(s_tet, x_tet);
3639 new_node_pt->
x(0) = x_tet[0];
3640 new_node_pt->
x(1) = x_tet[1];
3641 new_node_pt->
x(2) = x_tet[2];
3646 el_pt->
node_pt(j) = old_node_pt;
3656 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[1][0]);
3657 old_node_pt = tet_node_node_pt[tet_node_pt];
3658 if (old_node_pt == 0)
3660 Node* new_node_pt = 0;
3669 tet_node_node_pt[tet_node_pt] = new_node_pt;
3670 Node_pt.push_back(new_node_pt);
3675 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
3676 tet_el_pt->interpolated_x(s_tet, x_tet);
3677 new_node_pt->
x(0) = x_tet[0];
3678 new_node_pt->
x(1) = x_tet[1];
3679 new_node_pt->
x(2) = x_tet[2];
3684 el_pt->
node_pt(j) = old_node_pt;
3694 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[2][0]);
3695 old_node_pt = tet_node_node_pt[tet_node_pt];
3696 if (old_node_pt == 0)
3698 Node* new_node_pt = 0;
3707 tet_node_node_pt[tet_node_pt] = new_node_pt;
3708 Node_pt.push_back(new_node_pt);
3713 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
3714 tet_el_pt->interpolated_x(s_tet, x_tet);
3715 new_node_pt->
x(0) = x_tet[0];
3716 new_node_pt->
x(1) = x_tet[1];
3717 new_node_pt->
x(2) = x_tet[2];
3722 el_pt->
node_pt(j) = old_node_pt;
3732 old_node_pt = tet_face_node_pt[
face0];
3733 if (old_node_pt == 0)
3735 Node* new_node_pt = 0;
3736 if (
face0.is_boundary_face())
3744 tet_face_node_pt[
face0] = new_node_pt;
3745 Node_pt.push_back(new_node_pt);
3750 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
3751 tet_el_pt->interpolated_x(s_tet, x_tet);
3752 new_node_pt->
x(0) = x_tet[0];
3753 new_node_pt->
x(1) = x_tet[1];
3754 new_node_pt->
x(2) = x_tet[2];
3759 el_pt->
node_pt(j) = old_node_pt;
3768 old_node_pt = tet_face_node_pt[
face1];
3769 if (old_node_pt == 0)
3771 Node* new_node_pt = 0;
3772 if (
face1.is_boundary_face())
3780 tet_face_node_pt[
face1] = new_node_pt;
3781 Node_pt.push_back(new_node_pt);
3786 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
3787 tet_el_pt->interpolated_x(s_tet, x_tet);
3788 new_node_pt->
x(0) = x_tet[0];
3789 new_node_pt->
x(1) = x_tet[1];
3790 new_node_pt->
x(2) = x_tet[2];
3795 el_pt->
node_pt(j) = old_node_pt;
3804 old_node_pt = tet_face_node_pt[
face2];
3805 if (old_node_pt == 0)
3807 Node* new_node_pt = 0;
3808 if (
face2.is_boundary_face())
3816 tet_face_node_pt[
face2] = new_node_pt;
3817 Node_pt.push_back(new_node_pt);
3822 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
3823 tet_el_pt->interpolated_x(s_tet, x_tet);
3824 new_node_pt->
x(0) = x_tet[0];
3825 new_node_pt->
x(1) = x_tet[1];
3826 new_node_pt->
x(2) = x_tet[2];
3831 el_pt->
node_pt(j) = old_node_pt;
3842 el_pt->
node_pt(j) = centroid_node_pt;
3853 Node_pt.push_back(new_node_pt);
3858 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
3859 tet_el_pt->interpolated_x(s_tet, x_tet);
3860 new_node_pt->
x(0) = x_tet[0];
3861 new_node_pt->
x(1) = x_tet[1];
3862 new_node_pt->
x(2) = x_tet[2];
3872 old_node_pt = brick_edge_node_pt[edge];
3873 if (old_node_pt == 0)
3875 Node* new_node_pt = 0;
3884 brick_edge_node_pt[edge] = new_node_pt;
3885 Node_pt.push_back(new_node_pt);
3890 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
3891 tet_el_pt->interpolated_x(s_tet, x_tet);
3892 new_node_pt->
x(0) = x_tet[0];
3893 new_node_pt->
x(1) = x_tet[1];
3894 new_node_pt->
x(2) = x_tet[2];
3899 el_pt->
node_pt(j) = old_node_pt;
3910 old_node_pt = brick_edge_node_pt[edge];
3911 if (old_node_pt == 0)
3913 Node* new_node_pt = 0;
3922 brick_edge_node_pt[edge] = new_node_pt;
3923 Node_pt.push_back(new_node_pt);
3928 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
3929 tet_el_pt->interpolated_x(s_tet, x_tet);
3930 new_node_pt->
x(0) = x_tet[0];
3931 new_node_pt->
x(1) = x_tet[1];
3932 new_node_pt->
x(2) = x_tet[2];
3937 el_pt->
node_pt(j) = old_node_pt;
3947 old_node_pt = brick_edge_node_pt[edge];
3948 if (old_node_pt == 0)
3950 Node* new_node_pt = 0;
3959 brick_edge_node_pt[edge] = new_node_pt;
3960 Node_pt.push_back(new_node_pt);
3965 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
3966 tet_el_pt->interpolated_x(s_tet, x_tet);
3967 new_node_pt->
x(0) = x_tet[0];
3968 new_node_pt->
x(1) = x_tet[1];
3969 new_node_pt->
x(2) = x_tet[2];
3974 el_pt->
node_pt(j) = old_node_pt;
3984 old_node_pt = brick_edge_node_pt[edge];
3985 if (old_node_pt == 0)
3987 Node* new_node_pt = 0;
3996 brick_edge_node_pt[edge] = new_node_pt;
3997 Node_pt.push_back(new_node_pt);
4002 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
4003 tet_el_pt->interpolated_x(s_tet, x_tet);
4004 new_node_pt->
x(0) = x_tet[0];
4005 new_node_pt->
x(1) = x_tet[1];
4006 new_node_pt->
x(2) = x_tet[2];
4011 el_pt->
node_pt(j) = old_node_pt;
4021 old_node_pt = brick_edge_node_pt[edge];
4022 if (old_node_pt == 0)
4024 Node* new_node_pt = 0;
4033 brick_edge_node_pt[edge] = new_node_pt;
4034 Node_pt.push_back(new_node_pt);
4039 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
4040 tet_el_pt->interpolated_x(s_tet, x_tet);
4041 new_node_pt->
x(0) = x_tet[0];
4042 new_node_pt->
x(1) = x_tet[1];
4043 new_node_pt->
x(2) = x_tet[2];
4048 el_pt->
node_pt(j) = old_node_pt;
4059 old_node_pt = brick_edge_node_pt[edge];
4060 if (old_node_pt == 0)
4062 Node* new_node_pt = 0;
4071 brick_edge_node_pt[edge] = new_node_pt;
4072 Node_pt.push_back(new_node_pt);
4077 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
4078 tet_el_pt->interpolated_x(s_tet, x_tet);
4079 new_node_pt->
x(0) = x_tet[0];
4080 new_node_pt->
x(1) = x_tet[1];
4081 new_node_pt->
x(2) = x_tet[2];
4086 el_pt->
node_pt(j) = old_node_pt;
4096 old_node_pt = brick_edge_node_pt[edge];
4097 if (old_node_pt == 0)
4099 Node* new_node_pt = 0;
4108 brick_edge_node_pt[edge] = new_node_pt;
4109 Node_pt.push_back(new_node_pt);
4114 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
4115 tet_el_pt->interpolated_x(s_tet, x_tet);
4116 new_node_pt->
x(0) = x_tet[0];
4117 new_node_pt->
x(1) = x_tet[1];
4118 new_node_pt->
x(2) = x_tet[2];
4123 el_pt->
node_pt(j) = old_node_pt;
4134 old_node_pt = brick_edge_node_pt[edge];
4135 if (old_node_pt == 0)
4137 Node* new_node_pt = 0;
4146 brick_edge_node_pt[edge] = new_node_pt;
4147 Node_pt.push_back(new_node_pt);
4152 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
4153 tet_el_pt->interpolated_x(s_tet, x_tet);
4154 new_node_pt->
x(0) = x_tet[0];
4155 new_node_pt->
x(1) = x_tet[1];
4156 new_node_pt->
x(2) = x_tet[2];
4161 el_pt->
node_pt(j) = old_node_pt;
4171 old_node_pt = brick_edge_node_pt[edge];
4172 if (old_node_pt == 0)
4174 Node* new_node_pt = 0;
4183 brick_edge_node_pt[edge] = new_node_pt;
4184 Node_pt.push_back(new_node_pt);
4189 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
4190 tet_el_pt->interpolated_x(s_tet, x_tet);
4191 new_node_pt->
x(0) = x_tet[0];
4192 new_node_pt->
x(1) = x_tet[1];
4193 new_node_pt->
x(2) = x_tet[2];
4198 el_pt->
node_pt(j) = old_node_pt;
4209 old_node_pt = brick_edge_node_pt[edge];
4210 if (old_node_pt == 0)
4212 Node* new_node_pt = 0;
4221 brick_edge_node_pt[edge] = new_node_pt;
4222 Node_pt.push_back(new_node_pt);
4227 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
4228 tet_el_pt->interpolated_x(s_tet, x_tet);
4229 new_node_pt->
x(0) = x_tet[0];
4230 new_node_pt->
x(1) = x_tet[1];
4231 new_node_pt->
x(2) = x_tet[2];
4236 el_pt->
node_pt(j) = old_node_pt;
4247 old_node_pt = brick_edge_node_pt[edge];
4248 if (old_node_pt == 0)
4250 Node* new_node_pt = 0;
4259 brick_edge_node_pt[edge] = new_node_pt;
4260 Node_pt.push_back(new_node_pt);
4265 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
4266 tet_el_pt->interpolated_x(s_tet, x_tet);
4267 new_node_pt->
x(0) = x_tet[0];
4268 new_node_pt->
x(1) = x_tet[1];
4269 new_node_pt->
x(2) = x_tet[2];
4274 el_pt->
node_pt(j) = old_node_pt;
4285 old_node_pt = brick_edge_node_pt[edge];
4286 if (old_node_pt == 0)
4288 Node* new_node_pt = 0;
4297 brick_edge_node_pt[edge] = new_node_pt;
4298 Node_pt.push_back(new_node_pt);
4303 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
4304 tet_el_pt->interpolated_x(s_tet, x_tet);
4305 new_node_pt->
x(0) = x_tet[0];
4306 new_node_pt->
x(1) = x_tet[1];
4307 new_node_pt->
x(2) = x_tet[2];
4312 el_pt->
node_pt(j) = old_node_pt;
4323 TFace face(tet_el_pt->node_pt(central_tet_vertex),
4324 tet_el_pt->node_pt(tet_edge_node[0][0]),
4325 tet_el_pt->node_pt(tet_edge_node[2][0]));
4327 old_node_pt = tet_face_node_pt[face];
4328 if (old_node_pt == 0)
4330 Node* new_node_pt = 0;
4339 tet_face_node_pt[face] = new_node_pt;
4340 Node_pt.push_back(new_node_pt);
4345 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
4346 tet_el_pt->interpolated_x(s_tet, x_tet);
4347 new_node_pt->
x(0) = x_tet[0];
4348 new_node_pt->
x(1) = x_tet[1];
4349 new_node_pt->
x(2) = x_tet[2];
4354 el_pt->
node_pt(j) = old_node_pt;
4365 TFace face(tet_el_pt->node_pt(central_tet_vertex),
4366 tet_el_pt->node_pt(tet_edge_node[1][0]),
4367 tet_el_pt->node_pt(tet_edge_node[2][0]));
4369 old_node_pt = tet_face_node_pt[face];
4370 if (old_node_pt == 0)
4372 Node* new_node_pt = 0;
4381 tet_face_node_pt[face] = new_node_pt;
4382 Node_pt.push_back(new_node_pt);
4387 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
4388 tet_el_pt->interpolated_x(s_tet, x_tet);
4389 new_node_pt->
x(0) = x_tet[0];
4390 new_node_pt->
x(1) = x_tet[1];
4391 new_node_pt->
x(2) = x_tet[2];
4396 el_pt->
node_pt(j) = old_node_pt;
4407 TFace face(tet_el_pt->node_pt(central_tet_vertex),
4408 tet_el_pt->node_pt(tet_edge_node[0][0]),
4409 tet_el_pt->node_pt(tet_edge_node[1][0]));
4411 old_node_pt = tet_face_node_pt[face];
4412 if (old_node_pt == 0)
4414 Node* new_node_pt = 0;
4423 tet_face_node_pt[face] = new_node_pt;
4424 Node_pt.push_back(new_node_pt);
4429 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
4430 tet_el_pt->interpolated_x(s_tet, x_tet);
4431 new_node_pt->
x(0) = x_tet[0];
4432 new_node_pt->
x(1) = x_tet[1];
4433 new_node_pt->
x(2) = x_tet[2];
4438 el_pt->
node_pt(j) = old_node_pt;
4448 el_pt->
node_pt(j) = top_mid_face_node2_pt;
4457 el_pt->
node_pt(j) = top_mid_face_node1_pt;
4466 el_pt->
node_pt(j) = top_mid_face_node0_pt;
4476 for (
int face_index = 0; face_index < 4; face_index++)
4484 face_pt =
new TFace(tet_el_pt->node_pt(1),
4485 tet_el_pt->node_pt(2),
4486 tet_el_pt->node_pt(3));
4491 face_pt =
new TFace(tet_el_pt->node_pt(0),
4492 tet_el_pt->node_pt(2),
4493 tet_el_pt->node_pt(3));
4500 face_pt =
new TFace(tet_el_pt->node_pt(0),
4501 tet_el_pt->node_pt(1),
4502 tet_el_pt->node_pt(3));
4508 face_pt =
new TFace(tet_el_pt->node_pt(0),
4509 tet_el_pt->node_pt(1),
4510 tet_el_pt->node_pt(2));
4517 std::set<unsigned> bnd;
4518 std::set<unsigned>* bnd_pt = &bnd;
4522 if ((*bnd_pt).size() > 1)
4524 std::ostringstream error_stream;
4525 error_stream <<
"TFace should only be on one boundary.\n";
4527 OOMPH_CURRENT_FUNCTION,
4528 OOMPH_EXCEPTION_LOCATION);
4532 if ((*bnd_pt).size() == 1)
4536 if (tet_mesh_is_solid_mesh)
4541 std::ostringstream error_stream;
4543 <<
"Tet-element cannot be cast to SolidTElement<3,3>.\n"
4544 <<
"BrickFromTetMesh can only be built from\n"
4545 <<
"mesh containing quadratic tets.\n"
4548 OOMPH_CURRENT_FUNCTION,
4549 OOMPH_EXCEPTION_LOCATION);
4554 tet_el_pt, face_index);
4561 std::ostringstream error_stream;
4562 error_stream <<
"Tet-element cannot be cast to TElement<3,3>.\n"
4563 <<
"BrickFromTetMesh can only be built from\n"
4564 <<
"mesh containing quadratic tets.\n"
4567 OOMPH_CURRENT_FUNCTION,
4568 OOMPH_EXCEPTION_LOCATION);
4580 unsigned b = (*(*bnd_pt).begin());
4581 Boundary_coordinate_exists[b] =
true;
4591 brick_face_node_pt[0] = brick_el1_pt->
node_pt(0);
4592 brick_face_node_pt[1] = brick_el3_pt->
node_pt(0);
4593 brick_face_node_pt[2] = brick_el2_pt->
node_pt(0);
4595 brick_face_node_pt[3] = brick_el1_pt->
node_pt(18);
4596 brick_face_node_pt[4] = brick_el2_pt->
node_pt(18);
4597 brick_face_node_pt[5] = brick_el1_pt->
node_pt(2);
4599 brick_face_node_pt[6] = brick_el1_pt->
node_pt(9);
4600 brick_face_node_pt[7] = brick_el3_pt->
node_pt(1);
4601 brick_face_node_pt[8] = brick_el3_pt->
node_pt(9);
4603 brick_face_node_pt[9] = brick_el2_pt->
node_pt(9);
4604 brick_face_node_pt[10] = brick_el2_pt->
node_pt(3);
4605 brick_face_node_pt[11] = brick_el1_pt->
node_pt(1);
4607 brick_face_node_pt[12] = brick_el1_pt->
node_pt(20);
4609 brick_face_node_pt[13] = brick_el2_pt->
node_pt(12);
4610 brick_face_node_pt[14] = brick_el1_pt->
node_pt(19);
4612 brick_face_node_pt[15] = brick_el1_pt->
node_pt(10);
4613 brick_face_node_pt[16] = brick_el2_pt->
node_pt(21);
4615 brick_face_node_pt[17] = brick_el3_pt->
node_pt(10);
4616 brick_face_node_pt[18] = brick_el1_pt->
node_pt(11);
4620 brick_face_node_pt[0] = brick_el0_pt->
node_pt(0);
4621 brick_face_node_pt[1] = brick_el3_pt->
node_pt(0);
4622 brick_face_node_pt[2] = brick_el2_pt->
node_pt(0);
4624 brick_face_node_pt[3] = brick_el0_pt->
node_pt(18);
4625 brick_face_node_pt[4] = brick_el2_pt->
node_pt(18);
4626 brick_face_node_pt[5] = brick_el0_pt->
node_pt(6);
4628 brick_face_node_pt[6] = brick_el0_pt->
node_pt(9);
4629 brick_face_node_pt[7] = brick_el3_pt->
node_pt(3);
4630 brick_face_node_pt[8] = brick_el3_pt->
node_pt(9);
4632 brick_face_node_pt[9] = brick_el2_pt->
node_pt(9);
4633 brick_face_node_pt[10] = brick_el2_pt->
node_pt(1);
4634 brick_face_node_pt[11] = brick_el0_pt->
node_pt(3);
4636 brick_face_node_pt[12] = brick_el0_pt->
node_pt(24);
4638 brick_face_node_pt[13] = brick_el2_pt->
node_pt(10);
4639 brick_face_node_pt[14] = brick_el0_pt->
node_pt(21);
4641 brick_face_node_pt[15] = brick_el0_pt->
node_pt(12);
4642 brick_face_node_pt[16] = brick_el3_pt->
node_pt(21);
4644 brick_face_node_pt[17] = brick_el3_pt->
node_pt(12);
4645 brick_face_node_pt[18] = brick_el0_pt->
node_pt(15);
4649 brick_face_node_pt[0] = brick_el0_pt->
node_pt(0);
4650 brick_face_node_pt[1] = brick_el1_pt->
node_pt(0);
4651 brick_face_node_pt[2] = brick_el2_pt->
node_pt(0);
4653 brick_face_node_pt[3] = brick_el0_pt->
node_pt(2);
4654 brick_face_node_pt[4] = brick_el1_pt->
node_pt(2);
4655 brick_face_node_pt[5] = brick_el0_pt->
node_pt(6);
4657 brick_face_node_pt[6] = brick_el0_pt->
node_pt(1);
4658 brick_face_node_pt[7] = brick_el1_pt->
node_pt(3);
4659 brick_face_node_pt[8] = brick_el1_pt->
node_pt(1);
4661 brick_face_node_pt[9] = brick_el2_pt->
node_pt(3);
4662 brick_face_node_pt[10] = brick_el2_pt->
node_pt(1);
4663 brick_face_node_pt[11] = brick_el0_pt->
node_pt(3);
4665 brick_face_node_pt[12] = brick_el0_pt->
node_pt(8);
4667 brick_face_node_pt[13] = brick_el2_pt->
node_pt(4);
4668 brick_face_node_pt[14] = brick_el0_pt->
node_pt(5);
4670 brick_face_node_pt[15] = brick_el0_pt->
node_pt(4);
4671 brick_face_node_pt[16] = brick_el1_pt->
node_pt(5);
4673 brick_face_node_pt[17] = brick_el1_pt->
node_pt(4);
4674 brick_face_node_pt[18] = brick_el0_pt->
node_pt(7);
4678 brick_face_node_pt[0] = brick_el1_pt->
node_pt(0);
4679 brick_face_node_pt[1] = brick_el3_pt->
node_pt(0);
4680 brick_face_node_pt[2] = brick_el0_pt->
node_pt(0);
4682 brick_face_node_pt[3] = brick_el1_pt->
node_pt(18);
4683 brick_face_node_pt[4] = brick_el3_pt->
node_pt(6);
4684 brick_face_node_pt[5] = brick_el1_pt->
node_pt(6);
4686 brick_face_node_pt[6] = brick_el1_pt->
node_pt(9);
4687 brick_face_node_pt[7] = brick_el3_pt->
node_pt(1);
4688 brick_face_node_pt[8] = brick_el3_pt->
node_pt(3);
4690 brick_face_node_pt[9] = brick_el0_pt->
node_pt(9);
4691 brick_face_node_pt[10] = brick_el0_pt->
node_pt(1);
4692 brick_face_node_pt[11] = brick_el1_pt->
node_pt(3);
4694 brick_face_node_pt[12] = brick_el1_pt->
node_pt(24);
4696 brick_face_node_pt[13] = brick_el0_pt->
node_pt(10);
4697 brick_face_node_pt[14] = brick_el1_pt->
node_pt(21);
4699 brick_face_node_pt[15] = brick_el1_pt->
node_pt(12);
4700 brick_face_node_pt[16] = brick_el3_pt->
node_pt(7);
4702 brick_face_node_pt[17] = brick_el3_pt->
node_pt(4);
4703 brick_face_node_pt[18] = brick_el1_pt->
node_pt(15);
4712 for (
unsigned i = 0;
i < 19;
i++)
4718 for (
unsigned j = 0; j < 19; j++)
4721 Node* brick_node_pt = brick_face_node_pt[translate[j]];
4732 double dist = sqrt(pow(brick_node_pt->
x(0) - x[0], 2) +
4733 pow(brick_node_pt->
x(1) - x[1], 2) +
4734 pow(brick_node_pt->
x(2) - x[2], 2));
4737 std::ofstream brick0;
4738 std::ofstream brick1;
4739 std::ofstream brick2;
4740 std::ofstream brick3;
4741 brick0.open(
"full_brick0.dat");
4742 brick1.open(
"full_brick1.dat");
4743 brick2.open(
"full_brick2.dat");
4744 brick3.open(
"full_brick3.dat");
4745 for (
unsigned j = 0; j < 27; j++)
4747 brick0 << brick_el0_pt->
node_pt(j)->
x(0) <<
" "
4748 << brick_el0_pt->
node_pt(j)->
x(1) <<
" "
4749 << brick_el0_pt->
node_pt(j)->
x(2) <<
"\n";
4751 brick1 << brick_el1_pt->
node_pt(j)->
x(0) <<
" "
4752 << brick_el1_pt->
node_pt(j)->
x(1) <<
" "
4753 << brick_el1_pt->
node_pt(j)->
x(2) <<
"\n";
4755 brick2 << brick_el2_pt->
node_pt(j)->
x(0) <<
" "
4756 << brick_el2_pt->
node_pt(j)->
x(1) <<
" "
4757 << brick_el2_pt->
node_pt(j)->
x(2) <<
"\n";
4759 brick3 << brick_el3_pt->
node_pt(j)->
x(0) <<
" "
4760 << brick_el3_pt->
node_pt(j)->
x(1) <<
" "
4761 << brick_el3_pt->
node_pt(j)->
x(2) <<
"\n";
4768 std::ofstream full_face;
4769 full_face.open(
"full_face.dat");
4770 for (
unsigned j = 0; j < 6; j++)
4772 full_face << face_el_pt->
node_pt(j)->
x(0) <<
" "
4773 << face_el_pt->
node_pt(j)->
x(1) <<
" "
4774 << face_el_pt->
node_pt(j)->
x(2) <<
"\n";
4781 std::ostringstream error_stream;
4783 <<
"During assignment of boundary cordinates, the distance\n"
4784 <<
"between brick node and reference point in \n"
4785 <<
"triangular FaceElement is " << dist <<
" which \n"
4786 <<
"is bigger than the tolerance defined in \n"
4787 <<
"BrickFromTetMeshHelper::Face_position_tolerance="
4789 <<
"If this is tolerable, increase the tolerance \n"
4790 <<
"(it's defined in a namespace and therefore publically\n"
4791 <<
"accessible). If not, the Face may be inverted in which \n"
4792 <<
"case you should re-implement the translation scheme,\n"
4793 <<
"following the pattern used in the "
4794 "ThinLayerBrickOnTetMesh."
4795 <<
"\nThe required code fragements are already here but \n"
4796 <<
"the translation is the unit map.\n"
4797 <<
"To aid the diagnostics, the files full_brick[0-3].dat\n"
4798 <<
"contain the coordinates of the 27 nodes in the four\n"
4799 <<
"bricks associated with the current tet and "
4801 <<
"contains the coordinates of the 6 nodes in the "
4803 <<
"\nfrom which the boundary coordinates are extracted.\n"
4804 <<
"FYI: The normal_sign of the face is: " << normal_sign
4807 OOMPH_CURRENT_FUNCTION,
4808 OOMPH_EXCEPTION_LOCATION);
4813 add_boundary_node(b, brick_node_pt);
4821 Boundary_element_pt[b].push_back(brick_el1_pt);
4822 Face_index_at_boundary[b].push_back(-2);
4823 Boundary_element_pt[b].push_back(brick_el2_pt);
4824 Face_index_at_boundary[b].push_back(-1);
4825 Boundary_element_pt[b].push_back(brick_el3_pt);
4826 Face_index_at_boundary[b].push_back(-2);
4830 Boundary_element_pt[b].push_back(brick_el0_pt);
4831 Face_index_at_boundary[b].push_back(-1);
4832 Boundary_element_pt[b].push_back(brick_el2_pt);
4833 Face_index_at_boundary[b].push_back(-2);
4834 Boundary_element_pt[b].push_back(brick_el3_pt);
4835 Face_index_at_boundary[b].push_back(-1);
4839 Boundary_element_pt[b].push_back(brick_el0_pt);
4840 Face_index_at_boundary[b].push_back(-3);
4841 Boundary_element_pt[b].push_back(brick_el1_pt);
4842 Face_index_at_boundary[b].push_back(-3);
4843 Boundary_element_pt[b].push_back(brick_el2_pt);
4844 Face_index_at_boundary[b].push_back(-3);
4848 Boundary_element_pt[b].push_back(brick_el0_pt);
4849 Face_index_at_boundary[b].push_back(-2);
4850 Boundary_element_pt[b].push_back(brick_el1_pt);
4851 Face_index_at_boundary[b].push_back(-1);
4852 Boundary_element_pt[b].push_back(brick_el3_pt);
4853 Face_index_at_boundary[b].push_back(-3);
4866 Lookup_for_elements_next_boundary_is_setup =
true;
4870 unsigned n_xda_boundaries = tet_mesh_pt->nxda_boundary();
4873 Boundary_id.resize(n_xda_boundaries);
4874 for (
unsigned xda_b = 0; xda_b < n_xda_boundaries; xda_b++)
4876 Boundary_id[xda_b] = tet_mesh_pt->oomph_lib_boundary_ids(xda_b);
4881 for (
unsigned e = 0;
e < 4;
e++)
4883 for (
unsigned j = 0; j < 8; j++)
4885 delete dummy_q_el_pt[
e]->node_pt(j);
4887 delete dummy_q_el_pt[
e];
4895 template<
class ELEMENT>
4900 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(3, 3);
4903 bool tet_mesh_is_solid_mesh =
false;
4906 tet_mesh_is_solid_mesh =
true;
4914 for (
unsigned i = 0;
i < 19;
i++)
4916 s_face[
i].resize(2);
4958 s_face[
i][0] = 0.75;
4959 s_face[
i][1] = 0.25;
4963 s_face[
i][0] = 0.25;
4964 s_face[
i][1] = 0.75;
4969 s_face[
i][1] = 0.75;
4974 s_face[
i][1] = 0.25;
4978 s_face[
i][0] = 0.25;
4983 s_face[
i][0] = 0.75;
4990 s_face[
i][0] = 1.0 / 3.0;
4991 s_face[
i][1] = 1.0 / 3.0;
4998 s_face[
i][0] = 5.0 / 24.0;
4999 s_face[
i][1] = 5.0 / 24.0;
5003 s_face[
i][0] = 5.0 / 12.0;
5004 s_face[
i][1] = 5.0 / 12.0;
5010 s_face[
i][1] = 5.0 / 24.0;
5011 s_face[
i][0] = 7.0 / 12.0;
5015 s_face[
i][1] = 5.0 / 12.0;
5016 s_face[
i][0] = 1.0 / 6.0;
5023 s_face[
i][0] = 5.0 / 24.0;
5024 s_face[
i][1] = 7.0 / 12.0;
5028 s_face[
i][0] = 5.0 / 12.0;
5029 s_face[
i][1] = 1.0 / 6.0;
5035 unsigned nb = tet_mesh_pt->nboundary();
5039 Boundary_element_pt.resize(nb);
5040 Face_index_at_boundary.resize(nb);
5045 std::map<Node*, Node*> tet_node_node_pt;
5048 std::map<Edge, Node*> brick_edge_node_pt;
5051 std::map<TFace, Node*> tet_face_node_pt;
5056 for (
unsigned e = 0;
e < 4;
e++)
5059 for (
unsigned j = 0; j < 8; j++)
5061 dummy_q_el_pt[
e]->construct_node(j);
5066 unsigned n_el_tet = tet_mesh_pt->nelement();
5067 for (
unsigned e_tet = 0; e_tet < n_el_tet; e_tet++)
5076 std::ostringstream error_stream;
5078 <<
"BrickFromTetMesh can only built from tet mesh containing\n"
5079 <<
"ten-noded tets.\n";
5081 error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
5086 Node* centroid_node_pt = 0;
5089 Node* top_mid_face_node0_pt = 0;
5090 Node* right_mid_face_node0_pt = 0;
5091 Node* back_mid_face_node0_pt = 0;
5093 Node* top_mid_face_node1_pt = 0;
5094 Node* right_mid_face_node1_pt = 0;
5096 Node* top_mid_face_node2_pt = 0;
5109 for (
unsigned j = 0; j < 8; j++)
5111 Node* nod_pt = dummy_q_el_pt[0]->node_pt(j);
5117 tet_el_pt->local_coordinate_of_node(0, s_tet);
5121 tet_el_pt->interpolated_x(s_tet, x_tet);
5122 nod_pt->
x(0) = x_tet[0];
5123 nod_pt->
x(1) = x_tet[1];
5124 nod_pt->
x(2) = x_tet[2];
5127 tet_el_pt->local_coordinate_of_node(4, s_tet);
5131 tet_el_pt->interpolated_x(s_tet, x_tet);
5132 nod_pt->
x(0) = x_tet[0];
5133 nod_pt->
x(1) = x_tet[1];
5134 nod_pt->
x(2) = x_tet[2];
5137 tet_el_pt->local_coordinate_of_node(6, s_tet);
5141 tet_el_pt->interpolated_x(s_tet, x_tet);
5142 nod_pt->
x(0) = x_tet[0];
5143 nod_pt->
x(1) = x_tet[1];
5144 nod_pt->
x(2) = x_tet[2];
5149 s_tet[0] = 1.0 / 3.0;
5150 s_tet[1] = 1.0 / 3.0;
5155 tet_el_pt->interpolated_x(s_tet, x_tet);
5156 nod_pt->
x(0) = x_tet[0];
5157 nod_pt->
x(1) = x_tet[1];
5158 nod_pt->
x(2) = x_tet[2];
5161 tet_el_pt->local_coordinate_of_node(5, s_tet);
5165 tet_el_pt->interpolated_x(s_tet, x_tet);
5166 nod_pt->
x(0) = x_tet[0];
5167 nod_pt->
x(1) = x_tet[1];
5168 nod_pt->
x(2) = x_tet[2];
5173 s_tet[0] = 1.0 / 3.0;
5174 s_tet[1] = 1.0 / 3.0;
5175 s_tet[2] = 1.0 / 3.0;
5179 tet_el_pt->interpolated_x(s_tet, x_tet);
5180 nod_pt->
x(0) = x_tet[0];
5181 nod_pt->
x(1) = x_tet[1];
5182 nod_pt->
x(2) = x_tet[2];
5187 s_tet[0] = 1.0 / 3.0;
5189 s_tet[2] = 1.0 / 3.0;
5193 tet_el_pt->interpolated_x(s_tet, x_tet);
5194 nod_pt->
x(0) = x_tet[0];
5195 nod_pt->
x(1) = x_tet[1];
5196 nod_pt->
x(2) = x_tet[2];
5206 tet_el_pt->interpolated_x(s_tet, x_tet);
5207 nod_pt->
x(0) = x_tet[0];
5208 nod_pt->
x(1) = x_tet[1];
5209 nod_pt->
x(2) = x_tet[2];
5217 brick_el0_pt = el_pt;
5218 Element_pt.push_back(el_pt);
5221 tet_el_pt->node_pt(0), tet_el_pt->node_pt(1), tet_el_pt->node_pt(2));
5224 tet_el_pt->node_pt(0), tet_el_pt->node_pt(2), tet_el_pt->node_pt(3));
5227 tet_el_pt->node_pt(0), tet_el_pt->node_pt(1), tet_el_pt->node_pt(3));
5232 tet_edge_node[0].resize(2);
5233 tet_edge_node[0][0] = 4;
5234 tet_edge_node[0][1] = 1;
5235 tet_edge_node[1].resize(2);
5236 tet_edge_node[1][0] = 6;
5237 tet_edge_node[1][1] = 3;
5238 tet_edge_node[2].resize(2);
5239 tet_edge_node[2][0] = 5;
5240 tet_edge_node[2][1] = 2;
5243 unsigned central_tet_vertex = 0;
5245 Node* tet_node_pt = 0;
5246 Node* old_node_pt = 0;
5253 tet_node_pt = tet_el_pt->node_pt(central_tet_vertex);
5254 old_node_pt = tet_node_node_pt[tet_node_pt];
5255 if (old_node_pt == 0)
5257 Node* new_node_pt = 0;
5266 tet_node_node_pt[tet_node_pt] = new_node_pt;
5267 Node_pt.push_back(new_node_pt);
5272 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
5273 tet_el_pt->interpolated_x(s_tet, x_tet);
5274 new_node_pt->
x(0) = x_tet[0];
5275 new_node_pt->
x(1) = x_tet[1];
5276 new_node_pt->
x(2) = x_tet[2];
5281 el_pt->
node_pt(j) = old_node_pt;
5291 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[0][0]);
5292 old_node_pt = tet_node_node_pt[tet_node_pt];
5293 if (old_node_pt == 0)
5295 Node* new_node_pt = 0;
5304 tet_node_node_pt[tet_node_pt] = new_node_pt;
5305 Node_pt.push_back(new_node_pt);
5310 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
5311 tet_el_pt->interpolated_x(s_tet, x_tet);
5312 new_node_pt->
x(0) = x_tet[0];
5313 new_node_pt->
x(1) = x_tet[1];
5314 new_node_pt->
x(2) = x_tet[2];
5319 el_pt->
node_pt(j) = old_node_pt;
5329 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[1][0]);
5330 old_node_pt = tet_node_node_pt[tet_node_pt];
5331 if (old_node_pt == 0)
5333 Node* new_node_pt = 0;
5342 tet_node_node_pt[tet_node_pt] = new_node_pt;
5343 Node_pt.push_back(new_node_pt);
5348 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
5349 tet_el_pt->interpolated_x(s_tet, x_tet);
5350 new_node_pt->
x(0) = x_tet[0];
5351 new_node_pt->
x(1) = x_tet[1];
5352 new_node_pt->
x(2) = x_tet[2];
5357 el_pt->
node_pt(j) = old_node_pt;
5367 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[2][0]);
5368 old_node_pt = tet_node_node_pt[tet_node_pt];
5369 if (old_node_pt == 0)
5371 Node* new_node_pt = 0;
5380 tet_node_node_pt[tet_node_pt] = new_node_pt;
5381 Node_pt.push_back(new_node_pt);
5386 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
5387 tet_el_pt->interpolated_x(s_tet, x_tet);
5388 new_node_pt->
x(0) = x_tet[0];
5389 new_node_pt->
x(1) = x_tet[1];
5390 new_node_pt->
x(2) = x_tet[2];
5395 el_pt->
node_pt(j) = old_node_pt;
5406 old_node_pt = tet_face_node_pt[
face0];
5407 if (old_node_pt == 0)
5409 Node* new_node_pt = 0;
5410 if (
face0.is_boundary_face())
5418 tet_face_node_pt[
face0] = new_node_pt;
5419 Node_pt.push_back(new_node_pt);
5424 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
5425 tet_el_pt->interpolated_x(s_tet, x_tet);
5426 new_node_pt->
x(0) = x_tet[0];
5427 new_node_pt->
x(1) = x_tet[1];
5428 new_node_pt->
x(2) = x_tet[2];
5433 el_pt->
node_pt(j) = old_node_pt;
5443 old_node_pt = tet_face_node_pt[
face1];
5444 if (old_node_pt == 0)
5446 Node* new_node_pt = 0;
5447 if (
face1.is_boundary_face())
5455 tet_face_node_pt[
face1] = new_node_pt;
5456 Node_pt.push_back(new_node_pt);
5461 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
5462 tet_el_pt->interpolated_x(s_tet, x_tet);
5463 new_node_pt->
x(0) = x_tet[0];
5464 new_node_pt->
x(1) = x_tet[1];
5465 new_node_pt->
x(2) = x_tet[2];
5470 el_pt->
node_pt(j) = old_node_pt;
5480 old_node_pt = tet_face_node_pt[
face2];
5481 if (old_node_pt == 0)
5483 Node* new_node_pt = 0;
5484 if (
face2.is_boundary_face())
5492 tet_face_node_pt[
face2] = new_node_pt;
5493 Node_pt.push_back(new_node_pt);
5498 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
5499 tet_el_pt->interpolated_x(s_tet, x_tet);
5500 new_node_pt->
x(0) = x_tet[0];
5501 new_node_pt->
x(1) = x_tet[1];
5502 new_node_pt->
x(2) = x_tet[2];
5507 el_pt->
node_pt(j) = old_node_pt;
5519 centroid_node_pt = new_node_pt;
5520 Node_pt.push_back(new_node_pt);
5525 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
5526 tet_el_pt->interpolated_x(s_tet, x_tet);
5527 new_node_pt->
x(0) = x_tet[0];
5528 new_node_pt->
x(1) = x_tet[1];
5529 new_node_pt->
x(2) = x_tet[2];
5541 Node_pt.push_back(new_node_pt);
5546 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
5547 tet_el_pt->interpolated_x(s_tet, x_tet);
5548 new_node_pt->
x(0) = x_tet[0];
5549 new_node_pt->
x(1) = x_tet[1];
5550 new_node_pt->
x(2) = x_tet[2];
5560 old_node_pt = brick_edge_node_pt[edge];
5561 if (old_node_pt == 0)
5563 Node* new_node_pt = 0;
5572 brick_edge_node_pt[edge] = new_node_pt;
5573 Node_pt.push_back(new_node_pt);
5578 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
5579 tet_el_pt->interpolated_x(s_tet, x_tet);
5580 new_node_pt->
x(0) = x_tet[0];
5581 new_node_pt->
x(1) = x_tet[1];
5582 new_node_pt->
x(2) = x_tet[2];
5587 el_pt->
node_pt(j) = old_node_pt;
5598 old_node_pt = brick_edge_node_pt[edge];
5599 if (old_node_pt == 0)
5601 Node* new_node_pt = 0;
5610 brick_edge_node_pt[edge] = new_node_pt;
5611 Node_pt.push_back(new_node_pt);
5616 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
5617 tet_el_pt->interpolated_x(s_tet, x_tet);
5618 new_node_pt->
x(0) = x_tet[0];
5619 new_node_pt->
x(1) = x_tet[1];
5620 new_node_pt->
x(2) = x_tet[2];
5625 el_pt->
node_pt(j) = old_node_pt;
5635 old_node_pt = brick_edge_node_pt[edge];
5636 if (old_node_pt == 0)
5638 Node* new_node_pt = 0;
5647 brick_edge_node_pt[edge] = new_node_pt;
5648 Node_pt.push_back(new_node_pt);
5653 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
5654 tet_el_pt->interpolated_x(s_tet, x_tet);
5655 new_node_pt->
x(0) = x_tet[0];
5656 new_node_pt->
x(1) = x_tet[1];
5657 new_node_pt->
x(2) = x_tet[2];
5662 el_pt->
node_pt(j) = old_node_pt;
5672 old_node_pt = brick_edge_node_pt[edge];
5673 if (old_node_pt == 0)
5675 Node* new_node_pt = 0;
5684 brick_edge_node_pt[edge] = new_node_pt;
5685 Node_pt.push_back(new_node_pt);
5690 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
5691 tet_el_pt->interpolated_x(s_tet, x_tet);
5692 new_node_pt->
x(0) = x_tet[0];
5693 new_node_pt->
x(1) = x_tet[1];
5694 new_node_pt->
x(2) = x_tet[2];
5699 el_pt->
node_pt(j) = old_node_pt;
5709 old_node_pt = brick_edge_node_pt[edge];
5710 if (old_node_pt == 0)
5712 Node* new_node_pt = 0;
5721 brick_edge_node_pt[edge] = new_node_pt;
5722 Node_pt.push_back(new_node_pt);
5727 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
5728 tet_el_pt->interpolated_x(s_tet, x_tet);
5729 new_node_pt->
x(0) = x_tet[0];
5730 new_node_pt->
x(1) = x_tet[1];
5731 new_node_pt->
x(2) = x_tet[2];
5736 el_pt->
node_pt(j) = old_node_pt;
5747 old_node_pt = brick_edge_node_pt[edge];
5748 if (old_node_pt == 0)
5750 Node* new_node_pt = 0;
5759 brick_edge_node_pt[edge] = new_node_pt;
5760 Node_pt.push_back(new_node_pt);
5765 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
5766 tet_el_pt->interpolated_x(s_tet, x_tet);
5767 new_node_pt->
x(0) = x_tet[0];
5768 new_node_pt->
x(1) = x_tet[1];
5769 new_node_pt->
x(2) = x_tet[2];
5774 el_pt->
node_pt(j) = old_node_pt;
5784 old_node_pt = brick_edge_node_pt[edge];
5785 if (old_node_pt == 0)
5787 Node* new_node_pt = 0;
5796 brick_edge_node_pt[edge] = new_node_pt;
5797 Node_pt.push_back(new_node_pt);
5802 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
5803 tet_el_pt->interpolated_x(s_tet, x_tet);
5804 new_node_pt->
x(0) = x_tet[0];
5805 new_node_pt->
x(1) = x_tet[1];
5806 new_node_pt->
x(2) = x_tet[2];
5811 el_pt->
node_pt(j) = old_node_pt;
5822 old_node_pt = brick_edge_node_pt[edge];
5823 if (old_node_pt == 0)
5825 Node* new_node_pt = 0;
5834 brick_edge_node_pt[edge] = new_node_pt;
5835 Node_pt.push_back(new_node_pt);
5840 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
5841 tet_el_pt->interpolated_x(s_tet, x_tet);
5842 new_node_pt->
x(0) = x_tet[0];
5843 new_node_pt->
x(1) = x_tet[1];
5844 new_node_pt->
x(2) = x_tet[2];
5849 el_pt->
node_pt(j) = old_node_pt;
5859 old_node_pt = brick_edge_node_pt[edge];
5860 if (old_node_pt == 0)
5862 Node* new_node_pt = 0;
5871 brick_edge_node_pt[edge] = new_node_pt;
5872 Node_pt.push_back(new_node_pt);
5877 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
5878 tet_el_pt->interpolated_x(s_tet, x_tet);
5879 new_node_pt->
x(0) = x_tet[0];
5880 new_node_pt->
x(1) = x_tet[1];
5881 new_node_pt->
x(2) = x_tet[2];
5886 el_pt->
node_pt(j) = old_node_pt;
5897 old_node_pt = brick_edge_node_pt[edge];
5898 if (old_node_pt == 0)
5900 Node* new_node_pt = 0;
5909 brick_edge_node_pt[edge] = new_node_pt;
5910 Node_pt.push_back(new_node_pt);
5915 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
5916 tet_el_pt->interpolated_x(s_tet, x_tet);
5917 new_node_pt->
x(0) = x_tet[0];
5918 new_node_pt->
x(1) = x_tet[1];
5919 new_node_pt->
x(2) = x_tet[2];
5924 el_pt->
node_pt(j) = old_node_pt;
5935 old_node_pt = brick_edge_node_pt[edge];
5936 if (old_node_pt == 0)
5938 Node* new_node_pt = 0;
5947 brick_edge_node_pt[edge] = new_node_pt;
5948 Node_pt.push_back(new_node_pt);
5953 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
5954 tet_el_pt->interpolated_x(s_tet, x_tet);
5955 new_node_pt->
x(0) = x_tet[0];
5956 new_node_pt->
x(1) = x_tet[1];
5957 new_node_pt->
x(2) = x_tet[2];
5962 el_pt->
node_pt(j) = old_node_pt;
5973 old_node_pt = brick_edge_node_pt[edge];
5974 if (old_node_pt == 0)
5976 Node* new_node_pt = 0;
5985 brick_edge_node_pt[edge] = new_node_pt;
5986 Node_pt.push_back(new_node_pt);
5991 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
5992 tet_el_pt->interpolated_x(s_tet, x_tet);
5993 new_node_pt->
x(0) = x_tet[0];
5994 new_node_pt->
x(1) = x_tet[1];
5995 new_node_pt->
x(2) = x_tet[2];
6000 el_pt->
node_pt(j) = old_node_pt;
6011 TFace face(tet_el_pt->node_pt(central_tet_vertex),
6012 tet_el_pt->node_pt(tet_edge_node[0][0]),
6013 tet_el_pt->node_pt(tet_edge_node[2][0]));
6015 old_node_pt = tet_face_node_pt[face];
6016 if (old_node_pt == 0)
6018 Node* new_node_pt = 0;
6027 tet_face_node_pt[face] = new_node_pt;
6028 Node_pt.push_back(new_node_pt);
6033 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
6034 tet_el_pt->interpolated_x(s_tet, x_tet);
6035 new_node_pt->
x(0) = x_tet[0];
6036 new_node_pt->
x(1) = x_tet[1];
6037 new_node_pt->
x(2) = x_tet[2];
6042 el_pt->
node_pt(j) = old_node_pt;
6053 TFace face(tet_el_pt->node_pt(central_tet_vertex),
6054 tet_el_pt->node_pt(tet_edge_node[1][0]),
6055 tet_el_pt->node_pt(tet_edge_node[2][0]));
6057 old_node_pt = tet_face_node_pt[face];
6058 if (old_node_pt == 0)
6060 Node* new_node_pt = 0;
6069 tet_face_node_pt[face] = new_node_pt;
6070 Node_pt.push_back(new_node_pt);
6075 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
6076 tet_el_pt->interpolated_x(s_tet, x_tet);
6077 new_node_pt->
x(0) = x_tet[0];
6078 new_node_pt->
x(1) = x_tet[1];
6079 new_node_pt->
x(2) = x_tet[2];
6084 el_pt->
node_pt(j) = old_node_pt;
6095 TFace face(tet_el_pt->node_pt(central_tet_vertex),
6096 tet_el_pt->node_pt(tet_edge_node[0][0]),
6097 tet_el_pt->node_pt(tet_edge_node[1][0]));
6099 old_node_pt = tet_face_node_pt[face];
6100 if (old_node_pt == 0)
6102 Node* new_node_pt = 0;
6111 tet_face_node_pt[face] = new_node_pt;
6112 Node_pt.push_back(new_node_pt);
6117 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
6118 tet_el_pt->interpolated_x(s_tet, x_tet);
6119 new_node_pt->
x(0) = x_tet[0];
6120 new_node_pt->
x(1) = x_tet[1];
6121 new_node_pt->
x(2) = x_tet[2];
6126 el_pt->
node_pt(j) = old_node_pt;
6135 Node_pt.push_back(new_node_pt);
6140 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
6141 top_mid_face_node0_pt = new_node_pt;
6142 tet_el_pt->interpolated_x(s_tet, x_tet);
6143 new_node_pt->
x(0) = x_tet[0];
6144 new_node_pt->
x(1) = x_tet[1];
6145 new_node_pt->
x(2) = x_tet[2];
6153 Node_pt.push_back(new_node_pt);
6158 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
6159 right_mid_face_node0_pt = new_node_pt;
6160 tet_el_pt->interpolated_x(s_tet, x_tet);
6161 new_node_pt->
x(0) = x_tet[0];
6162 new_node_pt->
x(1) = x_tet[1];
6163 new_node_pt->
x(2) = x_tet[2];
6171 Node_pt.push_back(new_node_pt);
6176 dummy_q_el_pt[0]->interpolated_s_tet(
s, s_tet);
6177 back_mid_face_node0_pt = new_node_pt;
6178 tet_el_pt->interpolated_x(s_tet, x_tet);
6179 new_node_pt->
x(0) = x_tet[0];
6180 new_node_pt->
x(1) = x_tet[1];
6181 new_node_pt->
x(2) = x_tet[2];
6190 for (
unsigned j = 0; j < 8; j++)
6192 Node* nod_pt = dummy_q_el_pt[1]->node_pt(j);
6198 tet_el_pt->local_coordinate_of_node(1, s_tet);
6202 tet_el_pt->interpolated_x(s_tet, x_tet);
6203 nod_pt->
x(0) = x_tet[0];
6204 nod_pt->
x(1) = x_tet[1];
6205 nod_pt->
x(2) = x_tet[2];
6208 tet_el_pt->local_coordinate_of_node(9, s_tet);
6212 tet_el_pt->interpolated_x(s_tet, x_tet);
6213 nod_pt->
x(0) = x_tet[0];
6214 nod_pt->
x(1) = x_tet[1];
6215 nod_pt->
x(2) = x_tet[2];
6218 tet_el_pt->local_coordinate_of_node(4, s_tet);
6222 tet_el_pt->interpolated_x(s_tet, x_tet);
6223 nod_pt->
x(0) = x_tet[0];
6224 nod_pt->
x(1) = x_tet[1];
6225 nod_pt->
x(2) = x_tet[2];
6230 s_tet[0] = 1.0 / 3.0;
6231 s_tet[1] = 1.0 / 3.0;
6236 tet_el_pt->interpolated_x(s_tet, x_tet);
6237 nod_pt->
x(0) = x_tet[0];
6238 nod_pt->
x(1) = x_tet[1];
6239 nod_pt->
x(2) = x_tet[2];
6242 tet_el_pt->local_coordinate_of_node(7, s_tet);
6246 tet_el_pt->interpolated_x(s_tet, x_tet);
6247 nod_pt->
x(0) = x_tet[0];
6248 nod_pt->
x(1) = x_tet[1];
6249 nod_pt->
x(2) = x_tet[2];
6255 s_tet[1] = 1.0 / 3.0;
6256 s_tet[2] = 1.0 / 3.0;
6260 tet_el_pt->interpolated_x(s_tet, x_tet);
6261 nod_pt->
x(0) = x_tet[0];
6262 nod_pt->
x(1) = x_tet[1];
6263 nod_pt->
x(2) = x_tet[2];
6268 s_tet[0] = 1.0 / 3.0;
6269 s_tet[1] = 1.0 / 3.0;
6270 s_tet[2] = 1.0 / 3.0;
6274 tet_el_pt->interpolated_x(s_tet, x_tet);
6275 nod_pt->
x(0) = x_tet[0];
6276 nod_pt->
x(1) = x_tet[1];
6277 nod_pt->
x(2) = x_tet[2];
6287 tet_el_pt->interpolated_x(s_tet, x_tet);
6288 nod_pt->
x(0) = x_tet[0];
6289 nod_pt->
x(1) = x_tet[1];
6290 nod_pt->
x(2) = x_tet[2];
6298 brick_el1_pt = el_pt;
6299 Element_pt.push_back(el_pt);
6302 tet_el_pt->node_pt(1), tet_el_pt->node_pt(3), tet_el_pt->node_pt(2));
6305 tet_el_pt->node_pt(1), tet_el_pt->node_pt(0), tet_el_pt->node_pt(2));
6308 tet_el_pt->node_pt(1), tet_el_pt->node_pt(0), tet_el_pt->node_pt(3));
6312 tet_edge_node[0].resize(2);
6313 tet_edge_node[0][0] = 9;
6314 tet_edge_node[0][1] = 3;
6315 tet_edge_node[1].resize(2);
6316 tet_edge_node[1][0] = 4;
6317 tet_edge_node[1][1] = 0;
6318 tet_edge_node[2].resize(2);
6319 tet_edge_node[2][0] = 7;
6320 tet_edge_node[2][1] = 2;
6323 unsigned central_tet_vertex = 1;
6325 Node* tet_node_pt = 0;
6326 Node* old_node_pt = 0;
6333 tet_node_pt = tet_el_pt->node_pt(central_tet_vertex);
6334 old_node_pt = tet_node_node_pt[tet_node_pt];
6335 if (old_node_pt == 0)
6337 Node* new_node_pt = 0;
6346 tet_node_node_pt[tet_node_pt] = new_node_pt;
6347 Node_pt.push_back(new_node_pt);
6352 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
6353 tet_el_pt->interpolated_x(s_tet, x_tet);
6354 new_node_pt->
x(0) = x_tet[0];
6355 new_node_pt->
x(1) = x_tet[1];
6356 new_node_pt->
x(2) = x_tet[2];
6361 el_pt->
node_pt(j) = old_node_pt;
6371 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[0][0]);
6372 old_node_pt = tet_node_node_pt[tet_node_pt];
6373 if (old_node_pt == 0)
6375 Node* new_node_pt = 0;
6384 tet_node_node_pt[tet_node_pt] = new_node_pt;
6385 Node_pt.push_back(new_node_pt);
6390 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
6391 tet_el_pt->interpolated_x(s_tet, x_tet);
6392 new_node_pt->
x(0) = x_tet[0];
6393 new_node_pt->
x(1) = x_tet[1];
6394 new_node_pt->
x(2) = x_tet[2];
6399 el_pt->
node_pt(j) = old_node_pt;
6409 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[1][0]);
6410 old_node_pt = tet_node_node_pt[tet_node_pt];
6411 if (old_node_pt == 0)
6413 Node* new_node_pt = 0;
6422 tet_node_node_pt[tet_node_pt] = new_node_pt;
6423 Node_pt.push_back(new_node_pt);
6428 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
6429 tet_el_pt->interpolated_x(s_tet, x_tet);
6430 new_node_pt->
x(0) = x_tet[0];
6431 new_node_pt->
x(1) = x_tet[1];
6432 new_node_pt->
x(2) = x_tet[2];
6437 el_pt->
node_pt(j) = old_node_pt;
6447 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[2][0]);
6448 old_node_pt = tet_node_node_pt[tet_node_pt];
6449 if (old_node_pt == 0)
6451 Node* new_node_pt = 0;
6460 tet_node_node_pt[tet_node_pt] = new_node_pt;
6461 Node_pt.push_back(new_node_pt);
6466 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
6467 tet_el_pt->interpolated_x(s_tet, x_tet);
6468 new_node_pt->
x(0) = x_tet[0];
6469 new_node_pt->
x(1) = x_tet[1];
6470 new_node_pt->
x(2) = x_tet[2];
6475 el_pt->
node_pt(j) = old_node_pt;
6485 old_node_pt = tet_face_node_pt[
face0];
6486 if (old_node_pt == 0)
6488 Node* new_node_pt = 0;
6489 if (
face0.is_boundary_face())
6497 tet_face_node_pt[
face0] = new_node_pt;
6498 Node_pt.push_back(new_node_pt);
6503 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
6504 tet_el_pt->interpolated_x(s_tet, x_tet);
6505 new_node_pt->
x(0) = x_tet[0];
6506 new_node_pt->
x(1) = x_tet[1];
6507 new_node_pt->
x(2) = x_tet[2];
6512 el_pt->
node_pt(j) = old_node_pt;
6521 old_node_pt = tet_face_node_pt[
face1];
6522 if (old_node_pt == 0)
6524 Node* new_node_pt = 0;
6525 if (
face1.is_boundary_face())
6533 tet_face_node_pt[
face1] = new_node_pt;
6534 Node_pt.push_back(new_node_pt);
6539 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
6540 tet_el_pt->interpolated_x(s_tet, x_tet);
6541 new_node_pt->
x(0) = x_tet[0];
6542 new_node_pt->
x(1) = x_tet[1];
6543 new_node_pt->
x(2) = x_tet[2];
6548 el_pt->
node_pt(j) = old_node_pt;
6557 old_node_pt = tet_face_node_pt[
face2];
6558 if (old_node_pt == 0)
6560 Node* new_node_pt = 0;
6561 if (
face2.is_boundary_face())
6569 tet_face_node_pt[
face2] = new_node_pt;
6570 Node_pt.push_back(new_node_pt);
6575 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
6576 tet_el_pt->interpolated_x(s_tet, x_tet);
6577 new_node_pt->
x(0) = x_tet[0];
6578 new_node_pt->
x(1) = x_tet[1];
6579 new_node_pt->
x(2) = x_tet[2];
6584 el_pt->
node_pt(j) = old_node_pt;
6595 el_pt->
node_pt(j) = centroid_node_pt;
6606 Node_pt.push_back(new_node_pt);
6611 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
6612 tet_el_pt->interpolated_x(s_tet, x_tet);
6613 new_node_pt->
x(0) = x_tet[0];
6614 new_node_pt->
x(1) = x_tet[1];
6615 new_node_pt->
x(2) = x_tet[2];
6626 old_node_pt = brick_edge_node_pt[edge];
6627 if (old_node_pt == 0)
6629 Node* new_node_pt = 0;
6638 brick_edge_node_pt[edge] = new_node_pt;
6639 Node_pt.push_back(new_node_pt);
6644 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
6645 tet_el_pt->interpolated_x(s_tet, x_tet);
6646 new_node_pt->
x(0) = x_tet[0];
6647 new_node_pt->
x(1) = x_tet[1];
6648 new_node_pt->
x(2) = x_tet[2];
6653 el_pt->
node_pt(j) = old_node_pt;
6664 old_node_pt = brick_edge_node_pt[edge];
6665 if (old_node_pt == 0)
6667 Node* new_node_pt = 0;
6676 brick_edge_node_pt[edge] = new_node_pt;
6677 Node_pt.push_back(new_node_pt);
6682 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
6683 tet_el_pt->interpolated_x(s_tet, x_tet);
6684 new_node_pt->
x(0) = x_tet[0];
6685 new_node_pt->
x(1) = x_tet[1];
6686 new_node_pt->
x(2) = x_tet[2];
6691 el_pt->
node_pt(j) = old_node_pt;
6702 old_node_pt = brick_edge_node_pt[edge];
6703 if (old_node_pt == 0)
6705 Node* new_node_pt = 0;
6714 brick_edge_node_pt[edge] = new_node_pt;
6715 Node_pt.push_back(new_node_pt);
6720 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
6721 tet_el_pt->interpolated_x(s_tet, x_tet);
6722 new_node_pt->
x(0) = x_tet[0];
6723 new_node_pt->
x(1) = x_tet[1];
6724 new_node_pt->
x(2) = x_tet[2];
6729 el_pt->
node_pt(j) = old_node_pt;
6739 old_node_pt = brick_edge_node_pt[edge];
6740 if (old_node_pt == 0)
6742 Node* new_node_pt = 0;
6751 brick_edge_node_pt[edge] = new_node_pt;
6752 Node_pt.push_back(new_node_pt);
6757 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
6758 tet_el_pt->interpolated_x(s_tet, x_tet);
6759 new_node_pt->
x(0) = x_tet[0];
6760 new_node_pt->
x(1) = x_tet[1];
6761 new_node_pt->
x(2) = x_tet[2];
6766 el_pt->
node_pt(j) = old_node_pt;
6776 old_node_pt = brick_edge_node_pt[edge];
6777 if (old_node_pt == 0)
6779 Node* new_node_pt = 0;
6788 brick_edge_node_pt[edge] = new_node_pt;
6789 Node_pt.push_back(new_node_pt);
6794 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
6795 tet_el_pt->interpolated_x(s_tet, x_tet);
6796 new_node_pt->
x(0) = x_tet[0];
6797 new_node_pt->
x(1) = x_tet[1];
6798 new_node_pt->
x(2) = x_tet[2];
6803 el_pt->
node_pt(j) = old_node_pt;
6814 old_node_pt = brick_edge_node_pt[edge];
6815 if (old_node_pt == 0)
6817 Node* new_node_pt = 0;
6826 brick_edge_node_pt[edge] = new_node_pt;
6827 Node_pt.push_back(new_node_pt);
6832 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
6833 tet_el_pt->interpolated_x(s_tet, x_tet);
6834 new_node_pt->
x(0) = x_tet[0];
6835 new_node_pt->
x(1) = x_tet[1];
6836 new_node_pt->
x(2) = x_tet[2];
6841 el_pt->
node_pt(j) = old_node_pt;
6851 old_node_pt = brick_edge_node_pt[edge];
6852 if (old_node_pt == 0)
6854 Node* new_node_pt = 0;
6863 brick_edge_node_pt[edge] = new_node_pt;
6864 Node_pt.push_back(new_node_pt);
6869 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
6870 tet_el_pt->interpolated_x(s_tet, x_tet);
6871 new_node_pt->
x(0) = x_tet[0];
6872 new_node_pt->
x(1) = x_tet[1];
6873 new_node_pt->
x(2) = x_tet[2];
6878 el_pt->
node_pt(j) = old_node_pt;
6889 old_node_pt = brick_edge_node_pt[edge];
6890 if (old_node_pt == 0)
6892 Node* new_node_pt = 0;
6901 brick_edge_node_pt[edge] = new_node_pt;
6902 Node_pt.push_back(new_node_pt);
6907 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
6908 tet_el_pt->interpolated_x(s_tet, x_tet);
6909 new_node_pt->
x(0) = x_tet[0];
6910 new_node_pt->
x(1) = x_tet[1];
6911 new_node_pt->
x(2) = x_tet[2];
6916 el_pt->
node_pt(j) = old_node_pt;
6926 old_node_pt = brick_edge_node_pt[edge];
6927 if (old_node_pt == 0)
6929 Node* new_node_pt = 0;
6938 brick_edge_node_pt[edge] = new_node_pt;
6939 Node_pt.push_back(new_node_pt);
6944 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
6945 tet_el_pt->interpolated_x(s_tet, x_tet);
6946 new_node_pt->
x(0) = x_tet[0];
6947 new_node_pt->
x(1) = x_tet[1];
6948 new_node_pt->
x(2) = x_tet[2];
6953 el_pt->
node_pt(j) = old_node_pt;
6964 old_node_pt = brick_edge_node_pt[edge];
6965 if (old_node_pt == 0)
6967 Node* new_node_pt = 0;
6976 brick_edge_node_pt[edge] = new_node_pt;
6977 Node_pt.push_back(new_node_pt);
6982 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
6983 tet_el_pt->interpolated_x(s_tet, x_tet);
6984 new_node_pt->
x(0) = x_tet[0];
6985 new_node_pt->
x(1) = x_tet[1];
6986 new_node_pt->
x(2) = x_tet[2];
6991 el_pt->
node_pt(j) = old_node_pt;
7002 old_node_pt = brick_edge_node_pt[edge];
7003 if (old_node_pt == 0)
7005 Node* new_node_pt = 0;
7014 brick_edge_node_pt[edge] = new_node_pt;
7015 Node_pt.push_back(new_node_pt);
7020 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
7021 tet_el_pt->interpolated_x(s_tet, x_tet);
7022 new_node_pt->
x(0) = x_tet[0];
7023 new_node_pt->
x(1) = x_tet[1];
7024 new_node_pt->
x(2) = x_tet[2];
7029 el_pt->
node_pt(j) = old_node_pt;
7040 old_node_pt = brick_edge_node_pt[edge];
7041 if (old_node_pt == 0)
7043 Node* new_node_pt = 0;
7052 brick_edge_node_pt[edge] = new_node_pt;
7053 Node_pt.push_back(new_node_pt);
7058 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
7059 tet_el_pt->interpolated_x(s_tet, x_tet);
7060 new_node_pt->
x(0) = x_tet[0];
7061 new_node_pt->
x(1) = x_tet[1];
7062 new_node_pt->
x(2) = x_tet[2];
7067 el_pt->
node_pt(j) = old_node_pt;
7078 TFace face(tet_el_pt->node_pt(central_tet_vertex),
7079 tet_el_pt->node_pt(tet_edge_node[0][0]),
7080 tet_el_pt->node_pt(tet_edge_node[2][0]));
7082 old_node_pt = tet_face_node_pt[face];
7083 if (old_node_pt == 0)
7085 Node* new_node_pt = 0;
7094 tet_face_node_pt[face] = new_node_pt;
7095 Node_pt.push_back(new_node_pt);
7100 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
7101 tet_el_pt->interpolated_x(s_tet, x_tet);
7102 new_node_pt->
x(0) = x_tet[0];
7103 new_node_pt->
x(1) = x_tet[1];
7104 new_node_pt->
x(2) = x_tet[2];
7109 el_pt->
node_pt(j) = old_node_pt;
7120 TFace face(tet_el_pt->node_pt(central_tet_vertex),
7121 tet_el_pt->node_pt(tet_edge_node[1][0]),
7122 tet_el_pt->node_pt(tet_edge_node[2][0]));
7124 old_node_pt = tet_face_node_pt[face];
7125 if (old_node_pt == 0)
7127 Node* new_node_pt = 0;
7136 tet_face_node_pt[face] = new_node_pt;
7137 Node_pt.push_back(new_node_pt);
7142 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
7143 tet_el_pt->interpolated_x(s_tet, x_tet);
7144 new_node_pt->
x(0) = x_tet[0];
7145 new_node_pt->
x(1) = x_tet[1];
7146 new_node_pt->
x(2) = x_tet[2];
7151 el_pt->
node_pt(j) = old_node_pt;
7162 TFace face(tet_el_pt->node_pt(central_tet_vertex),
7163 tet_el_pt->node_pt(tet_edge_node[0][0]),
7164 tet_el_pt->node_pt(tet_edge_node[1][0]));
7166 old_node_pt = tet_face_node_pt[face];
7167 if (old_node_pt == 0)
7169 Node* new_node_pt = 0;
7178 tet_face_node_pt[face] = new_node_pt;
7179 Node_pt.push_back(new_node_pt);
7184 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
7185 tet_el_pt->interpolated_x(s_tet, x_tet);
7186 new_node_pt->
x(0) = x_tet[0];
7187 new_node_pt->
x(1) = x_tet[1];
7188 new_node_pt->
x(2) = x_tet[2];
7193 el_pt->
node_pt(j) = old_node_pt;
7202 Node_pt.push_back(new_node_pt);
7207 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
7208 top_mid_face_node1_pt = new_node_pt;
7209 tet_el_pt->interpolated_x(s_tet, x_tet);
7210 new_node_pt->
x(0) = x_tet[0];
7211 new_node_pt->
x(1) = x_tet[1];
7212 new_node_pt->
x(2) = x_tet[2];
7220 Node_pt.push_back(new_node_pt);
7225 dummy_q_el_pt[1]->interpolated_s_tet(
s, s_tet);
7226 right_mid_face_node1_pt = new_node_pt;
7227 tet_el_pt->interpolated_x(s_tet, x_tet);
7228 new_node_pt->
x(0) = x_tet[0];
7229 new_node_pt->
x(1) = x_tet[1];
7230 new_node_pt->
x(2) = x_tet[2];
7239 el_pt->
node_pt(j) = right_mid_face_node0_pt;
7248 for (
unsigned j = 0; j < 8; j++)
7250 Node* nod_pt = dummy_q_el_pt[2]->node_pt(j);
7256 tet_el_pt->local_coordinate_of_node(3, s_tet);
7260 tet_el_pt->interpolated_x(s_tet, x_tet);
7261 nod_pt->
x(0) = x_tet[0];
7262 nod_pt->
x(1) = x_tet[1];
7263 nod_pt->
x(2) = x_tet[2];
7266 tet_el_pt->local_coordinate_of_node(6, s_tet);
7270 tet_el_pt->interpolated_x(s_tet, x_tet);
7271 nod_pt->
x(0) = x_tet[0];
7272 nod_pt->
x(1) = x_tet[1];
7273 nod_pt->
x(2) = x_tet[2];
7276 tet_el_pt->local_coordinate_of_node(9, s_tet);
7280 tet_el_pt->interpolated_x(s_tet, x_tet);
7281 nod_pt->
x(0) = x_tet[0];
7282 nod_pt->
x(1) = x_tet[1];
7283 nod_pt->
x(2) = x_tet[2];
7288 s_tet[0] = 1.0 / 3.0;
7289 s_tet[1] = 1.0 / 3.0;
7294 tet_el_pt->interpolated_x(s_tet, x_tet);
7295 nod_pt->
x(0) = x_tet[0];
7296 nod_pt->
x(1) = x_tet[1];
7297 nod_pt->
x(2) = x_tet[2];
7300 tet_el_pt->local_coordinate_of_node(8, s_tet);
7304 tet_el_pt->interpolated_x(s_tet, x_tet);
7305 nod_pt->
x(0) = x_tet[0];
7306 nod_pt->
x(1) = x_tet[1];
7307 nod_pt->
x(2) = x_tet[2];
7312 s_tet[0] = 1.0 / 3.0;
7314 s_tet[2] = 1.0 / 3.0;
7318 tet_el_pt->interpolated_x(s_tet, x_tet);
7319 nod_pt->
x(0) = x_tet[0];
7320 nod_pt->
x(1) = x_tet[1];
7321 nod_pt->
x(2) = x_tet[2];
7327 s_tet[1] = 1.0 / 3.0;
7328 s_tet[2] = 1.0 / 3.0;
7332 tet_el_pt->interpolated_x(s_tet, x_tet);
7333 nod_pt->
x(0) = x_tet[0];
7334 nod_pt->
x(1) = x_tet[1];
7335 nod_pt->
x(2) = x_tet[2];
7345 tet_el_pt->interpolated_x(s_tet, x_tet);
7346 nod_pt->
x(0) = x_tet[0];
7347 nod_pt->
x(1) = x_tet[1];
7348 nod_pt->
x(2) = x_tet[2];
7356 brick_el2_pt = el_pt;
7357 Element_pt.push_back(el_pt);
7360 tet_el_pt->node_pt(3), tet_el_pt->node_pt(0), tet_el_pt->node_pt(2));
7363 tet_el_pt->node_pt(3), tet_el_pt->node_pt(1), tet_el_pt->node_pt(2));
7366 tet_el_pt->node_pt(3), tet_el_pt->node_pt(1), tet_el_pt->node_pt(0));
7370 tet_edge_node[0].resize(2);
7371 tet_edge_node[0][0] = 6;
7372 tet_edge_node[0][1] = 0;
7373 tet_edge_node[1].resize(2);
7374 tet_edge_node[1][0] = 9;
7375 tet_edge_node[1][1] = 1;
7376 tet_edge_node[2].resize(2);
7377 tet_edge_node[2][0] = 8;
7378 tet_edge_node[2][1] = 2;
7381 unsigned central_tet_vertex = 3;
7383 Node* tet_node_pt = 0;
7384 Node* old_node_pt = 0;
7391 tet_node_pt = tet_el_pt->node_pt(central_tet_vertex);
7392 old_node_pt = tet_node_node_pt[tet_node_pt];
7393 if (old_node_pt == 0)
7395 Node* new_node_pt = 0;
7404 tet_node_node_pt[tet_node_pt] = new_node_pt;
7405 Node_pt.push_back(new_node_pt);
7410 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
7411 tet_el_pt->interpolated_x(s_tet, x_tet);
7412 new_node_pt->
x(0) = x_tet[0];
7413 new_node_pt->
x(1) = x_tet[1];
7414 new_node_pt->
x(2) = x_tet[2];
7419 el_pt->
node_pt(j) = old_node_pt;
7429 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[0][0]);
7430 old_node_pt = tet_node_node_pt[tet_node_pt];
7431 if (old_node_pt == 0)
7433 Node* new_node_pt = 0;
7442 tet_node_node_pt[tet_node_pt] = new_node_pt;
7443 Node_pt.push_back(new_node_pt);
7448 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
7449 tet_el_pt->interpolated_x(s_tet, x_tet);
7450 new_node_pt->
x(0) = x_tet[0];
7451 new_node_pt->
x(1) = x_tet[1];
7452 new_node_pt->
x(2) = x_tet[2];
7457 el_pt->
node_pt(j) = old_node_pt;
7467 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[1][0]);
7468 old_node_pt = tet_node_node_pt[tet_node_pt];
7469 if (old_node_pt == 0)
7471 Node* new_node_pt = 0;
7480 tet_node_node_pt[tet_node_pt] = new_node_pt;
7481 Node_pt.push_back(new_node_pt);
7486 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
7487 tet_el_pt->interpolated_x(s_tet, x_tet);
7488 new_node_pt->
x(0) = x_tet[0];
7489 new_node_pt->
x(1) = x_tet[1];
7490 new_node_pt->
x(2) = x_tet[2];
7495 el_pt->
node_pt(j) = old_node_pt;
7505 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[2][0]);
7506 old_node_pt = tet_node_node_pt[tet_node_pt];
7507 if (old_node_pt == 0)
7509 Node* new_node_pt = 0;
7518 tet_node_node_pt[tet_node_pt] = new_node_pt;
7519 Node_pt.push_back(new_node_pt);
7524 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
7525 tet_el_pt->interpolated_x(s_tet, x_tet);
7526 new_node_pt->
x(0) = x_tet[0];
7527 new_node_pt->
x(1) = x_tet[1];
7528 new_node_pt->
x(2) = x_tet[2];
7533 el_pt->
node_pt(j) = old_node_pt;
7543 old_node_pt = tet_face_node_pt[
face0];
7544 if (old_node_pt == 0)
7546 Node* new_node_pt = 0;
7547 if (
face0.is_boundary_face())
7555 tet_face_node_pt[
face0] = new_node_pt;
7556 Node_pt.push_back(new_node_pt);
7561 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
7562 tet_el_pt->interpolated_x(s_tet, x_tet);
7563 new_node_pt->
x(0) = x_tet[0];
7564 new_node_pt->
x(1) = x_tet[1];
7565 new_node_pt->
x(2) = x_tet[2];
7570 el_pt->
node_pt(j) = old_node_pt;
7579 old_node_pt = tet_face_node_pt[
face1];
7580 if (old_node_pt == 0)
7582 Node* new_node_pt = 0;
7583 if (
face1.is_boundary_face())
7591 tet_face_node_pt[
face1] = new_node_pt;
7592 Node_pt.push_back(new_node_pt);
7597 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
7598 tet_el_pt->interpolated_x(s_tet, x_tet);
7599 new_node_pt->
x(0) = x_tet[0];
7600 new_node_pt->
x(1) = x_tet[1];
7601 new_node_pt->
x(2) = x_tet[2];
7606 el_pt->
node_pt(j) = old_node_pt;
7615 old_node_pt = tet_face_node_pt[
face2];
7616 if (old_node_pt == 0)
7618 Node* new_node_pt = 0;
7619 if (
face2.is_boundary_face())
7627 tet_face_node_pt[
face2] = new_node_pt;
7628 Node_pt.push_back(new_node_pt);
7633 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
7634 tet_el_pt->interpolated_x(s_tet, x_tet);
7635 new_node_pt->
x(0) = x_tet[0];
7636 new_node_pt->
x(1) = x_tet[1];
7637 new_node_pt->
x(2) = x_tet[2];
7642 el_pt->
node_pt(j) = old_node_pt;
7653 el_pt->
node_pt(j) = centroid_node_pt;
7664 Node_pt.push_back(new_node_pt);
7669 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
7670 tet_el_pt->interpolated_x(s_tet, x_tet);
7671 new_node_pt->
x(0) = x_tet[0];
7672 new_node_pt->
x(1) = x_tet[1];
7673 new_node_pt->
x(2) = x_tet[2];
7683 old_node_pt = brick_edge_node_pt[edge];
7684 if (old_node_pt == 0)
7686 Node* new_node_pt = 0;
7695 brick_edge_node_pt[edge] = new_node_pt;
7696 Node_pt.push_back(new_node_pt);
7701 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
7702 tet_el_pt->interpolated_x(s_tet, x_tet);
7703 new_node_pt->
x(0) = x_tet[0];
7704 new_node_pt->
x(1) = x_tet[1];
7705 new_node_pt->
x(2) = x_tet[2];
7710 el_pt->
node_pt(j) = old_node_pt;
7721 old_node_pt = brick_edge_node_pt[edge];
7722 if (old_node_pt == 0)
7724 Node* new_node_pt = 0;
7733 brick_edge_node_pt[edge] = new_node_pt;
7734 Node_pt.push_back(new_node_pt);
7739 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
7740 tet_el_pt->interpolated_x(s_tet, x_tet);
7741 new_node_pt->
x(0) = x_tet[0];
7742 new_node_pt->
x(1) = x_tet[1];
7743 new_node_pt->
x(2) = x_tet[2];
7748 el_pt->
node_pt(j) = old_node_pt;
7758 old_node_pt = brick_edge_node_pt[edge];
7759 if (old_node_pt == 0)
7761 Node* new_node_pt = 0;
7770 brick_edge_node_pt[edge] = new_node_pt;
7771 Node_pt.push_back(new_node_pt);
7776 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
7777 tet_el_pt->interpolated_x(s_tet, x_tet);
7778 new_node_pt->
x(0) = x_tet[0];
7779 new_node_pt->
x(1) = x_tet[1];
7780 new_node_pt->
x(2) = x_tet[2];
7785 el_pt->
node_pt(j) = old_node_pt;
7795 old_node_pt = brick_edge_node_pt[edge];
7796 if (old_node_pt == 0)
7798 Node* new_node_pt = 0;
7807 brick_edge_node_pt[edge] = new_node_pt;
7808 Node_pt.push_back(new_node_pt);
7813 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
7814 tet_el_pt->interpolated_x(s_tet, x_tet);
7815 new_node_pt->
x(0) = x_tet[0];
7816 new_node_pt->
x(1) = x_tet[1];
7817 new_node_pt->
x(2) = x_tet[2];
7822 el_pt->
node_pt(j) = old_node_pt;
7832 old_node_pt = brick_edge_node_pt[edge];
7833 if (old_node_pt == 0)
7835 Node* new_node_pt = 0;
7844 brick_edge_node_pt[edge] = new_node_pt;
7845 Node_pt.push_back(new_node_pt);
7850 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
7851 tet_el_pt->interpolated_x(s_tet, x_tet);
7852 new_node_pt->
x(0) = x_tet[0];
7853 new_node_pt->
x(1) = x_tet[1];
7854 new_node_pt->
x(2) = x_tet[2];
7859 el_pt->
node_pt(j) = old_node_pt;
7870 old_node_pt = brick_edge_node_pt[edge];
7871 if (old_node_pt == 0)
7873 Node* new_node_pt = 0;
7882 brick_edge_node_pt[edge] = new_node_pt;
7883 Node_pt.push_back(new_node_pt);
7888 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
7889 tet_el_pt->interpolated_x(s_tet, x_tet);
7890 new_node_pt->
x(0) = x_tet[0];
7891 new_node_pt->
x(1) = x_tet[1];
7892 new_node_pt->
x(2) = x_tet[2];
7897 el_pt->
node_pt(j) = old_node_pt;
7907 old_node_pt = brick_edge_node_pt[edge];
7908 if (old_node_pt == 0)
7910 Node* new_node_pt = 0;
7919 brick_edge_node_pt[edge] = new_node_pt;
7920 Node_pt.push_back(new_node_pt);
7925 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
7926 tet_el_pt->interpolated_x(s_tet, x_tet);
7927 new_node_pt->
x(0) = x_tet[0];
7928 new_node_pt->
x(1) = x_tet[1];
7929 new_node_pt->
x(2) = x_tet[2];
7934 el_pt->
node_pt(j) = old_node_pt;
7945 old_node_pt = brick_edge_node_pt[edge];
7946 if (old_node_pt == 0)
7948 Node* new_node_pt = 0;
7957 brick_edge_node_pt[edge] = new_node_pt;
7958 Node_pt.push_back(new_node_pt);
7963 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
7964 tet_el_pt->interpolated_x(s_tet, x_tet);
7965 new_node_pt->
x(0) = x_tet[0];
7966 new_node_pt->
x(1) = x_tet[1];
7967 new_node_pt->
x(2) = x_tet[2];
7972 el_pt->
node_pt(j) = old_node_pt;
7982 old_node_pt = brick_edge_node_pt[edge];
7983 if (old_node_pt == 0)
7985 Node* new_node_pt = 0;
7994 brick_edge_node_pt[edge] = new_node_pt;
7995 Node_pt.push_back(new_node_pt);
8000 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
8001 tet_el_pt->interpolated_x(s_tet, x_tet);
8002 new_node_pt->
x(0) = x_tet[0];
8003 new_node_pt->
x(1) = x_tet[1];
8004 new_node_pt->
x(2) = x_tet[2];
8009 el_pt->
node_pt(j) = old_node_pt;
8020 old_node_pt = brick_edge_node_pt[edge];
8021 if (old_node_pt == 0)
8023 Node* new_node_pt = 0;
8032 brick_edge_node_pt[edge] = new_node_pt;
8033 Node_pt.push_back(new_node_pt);
8038 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
8039 tet_el_pt->interpolated_x(s_tet, x_tet);
8040 new_node_pt->
x(0) = x_tet[0];
8041 new_node_pt->
x(1) = x_tet[1];
8042 new_node_pt->
x(2) = x_tet[2];
8047 el_pt->
node_pt(j) = old_node_pt;
8058 old_node_pt = brick_edge_node_pt[edge];
8059 if (old_node_pt == 0)
8061 Node* new_node_pt = 0;
8070 brick_edge_node_pt[edge] = new_node_pt;
8071 Node_pt.push_back(new_node_pt);
8076 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
8077 tet_el_pt->interpolated_x(s_tet, x_tet);
8078 new_node_pt->
x(0) = x_tet[0];
8079 new_node_pt->
x(1) = x_tet[1];
8080 new_node_pt->
x(2) = x_tet[2];
8085 el_pt->
node_pt(j) = old_node_pt;
8096 old_node_pt = brick_edge_node_pt[edge];
8097 if (old_node_pt == 0)
8099 Node* new_node_pt = 0;
8108 brick_edge_node_pt[edge] = new_node_pt;
8109 Node_pt.push_back(new_node_pt);
8114 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
8115 tet_el_pt->interpolated_x(s_tet, x_tet);
8116 new_node_pt->
x(0) = x_tet[0];
8117 new_node_pt->
x(1) = x_tet[1];
8118 new_node_pt->
x(2) = x_tet[2];
8123 el_pt->
node_pt(j) = old_node_pt;
8134 TFace face(tet_el_pt->node_pt(central_tet_vertex),
8135 tet_el_pt->node_pt(tet_edge_node[0][0]),
8136 tet_el_pt->node_pt(tet_edge_node[2][0]));
8138 old_node_pt = tet_face_node_pt[face];
8139 if (old_node_pt == 0)
8141 Node* new_node_pt = 0;
8150 tet_face_node_pt[face] = new_node_pt;
8151 Node_pt.push_back(new_node_pt);
8156 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
8157 tet_el_pt->interpolated_x(s_tet, x_tet);
8158 new_node_pt->
x(0) = x_tet[0];
8159 new_node_pt->
x(1) = x_tet[1];
8160 new_node_pt->
x(2) = x_tet[2];
8165 el_pt->
node_pt(j) = old_node_pt;
8176 TFace face(tet_el_pt->node_pt(central_tet_vertex),
8177 tet_el_pt->node_pt(tet_edge_node[1][0]),
8178 tet_el_pt->node_pt(tet_edge_node[2][0]));
8179 old_node_pt = tet_face_node_pt[face];
8180 if (old_node_pt == 0)
8182 Node* new_node_pt = 0;
8191 tet_face_node_pt[face] = new_node_pt;
8192 Node_pt.push_back(new_node_pt);
8197 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
8198 tet_el_pt->interpolated_x(s_tet, x_tet);
8199 new_node_pt->
x(0) = x_tet[0];
8200 new_node_pt->
x(1) = x_tet[1];
8201 new_node_pt->
x(2) = x_tet[2];
8206 el_pt->
node_pt(j) = old_node_pt;
8217 TFace face(tet_el_pt->node_pt(central_tet_vertex),
8218 tet_el_pt->node_pt(tet_edge_node[0][0]),
8219 tet_el_pt->node_pt(tet_edge_node[1][0]));
8221 old_node_pt = tet_face_node_pt[face];
8222 if (old_node_pt == 0)
8224 Node* new_node_pt = 0;
8233 tet_face_node_pt[face] = new_node_pt;
8234 Node_pt.push_back(new_node_pt);
8239 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
8240 tet_el_pt->interpolated_x(s_tet, x_tet);
8241 new_node_pt->
x(0) = x_tet[0];
8242 new_node_pt->
x(1) = x_tet[1];
8243 new_node_pt->
x(2) = x_tet[2];
8248 el_pt->
node_pt(j) = old_node_pt;
8257 Node_pt.push_back(new_node_pt);
8262 dummy_q_el_pt[2]->interpolated_s_tet(
s, s_tet);
8263 top_mid_face_node2_pt = new_node_pt;
8264 tet_el_pt->interpolated_x(s_tet, x_tet);
8265 new_node_pt->
x(0) = x_tet[0];
8266 new_node_pt->
x(1) = x_tet[1];
8267 new_node_pt->
x(2) = x_tet[2];
8276 el_pt->
node_pt(j) = back_mid_face_node0_pt;
8285 el_pt->
node_pt(j) = right_mid_face_node1_pt;
8294 for (
unsigned j = 0; j < 8; j++)
8296 Node* nod_pt = dummy_q_el_pt[3]->node_pt(j);
8302 tet_el_pt->local_coordinate_of_node(2, s_tet);
8306 tet_el_pt->interpolated_x(s_tet, x_tet);
8307 nod_pt->
x(0) = x_tet[0];
8308 nod_pt->
x(1) = x_tet[1];
8309 nod_pt->
x(2) = x_tet[2];
8312 tet_el_pt->local_coordinate_of_node(7, s_tet);
8316 tet_el_pt->interpolated_x(s_tet, x_tet);
8317 nod_pt->
x(0) = x_tet[0];
8318 nod_pt->
x(1) = x_tet[1];
8319 nod_pt->
x(2) = x_tet[2];
8322 tet_el_pt->local_coordinate_of_node(5, s_tet);
8326 tet_el_pt->interpolated_x(s_tet, x_tet);
8327 nod_pt->
x(0) = x_tet[0];
8328 nod_pt->
x(1) = x_tet[1];
8329 nod_pt->
x(2) = x_tet[2];
8334 s_tet[0] = 1.0 / 3.0;
8335 s_tet[1] = 1.0 / 3.0;
8336 s_tet[2] = 1.0 / 3.0;
8340 tet_el_pt->interpolated_x(s_tet, x_tet);
8341 nod_pt->
x(0) = x_tet[0];
8342 nod_pt->
x(1) = x_tet[1];
8343 nod_pt->
x(2) = x_tet[2];
8346 tet_el_pt->local_coordinate_of_node(8, s_tet);
8350 tet_el_pt->interpolated_x(s_tet, x_tet);
8351 nod_pt->
x(0) = x_tet[0];
8352 nod_pt->
x(1) = x_tet[1];
8353 nod_pt->
x(2) = x_tet[2];
8359 s_tet[1] = 1.0 / 3.0;
8360 s_tet[2] = 1.0 / 3.0;
8364 tet_el_pt->interpolated_x(s_tet, x_tet);
8365 nod_pt->
x(0) = x_tet[0];
8366 nod_pt->
x(1) = x_tet[1];
8367 nod_pt->
x(2) = x_tet[2];
8372 s_tet[0] = 1.0 / 3.0;
8374 s_tet[2] = 1.0 / 3.0;
8378 tet_el_pt->interpolated_x(s_tet, x_tet);
8379 nod_pt->
x(0) = x_tet[0];
8380 nod_pt->
x(1) = x_tet[1];
8381 nod_pt->
x(2) = x_tet[2];
8391 tet_el_pt->interpolated_x(s_tet, x_tet);
8392 nod_pt->
x(0) = x_tet[0];
8393 nod_pt->
x(1) = x_tet[1];
8394 nod_pt->
x(2) = x_tet[2];
8402 brick_el3_pt = el_pt;
8403 Element_pt.push_back(el_pt);
8406 tet_el_pt->node_pt(1), tet_el_pt->node_pt(2), tet_el_pt->node_pt(3));
8409 tet_el_pt->node_pt(0), tet_el_pt->node_pt(2), tet_el_pt->node_pt(3));
8412 tet_el_pt->node_pt(0), tet_el_pt->node_pt(1), tet_el_pt->node_pt(2));
8416 tet_edge_node[0].resize(2);
8417 tet_edge_node[0][0] = 7;
8418 tet_edge_node[0][1] = 1;
8419 tet_edge_node[1].resize(2);
8420 tet_edge_node[1][0] = 5;
8421 tet_edge_node[1][1] = 0;
8422 tet_edge_node[2].resize(2);
8423 tet_edge_node[2][0] = 8;
8424 tet_edge_node[2][1] = 3;
8427 unsigned central_tet_vertex = 2;
8429 Node* tet_node_pt = 0;
8430 Node* old_node_pt = 0;
8437 tet_node_pt = tet_el_pt->node_pt(central_tet_vertex);
8438 old_node_pt = tet_node_node_pt[tet_node_pt];
8439 if (old_node_pt == 0)
8441 Node* new_node_pt = 0;
8450 tet_node_node_pt[tet_node_pt] = new_node_pt;
8451 Node_pt.push_back(new_node_pt);
8456 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
8457 tet_el_pt->interpolated_x(s_tet, x_tet);
8458 new_node_pt->
x(0) = x_tet[0];
8459 new_node_pt->
x(1) = x_tet[1];
8460 new_node_pt->
x(2) = x_tet[2];
8465 el_pt->
node_pt(j) = old_node_pt;
8475 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[0][0]);
8476 old_node_pt = tet_node_node_pt[tet_node_pt];
8477 if (old_node_pt == 0)
8479 Node* new_node_pt = 0;
8488 tet_node_node_pt[tet_node_pt] = new_node_pt;
8489 Node_pt.push_back(new_node_pt);
8494 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
8495 tet_el_pt->interpolated_x(s_tet, x_tet);
8496 new_node_pt->
x(0) = x_tet[0];
8497 new_node_pt->
x(1) = x_tet[1];
8498 new_node_pt->
x(2) = x_tet[2];
8503 el_pt->
node_pt(j) = old_node_pt;
8513 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[1][0]);
8514 old_node_pt = tet_node_node_pt[tet_node_pt];
8515 if (old_node_pt == 0)
8517 Node* new_node_pt = 0;
8526 tet_node_node_pt[tet_node_pt] = new_node_pt;
8527 Node_pt.push_back(new_node_pt);
8532 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
8533 tet_el_pt->interpolated_x(s_tet, x_tet);
8534 new_node_pt->
x(0) = x_tet[0];
8535 new_node_pt->
x(1) = x_tet[1];
8536 new_node_pt->
x(2) = x_tet[2];
8541 el_pt->
node_pt(j) = old_node_pt;
8551 tet_node_pt = tet_el_pt->node_pt(tet_edge_node[2][0]);
8552 old_node_pt = tet_node_node_pt[tet_node_pt];
8553 if (old_node_pt == 0)
8555 Node* new_node_pt = 0;
8564 tet_node_node_pt[tet_node_pt] = new_node_pt;
8565 Node_pt.push_back(new_node_pt);
8570 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
8571 tet_el_pt->interpolated_x(s_tet, x_tet);
8572 new_node_pt->
x(0) = x_tet[0];
8573 new_node_pt->
x(1) = x_tet[1];
8574 new_node_pt->
x(2) = x_tet[2];
8579 el_pt->
node_pt(j) = old_node_pt;
8589 old_node_pt = tet_face_node_pt[
face0];
8590 if (old_node_pt == 0)
8592 Node* new_node_pt = 0;
8593 if (
face0.is_boundary_face())
8601 tet_face_node_pt[
face0] = new_node_pt;
8602 Node_pt.push_back(new_node_pt);
8607 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
8608 tet_el_pt->interpolated_x(s_tet, x_tet);
8609 new_node_pt->
x(0) = x_tet[0];
8610 new_node_pt->
x(1) = x_tet[1];
8611 new_node_pt->
x(2) = x_tet[2];
8616 el_pt->
node_pt(j) = old_node_pt;
8625 old_node_pt = tet_face_node_pt[
face1];
8626 if (old_node_pt == 0)
8628 Node* new_node_pt = 0;
8629 if (
face1.is_boundary_face())
8637 tet_face_node_pt[
face1] = new_node_pt;
8638 Node_pt.push_back(new_node_pt);
8643 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
8644 tet_el_pt->interpolated_x(s_tet, x_tet);
8645 new_node_pt->
x(0) = x_tet[0];
8646 new_node_pt->
x(1) = x_tet[1];
8647 new_node_pt->
x(2) = x_tet[2];
8652 el_pt->
node_pt(j) = old_node_pt;
8661 old_node_pt = tet_face_node_pt[
face2];
8662 if (old_node_pt == 0)
8664 Node* new_node_pt = 0;
8665 if (
face2.is_boundary_face())
8673 tet_face_node_pt[
face2] = new_node_pt;
8674 Node_pt.push_back(new_node_pt);
8679 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
8680 tet_el_pt->interpolated_x(s_tet, x_tet);
8681 new_node_pt->
x(0) = x_tet[0];
8682 new_node_pt->
x(1) = x_tet[1];
8683 new_node_pt->
x(2) = x_tet[2];
8688 el_pt->
node_pt(j) = old_node_pt;
8699 el_pt->
node_pt(j) = centroid_node_pt;
8710 Node_pt.push_back(new_node_pt);
8715 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
8716 tet_el_pt->interpolated_x(s_tet, x_tet);
8717 new_node_pt->
x(0) = x_tet[0];
8718 new_node_pt->
x(1) = x_tet[1];
8719 new_node_pt->
x(2) = x_tet[2];
8729 old_node_pt = brick_edge_node_pt[edge];
8730 if (old_node_pt == 0)
8732 Node* new_node_pt = 0;
8741 brick_edge_node_pt[edge] = new_node_pt;
8742 Node_pt.push_back(new_node_pt);
8747 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
8748 tet_el_pt->interpolated_x(s_tet, x_tet);
8749 new_node_pt->
x(0) = x_tet[0];
8750 new_node_pt->
x(1) = x_tet[1];
8751 new_node_pt->
x(2) = x_tet[2];
8756 el_pt->
node_pt(j) = old_node_pt;
8767 old_node_pt = brick_edge_node_pt[edge];
8768 if (old_node_pt == 0)
8770 Node* new_node_pt = 0;
8779 brick_edge_node_pt[edge] = new_node_pt;
8780 Node_pt.push_back(new_node_pt);
8785 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
8786 tet_el_pt->interpolated_x(s_tet, x_tet);
8787 new_node_pt->
x(0) = x_tet[0];
8788 new_node_pt->
x(1) = x_tet[1];
8789 new_node_pt->
x(2) = x_tet[2];
8794 el_pt->
node_pt(j) = old_node_pt;
8804 old_node_pt = brick_edge_node_pt[edge];
8805 if (old_node_pt == 0)
8807 Node* new_node_pt = 0;
8816 brick_edge_node_pt[edge] = new_node_pt;
8817 Node_pt.push_back(new_node_pt);
8822 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
8823 tet_el_pt->interpolated_x(s_tet, x_tet);
8824 new_node_pt->
x(0) = x_tet[0];
8825 new_node_pt->
x(1) = x_tet[1];
8826 new_node_pt->
x(2) = x_tet[2];
8831 el_pt->
node_pt(j) = old_node_pt;
8841 old_node_pt = brick_edge_node_pt[edge];
8842 if (old_node_pt == 0)
8844 Node* new_node_pt = 0;
8853 brick_edge_node_pt[edge] = new_node_pt;
8854 Node_pt.push_back(new_node_pt);
8859 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
8860 tet_el_pt->interpolated_x(s_tet, x_tet);
8861 new_node_pt->
x(0) = x_tet[0];
8862 new_node_pt->
x(1) = x_tet[1];
8863 new_node_pt->
x(2) = x_tet[2];
8868 el_pt->
node_pt(j) = old_node_pt;
8878 old_node_pt = brick_edge_node_pt[edge];
8879 if (old_node_pt == 0)
8881 Node* new_node_pt = 0;
8890 brick_edge_node_pt[edge] = new_node_pt;
8891 Node_pt.push_back(new_node_pt);
8896 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
8897 tet_el_pt->interpolated_x(s_tet, x_tet);
8898 new_node_pt->
x(0) = x_tet[0];
8899 new_node_pt->
x(1) = x_tet[1];
8900 new_node_pt->
x(2) = x_tet[2];
8905 el_pt->
node_pt(j) = old_node_pt;
8916 old_node_pt = brick_edge_node_pt[edge];
8917 if (old_node_pt == 0)
8919 Node* new_node_pt = 0;
8928 brick_edge_node_pt[edge] = new_node_pt;
8929 Node_pt.push_back(new_node_pt);
8934 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
8935 tet_el_pt->interpolated_x(s_tet, x_tet);
8936 new_node_pt->
x(0) = x_tet[0];
8937 new_node_pt->
x(1) = x_tet[1];
8938 new_node_pt->
x(2) = x_tet[2];
8943 el_pt->
node_pt(j) = old_node_pt;
8953 old_node_pt = brick_edge_node_pt[edge];
8954 if (old_node_pt == 0)
8956 Node* new_node_pt = 0;
8965 brick_edge_node_pt[edge] = new_node_pt;
8966 Node_pt.push_back(new_node_pt);
8971 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
8972 tet_el_pt->interpolated_x(s_tet, x_tet);
8973 new_node_pt->
x(0) = x_tet[0];
8974 new_node_pt->
x(1) = x_tet[1];
8975 new_node_pt->
x(2) = x_tet[2];
8980 el_pt->
node_pt(j) = old_node_pt;
8991 old_node_pt = brick_edge_node_pt[edge];
8992 if (old_node_pt == 0)
8994 Node* new_node_pt = 0;
9003 brick_edge_node_pt[edge] = new_node_pt;
9004 Node_pt.push_back(new_node_pt);
9009 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
9010 tet_el_pt->interpolated_x(s_tet, x_tet);
9011 new_node_pt->
x(0) = x_tet[0];
9012 new_node_pt->
x(1) = x_tet[1];
9013 new_node_pt->
x(2) = x_tet[2];
9018 el_pt->
node_pt(j) = old_node_pt;
9028 old_node_pt = brick_edge_node_pt[edge];
9029 if (old_node_pt == 0)
9031 Node* new_node_pt = 0;
9040 brick_edge_node_pt[edge] = new_node_pt;
9041 Node_pt.push_back(new_node_pt);
9046 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
9047 tet_el_pt->interpolated_x(s_tet, x_tet);
9048 new_node_pt->
x(0) = x_tet[0];
9049 new_node_pt->
x(1) = x_tet[1];
9050 new_node_pt->
x(2) = x_tet[2];
9055 el_pt->
node_pt(j) = old_node_pt;
9066 old_node_pt = brick_edge_node_pt[edge];
9067 if (old_node_pt == 0)
9069 Node* new_node_pt = 0;
9078 brick_edge_node_pt[edge] = new_node_pt;
9079 Node_pt.push_back(new_node_pt);
9084 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
9085 tet_el_pt->interpolated_x(s_tet, x_tet);
9086 new_node_pt->
x(0) = x_tet[0];
9087 new_node_pt->
x(1) = x_tet[1];
9088 new_node_pt->
x(2) = x_tet[2];
9093 el_pt->
node_pt(j) = old_node_pt;
9104 old_node_pt = brick_edge_node_pt[edge];
9105 if (old_node_pt == 0)
9107 Node* new_node_pt = 0;
9116 brick_edge_node_pt[edge] = new_node_pt;
9117 Node_pt.push_back(new_node_pt);
9122 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
9123 tet_el_pt->interpolated_x(s_tet, x_tet);
9124 new_node_pt->
x(0) = x_tet[0];
9125 new_node_pt->
x(1) = x_tet[1];
9126 new_node_pt->
x(2) = x_tet[2];
9131 el_pt->
node_pt(j) = old_node_pt;
9142 old_node_pt = brick_edge_node_pt[edge];
9143 if (old_node_pt == 0)
9145 Node* new_node_pt = 0;
9154 brick_edge_node_pt[edge] = new_node_pt;
9155 Node_pt.push_back(new_node_pt);
9160 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
9161 tet_el_pt->interpolated_x(s_tet, x_tet);
9162 new_node_pt->
x(0) = x_tet[0];
9163 new_node_pt->
x(1) = x_tet[1];
9164 new_node_pt->
x(2) = x_tet[2];
9169 el_pt->
node_pt(j) = old_node_pt;
9180 TFace face(tet_el_pt->node_pt(central_tet_vertex),
9181 tet_el_pt->node_pt(tet_edge_node[0][0]),
9182 tet_el_pt->node_pt(tet_edge_node[2][0]));
9184 old_node_pt = tet_face_node_pt[face];
9185 if (old_node_pt == 0)
9187 Node* new_node_pt = 0;
9196 tet_face_node_pt[face] = new_node_pt;
9197 Node_pt.push_back(new_node_pt);
9202 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
9203 tet_el_pt->interpolated_x(s_tet, x_tet);
9204 new_node_pt->
x(0) = x_tet[0];
9205 new_node_pt->
x(1) = x_tet[1];
9206 new_node_pt->
x(2) = x_tet[2];
9211 el_pt->
node_pt(j) = old_node_pt;
9222 TFace face(tet_el_pt->node_pt(central_tet_vertex),
9223 tet_el_pt->node_pt(tet_edge_node[1][0]),
9224 tet_el_pt->node_pt(tet_edge_node[2][0]));
9226 old_node_pt = tet_face_node_pt[face];
9227 if (old_node_pt == 0)
9229 Node* new_node_pt = 0;
9238 tet_face_node_pt[face] = new_node_pt;
9239 Node_pt.push_back(new_node_pt);
9244 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
9245 tet_el_pt->interpolated_x(s_tet, x_tet);
9246 new_node_pt->
x(0) = x_tet[0];
9247 new_node_pt->
x(1) = x_tet[1];
9248 new_node_pt->
x(2) = x_tet[2];
9253 el_pt->
node_pt(j) = old_node_pt;
9264 TFace face(tet_el_pt->node_pt(central_tet_vertex),
9265 tet_el_pt->node_pt(tet_edge_node[0][0]),
9266 tet_el_pt->node_pt(tet_edge_node[1][0]));
9268 old_node_pt = tet_face_node_pt[face];
9269 if (old_node_pt == 0)
9271 Node* new_node_pt = 0;
9280 tet_face_node_pt[face] = new_node_pt;
9281 Node_pt.push_back(new_node_pt);
9286 dummy_q_el_pt[3]->interpolated_s_tet(
s, s_tet);
9287 tet_el_pt->interpolated_x(s_tet, x_tet);
9288 new_node_pt->
x(0) = x_tet[0];
9289 new_node_pt->
x(1) = x_tet[1];
9290 new_node_pt->
x(2) = x_tet[2];
9295 el_pt->
node_pt(j) = old_node_pt;
9305 el_pt->
node_pt(j) = top_mid_face_node2_pt;
9314 el_pt->
node_pt(j) = top_mid_face_node1_pt;
9323 el_pt->
node_pt(j) = top_mid_face_node0_pt;
9333 for (
int face_index = 0; face_index < 4; face_index++)
9341 face_pt =
new TFace(tet_el_pt->node_pt(1),
9342 tet_el_pt->node_pt(2),
9343 tet_el_pt->node_pt(3));
9348 face_pt =
new TFace(tet_el_pt->node_pt(0),
9349 tet_el_pt->node_pt(2),
9350 tet_el_pt->node_pt(3));
9357 face_pt =
new TFace(tet_el_pt->node_pt(0),
9358 tet_el_pt->node_pt(1),
9359 tet_el_pt->node_pt(3));
9365 face_pt =
new TFace(tet_el_pt->node_pt(0),
9366 tet_el_pt->node_pt(1),
9367 tet_el_pt->node_pt(2));
9374 std::set<unsigned> bnd;
9375 std::set<unsigned>* bnd_pt = &bnd;
9379 if ((*bnd_pt).size() > 1)
9381 std::ostringstream error_stream;
9382 error_stream <<
"TFace should only be on one boundary.\n";
9384 OOMPH_CURRENT_FUNCTION,
9385 OOMPH_EXCEPTION_LOCATION);
9389 if ((*bnd_pt).size() == 1)
9393 if (tet_mesh_is_solid_mesh)
9398 std::ostringstream error_stream;
9400 <<
"Tet-element cannot be cast to SolidTElement<3,3>.\n"
9401 <<
"BrickFromTetMesh can only be built from\n"
9402 <<
"mesh containing quadratic tets.\n"
9405 OOMPH_CURRENT_FUNCTION,
9406 OOMPH_EXCEPTION_LOCATION);
9411 tet_el_pt, face_index);
9418 std::ostringstream error_stream;
9419 error_stream <<
"Tet-element cannot be cast to TElement<3,3>.\n"
9420 <<
"BrickFromTetMesh can only be built from\n"
9421 <<
"mesh containing quadratic tets.\n"
9424 OOMPH_CURRENT_FUNCTION,
9425 OOMPH_EXCEPTION_LOCATION);
9437 unsigned b = (*(*bnd_pt).begin());
9438 Boundary_coordinate_exists[b] =
true;
9448 brick_face_node_pt[0] = brick_el1_pt->
node_pt(0);
9449 brick_face_node_pt[1] = brick_el3_pt->
node_pt(0);
9450 brick_face_node_pt[2] = brick_el2_pt->
node_pt(0);
9452 brick_face_node_pt[3] = brick_el1_pt->
node_pt(18);
9453 brick_face_node_pt[4] = brick_el2_pt->
node_pt(18);
9454 brick_face_node_pt[5] = brick_el1_pt->
node_pt(2);
9456 brick_face_node_pt[6] = brick_el1_pt->
node_pt(9);
9457 brick_face_node_pt[7] = brick_el3_pt->
node_pt(1);
9458 brick_face_node_pt[8] = brick_el3_pt->
node_pt(9);
9460 brick_face_node_pt[9] = brick_el2_pt->
node_pt(9);
9461 brick_face_node_pt[10] = brick_el2_pt->
node_pt(3);
9462 brick_face_node_pt[11] = brick_el1_pt->
node_pt(1);
9464 brick_face_node_pt[12] = brick_el1_pt->
node_pt(20);
9466 brick_face_node_pt[13] = brick_el2_pt->
node_pt(12);
9467 brick_face_node_pt[14] = brick_el1_pt->
node_pt(19);
9469 brick_face_node_pt[15] = brick_el1_pt->
node_pt(10);
9470 brick_face_node_pt[16] = brick_el2_pt->
node_pt(21);
9472 brick_face_node_pt[17] = brick_el3_pt->
node_pt(10);
9473 brick_face_node_pt[18] = brick_el1_pt->
node_pt(11);
9477 brick_face_node_pt[0] = brick_el0_pt->
node_pt(0);
9478 brick_face_node_pt[1] = brick_el3_pt->
node_pt(0);
9479 brick_face_node_pt[2] = brick_el2_pt->
node_pt(0);
9481 brick_face_node_pt[3] = brick_el0_pt->
node_pt(18);
9482 brick_face_node_pt[4] = brick_el2_pt->
node_pt(18);
9483 brick_face_node_pt[5] = brick_el0_pt->
node_pt(6);
9485 brick_face_node_pt[6] = brick_el0_pt->
node_pt(9);
9486 brick_face_node_pt[7] = brick_el3_pt->
node_pt(3);
9487 brick_face_node_pt[8] = brick_el3_pt->
node_pt(9);
9489 brick_face_node_pt[9] = brick_el2_pt->
node_pt(9);
9490 brick_face_node_pt[10] = brick_el2_pt->
node_pt(1);
9491 brick_face_node_pt[11] = brick_el0_pt->
node_pt(3);
9493 brick_face_node_pt[12] = brick_el0_pt->
node_pt(24);
9495 brick_face_node_pt[13] = brick_el2_pt->
node_pt(10);
9496 brick_face_node_pt[14] = brick_el0_pt->
node_pt(21);
9498 brick_face_node_pt[15] = brick_el0_pt->
node_pt(12);
9499 brick_face_node_pt[16] = brick_el3_pt->
node_pt(21);
9501 brick_face_node_pt[17] = brick_el3_pt->
node_pt(12);
9502 brick_face_node_pt[18] = brick_el0_pt->
node_pt(15);
9506 brick_face_node_pt[0] = brick_el0_pt->
node_pt(0);
9507 brick_face_node_pt[1] = brick_el1_pt->
node_pt(0);
9508 brick_face_node_pt[2] = brick_el2_pt->
node_pt(0);
9510 brick_face_node_pt[3] = brick_el0_pt->
node_pt(2);
9511 brick_face_node_pt[4] = brick_el1_pt->
node_pt(2);
9512 brick_face_node_pt[5] = brick_el0_pt->
node_pt(6);
9514 brick_face_node_pt[6] = brick_el0_pt->
node_pt(1);
9515 brick_face_node_pt[7] = brick_el1_pt->
node_pt(3);
9516 brick_face_node_pt[8] = brick_el1_pt->
node_pt(1);
9518 brick_face_node_pt[9] = brick_el2_pt->
node_pt(3);
9519 brick_face_node_pt[10] = brick_el2_pt->
node_pt(1);
9520 brick_face_node_pt[11] = brick_el0_pt->
node_pt(3);
9522 brick_face_node_pt[12] = brick_el0_pt->
node_pt(8);
9524 brick_face_node_pt[13] = brick_el2_pt->
node_pt(4);
9525 brick_face_node_pt[14] = brick_el0_pt->
node_pt(5);
9527 brick_face_node_pt[15] = brick_el0_pt->
node_pt(4);
9528 brick_face_node_pt[16] = brick_el1_pt->
node_pt(5);
9530 brick_face_node_pt[17] = brick_el1_pt->
node_pt(4);
9531 brick_face_node_pt[18] = brick_el0_pt->
node_pt(7);
9535 brick_face_node_pt[0] = brick_el1_pt->
node_pt(0);
9536 brick_face_node_pt[1] = brick_el3_pt->
node_pt(0);
9537 brick_face_node_pt[2] = brick_el0_pt->
node_pt(0);
9539 brick_face_node_pt[3] = brick_el1_pt->
node_pt(18);
9540 brick_face_node_pt[4] = brick_el3_pt->
node_pt(6);
9541 brick_face_node_pt[5] = brick_el1_pt->
node_pt(6);
9543 brick_face_node_pt[6] = brick_el1_pt->
node_pt(9);
9544 brick_face_node_pt[7] = brick_el3_pt->
node_pt(1);
9545 brick_face_node_pt[8] = brick_el3_pt->
node_pt(3);
9547 brick_face_node_pt[9] = brick_el0_pt->
node_pt(9);
9548 brick_face_node_pt[10] = brick_el0_pt->
node_pt(1);
9549 brick_face_node_pt[11] = brick_el1_pt->
node_pt(3);
9551 brick_face_node_pt[12] = brick_el1_pt->
node_pt(24);
9553 brick_face_node_pt[13] = brick_el0_pt->
node_pt(10);
9554 brick_face_node_pt[14] = brick_el1_pt->
node_pt(21);
9556 brick_face_node_pt[15] = brick_el1_pt->
node_pt(12);
9557 brick_face_node_pt[16] = brick_el3_pt->
node_pt(7);
9559 brick_face_node_pt[17] = brick_el3_pt->
node_pt(4);
9560 brick_face_node_pt[18] = brick_el1_pt->
node_pt(15);
9569 for (
unsigned i = 0;
i < 19;
i++)
9575 for (
unsigned j = 0; j < 19; j++)
9578 Node* brick_node_pt = brick_face_node_pt[translate[j]];
9589 double dist = sqrt(pow(brick_node_pt->
x(0) - x[0], 2) +
9590 pow(brick_node_pt->
x(1) - x[1], 2) +
9591 pow(brick_node_pt->
x(2) - x[2], 2));
9594 std::ofstream brick0;
9595 std::ofstream brick1;
9596 std::ofstream brick2;
9597 std::ofstream brick3;
9598 brick0.open(
"full_brick0.dat");
9599 brick1.open(
"full_brick1.dat");
9600 brick2.open(
"full_brick2.dat");
9601 brick3.open(
"full_brick3.dat");
9602 for (
unsigned j = 0; j < 27; j++)
9604 brick0 << brick_el0_pt->
node_pt(j)->
x(0) <<
" "
9605 << brick_el0_pt->
node_pt(j)->
x(1) <<
" "
9606 << brick_el0_pt->
node_pt(j)->
x(2) <<
"\n";
9608 brick1 << brick_el1_pt->
node_pt(j)->
x(0) <<
" "
9609 << brick_el1_pt->
node_pt(j)->
x(1) <<
" "
9610 << brick_el1_pt->
node_pt(j)->
x(2) <<
"\n";
9612 brick2 << brick_el2_pt->
node_pt(j)->
x(0) <<
" "
9613 << brick_el2_pt->
node_pt(j)->
x(1) <<
" "
9614 << brick_el2_pt->
node_pt(j)->
x(2) <<
"\n";
9616 brick3 << brick_el3_pt->
node_pt(j)->
x(0) <<
" "
9617 << brick_el3_pt->
node_pt(j)->
x(1) <<
" "
9618 << brick_el3_pt->
node_pt(j)->
x(2) <<
"\n";
9625 std::ofstream full_face;
9626 full_face.open(
"full_face.dat");
9627 for (
unsigned j = 0; j < 6; j++)
9629 full_face << face_el_pt->
node_pt(j)->
x(0) <<
" "
9630 << face_el_pt->
node_pt(j)->
x(1) <<
" "
9631 << face_el_pt->
node_pt(j)->
x(2) <<
"\n";
9638 std::ostringstream error_stream;
9640 <<
"During assignment of boundary cordinates, the distance\n"
9641 <<
"between brick node and reference point in \n"
9642 <<
"triangular FaceElement is " << dist <<
" which \n"
9643 <<
"is bigger than the tolerance defined in \n"
9644 <<
"BrickFromTetMeshHelper::Face_position_tolerance="
9646 <<
"If this is tolerable, increase the tolerance \n"
9647 <<
"(it's defined in a namespace and therefore publically\n"
9648 <<
"accessible). If not, the Face may be inverted in which \n"
9649 <<
"case you should re-implement the translation scheme,\n"
9650 <<
"following the pattern used in the "
9651 "ThinLayerBrickOnTetMesh."
9652 <<
"\nThe required code fragements are already here but \n"
9653 <<
"the translation is the unit map.\n"
9654 <<
"To aid the diagnostics, the files full_brick[0-3].dat\n"
9655 <<
"contain the coordinates of the 27 nodes in the four\n"
9656 <<
"bricks associated with the current tet and "
9658 <<
"contains the coordinates of the 6 nodes in the "
9660 <<
"\nfrom which the boundary coordinates are extracted.\n"
9661 <<
"FYI: The normal_sign of the face is: " << normal_sign
9664 OOMPH_CURRENT_FUNCTION,
9665 OOMPH_EXCEPTION_LOCATION);
9670 add_boundary_node(b, brick_node_pt);
9678 Boundary_element_pt[b].push_back(brick_el1_pt);
9679 Face_index_at_boundary[b].push_back(-2);
9680 Boundary_element_pt[b].push_back(brick_el2_pt);
9681 Face_index_at_boundary[b].push_back(-1);
9682 Boundary_element_pt[b].push_back(brick_el3_pt);
9683 Face_index_at_boundary[b].push_back(-2);
9687 Boundary_element_pt[b].push_back(brick_el0_pt);
9688 Face_index_at_boundary[b].push_back(-1);
9689 Boundary_element_pt[b].push_back(brick_el2_pt);
9690 Face_index_at_boundary[b].push_back(-2);
9691 Boundary_element_pt[b].push_back(brick_el3_pt);
9692 Face_index_at_boundary[b].push_back(-1);
9696 Boundary_element_pt[b].push_back(brick_el0_pt);
9697 Face_index_at_boundary[b].push_back(-3);
9698 Boundary_element_pt[b].push_back(brick_el1_pt);
9699 Face_index_at_boundary[b].push_back(-3);
9700 Boundary_element_pt[b].push_back(brick_el2_pt);
9701 Face_index_at_boundary[b].push_back(-3);
9705 Boundary_element_pt[b].push_back(brick_el0_pt);
9706 Face_index_at_boundary[b].push_back(-2);
9707 Boundary_element_pt[b].push_back(brick_el1_pt);
9708 Face_index_at_boundary[b].push_back(-1);
9709 Boundary_element_pt[b].push_back(brick_el3_pt);
9710 Face_index_at_boundary[b].push_back(-3);
9723 Lookup_for_elements_next_boundary_is_setup =
true;
9739 for (
unsigned e = 0;
e < 4;
e++)
9741 for (
unsigned j = 0; j < 8; j++)
9743 delete dummy_q_el_pt[
e]->node_pt(j);
9745 delete dummy_q_el_pt[
e];
void build_mesh(XdaTetMesh< TElement< 3, 3 >> *tet_mesh_pt, TimeStepper *time_stepper_pt)
Build fct: Pass pointer to existing tet mesh.
void set_value(const unsigned &i, const double &value_)
Set the i-th stored data value to specified value. The only reason that we require an explicit set fu...
//////////////////////////////////////////////////////////////// ////////////////////////////////////...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
//////////////////////////////////////////////////////////////////////// ////////////////////////////...
bool is_boundary_edge() const
Test whether the Edge is a boundary edge, i.e. does it connnect two boundary nodes?
FaceElements are elements that coincide with the faces of higher-dimensional "bulk" elements....
double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s. Overloaded to get information from bulk...
void set_boundary_number_in_bulk_mesh(const unsigned &b)
Set function for the boundary number in bulk mesh.
int & normal_sign()
Sign of outer unit normal (relative to cross-products of tangent vectors in the corresponding "bulk" ...
A general Finite Element class.
virtual void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Get local coordinates of node j in the element; vector sets its own size (broken virtual)
virtual Node * construct_node(const unsigned &n)
Construct the local node n and return a pointer to the newly created node object.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
void interpolated_zeta(const Vector< double > &s, Vector< double > &zeta) const
Calculate the interpolated value of zeta, the intrinsic coordinate of the element when viewed as a co...
virtual Node * construct_boundary_node(const unsigned &n)
Construct the local node n as a boundary node; that is a node that MAY be placed on a mesh boundary a...
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
double & x(const unsigned &i)
Return the i-th nodal coordinate.
virtual bool is_on_boundary() const
Test whether the Node lies on a boundary. The "bulk" Node cannot lie on a boundary,...
virtual void set_coordinates_on_boundary(const unsigned &b, const unsigned &k, const Vector< double > &boundary_zeta)
Set the vector of the k-th generalised boundary coordinates on mesh boundary b. Broken virtual interf...
An OomphLibError object which should be thrown when an run-time error is encountered....
////////////////////////////////////////////////////////////////////// //////////////////////////////...
/////////////////////////////////////////////////////////////////////// /////////////////////////////...
//////////////////////////////////////////////////////////////////////// ////////////////////////////...
void get_boundaries_pt(std::set< unsigned > *&boundaries_pt)
Access to pointer to set of mesh boundaries that this face occupies; NULL if the node is not on any b...
bool is_boundary_face() const
Test whether the face is a boundary face, i.e. does it connnect three boundary nodes?
Unstructured tet mesh based on output from Tetgen: http://wias-berlin.de/software/tetgen/.
////////////////////////////////////////////////////////////////////// //////////////////////////////...
A slight extension to the standard template vector class so that we can include "graceful" array rang...
Tet mesh made of quadratic (ten node) tets built from xda input file.
double Face_position_tolerance
Tolerance for mismatch during setup of boundary coordinates.
void face1(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s0 = 1.0.
void face0(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s0 = -1.0.
void face2(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the east face (s0 = 1.0)
//////////////////////////////////////////////////////////////////// ////////////////////////////////...