26 #ifndef OOMPH_SIMPLE_CUBIC_MESH_TEMPLATE_CC
27 #define OOMPH_SIMPLE_CUBIC_MESH_TEMPLATE_CC
39 template<
class ELEMENT>
43 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(3);
45 if ((Nx == 1) || (Ny == 1) || (Nz == 1))
47 std::ostringstream error_message;
48 error_message <<
"SimpleCubicMesh needs at least two elements in each,\n"
49 <<
"coordinate direction. You have specified \n"
50 <<
"Nx=" << Nx <<
"; Ny=" << Ny <<
"; Nz=" << Nz
53 error_message.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
60 Element_pt.resize(Nx * Ny * Nz);
62 unsigned element_num = 0;
63 Element_pt[element_num] =
new ELEMENT;
66 unsigned n_p =
dynamic_cast<ELEMENT*
>(finite_element_pt(0))->nnode_1d();
69 Node_pt.resize((1 + (n_p - 1) * Nx) * (1 + (n_p - 1) * Ny) *
70 (1 + (n_p - 1) * Nz));
75 unsigned long node_count = 0;
78 double el_length[3] = {(Xmax - Xmin) /
double(Nx),
79 (Ymax - Ymin) /
double(Ny),
80 (Zmax - Zmin) /
double(Nz)};
99 unsigned local_node_num = 0;
101 Node_pt[node_count] =
102 finite_element_pt(element_num)
103 ->construct_boundary_node(local_node_num, time_stepper_pt);
105 finite_element_pt(element_num)->node_pt(local_node_num) =
109 Node_pt[node_count]->x(0) = Xmin;
110 Node_pt[node_count]->x(1) = Ymin;
111 Node_pt[node_count]->x(2) = Zmin;
114 add_boundary_node(0, Node_pt[node_count]);
115 add_boundary_node(1, Node_pt[node_count]);
116 add_boundary_node(4, Node_pt[node_count]);
122 for (
unsigned l2 = 1; l2 < n_p; l2++)
128 Node_pt[node_count] =
129 finite_element_pt(element_num)
130 ->construct_boundary_node(local_node_num, time_stepper_pt);
132 finite_element_pt(element_num)->node_pt(local_node_num) =
136 finite_element_pt(element_num)
137 ->local_fraction_of_node(local_node_num, s_fraction);
140 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
141 Node_pt[node_count]->x(1) = Ymin;
142 Node_pt[node_count]->x(2) = Zmin;
145 add_boundary_node(0, Node_pt[node_count]);
146 add_boundary_node(1, Node_pt[node_count]);
152 for (
unsigned l1 = 1; l1 < n_p; l1++)
155 local_node_num = l1 * n_p;
158 Node_pt[node_count] =
159 finite_element_pt(element_num)
160 ->construct_boundary_node(local_node_num, time_stepper_pt);
162 finite_element_pt(element_num)->node_pt(local_node_num) =
166 finite_element_pt(element_num)
167 ->local_fraction_of_node(local_node_num, s_fraction);
171 Node_pt[node_count]->x(0) = Xmin;
172 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
173 Node_pt[node_count]->x(2) = Zmin;
176 add_boundary_node(4, Node_pt[node_count]);
177 add_boundary_node(0, Node_pt[node_count]);
182 for (
unsigned l2 = 1; l2 < n_p; l2++)
185 local_node_num = l1 * n_p + l2;
188 Node_pt[node_count] =
189 finite_element_pt(element_num)
190 ->construct_boundary_node(local_node_num, time_stepper_pt);
192 finite_element_pt(element_num)->node_pt(local_node_num) =
196 finite_element_pt(element_num)
197 ->local_fraction_of_node(local_node_num, s_fraction);
200 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
201 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
202 Node_pt[node_count]->x(2) = Zmin;
205 add_boundary_node(0, Node_pt[node_count]);
215 for (
unsigned l3 = 1; l3 < n_p; l3++)
218 local_node_num = n_p * n_p * l3;
221 Node_pt[node_count] =
222 finite_element_pt(element_num)
223 ->construct_boundary_node(local_node_num, time_stepper_pt);
225 finite_element_pt(element_num)->node_pt(local_node_num) =
229 finite_element_pt(element_num)
230 ->local_fraction_of_node(local_node_num, s_fraction);
233 Node_pt[node_count]->x(0) = Xmin;
234 Node_pt[node_count]->x(1) = Ymin;
235 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
238 add_boundary_node(1, Node_pt[node_count]);
239 add_boundary_node(4, Node_pt[node_count]);
244 for (
unsigned l2 = 1; l2 < n_p; l2++)
247 local_node_num = l2 + n_p * n_p * l3;
250 Node_pt[node_count] =
251 finite_element_pt(element_num)
252 ->construct_boundary_node(local_node_num, time_stepper_pt);
254 finite_element_pt(element_num)->node_pt(local_node_num) =
258 finite_element_pt(element_num)
259 ->local_fraction_of_node(local_node_num, s_fraction);
262 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
263 Node_pt[node_count]->x(1) = Ymin;
264 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
267 add_boundary_node(1, Node_pt[node_count]);
273 for (
unsigned l1 = 1; l1 < n_p; l1++)
276 local_node_num = l1 * n_p + n_p * n_p * l3;
279 Node_pt[node_count] =
280 finite_element_pt(element_num)
281 ->construct_boundary_node(local_node_num, time_stepper_pt);
283 finite_element_pt(element_num)->node_pt(local_node_num) =
287 finite_element_pt(element_num)
288 ->local_fraction_of_node(local_node_num, s_fraction);
291 Node_pt[node_count]->x(0) = Xmin;
292 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
293 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
296 add_boundary_node(4, Node_pt[node_count]);
301 for (
unsigned l2 = 1; l2 < n_p; l2++)
304 local_node_num = l2 + l1 * n_p + n_p * n_p * l3;
307 Node_pt[node_count] =
308 finite_element_pt(element_num)
309 ->construct_node(local_node_num, time_stepper_pt);
311 finite_element_pt(element_num)->node_pt(local_node_num) =
315 finite_element_pt(element_num)
316 ->local_fraction_of_node(local_node_num, s_fraction);
319 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
320 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
321 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
338 for (
unsigned j = 1; j < (Nx - 1); j++)
342 Element_pt[element_num] =
new ELEMENT;
349 finite_element_pt(element_num)->node_pt(0) =
350 finite_element_pt(element_num - 1)->node_pt((n_p - 1));
353 for (
unsigned l2 = 1; l2 < n_p; l2++)
359 Node_pt[node_count] =
360 finite_element_pt(element_num)
361 ->construct_boundary_node(local_node_num, time_stepper_pt);
363 finite_element_pt(element_num)->node_pt(local_node_num) =
367 finite_element_pt(element_num)
368 ->local_fraction_of_node(local_node_num, s_fraction);
371 Node_pt[node_count]->x(0) = Xmin + el_length[0] * (j + s_fraction[0]);
372 Node_pt[node_count]->x(1) = Ymin;
373 Node_pt[node_count]->x(2) = Zmin;
376 add_boundary_node(0, Node_pt[node_count]);
377 add_boundary_node(1, Node_pt[node_count]);
383 for (
unsigned l1 = 1; l1 < n_p; l1++)
386 finite_element_pt(element_num)->node_pt(l1 * n_p) =
387 finite_element_pt(element_num - 1)->node_pt(l1 * n_p + (n_p - 1));
390 for (
unsigned l2 = 1; l2 < n_p; l2++)
393 local_node_num = l2 + l1 * n_p;
396 Node_pt[node_count] =
397 finite_element_pt(element_num)
398 ->construct_boundary_node(local_node_num, time_stepper_pt);
400 finite_element_pt(element_num)->node_pt(local_node_num) =
404 finite_element_pt(element_num)
405 ->local_fraction_of_node(local_node_num, s_fraction);
408 Node_pt[node_count]->x(0) = Xmin + el_length[0] * (j + s_fraction[0]);
409 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
410 Node_pt[node_count]->x(2) = Zmin;
413 add_boundary_node(0, Node_pt[node_count]);
420 for (
unsigned l3 = 1; l3 < n_p; l3++)
423 finite_element_pt(j)->node_pt(l3 * n_p * n_p) =
424 finite_element_pt(j - 1)->node_pt(l3 * n_p * n_p + (n_p - 1));
427 for (
unsigned l2 = 1; l2 < n_p; l2++)
430 local_node_num = l2 + l3 * n_p * n_p;
433 Node_pt[node_count] =
434 finite_element_pt(element_num)
435 ->construct_boundary_node(local_node_num, time_stepper_pt);
437 finite_element_pt(element_num)->node_pt(local_node_num) =
441 finite_element_pt(element_num)
442 ->local_fraction_of_node(local_node_num, s_fraction);
445 Node_pt[node_count]->x(0) = Xmin + el_length[0] * (j + s_fraction[0]);
446 Node_pt[node_count]->x(1) = Ymin;
447 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
450 add_boundary_node(1, Node_pt[node_count]);
456 for (
unsigned l1 = 1; l1 < n_p; l1++)
459 finite_element_pt(j)->node_pt(l1 * n_p + l3 * n_p * n_p) =
460 finite_element_pt(j - 1)->node_pt(l1 * n_p + (n_p - 1) +
464 for (
unsigned l2 = 1; l2 < n_p; l2++)
467 local_node_num = l2 + l1 * n_p + l3 * n_p * n_p;
470 Node_pt[node_count] =
471 finite_element_pt(element_num)
472 ->construct_node(local_node_num, time_stepper_pt);
474 finite_element_pt(element_num)->node_pt(local_node_num) =
478 finite_element_pt(element_num)
479 ->local_fraction_of_node(local_node_num, s_fraction);
482 Node_pt[node_count]->x(0) =
483 Xmin + el_length[0] * (j + s_fraction[0]);
484 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
485 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
500 element_num = Nx - 1;
501 Element_pt[element_num] =
new ELEMENT;
508 finite_element_pt(element_num)->node_pt(0) =
509 finite_element_pt(element_num - 1)->node_pt((n_p - 1));
512 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
518 Node_pt[node_count] =
519 finite_element_pt(element_num)
520 ->construct_boundary_node(local_node_num, time_stepper_pt);
522 finite_element_pt(element_num)->node_pt(local_node_num) =
526 finite_element_pt(element_num)
527 ->local_fraction_of_node(local_node_num, s_fraction);
530 Node_pt[node_count]->x(0) =
531 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
532 Node_pt[node_count]->x(1) = Ymin;
533 Node_pt[node_count]->x(2) = Zmin;
536 add_boundary_node(0, Node_pt[node_count]);
537 add_boundary_node(1, Node_pt[node_count]);
544 local_node_num = n_p - 1;
547 Node_pt[node_count] =
548 finite_element_pt(element_num)
549 ->construct_boundary_node(local_node_num, time_stepper_pt);
551 finite_element_pt(element_num)->node_pt(local_node_num) =
555 finite_element_pt(element_num)
556 ->local_fraction_of_node(local_node_num, s_fraction);
559 Node_pt[node_count]->x(0) = Xmax;
560 Node_pt[node_count]->x(1) = Ymin;
561 Node_pt[node_count]->x(2) = Zmin;
564 add_boundary_node(0, Node_pt[node_count]);
565 add_boundary_node(1, Node_pt[node_count]);
566 add_boundary_node(2, Node_pt[node_count]);
571 for (
unsigned l1 = 1; l1 < n_p; l1++)
574 finite_element_pt(element_num)->node_pt(l1 * n_p) =
575 finite_element_pt(element_num - 1)->node_pt(l1 * n_p + (n_p - 1));
578 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
581 local_node_num = l2 + l1 * n_p;
584 Node_pt[node_count] =
585 finite_element_pt(element_num)
586 ->construct_boundary_node(local_node_num, time_stepper_pt);
588 finite_element_pt(element_num)->node_pt(local_node_num) =
592 finite_element_pt(element_num)
593 ->local_fraction_of_node(local_node_num, s_fraction);
596 Node_pt[node_count]->x(0) =
597 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
598 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
599 Node_pt[node_count]->x(2) = Zmin;
602 add_boundary_node(0, Node_pt[node_count]);
609 local_node_num = l1 * n_p + (n_p - 1);
612 Node_pt[node_count] =
613 finite_element_pt(element_num)
614 ->construct_boundary_node(local_node_num, time_stepper_pt);
616 finite_element_pt(element_num)->node_pt(local_node_num) =
620 finite_element_pt(element_num)
621 ->local_fraction_of_node(local_node_num, s_fraction);
624 Node_pt[node_count]->x(0) = Xmax;
625 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
626 Node_pt[node_count]->x(2) = Zmin;
629 add_boundary_node(2, Node_pt[node_count]);
630 add_boundary_node(0, Node_pt[node_count]);
636 for (
unsigned l3 = 1; l3 < n_p; l3++)
639 finite_element_pt(element_num)->node_pt(l3 * n_p * n_p) =
640 finite_element_pt(element_num - 1)->node_pt(l3 * n_p * n_p + (n_p - 1));
643 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
646 local_node_num = l2 + l3 * n_p * n_p;
649 Node_pt[node_count] =
650 finite_element_pt(element_num)
651 ->construct_boundary_node(local_node_num, time_stepper_pt);
653 finite_element_pt(element_num)->node_pt(local_node_num) =
657 finite_element_pt(element_num)
658 ->local_fraction_of_node(local_node_num, s_fraction);
661 Node_pt[node_count]->x(0) =
662 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
663 Node_pt[node_count]->x(1) = Ymin;
664 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
667 add_boundary_node(1, Node_pt[node_count]);
674 local_node_num = n_p - 1 + l3 * n_p * n_p;
677 Node_pt[node_count] =
678 finite_element_pt(element_num)
679 ->construct_boundary_node(local_node_num, time_stepper_pt);
681 finite_element_pt(element_num)->node_pt(local_node_num) =
685 finite_element_pt(element_num)
686 ->local_fraction_of_node(local_node_num, s_fraction);
689 Node_pt[node_count]->x(0) = Xmax;
690 Node_pt[node_count]->x(1) = Ymin;
691 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
694 add_boundary_node(1, Node_pt[node_count]);
695 add_boundary_node(2, Node_pt[node_count]);
700 for (
unsigned l1 = 1; l1 < n_p; l1++)
703 finite_element_pt(element_num)->node_pt(l1 * n_p + l3 * n_p * n_p) =
704 finite_element_pt(element_num - 1)
705 ->node_pt(l1 * n_p + (n_p - 1) + l3 * n_p * n_p);
708 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
711 local_node_num = l2 + l1 * n_p + l3 * n_p * n_p;
714 Node_pt[node_count] =
715 finite_element_pt(element_num)
716 ->construct_node(local_node_num, time_stepper_pt);
718 finite_element_pt(element_num)->node_pt(local_node_num) =
722 finite_element_pt(element_num)
723 ->local_fraction_of_node(local_node_num, s_fraction);
726 Node_pt[node_count]->x(0) =
727 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
728 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
729 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
739 local_node_num = l1 * n_p + (n_p - 1) + l3 * n_p * n_p;
741 Node_pt[node_count] =
742 finite_element_pt(element_num)
743 ->construct_boundary_node(local_node_num, time_stepper_pt);
745 finite_element_pt(element_num)->node_pt(local_node_num) =
749 finite_element_pt(element_num)
750 ->local_fraction_of_node(local_node_num, s_fraction);
753 Node_pt[node_count]->x(0) = Xmax;
754 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
755 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
758 add_boundary_node(2, Node_pt[node_count]);
769 for (
unsigned i = 1;
i < (Ny - 1);
i++)
774 element_num = Nx *
i;
775 Element_pt[element_num] =
new ELEMENT;
778 for (
unsigned l2 = 0; l2 < n_p; l2++)
780 finite_element_pt(element_num)->node_pt(l2) =
781 finite_element_pt(element_num - Nx)->node_pt((n_p - 1) * n_p + l2);
785 for (
unsigned l1 = 1; l1 < n_p; l1++)
789 local_node_num = l1 * n_p;
792 Node_pt[node_count] =
793 finite_element_pt(element_num)
794 ->construct_boundary_node(local_node_num, time_stepper_pt);
796 finite_element_pt(element_num)->node_pt(local_node_num) =
800 finite_element_pt(element_num)
801 ->local_fraction_of_node(local_node_num, s_fraction);
804 Node_pt[node_count]->x(0) = Xmin;
805 Node_pt[node_count]->x(1) = Ymin + el_length[1] * (
i + s_fraction[1]);
806 Node_pt[node_count]->x(2) = Zmin;
809 add_boundary_node(0, Node_pt[node_count]);
810 add_boundary_node(4, Node_pt[node_count]);
815 for (
unsigned l2 = 1; l2 < n_p; l2++)
818 local_node_num = l2 + l1 * n_p;
821 Node_pt[node_count] =
822 finite_element_pt(element_num)
823 ->construct_boundary_node(local_node_num, time_stepper_pt);
825 finite_element_pt(element_num)->node_pt(local_node_num) =
829 finite_element_pt(element_num)
830 ->local_fraction_of_node(local_node_num, s_fraction);
834 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
835 Node_pt[node_count]->x(1) = Ymin + el_length[1] * (
i + s_fraction[1]);
836 Node_pt[node_count]->x(2) = Zmin;
839 add_boundary_node(0, Node_pt[node_count]);
846 for (
unsigned l3 = 1; l3 < n_p; l3++)
849 for (
unsigned l2 = 0; l2 < n_p; l2++)
851 finite_element_pt(element_num)->node_pt(l2 + l3 * n_p * n_p) =
852 finite_element_pt(element_num - Nx)
853 ->node_pt((n_p - 1) * n_p + l2 + l3 * n_p * n_p);
857 for (
unsigned l1 = 1; l1 < n_p; l1++)
861 local_node_num = l1 * n_p + l3 * n_p * n_p;
864 Node_pt[node_count] =
865 finite_element_pt(element_num)
866 ->construct_boundary_node(local_node_num, time_stepper_pt);
868 finite_element_pt(element_num)->node_pt(local_node_num) =
872 finite_element_pt(element_num)
873 ->local_fraction_of_node(local_node_num, s_fraction);
876 Node_pt[node_count]->x(0) = Xmin;
877 Node_pt[node_count]->x(1) = Ymin + el_length[1] * (
i + s_fraction[1]);
878 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
881 add_boundary_node(4, Node_pt[node_count]);
887 for (
unsigned l2 = 1; l2 < n_p; l2++)
890 local_node_num = l2 + l1 * n_p + n_p * n_p * l3;
893 Node_pt[node_count] =
894 finite_element_pt(element_num)
895 ->construct_node(local_node_num, time_stepper_pt);
897 finite_element_pt(element_num)->node_pt(local_node_num) =
901 finite_element_pt(element_num)
902 ->local_fraction_of_node(local_node_num, s_fraction);
905 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
906 Node_pt[node_count]->x(1) =
907 Ymin + el_length[1] * (
i + s_fraction[1]);
908 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
919 for (
unsigned j = 1; j < (Nx - 1); j++)
922 element_num = Nx *
i + j;
923 Element_pt[element_num] =
new ELEMENT;
926 for (
unsigned l2 = 0; l2 < n_p; l2++)
928 finite_element_pt(element_num)->node_pt(l2) =
929 finite_element_pt(element_num - Nx)->node_pt((n_p - 1) * n_p + l2);
932 for (
unsigned l1 = 1; l1 < n_p; l1++)
935 finite_element_pt(element_num)->node_pt(l1 * n_p) =
936 finite_element_pt(element_num - 1)->node_pt(l1 * n_p + (n_p - 1));
939 for (
unsigned l2 = 1; l2 < n_p; l2++)
942 local_node_num = l1 * n_p + l2;
945 Node_pt[node_count] =
946 finite_element_pt(element_num)
947 ->construct_boundary_node(local_node_num, time_stepper_pt);
949 finite_element_pt(element_num)->node_pt(local_node_num) =
953 finite_element_pt(element_num)
954 ->local_fraction_of_node(local_node_num, s_fraction);
957 Node_pt[node_count]->x(0) =
958 Xmin + el_length[0] * (j + s_fraction[0]);
959 Node_pt[node_count]->x(1) =
960 Ymin + el_length[1] * (
i + s_fraction[1]);
961 Node_pt[node_count]->x(2) = Zmin;
964 add_boundary_node(0, Node_pt[node_count]);
971 for (
unsigned l3 = 1; l3 < n_p; l3++)
975 for (
unsigned l2 = 0; l2 < n_p; l2++)
977 finite_element_pt(element_num)->node_pt(l2 + l3 * n_p * n_p) =
978 finite_element_pt(element_num - Nx)
979 ->node_pt((n_p - 1) * n_p + l2 + l3 * n_p * n_p);
982 for (
unsigned l1 = 1; l1 < n_p; l1++)
985 finite_element_pt(element_num)->node_pt(l1 * n_p + l3 * n_p * n_p) =
986 finite_element_pt(element_num - 1)
987 ->node_pt(l1 * n_p + l3 * n_p * n_p + (n_p - 1));
990 for (
unsigned l2 = 1; l2 < n_p; l2++)
993 local_node_num = l1 * n_p + l2 + l3 * n_p * n_p;
996 Node_pt[node_count] =
997 finite_element_pt(element_num)
998 ->construct_node(local_node_num, time_stepper_pt);
1000 finite_element_pt(element_num)->node_pt(local_node_num) =
1001 Node_pt[node_count];
1004 finite_element_pt(element_num)
1005 ->local_fraction_of_node(local_node_num, s_fraction);
1008 Node_pt[node_count]->x(0) =
1009 Xmin + el_length[0] * (j + s_fraction[0]);
1010 Node_pt[node_count]->x(1) =
1011 Ymin + el_length[1] * (
i + s_fraction[1]);
1012 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
1028 element_num = Nx *
i + Nx - 1;
1029 Element_pt[element_num] =
new ELEMENT;
1033 for (
unsigned l2 = 0; l2 < n_p; l2++)
1035 finite_element_pt(element_num)->node_pt(l2) =
1036 finite_element_pt(element_num - Nx)->node_pt((n_p - 1) * n_p + l2);
1039 for (
unsigned l1 = 1; l1 < n_p; l1++)
1042 finite_element_pt(element_num)->node_pt(l1 * n_p) =
1043 finite_element_pt(element_num - 1)->node_pt(l1 * n_p + (n_p - 1));
1046 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
1049 local_node_num = l1 * n_p + l2;
1052 Node_pt[node_count] =
1053 finite_element_pt(element_num)
1054 ->construct_boundary_node(local_node_num, time_stepper_pt);
1056 finite_element_pt(element_num)->node_pt(local_node_num) =
1057 Node_pt[node_count];
1060 finite_element_pt(element_num)
1061 ->local_fraction_of_node(local_node_num, s_fraction);
1064 Node_pt[node_count]->x(0) =
1065 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
1066 Node_pt[node_count]->x(1) = Ymin + el_length[1] * (
i + s_fraction[1]);
1067 Node_pt[node_count]->x(2) = Zmin;
1070 add_boundary_node(0, Node_pt[node_count]);
1079 local_node_num = l1 * n_p + (n_p - 1);
1082 Node_pt[node_count] =
1083 finite_element_pt(element_num)
1084 ->construct_boundary_node(local_node_num, time_stepper_pt);
1086 finite_element_pt(element_num)->node_pt(local_node_num) =
1087 Node_pt[node_count];
1090 finite_element_pt(element_num)
1091 ->local_fraction_of_node(local_node_num, s_fraction);
1095 Node_pt[node_count]->x(0) = Xmax;
1096 Node_pt[node_count]->x(1) = Ymin + el_length[1] * (
i + s_fraction[1]);
1097 Node_pt[node_count]->x(2) = Zmin;
1100 add_boundary_node(0, Node_pt[node_count]);
1101 add_boundary_node(2, Node_pt[node_count]);
1109 for (
unsigned l3 = 1; l3 < n_p; l3++)
1112 for (
unsigned l2 = 0; l2 < n_p; l2++)
1114 finite_element_pt(element_num)->node_pt(l2 + l3 * n_p * n_p) =
1115 finite_element_pt(element_num - Nx)
1116 ->node_pt((n_p - 1) * n_p + l2 + l3 * n_p * n_p);
1119 for (
unsigned l1 = 1; l1 < n_p; l1++)
1122 finite_element_pt(element_num)->node_pt(l1 * n_p + l3 * n_p * n_p) =
1123 finite_element_pt(element_num - 1)
1124 ->node_pt(l1 * n_p + (n_p - 1) + l3 * n_p * n_p);
1127 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
1130 local_node_num = l1 * n_p + l2 + l3 * n_p * n_p;
1133 Node_pt[node_count] =
1134 finite_element_pt(element_num)
1135 ->construct_node(local_node_num, time_stepper_pt);
1137 finite_element_pt(element_num)->node_pt(local_node_num) =
1138 Node_pt[node_count];
1141 finite_element_pt(element_num)
1142 ->local_fraction_of_node(local_node_num, s_fraction);
1145 Node_pt[node_count]->x(0) =
1146 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
1147 Node_pt[node_count]->x(1) =
1148 Ymin + el_length[1] * (
i + s_fraction[1]);
1149 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
1159 local_node_num = l1 * n_p + (n_p - 1) + l3 * n_p * n_p;
1162 Node_pt[node_count] =
1163 finite_element_pt(element_num)
1164 ->construct_boundary_node(local_node_num, time_stepper_pt);
1166 finite_element_pt(element_num)->node_pt(local_node_num) =
1167 Node_pt[node_count];
1170 finite_element_pt(element_num)
1171 ->local_fraction_of_node(local_node_num, s_fraction);
1174 Node_pt[node_count]->x(0) = Xmax;
1175 Node_pt[node_count]->x(1) = Ymin + el_length[1] * (
i + s_fraction[1]);
1176 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
1179 add_boundary_node(2, Node_pt[node_count]);
1199 element_num = Nx * (Ny - 1);
1200 Element_pt[element_num] =
new ELEMENT;
1203 for (
unsigned l2 = 0; l2 < n_p; l2++)
1205 finite_element_pt(element_num)->node_pt(l2) =
1206 finite_element_pt(element_num - Nx)->node_pt((n_p - 1) * n_p + l2);
1211 for (
unsigned l1 = 1; l1 < (n_p - 1); l1++)
1214 local_node_num = n_p * l1;
1217 Node_pt[node_count] =
1218 finite_element_pt(element_num)
1219 ->construct_boundary_node(local_node_num, time_stepper_pt);
1221 finite_element_pt(element_num)->node_pt(local_node_num) =
1222 Node_pt[node_count];
1225 finite_element_pt(element_num)
1226 ->local_fraction_of_node(local_node_num, s_fraction);
1229 Node_pt[node_count]->x(0) = Xmin;
1230 Node_pt[node_count]->x(1) =
1231 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
1232 Node_pt[node_count]->x(2) = Zmin;
1235 add_boundary_node(0, Node_pt[node_count]);
1236 add_boundary_node(4, Node_pt[node_count]);
1241 for (
unsigned l2 = 1; l2 < n_p; l2++)
1244 local_node_num = n_p * l1 + l2;
1247 Node_pt[node_count] =
1248 finite_element_pt(element_num)
1249 ->construct_boundary_node(local_node_num, time_stepper_pt);
1251 finite_element_pt(element_num)->node_pt(local_node_num) =
1252 Node_pt[node_count];
1255 finite_element_pt(element_num)
1256 ->local_fraction_of_node(local_node_num, s_fraction);
1259 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
1260 Node_pt[node_count]->x(1) =
1261 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
1262 Node_pt[node_count]->x(2) = Zmin;
1265 add_boundary_node(0, Node_pt[node_count]);
1275 local_node_num = n_p * (n_p - 1);
1277 Node_pt[node_count] =
1278 finite_element_pt(element_num)
1279 ->construct_boundary_node(local_node_num, time_stepper_pt);
1281 finite_element_pt(element_num)->node_pt(local_node_num) =
1282 Node_pt[node_count];
1285 finite_element_pt(element_num)
1286 ->local_fraction_of_node(local_node_num, s_fraction);
1289 Node_pt[node_count]->x(0) = Xmin;
1290 Node_pt[node_count]->x(1) = Ymax;
1291 Node_pt[node_count]->x(2) = Zmin;
1294 add_boundary_node(0, Node_pt[node_count]);
1295 add_boundary_node(3, Node_pt[node_count]);
1296 add_boundary_node(4, Node_pt[node_count]);
1302 for (
unsigned l2 = 1; l2 < n_p; l2++)
1305 local_node_num = n_p * (n_p - 1) + l2;
1307 Node_pt[node_count] =
1308 finite_element_pt(element_num)
1309 ->construct_boundary_node(local_node_num, time_stepper_pt);
1311 finite_element_pt(element_num)->node_pt(local_node_num) =
1312 Node_pt[node_count];
1315 finite_element_pt(element_num)
1316 ->local_fraction_of_node(local_node_num, s_fraction);
1319 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
1320 Node_pt[node_count]->x(1) = Ymax;
1321 Node_pt[node_count]->x(2) = Zmin;
1324 add_boundary_node(0, Node_pt[node_count]);
1325 add_boundary_node(3, Node_pt[node_count]);
1331 for (
unsigned l3 = 1; l3 < n_p; l3++)
1334 for (
unsigned l2 = 0; l2 < n_p; l2++)
1336 finite_element_pt(element_num)->node_pt(l2 + l3 * n_p * n_p) =
1337 finite_element_pt(element_num - Nx)
1338 ->node_pt((n_p - 1) * n_p + l2 + l3 * n_p * n_p);
1343 for (
unsigned l1 = 1; l1 < (n_p - 1); l1++)
1346 local_node_num = n_p * l1 + l3 * n_p * n_p;
1349 Node_pt[node_count] =
1350 finite_element_pt(element_num)
1351 ->construct_boundary_node(local_node_num, time_stepper_pt);
1353 finite_element_pt(element_num)->node_pt(local_node_num) =
1354 Node_pt[node_count];
1357 finite_element_pt(element_num)
1358 ->local_fraction_of_node(local_node_num, s_fraction);
1361 Node_pt[node_count]->x(0) = Xmin;
1362 Node_pt[node_count]->x(1) =
1363 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
1364 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
1367 add_boundary_node(4, Node_pt[node_count]);
1372 for (
unsigned l2 = 1; l2 < n_p; l2++)
1375 local_node_num = n_p * l1 + l2 + l3 * n_p * n_p;
1378 Node_pt[node_count] =
1379 finite_element_pt(element_num)
1380 ->construct_node(local_node_num, time_stepper_pt);
1382 finite_element_pt(element_num)->node_pt(local_node_num) =
1383 Node_pt[node_count];
1386 finite_element_pt(element_num)
1387 ->local_fraction_of_node(local_node_num, s_fraction);
1390 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
1391 Node_pt[node_count]->x(1) =
1392 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
1393 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
1405 local_node_num = n_p * (n_p - 1) + l3 * n_p * n_p;
1407 Node_pt[node_count] =
1408 finite_element_pt(element_num)
1409 ->construct_boundary_node(local_node_num, time_stepper_pt);
1411 finite_element_pt(element_num)->node_pt(local_node_num) =
1412 Node_pt[node_count];
1415 finite_element_pt(element_num)
1416 ->local_fraction_of_node(local_node_num, s_fraction);
1419 Node_pt[node_count]->x(0) = Xmin;
1420 Node_pt[node_count]->x(1) = Ymax;
1421 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
1424 add_boundary_node(3, Node_pt[node_count]);
1425 add_boundary_node(4, Node_pt[node_count]);
1431 for (
unsigned l2 = 1; l2 < n_p; l2++)
1433 local_node_num = n_p * (n_p - 1) + l2 + l3 * n_p * n_p;
1435 Node_pt[node_count] =
1436 finite_element_pt(element_num)
1437 ->construct_boundary_node(local_node_num, time_stepper_pt);
1439 finite_element_pt(element_num)->node_pt(local_node_num) =
1440 Node_pt[node_count];
1443 finite_element_pt(element_num)
1444 ->local_fraction_of_node(local_node_num, s_fraction);
1447 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
1448 Node_pt[node_count]->x(1) = Ymax;
1449 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
1452 add_boundary_node(3, Node_pt[node_count]);
1463 for (
unsigned j = 1; j < (Nx - 1); j++)
1466 element_num = Nx * (Ny - 1) + j;
1467 Element_pt[element_num] =
new ELEMENT;
1469 for (
unsigned l2 = 0; l2 < n_p; l2++)
1471 finite_element_pt(element_num)->node_pt(l2) =
1472 finite_element_pt(element_num - Nx)->node_pt((n_p - 1) * n_p + l2);
1476 for (
unsigned l1 = 1; l1 < (n_p - 1); l1++)
1479 finite_element_pt(element_num)->node_pt(n_p * l1) =
1480 finite_element_pt(element_num - 1)->node_pt(n_p * l1 + (n_p - 1));
1483 for (
unsigned l2 = 1; l2 < n_p; l2++)
1485 local_node_num = n_p * l1 + l2;
1487 Node_pt[node_count] =
1488 finite_element_pt(element_num)
1489 ->construct_boundary_node(local_node_num, time_stepper_pt);
1492 finite_element_pt(element_num)->node_pt(local_node_num) =
1493 Node_pt[node_count];
1496 finite_element_pt(element_num)
1497 ->local_fraction_of_node(local_node_num, s_fraction);
1500 Node_pt[node_count]->x(0) = Xmin + el_length[0] * (j + s_fraction[0]);
1501 Node_pt[node_count]->x(1) =
1502 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
1503 Node_pt[node_count]->x(2) = Zmin;
1506 add_boundary_node(0, Node_pt[node_count]);
1515 finite_element_pt(element_num)->node_pt(n_p * (n_p - 1)) =
1516 finite_element_pt(element_num - 1)
1517 ->node_pt(n_p * (n_p - 1) + (n_p - 1));
1519 for (
unsigned l2 = 1; l2 < n_p; l2++)
1521 local_node_num = n_p * (n_p - 1) + l2;
1523 Node_pt[node_count] =
1524 finite_element_pt(element_num)
1525 ->construct_boundary_node(local_node_num, time_stepper_pt);
1527 finite_element_pt(element_num)->node_pt(local_node_num) =
1528 Node_pt[node_count];
1531 finite_element_pt(element_num)
1532 ->local_fraction_of_node(local_node_num, s_fraction);
1535 Node_pt[node_count]->x(0) = Xmin + el_length[0] * (j + s_fraction[0]);
1536 Node_pt[node_count]->x(1) = Ymax;
1537 Node_pt[node_count]->x(2) = Zmin;
1540 add_boundary_node(3, Node_pt[node_count]);
1541 add_boundary_node(0, Node_pt[node_count]);
1550 for (
unsigned l3 = 1; l3 < n_p; l3++)
1553 for (
unsigned l2 = 0; l2 < n_p; l2++)
1555 finite_element_pt(element_num)->node_pt(l2 + l3 * n_p * n_p) =
1556 finite_element_pt(element_num - Nx)
1557 ->node_pt((n_p - 1) * n_p + l2 + l3 * n_p * n_p);
1561 for (
unsigned l1 = 1; l1 < (n_p - 1); l1++)
1564 finite_element_pt(element_num)->node_pt(n_p * l1 + l3 * n_p * n_p) =
1565 finite_element_pt(element_num - 1)
1566 ->node_pt(n_p * l1 + (n_p - 1) + l3 * n_p * n_p);
1569 for (
unsigned l2 = 1; l2 < n_p; l2++)
1571 local_node_num = n_p * l1 + l2 + l3 * n_p * n_p;
1573 Node_pt[node_count] =
1574 finite_element_pt(element_num)
1575 ->construct_node(local_node_num, time_stepper_pt);
1578 finite_element_pt(element_num)->node_pt(local_node_num) =
1579 Node_pt[node_count];
1582 finite_element_pt(element_num)
1583 ->local_fraction_of_node(local_node_num, s_fraction);
1586 Node_pt[node_count]->x(0) =
1587 Xmin + el_length[0] * (j + s_fraction[0]);
1588 Node_pt[node_count]->x(1) =
1589 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
1590 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
1602 finite_element_pt(element_num)
1603 ->node_pt(n_p * (n_p - 1) + l3 * n_p * n_p) =
1604 finite_element_pt(element_num - 1)
1605 ->node_pt(n_p * (n_p - 1) + (n_p - 1) + l3 * n_p * n_p);
1607 for (
unsigned l2 = 1; l2 < n_p; l2++)
1609 local_node_num = n_p * (n_p - 1) + l2 + l3 * n_p * n_p;
1611 Node_pt[node_count] =
1612 finite_element_pt(element_num)
1613 ->construct_boundary_node(local_node_num, time_stepper_pt);
1615 finite_element_pt(element_num)->node_pt(local_node_num) =
1616 Node_pt[node_count];
1619 finite_element_pt(element_num)
1620 ->local_fraction_of_node(local_node_num, s_fraction);
1623 Node_pt[node_count]->x(0) = Xmin + el_length[0] * (j + s_fraction[0]);
1624 Node_pt[node_count]->x(1) = Ymax;
1625 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
1628 add_boundary_node(3, Node_pt[node_count]);
1642 element_num = Nx * (Ny - 1) + Nx - 1;
1643 Element_pt[element_num] =
new ELEMENT;
1647 for (
unsigned l2 = 0; l2 < n_p; l2++)
1649 finite_element_pt(element_num)->node_pt(l2) =
1650 finite_element_pt(element_num - Nx)->node_pt((n_p - 1) * n_p + l2);
1654 for (
unsigned l1 = 1; l1 < (n_p - 1); l1++)
1657 finite_element_pt(element_num)->node_pt(n_p * l1) =
1658 finite_element_pt(element_num - 1)->node_pt(n_p * l1 + (n_p - 1));
1661 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
1663 local_node_num = n_p * l1 + l2;
1665 Node_pt[node_count] =
1666 finite_element_pt(element_num)
1667 ->construct_boundary_node(local_node_num, time_stepper_pt);
1669 finite_element_pt(element_num)->node_pt(local_node_num) =
1670 Node_pt[node_count];
1673 finite_element_pt(element_num)
1674 ->local_fraction_of_node(local_node_num, s_fraction);
1677 Node_pt[node_count]->x(0) =
1678 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
1679 Node_pt[node_count]->x(1) =
1680 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
1681 Node_pt[node_count]->x(2) = Zmin;
1684 add_boundary_node(0, Node_pt[node_count]);
1691 local_node_num = n_p * l1 + (n_p - 1);
1693 Node_pt[node_count] =
1694 finite_element_pt(element_num)
1695 ->construct_boundary_node(local_node_num, time_stepper_pt);
1697 finite_element_pt(element_num)->node_pt(local_node_num) =
1698 Node_pt[node_count];
1701 finite_element_pt(element_num)
1702 ->local_fraction_of_node(local_node_num, s_fraction);
1705 Node_pt[node_count]->x(0) = Xmax;
1706 Node_pt[node_count]->x(1) =
1707 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
1708 Node_pt[node_count]->x(2) = Zmin;
1711 add_boundary_node(0, Node_pt[node_count]);
1712 add_boundary_node(2, Node_pt[node_count]);
1722 finite_element_pt(element_num)->node_pt(n_p * (n_p - 1)) =
1723 finite_element_pt(element_num - 1)->node_pt(n_p * (n_p - 1) + (n_p - 1));
1726 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
1728 local_node_num = n_p * (n_p - 1) + l2;
1730 Node_pt[node_count] =
1731 finite_element_pt(element_num)
1732 ->construct_boundary_node(local_node_num, time_stepper_pt);
1734 finite_element_pt(element_num)->node_pt(local_node_num) =
1735 Node_pt[node_count];
1738 finite_element_pt(element_num)
1739 ->local_fraction_of_node(local_node_num, s_fraction);
1742 Node_pt[node_count]->x(0) =
1743 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
1744 Node_pt[node_count]->x(1) = Ymax;
1745 Node_pt[node_count]->x(2) = Zmin;
1748 add_boundary_node(0, Node_pt[node_count]);
1749 add_boundary_node(3, Node_pt[node_count]);
1758 local_node_num = n_p * (n_p - 1) + (n_p - 1);
1760 Node_pt[node_count] =
1761 finite_element_pt(element_num)
1762 ->construct_boundary_node(local_node_num, time_stepper_pt);
1764 finite_element_pt(element_num)->node_pt(local_node_num) =
1765 Node_pt[node_count];
1768 finite_element_pt(element_num)
1769 ->local_fraction_of_node(local_node_num, s_fraction);
1772 Node_pt[node_count]->x(0) = Xmax;
1773 Node_pt[node_count]->x(1) = Ymax;
1774 Node_pt[node_count]->x(2) = Zmin;
1777 add_boundary_node(0, Node_pt[node_count]);
1778 add_boundary_node(2, Node_pt[node_count]);
1779 add_boundary_node(3, Node_pt[node_count]);
1786 for (
unsigned l3 = 1; l3 < n_p; l3++)
1789 for (
unsigned l2 = 0; l2 < n_p; l2++)
1791 finite_element_pt(element_num)->node_pt(l2 + l3 * n_p * n_p) =
1792 finite_element_pt(element_num - Nx)
1793 ->node_pt((n_p - 1) * n_p + l2 + l3 * n_p * n_p);
1797 for (
unsigned l1 = 1; l1 < (n_p - 1); l1++)
1800 finite_element_pt(element_num)->node_pt(n_p * l1 + l3 * n_p * n_p) =
1801 finite_element_pt(element_num - 1)
1802 ->node_pt(n_p * l1 + (n_p - 1) + l3 * n_p * n_p);
1805 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
1808 local_node_num = n_p * l1 + l2 + l3 * n_p * n_p;
1810 Node_pt[node_count] =
1811 finite_element_pt(element_num)
1812 ->construct_node(local_node_num, time_stepper_pt);
1814 finite_element_pt(element_num)->node_pt(local_node_num) =
1815 Node_pt[node_count];
1818 finite_element_pt(element_num)
1819 ->local_fraction_of_node(local_node_num, s_fraction);
1822 Node_pt[node_count]->x(0) =
1823 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
1824 Node_pt[node_count]->x(1) =
1825 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
1826 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
1836 local_node_num = n_p * l1 + (n_p - 1) + l3 * n_p * n_p;
1838 Node_pt[node_count] =
1839 finite_element_pt(element_num)
1840 ->construct_boundary_node(local_node_num, time_stepper_pt);
1842 finite_element_pt(element_num)->node_pt(local_node_num) =
1843 Node_pt[node_count];
1846 finite_element_pt(element_num)
1847 ->local_fraction_of_node(local_node_num, s_fraction);
1850 Node_pt[node_count]->x(0) = Xmax;
1851 Node_pt[node_count]->x(1) =
1852 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
1853 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
1856 add_boundary_node(2, Node_pt[node_count]);
1864 finite_element_pt(element_num)
1865 ->node_pt(n_p * (n_p - 1) + l3 * n_p * n_p) =
1866 finite_element_pt(element_num - 1)
1867 ->node_pt(n_p * (n_p - 1) + (n_p - 1) + l3 * n_p * n_p);
1870 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
1873 local_node_num = n_p * (n_p - 1) + l2 + l3 * n_p * n_p;
1875 Node_pt[node_count] =
1876 finite_element_pt(element_num)
1877 ->construct_boundary_node(local_node_num, time_stepper_pt);
1879 finite_element_pt(element_num)->node_pt(local_node_num) =
1880 Node_pt[node_count];
1883 finite_element_pt(element_num)
1884 ->local_fraction_of_node(local_node_num, s_fraction);
1887 Node_pt[node_count]->x(0) =
1888 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
1889 Node_pt[node_count]->x(1) = Ymax;
1890 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
1893 add_boundary_node(3, Node_pt[node_count]);
1900 local_node_num = n_p * (n_p - 1) + (n_p - 1) + l3 * n_p * n_p;
1902 Node_pt[node_count] =
1903 finite_element_pt(element_num)
1904 ->construct_boundary_node(local_node_num, time_stepper_pt);
1906 finite_element_pt(element_num)->node_pt(local_node_num) =
1907 Node_pt[node_count];
1910 finite_element_pt(element_num)
1911 ->local_fraction_of_node(local_node_num, s_fraction);
1914 Node_pt[node_count]->x(0) = Xmax;
1915 Node_pt[node_count]->x(1) = Ymax;
1916 Node_pt[node_count]->x(2) = Zmin + el_length[2] * s_fraction[2];
1919 add_boundary_node(2, Node_pt[node_count]);
1920 add_boundary_node(3, Node_pt[node_count]);
1935 for (
unsigned k = 1; k < (Nz - 1); k++)
1942 element_num = k * Nx * Ny;
1943 Element_pt[element_num] =
new ELEMENT;
1946 for (
unsigned l1 = 0; l1 < n_p; l1++)
1948 for (
unsigned l2 = 0; l2 < n_p; l2++)
1950 finite_element_pt(element_num)->node_pt(l2 + n_p * l1) =
1951 finite_element_pt(element_num - Nx * Ny)
1952 ->node_pt(l2 + n_p * l1 + n_p * n_p * (n_p - 1));
1959 for (
unsigned l3 = 1; l3 < n_p; l3++)
1963 local_node_num = n_p * n_p * l3;
1966 Node_pt[node_count] =
1967 finite_element_pt(element_num)
1968 ->construct_boundary_node(local_node_num, time_stepper_pt);
1971 finite_element_pt(element_num)->node_pt(local_node_num) =
1972 Node_pt[node_count];
1975 finite_element_pt(element_num)
1976 ->local_fraction_of_node(local_node_num, s_fraction);
1979 Node_pt[node_count]->x(0) = Xmin;
1980 Node_pt[node_count]->x(1) = Ymin;
1981 Node_pt[node_count]->x(2) = Zmin + el_length[2] * (k + s_fraction[2]);
1984 add_boundary_node(1, Node_pt[node_count]);
1985 add_boundary_node(4, Node_pt[node_count]);
1991 for (
unsigned l2 = 1; l2 < n_p; l2++)
1994 local_node_num = l2 + n_p * n_p * l3;
1997 Node_pt[node_count] =
1998 finite_element_pt(element_num)
1999 ->construct_boundary_node(local_node_num, time_stepper_pt);
2001 finite_element_pt(element_num)->node_pt(local_node_num) =
2002 Node_pt[node_count];
2005 finite_element_pt(element_num)
2006 ->local_fraction_of_node(local_node_num, s_fraction);
2009 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
2010 Node_pt[node_count]->x(1) = Ymin;
2011 Node_pt[node_count]->x(2) = Zmin + el_length[2] * (k + s_fraction[2]);
2014 add_boundary_node(1, Node_pt[node_count]);
2020 for (
unsigned l1 = 1; l1 < n_p; l1++)
2023 local_node_num = l1 * n_p + n_p * n_p * l3;
2026 Node_pt[node_count] =
2027 finite_element_pt(element_num)
2028 ->construct_boundary_node(local_node_num, time_stepper_pt);
2030 finite_element_pt(element_num)->node_pt(local_node_num) =
2031 Node_pt[node_count];
2034 finite_element_pt(element_num)
2035 ->local_fraction_of_node(local_node_num, s_fraction);
2038 Node_pt[node_count]->x(0) = Xmin;
2039 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
2040 Node_pt[node_count]->x(2) = Zmin + el_length[2] * (k + s_fraction[2]);
2043 add_boundary_node(4, Node_pt[node_count]);
2048 for (
unsigned l2 = 1; l2 < n_p; l2++)
2051 local_node_num = l1 * n_p + l2 + n_p * n_p * l3;
2054 Node_pt[node_count] =
2055 finite_element_pt(element_num)
2056 ->construct_node(local_node_num, time_stepper_pt);
2058 finite_element_pt(element_num)->node_pt(local_node_num) =
2059 Node_pt[node_count];
2062 finite_element_pt(element_num)
2063 ->local_fraction_of_node(local_node_num, s_fraction);
2066 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
2067 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
2068 Node_pt[node_count]->x(2) =
2069 Zmin + el_length[2] * (k + s_fraction[2]);
2087 for (
unsigned j = 1; j < (Nx - 1); j++)
2090 element_num = j + k * Nx * Ny;
2091 Element_pt[element_num] =
new ELEMENT;
2094 for (
unsigned l1 = 0; l1 < n_p; l1++)
2096 for (
unsigned l2 = 0; l2 < n_p; l2++)
2098 finite_element_pt(j + k * Nx * Ny)->node_pt(l2 + n_p * l1) =
2099 finite_element_pt(j + (k - 1) * Nx * Ny)
2100 ->node_pt(l2 + n_p * l1 + (n_p - 1) * n_p * n_p);
2105 for (
unsigned l3 = 1; l3 < n_p; l3++)
2108 finite_element_pt(j + k * Nx * Ny)->node_pt(l3 * n_p * n_p) =
2109 finite_element_pt(j - 1 + k * Nx * Ny)
2110 ->node_pt(l3 * n_p * n_p + (n_p - 1));
2113 for (
unsigned l2 = 1; l2 < n_p; l2++)
2116 local_node_num = l2 + l3 * n_p * n_p;
2119 Node_pt[node_count] =
2120 finite_element_pt(element_num)
2121 ->construct_boundary_node(local_node_num, time_stepper_pt);
2123 finite_element_pt(element_num)->node_pt(local_node_num) =
2124 Node_pt[node_count];
2127 finite_element_pt(element_num)
2128 ->local_fraction_of_node(local_node_num, s_fraction);
2131 Node_pt[node_count]->x(0) =
2132 Xmin + el_length[0] * (j + s_fraction[0]);
2133 Node_pt[node_count]->x(1) = Ymin;
2134 Node_pt[node_count]->x(2) =
2135 Zmin + el_length[2] * (k + s_fraction[2]);
2138 add_boundary_node(1, Node_pt[node_count]);
2144 for (
unsigned l1 = 1; l1 < n_p; l1++)
2147 finite_element_pt(j + k * Nx * Ny)
2148 ->node_pt(l1 * n_p + l3 * n_p * n_p) =
2149 finite_element_pt(j - 1 + k * Nx * Ny)
2150 ->node_pt(l1 * n_p + (n_p - 1) + l3 * n_p * n_p);
2153 for (
unsigned l2 = 1; l2 < n_p; l2++)
2156 local_node_num = l1 * n_p + l2 + l3 * n_p * n_p;
2159 Node_pt[node_count] =
2160 finite_element_pt(element_num)
2161 ->construct_node(local_node_num, time_stepper_pt);
2163 finite_element_pt(element_num)->node_pt(local_node_num) =
2164 Node_pt[node_count];
2167 finite_element_pt(element_num)
2168 ->local_fraction_of_node(local_node_num, s_fraction);
2171 Node_pt[node_count]->x(0) =
2172 Xmin + el_length[0] * (j + s_fraction[0]);
2173 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
2174 Node_pt[node_count]->x(2) =
2175 Zmin + el_length[2] * (k + s_fraction[2]);
2191 element_num = Nx - 1 + k * Nx * Ny;
2192 Element_pt[element_num] =
new ELEMENT;
2195 for (
unsigned l1 = 0; l1 < n_p; l1++)
2197 for (
unsigned l2 = 0; l2 < n_p; l2++)
2199 finite_element_pt(Nx - 1 + k * Nx * Ny)->node_pt(l2 + n_p * l1) =
2200 finite_element_pt(Nx - 1 + (k - 1) * Nx * Ny)
2201 ->node_pt(l2 + n_p * l1 + (n_p - 1) * n_p * n_p);
2207 for (
unsigned l3 = 1; l3 < n_p; l3++)
2210 finite_element_pt(Nx - 1 + k * Nx * Ny)->node_pt(l3 * n_p * n_p) =
2211 finite_element_pt(Nx - 2 + k * Nx * Ny)
2212 ->node_pt(l3 * n_p * n_p + (n_p - 1));
2215 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
2218 local_node_num = l2 + l3 * n_p * n_p;
2221 Node_pt[node_count] =
2222 finite_element_pt(element_num)
2223 ->construct_boundary_node(local_node_num, time_stepper_pt);
2225 finite_element_pt(element_num)->node_pt(local_node_num) =
2226 Node_pt[node_count];
2229 finite_element_pt(element_num)
2230 ->local_fraction_of_node(local_node_num, s_fraction);
2233 Node_pt[node_count]->x(0) =
2234 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
2235 Node_pt[node_count]->x(1) = Ymin;
2236 Node_pt[node_count]->x(2) = Zmin + el_length[2] * (k + s_fraction[2]);
2239 add_boundary_node(1, Node_pt[node_count]);
2247 local_node_num = (n_p - 1) + l3 * n_p * n_p;
2250 Node_pt[node_count] =
2251 finite_element_pt(element_num)
2252 ->construct_boundary_node(local_node_num, time_stepper_pt);
2254 finite_element_pt(element_num)->node_pt(local_node_num) =
2255 Node_pt[node_count];
2258 finite_element_pt(element_num)
2259 ->local_fraction_of_node(local_node_num, s_fraction);
2262 Node_pt[node_count]->x(0) = Xmax;
2263 Node_pt[node_count]->x(1) = Ymin;
2264 Node_pt[node_count]->x(2) = Zmin + el_length[2] * (k + s_fraction[2]);
2267 add_boundary_node(1, Node_pt[node_count]);
2268 add_boundary_node(2, Node_pt[node_count]);
2273 for (
unsigned l1 = 1; l1 < n_p; l1++)
2276 finite_element_pt(Nx - 1 + k * Nx * Ny)
2277 ->node_pt(l1 * n_p + l3 * n_p * n_p) =
2278 finite_element_pt(Nx - 2 + k * Nx * Ny)
2279 ->node_pt(l1 * n_p + (n_p - 1) + l3 * n_p * n_p);
2282 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
2285 local_node_num = l1 * n_p + l2 + l3 * n_p * n_p;
2288 Node_pt[node_count] =
2289 finite_element_pt(element_num)
2290 ->construct_node(local_node_num, time_stepper_pt);
2292 finite_element_pt(element_num)->node_pt(local_node_num) =
2293 Node_pt[node_count];
2296 finite_element_pt(element_num)
2297 ->local_fraction_of_node(local_node_num, s_fraction);
2300 Node_pt[node_count]->x(0) =
2301 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
2302 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
2303 Node_pt[node_count]->x(2) =
2304 Zmin + el_length[2] * (k + s_fraction[2]);
2314 local_node_num = l1 * n_p + (n_p - 1) + l3 * n_p * n_p;
2316 Node_pt[node_count] =
2317 finite_element_pt(element_num)
2318 ->construct_boundary_node(local_node_num, time_stepper_pt);
2320 finite_element_pt(element_num)->node_pt(local_node_num) =
2321 Node_pt[node_count];
2324 finite_element_pt(element_num)
2325 ->local_fraction_of_node(local_node_num, s_fraction);
2329 Node_pt[node_count]->x(0) = Xmax;
2330 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
2331 Node_pt[node_count]->x(2) = Zmin + el_length[2] * (k + s_fraction[2]);
2334 add_boundary_node(2, Node_pt[node_count]);
2346 for (
unsigned i = 1;
i < (Ny - 1);
i++)
2351 element_num = Nx *
i + Nx * Ny * k;
2352 Element_pt[element_num] =
new ELEMENT;
2355 for (
unsigned l1 = 0; l1 < n_p; l1++)
2357 for (
unsigned l2 = 0; l2 < n_p; l2++)
2359 finite_element_pt(Nx *
i + k * Nx * Ny)->node_pt(l2 + n_p * l1) =
2360 finite_element_pt(Nx *
i + (k - 1) * Nx * Ny)
2361 ->node_pt(l2 + n_p * l1 + (n_p - 1) * n_p * n_p);
2367 for (
unsigned l3 = 1; l3 < n_p; l3++)
2370 for (
unsigned l2 = 0; l2 < n_p; l2++)
2372 finite_element_pt(Nx *
i + k * Nx * Ny)
2373 ->node_pt(l2 + l3 * n_p * n_p) =
2374 finite_element_pt(Nx * (
i - 1) + k * Nx * Ny)
2375 ->node_pt((n_p - 1) * n_p + l2 + l3 * n_p * n_p);
2379 for (
unsigned l1 = 1; l1 < n_p; l1++)
2384 local_node_num = l1 * n_p + l3 * n_p * n_p;
2387 Node_pt[node_count] =
2388 finite_element_pt(element_num)
2389 ->construct_boundary_node(local_node_num, time_stepper_pt);
2391 finite_element_pt(element_num)->node_pt(local_node_num) =
2392 Node_pt[node_count];
2395 finite_element_pt(element_num)
2396 ->local_fraction_of_node(local_node_num, s_fraction);
2399 Node_pt[node_count]->x(0) = Xmin;
2400 Node_pt[node_count]->x(1) =
2401 Ymin + el_length[1] * (
i + s_fraction[1]);
2402 Node_pt[node_count]->x(2) =
2403 Zmin + el_length[2] * (k + s_fraction[2]);
2406 add_boundary_node(4, Node_pt[node_count]);
2412 for (
unsigned l2 = 1; l2 < n_p; l2++)
2415 local_node_num = l1 * n_p + l2 + n_p * n_p * l3;
2418 Node_pt[node_count] =
2419 finite_element_pt(element_num)
2420 ->construct_node(local_node_num, time_stepper_pt);
2422 finite_element_pt(element_num)->node_pt(local_node_num) =
2423 Node_pt[node_count];
2426 finite_element_pt(element_num)
2427 ->local_fraction_of_node(local_node_num, s_fraction);
2430 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
2431 Node_pt[node_count]->x(1) =
2432 Ymin + el_length[1] * (
i + s_fraction[1]);
2433 Node_pt[node_count]->x(2) =
2434 Zmin + el_length[2] * (k + s_fraction[2]);
2446 for (
unsigned j = 1; j < (Nx - 1); j++)
2449 element_num = Nx *
i + j + k * Nx * Ny;
2450 Element_pt[element_num] =
new ELEMENT;
2453 for (
unsigned l1 = 0; l1 < n_p; l1++)
2455 for (
unsigned l2 = 0; l2 < n_p; l2++)
2457 finite_element_pt(Nx *
i + j + k * Nx * Ny)
2458 ->node_pt(l2 + n_p * l1) =
2459 finite_element_pt(Nx *
i + j + (k - 1) * Nx * Ny)
2460 ->node_pt(l2 + n_p * l1 + (n_p - 1) * n_p * n_p);
2466 for (
unsigned l3 = 1; l3 < n_p; l3++)
2470 for (
unsigned l2 = 0; l2 < n_p; l2++)
2472 finite_element_pt(Nx *
i + j + k * Nx * Ny)
2473 ->node_pt(l2 + l3 * n_p * n_p) =
2474 finite_element_pt(Nx * (
i - 1) + j + k * Nx * Ny)
2475 ->node_pt((n_p - 1) * n_p + l2 + l3 * n_p * n_p);
2478 for (
unsigned l1 = 1; l1 < n_p; l1++)
2481 finite_element_pt(Nx *
i + j + k * Nx * Ny)
2482 ->node_pt(l1 * n_p + l3 * n_p * n_p) =
2483 finite_element_pt(Nx *
i + (j - 1) + k * Nx * Ny)
2484 ->node_pt(l1 * n_p + l3 * n_p * n_p + (n_p - 1));
2487 for (
unsigned l2 = 1; l2 < n_p; l2++)
2490 local_node_num = l1 * n_p + l2 + l3 * n_p * n_p;
2493 Node_pt[node_count] =
2494 finite_element_pt(element_num)
2495 ->construct_node(local_node_num, time_stepper_pt);
2497 finite_element_pt(element_num)->node_pt(local_node_num) =
2498 Node_pt[node_count];
2500 finite_element_pt(element_num)
2501 ->local_fraction_of_node(local_node_num, s_fraction);
2505 Node_pt[node_count]->x(0) =
2506 Xmin + el_length[0] * (j + s_fraction[0]);
2507 Node_pt[node_count]->x(1) =
2508 Ymin + el_length[1] * (
i + s_fraction[1]);
2509 Node_pt[node_count]->x(2) =
2510 Zmin + el_length[2] * (k + s_fraction[2]);
2526 element_num = Nx *
i + Nx - 1 + k * Nx * Ny;
2527 Element_pt[element_num] =
new ELEMENT;
2530 for (
unsigned l1 = 0; l1 < n_p; l1++)
2532 for (
unsigned l2 = 0; l2 < n_p; l2++)
2534 finite_element_pt(Nx *
i + Nx - 1 + k * Nx * Ny)
2535 ->node_pt(l2 + n_p * l1) =
2536 finite_element_pt(Nx *
i + Nx - 1 + (k - 1) * Nx * Ny)
2537 ->node_pt(l2 + n_p * l1 + (n_p - 1) * n_p * n_p);
2543 for (
unsigned l3 = 1; l3 < n_p; l3++)
2546 for (
unsigned l2 = 0; l2 < n_p; l2++)
2548 finite_element_pt(Nx *
i + Nx - 1 + k * Nx * Ny)
2549 ->node_pt(l2 + l3 * n_p * n_p) =
2550 finite_element_pt(Nx * (
i - 1) + Nx - 1 + k * Nx * Ny)
2551 ->node_pt((n_p - 1) * n_p + l2 + l3 * n_p * n_p);
2554 for (
unsigned l1 = 1; l1 < n_p; l1++)
2557 finite_element_pt(Nx *
i + Nx - 1 + k * Nx * Ny)
2558 ->node_pt(l1 * n_p + l3 * n_p * n_p) =
2559 finite_element_pt(Nx *
i + Nx - 2 + k * Nx * Ny)
2560 ->node_pt(l1 * n_p + (n_p - 1) + l3 * n_p * n_p);
2563 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
2566 local_node_num = l1 * n_p + l2 + l3 * n_p * n_p;
2569 Node_pt[node_count] =
2570 finite_element_pt(element_num)
2571 ->construct_node(local_node_num, time_stepper_pt);
2573 finite_element_pt(element_num)->node_pt(local_node_num) =
2574 Node_pt[node_count];
2577 finite_element_pt(element_num)
2578 ->local_fraction_of_node(local_node_num, s_fraction);
2581 Node_pt[node_count]->x(0) =
2582 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
2583 Node_pt[node_count]->x(1) =
2584 Ymin + el_length[1] * (
i + s_fraction[1]);
2585 Node_pt[node_count]->x(2) =
2586 Zmin + el_length[2] * (k + s_fraction[2]);
2597 local_node_num = l1 * n_p + (n_p - 1) + l3 * n_p * n_p;
2600 Node_pt[node_count] =
2601 finite_element_pt(element_num)
2602 ->construct_boundary_node(local_node_num, time_stepper_pt);
2604 finite_element_pt(element_num)->node_pt(local_node_num) =
2605 Node_pt[node_count];
2608 finite_element_pt(element_num)
2609 ->local_fraction_of_node(local_node_num, s_fraction);
2612 Node_pt[node_count]->x(0) = Xmax;
2613 Node_pt[node_count]->x(1) =
2614 Ymin + el_length[1] * (
i + s_fraction[1]);
2615 Node_pt[node_count]->x(2) =
2616 Zmin + el_length[2] * (k + s_fraction[2]);
2619 add_boundary_node(2, Node_pt[node_count]);
2640 element_num = Nx * (Ny - 1) + k * Nx * Ny;
2641 Element_pt[element_num] =
new ELEMENT;
2644 for (
unsigned l1 = 0; l1 < n_p; l1++)
2646 for (
unsigned l2 = 0; l2 < n_p; l2++)
2648 finite_element_pt(Nx * (Ny - 1) + k * Nx * Ny)
2649 ->node_pt(l2 + n_p * l1) =
2650 finite_element_pt(Nx * (Ny - 1) + (k - 1) * Nx * Ny)
2651 ->node_pt(l2 + n_p * l1 + (n_p - 1) * n_p * n_p);
2656 for (
unsigned l3 = 1; l3 < n_p; l3++)
2659 for (
unsigned l2 = 0; l2 < n_p; l2++)
2661 finite_element_pt(Nx * (Ny - 1) + k * Nx * Ny)
2662 ->node_pt(l2 + l3 * n_p * n_p) =
2663 finite_element_pt(Nx * (Ny - 2) + k * Nx * Ny)
2664 ->node_pt((n_p - 1) * n_p + l2 + l3 * n_p * n_p);
2669 for (
unsigned l1 = 1; l1 < (n_p - 1); l1++)
2672 local_node_num = n_p * l1 + l3 * n_p * n_p;
2675 Node_pt[node_count] =
2676 finite_element_pt(element_num)
2677 ->construct_boundary_node(local_node_num, time_stepper_pt);
2679 finite_element_pt(element_num)->node_pt(local_node_num) =
2680 Node_pt[node_count];
2683 finite_element_pt(element_num)
2684 ->local_fraction_of_node(local_node_num, s_fraction);
2687 Node_pt[node_count]->x(0) = Xmin;
2688 Node_pt[node_count]->x(1) =
2689 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
2690 Node_pt[node_count]->x(2) = Zmin + el_length[2] * (k + s_fraction[2]);
2693 add_boundary_node(4, Node_pt[node_count]);
2699 for (
unsigned l2 = 1; l2 < n_p; l2++)
2702 local_node_num = n_p * l1 + l2 + l3 * n_p * n_p;
2705 Node_pt[node_count] =
2706 finite_element_pt(element_num)
2707 ->construct_node(local_node_num, time_stepper_pt);
2709 finite_element_pt(element_num)->node_pt(local_node_num) =
2710 Node_pt[node_count];
2713 finite_element_pt(element_num)
2714 ->local_fraction_of_node(local_node_num, s_fraction);
2717 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
2718 Node_pt[node_count]->x(1) =
2719 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
2720 Node_pt[node_count]->x(2) =
2721 Zmin + el_length[2] * (k + s_fraction[2]);
2734 local_node_num = n_p * (n_p - 1) + l3 * n_p * n_p;
2736 Node_pt[node_count] =
2737 finite_element_pt(element_num)
2738 ->construct_boundary_node(local_node_num, time_stepper_pt);
2740 finite_element_pt(element_num)->node_pt(local_node_num) =
2741 Node_pt[node_count];
2744 finite_element_pt(element_num)
2745 ->local_fraction_of_node(local_node_num, s_fraction);
2748 Node_pt[node_count]->x(0) = Xmin;
2749 Node_pt[node_count]->x(1) = Ymax;
2750 Node_pt[node_count]->x(2) = Zmin + el_length[2] * (k + s_fraction[2]);
2753 add_boundary_node(3, Node_pt[node_count]);
2754 add_boundary_node(4, Node_pt[node_count]);
2760 for (
unsigned l2 = 1; l2 < n_p; l2++)
2763 local_node_num = n_p * (n_p - 1) + l2 + l3 * n_p * n_p;
2765 Node_pt[node_count] =
2766 finite_element_pt(element_num)
2767 ->construct_boundary_node(local_node_num, time_stepper_pt);
2769 finite_element_pt(element_num)->node_pt(local_node_num) =
2770 Node_pt[node_count];
2773 finite_element_pt(element_num)
2774 ->local_fraction_of_node(local_node_num, s_fraction);
2777 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
2778 Node_pt[node_count]->x(1) = Ymax;
2779 Node_pt[node_count]->x(2) = Zmin + el_length[2] * (k + s_fraction[2]);
2782 add_boundary_node(3, Node_pt[node_count]);
2791 for (
unsigned j = 1; j < (Nx - 1); j++)
2794 element_num = Nx * (Ny - 1) + j + k * Nx * Ny;
2795 Element_pt[element_num] =
new ELEMENT;
2798 for (
unsigned l1 = 0; l1 < n_p; l1++)
2800 for (
unsigned l2 = 0; l2 < n_p; l2++)
2802 finite_element_pt(Nx * (Ny - 1) + j + k * Nx * Ny)
2803 ->node_pt(l2 + n_p * l1) =
2804 finite_element_pt(Nx * (Ny - 1) + j + (k - 1) * Nx * Ny)
2805 ->node_pt(l2 + n_p * l1 + (n_p - 1) * n_p * n_p);
2811 for (
unsigned l3 = 1; l3 < n_p; l3++)
2814 for (
unsigned l2 = 0; l2 < n_p; l2++)
2816 finite_element_pt(Nx * (Ny - 1) + j + k * Nx * Ny)
2817 ->node_pt(l2 + l3 * n_p * n_p) =
2818 finite_element_pt(Nx * (Ny - 2) + j + k * Nx * Ny)
2819 ->node_pt((n_p - 1) * n_p + l2 + l3 * n_p * n_p);
2823 for (
unsigned l1 = 1; l1 < (n_p - 1); l1++)
2826 finite_element_pt(Nx * (Ny - 1) + j + k * Nx * Ny)
2827 ->node_pt(n_p * l1 + l3 * n_p * n_p) =
2828 finite_element_pt(Nx * (Ny - 1) + (j - 1) + k * Nx * Ny)
2829 ->node_pt(n_p * l1 + (n_p - 1) + l3 * n_p * n_p);
2832 for (
unsigned l2 = 1; l2 < n_p; l2++)
2835 local_node_num = n_p * l1 + l2 + l3 * n_p * n_p;
2837 Node_pt[node_count] =
2838 finite_element_pt(element_num)
2839 ->construct_node(local_node_num, time_stepper_pt);
2842 finite_element_pt(element_num)->node_pt(local_node_num) =
2843 Node_pt[node_count];
2846 finite_element_pt(element_num)
2847 ->local_fraction_of_node(local_node_num, s_fraction);
2850 Node_pt[node_count]->x(0) =
2851 Xmin + el_length[0] * (j + s_fraction[0]);
2852 Node_pt[node_count]->x(1) =
2853 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
2854 Node_pt[node_count]->x(2) =
2855 Zmin + el_length[2] * (k + s_fraction[2]);
2867 finite_element_pt(Nx * (Ny - 1) + j + k * Nx * Ny)
2868 ->node_pt(n_p * (n_p - 1) + l3 * n_p * n_p) =
2869 finite_element_pt(Nx * (Ny - 1) + (j - 1) + k * Nx * Ny)
2870 ->node_pt(n_p * (n_p - 1) + (n_p - 1) + l3 * n_p * n_p);
2872 for (
unsigned l2 = 1; l2 < n_p; l2++)
2875 local_node_num = n_p * (n_p - 1) + l2 + l3 * n_p * n_p;
2877 Node_pt[node_count] =
2878 finite_element_pt(element_num)
2879 ->construct_boundary_node(local_node_num, time_stepper_pt);
2881 finite_element_pt(element_num)->node_pt(local_node_num) =
2882 Node_pt[node_count];
2885 finite_element_pt(element_num)
2886 ->local_fraction_of_node(local_node_num, s_fraction);
2889 Node_pt[node_count]->x(0) =
2890 Xmin + el_length[0] * (j + s_fraction[0]);
2891 Node_pt[node_count]->x(1) = Ymax;
2892 Node_pt[node_count]->x(2) =
2893 Zmin + el_length[2] * (k + s_fraction[2]);
2896 add_boundary_node(3, Node_pt[node_count]);
2910 element_num = Nx * (Ny - 1) + Nx - 1 + k * Nx * Ny;
2911 Element_pt[element_num] =
new ELEMENT;
2914 for (
unsigned l1 = 0; l1 < n_p; l1++)
2916 for (
unsigned l2 = 0; l2 < n_p; l2++)
2918 finite_element_pt(Nx * (Ny - 1) + Nx - 1 + k * Nx * Ny)
2919 ->node_pt(l2 + n_p * l1) =
2920 finite_element_pt(Nx * (Ny - 1) + Nx - 1 + (k - 1) * Nx * Ny)
2921 ->node_pt(l2 + n_p * l1 + (n_p - 1) * n_p * n_p);
2928 for (
unsigned l3 = 1; l3 < n_p; l3++)
2931 for (
unsigned l2 = 0; l2 < n_p; l2++)
2933 finite_element_pt(Nx * (Ny - 1) + Nx - 1 + k * Nx * Ny)
2934 ->node_pt(l2 + l3 * n_p * n_p) =
2935 finite_element_pt(Nx * (Ny - 2) + Nx - 1 + k * Nx * Ny)
2936 ->node_pt((n_p - 1) * n_p + l2 + l3 * n_p * n_p);
2940 for (
unsigned l1 = 1; l1 < (n_p - 1); l1++)
2943 finite_element_pt(Nx * (Ny - 1) + Nx - 1 + k * Nx * Ny)
2944 ->node_pt(n_p * l1 + l3 * n_p * n_p) =
2945 finite_element_pt(Nx * (Ny - 1) + Nx - 2 + k * Nx * Ny)
2946 ->node_pt(n_p * l1 + (n_p - 1) + l3 * n_p * n_p);
2949 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
2952 local_node_num = n_p * l1 + l2 + l3 * n_p * n_p;
2954 Node_pt[node_count] =
2955 finite_element_pt(element_num)
2956 ->construct_node(local_node_num, time_stepper_pt);
2958 finite_element_pt(element_num)->node_pt(local_node_num) =
2959 Node_pt[node_count];
2961 finite_element_pt(element_num)
2962 ->local_fraction_of_node(local_node_num, s_fraction);
2966 Node_pt[node_count]->x(0) =
2967 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
2968 Node_pt[node_count]->x(1) =
2969 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
2970 Node_pt[node_count]->x(2) =
2971 Zmin + el_length[2] * (k + s_fraction[2]);
2981 local_node_num = n_p * l1 + (n_p - 1) + l3 * n_p * n_p;
2983 Node_pt[node_count] =
2984 finite_element_pt(element_num)
2985 ->construct_boundary_node(local_node_num, time_stepper_pt);
2987 finite_element_pt(element_num)->node_pt(local_node_num) =
2988 Node_pt[node_count];
2991 finite_element_pt(element_num)
2992 ->local_fraction_of_node(local_node_num, s_fraction);
2995 Node_pt[node_count]->x(0) = Xmax;
2996 Node_pt[node_count]->x(1) =
2997 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
2998 Node_pt[node_count]->x(2) = Zmin + el_length[2] * (k + s_fraction[2]);
3001 add_boundary_node(2, Node_pt[node_count]);
3010 finite_element_pt(Nx * (Ny - 1) + Nx - 1 + k * Nx * Ny)
3011 ->node_pt(n_p * (n_p - 1) + l3 * n_p * n_p) =
3012 finite_element_pt(Nx * (Ny - 1) + Nx - 2 + k * Nx * Ny)
3013 ->node_pt(n_p * (n_p - 1) + (n_p - 1) + l3 * n_p * n_p);
3016 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
3019 local_node_num = n_p * (n_p - 1) + l2 + l3 * n_p * n_p;
3021 Node_pt[node_count] =
3022 finite_element_pt(element_num)
3023 ->construct_boundary_node(local_node_num, time_stepper_pt);
3025 finite_element_pt(element_num)->node_pt(local_node_num) =
3026 Node_pt[node_count];
3029 finite_element_pt(element_num)
3030 ->local_fraction_of_node(local_node_num, s_fraction);
3033 Node_pt[node_count]->x(0) =
3034 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
3035 Node_pt[node_count]->x(1) = Ymax;
3036 Node_pt[node_count]->x(2) = Zmin + el_length[2] * (k + s_fraction[2]);
3039 add_boundary_node(3, Node_pt[node_count]);
3047 local_node_num = n_p * (n_p - 1) + (n_p - 1) + l3 * n_p * n_p;
3049 Node_pt[node_count] =
3050 finite_element_pt(element_num)
3051 ->construct_boundary_node(local_node_num, time_stepper_pt);
3053 finite_element_pt(element_num)->node_pt(local_node_num) =
3054 Node_pt[node_count];
3057 finite_element_pt(element_num)
3058 ->local_fraction_of_node(local_node_num, s_fraction);
3061 Node_pt[node_count]->x(0) = Xmax;
3062 Node_pt[node_count]->x(1) = Ymax;
3063 Node_pt[node_count]->x(2) = Zmin + el_length[2] * (k + s_fraction[2]);
3066 add_boundary_node(2, Node_pt[node_count]);
3067 add_boundary_node(3, Node_pt[node_count]);
3087 element_num = (Nz - 1) * Nx * Ny;
3088 Element_pt[element_num] =
new ELEMENT;
3091 for (
unsigned l1 = 0; l1 < n_p; l1++)
3093 for (
unsigned l2 = 0; l2 < n_p; l2++)
3095 finite_element_pt((Nz - 1) * Nx * Ny)->node_pt(l2 + n_p * l1) =
3096 finite_element_pt((Nz - 2) * Nx * Ny)
3097 ->node_pt(l2 + n_p * l1 + n_p * n_p * (n_p - 1));
3104 for (
unsigned l3 = 1; l3 < (n_p - 1); l3++)
3108 local_node_num = n_p * n_p * l3;
3111 Node_pt[node_count] =
3112 finite_element_pt(element_num)
3113 ->construct_boundary_node(local_node_num, time_stepper_pt);
3116 finite_element_pt(element_num)->node_pt(local_node_num) =
3117 Node_pt[node_count];
3119 finite_element_pt(element_num)
3120 ->local_fraction_of_node(local_node_num, s_fraction);
3124 Node_pt[node_count]->x(0) = Xmin;
3125 Node_pt[node_count]->x(1) = Ymin;
3126 Node_pt[node_count]->x(2) =
3127 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
3130 add_boundary_node(1, Node_pt[node_count]);
3131 add_boundary_node(4, Node_pt[node_count]);
3137 for (
unsigned l2 = 1; l2 < n_p; l2++)
3140 local_node_num = l2 + n_p * n_p * l3;
3143 Node_pt[node_count] =
3144 finite_element_pt(element_num)
3145 ->construct_boundary_node(local_node_num, time_stepper_pt);
3147 finite_element_pt(element_num)->node_pt(local_node_num) =
3148 Node_pt[node_count];
3150 finite_element_pt(element_num)
3151 ->local_fraction_of_node(local_node_num, s_fraction);
3155 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
3156 Node_pt[node_count]->x(1) = Ymin;
3157 Node_pt[node_count]->x(2) =
3158 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
3161 add_boundary_node(1, Node_pt[node_count]);
3167 for (
unsigned l1 = 1; l1 < n_p; l1++)
3170 local_node_num = l1 * n_p + n_p * n_p * l3;
3173 Node_pt[node_count] =
3174 finite_element_pt(element_num)
3175 ->construct_boundary_node(local_node_num, time_stepper_pt);
3177 finite_element_pt(element_num)->node_pt(local_node_num) =
3178 Node_pt[node_count];
3181 finite_element_pt(element_num)
3182 ->local_fraction_of_node(local_node_num, s_fraction);
3185 Node_pt[node_count]->x(0) = Xmin;
3186 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
3187 Node_pt[node_count]->x(2) =
3188 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
3191 add_boundary_node(4, Node_pt[node_count]);
3196 for (
unsigned l2 = 1; l2 < n_p; l2++)
3199 local_node_num = l1 * n_p + l2 + n_p * n_p * l3;
3202 Node_pt[node_count] =
3203 finite_element_pt(element_num)
3204 ->construct_node(local_node_num, time_stepper_pt);
3206 finite_element_pt(element_num)->node_pt(local_node_num) =
3207 Node_pt[node_count];
3210 finite_element_pt(element_num)
3211 ->local_fraction_of_node(local_node_num, s_fraction);
3214 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
3215 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
3216 Node_pt[node_count]->x(2) =
3217 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
3231 local_node_num = n_p * n_p * (n_p - 1);
3234 Node_pt[node_count] =
3235 finite_element_pt(element_num)
3236 ->construct_boundary_node(local_node_num, time_stepper_pt);
3239 finite_element_pt(element_num)->node_pt(local_node_num) =
3240 Node_pt[node_count];
3243 finite_element_pt(element_num)
3244 ->local_fraction_of_node(local_node_num, s_fraction);
3247 Node_pt[node_count]->x(0) = Xmin;
3248 Node_pt[node_count]->x(1) = Ymin;
3249 Node_pt[node_count]->x(2) = Zmax;
3252 add_boundary_node(1, Node_pt[node_count]);
3253 add_boundary_node(4, Node_pt[node_count]);
3254 add_boundary_node(5, Node_pt[node_count]);
3260 for (
unsigned l2 = 1; l2 < n_p; l2++)
3263 local_node_num = l2 + n_p * n_p * (n_p - 1);
3266 Node_pt[node_count] =
3267 finite_element_pt(element_num)
3268 ->construct_boundary_node(local_node_num, time_stepper_pt);
3270 finite_element_pt(element_num)->node_pt(local_node_num) =
3271 Node_pt[node_count];
3274 finite_element_pt(element_num)
3275 ->local_fraction_of_node(local_node_num, s_fraction);
3278 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
3279 Node_pt[node_count]->x(1) = Ymin;
3280 Node_pt[node_count]->x(2) = Zmax;
3283 add_boundary_node(1, Node_pt[node_count]);
3284 add_boundary_node(5, Node_pt[node_count]);
3290 for (
unsigned l1 = 1; l1 < n_p; l1++)
3293 local_node_num = l1 * n_p + n_p * n_p * (n_p - 1);
3296 Node_pt[node_count] =
3297 finite_element_pt(element_num)
3298 ->construct_boundary_node(local_node_num, time_stepper_pt);
3300 finite_element_pt(element_num)->node_pt(local_node_num) =
3301 Node_pt[node_count];
3304 finite_element_pt(element_num)
3305 ->local_fraction_of_node(local_node_num, s_fraction);
3308 Node_pt[node_count]->x(0) = Xmin;
3309 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
3310 Node_pt[node_count]->x(2) = Zmax;
3313 add_boundary_node(4, Node_pt[node_count]);
3314 add_boundary_node(5, Node_pt[node_count]);
3319 for (
unsigned l2 = 1; l2 < n_p; l2++)
3322 local_node_num = l1 * n_p + l2 + n_p * n_p * (n_p - 1);
3325 Node_pt[node_count] =
3326 finite_element_pt(element_num)
3327 ->construct_boundary_node(local_node_num, time_stepper_pt);
3329 finite_element_pt(element_num)->node_pt(local_node_num) =
3330 Node_pt[node_count];
3333 finite_element_pt(element_num)
3334 ->local_fraction_of_node(local_node_num, s_fraction);
3337 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
3338 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
3339 Node_pt[node_count]->x(2) = Zmax;
3342 add_boundary_node(5, Node_pt[node_count]);
3355 for (
unsigned j = 1; j < (Nx - 1); j++)
3358 element_num = j + (Nz - 1) * Nx * Ny;
3359 Element_pt[element_num] =
new ELEMENT;
3362 for (
unsigned l1 = 0; l1 < n_p; l1++)
3364 for (
unsigned l2 = 0; l2 < n_p; l2++)
3366 finite_element_pt(j + (Nz - 1) * Nx * Ny)->node_pt(l2 + n_p * l1) =
3367 finite_element_pt(j + (Nz - 2) * Nx * Ny)
3368 ->node_pt(l2 + n_p * l1 + (n_p - 1) * n_p * n_p);
3373 for (
unsigned l3 = 1; l3 < (n_p - 1); l3++)
3376 finite_element_pt(j + (Nz - 1) * Nx * Ny)->node_pt(l3 * n_p * n_p) =
3377 finite_element_pt(j - 1 + (Nz - 1) * Nx * Ny)
3378 ->node_pt(l3 * n_p * n_p + (n_p - 1));
3381 for (
unsigned l2 = 1; l2 < n_p; l2++)
3384 local_node_num = l2 + l3 * n_p * n_p;
3387 Node_pt[node_count] =
3388 finite_element_pt(element_num)
3389 ->construct_boundary_node(local_node_num, time_stepper_pt);
3391 finite_element_pt(element_num)->node_pt(local_node_num) =
3392 Node_pt[node_count];
3395 finite_element_pt(element_num)
3396 ->local_fraction_of_node(local_node_num, s_fraction);
3399 Node_pt[node_count]->x(0) = Xmin + el_length[0] * (j + s_fraction[0]);
3400 Node_pt[node_count]->x(1) = Ymin;
3401 Node_pt[node_count]->x(2) =
3402 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
3405 add_boundary_node(1, Node_pt[node_count]);
3411 for (
unsigned l1 = 1; l1 < n_p; l1++)
3414 finite_element_pt(j + (Nz - 1) * Nx * Ny)
3415 ->node_pt(l1 * n_p + l3 * n_p * n_p) =
3416 finite_element_pt(j - 1 + (Nz - 1) * Nx * Ny)
3417 ->node_pt(l1 * n_p + (n_p - 1) + l3 * n_p * n_p);
3420 for (
unsigned l2 = 1; l2 < n_p; l2++)
3423 local_node_num = l1 * n_p + l2 + l3 * n_p * n_p;
3426 Node_pt[node_count] =
3427 finite_element_pt(element_num)
3428 ->construct_node(local_node_num, time_stepper_pt);
3430 finite_element_pt(element_num)->node_pt(local_node_num) =
3431 Node_pt[node_count];
3434 finite_element_pt(element_num)
3435 ->local_fraction_of_node(local_node_num, s_fraction);
3438 Node_pt[node_count]->x(0) =
3439 Xmin + el_length[0] * (j + s_fraction[0]);
3440 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
3441 Node_pt[node_count]->x(2) =
3442 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
3456 finite_element_pt(j + (Nz - 1) * Nx * Ny)
3457 ->node_pt((n_p - 1) * n_p * n_p) =
3458 finite_element_pt(j - 1 + (Nz - 1) * Nx * Ny)
3459 ->node_pt((n_p - 1) * n_p * n_p + (n_p - 1));
3462 for (
unsigned l2 = 1; l2 < n_p; l2++)
3465 local_node_num = l2 + (n_p - 1) * n_p * n_p;
3468 Node_pt[node_count] =
3469 finite_element_pt(element_num)
3470 ->construct_boundary_node(local_node_num, time_stepper_pt);
3472 finite_element_pt(element_num)->node_pt(local_node_num) =
3473 Node_pt[node_count];
3476 finite_element_pt(element_num)
3477 ->local_fraction_of_node(local_node_num, s_fraction);
3480 Node_pt[node_count]->x(0) = Xmin + el_length[0] * (j + s_fraction[0]);
3481 Node_pt[node_count]->x(1) = Ymin;
3482 Node_pt[node_count]->x(2) = Zmax;
3485 add_boundary_node(1, Node_pt[node_count]);
3486 add_boundary_node(5, Node_pt[node_count]);
3492 for (
unsigned l1 = 1; l1 < n_p; l1++)
3495 finite_element_pt(j + (Nz - 1) * Nx * Ny)
3496 ->node_pt(l1 * n_p + (n_p - 1) * n_p * n_p) =
3497 finite_element_pt(j - 1 + (Nz - 1) * Nx * Ny)
3498 ->node_pt(l1 * n_p + (n_p - 1) + (n_p - 1) * n_p * n_p);
3501 for (
unsigned l2 = 1; l2 < n_p; l2++)
3504 local_node_num = l1 * n_p + l2 + (n_p - 1) * n_p * n_p;
3507 Node_pt[node_count] =
3508 finite_element_pt(element_num)
3509 ->construct_boundary_node(local_node_num, time_stepper_pt);
3511 finite_element_pt(element_num)->node_pt(local_node_num) =
3512 Node_pt[node_count];
3515 finite_element_pt(element_num)
3516 ->local_fraction_of_node(local_node_num, s_fraction);
3519 Node_pt[node_count]->x(0) = Xmin + el_length[0] * (j + s_fraction[0]);
3520 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
3521 Node_pt[node_count]->x(2) = Zmax;
3524 add_boundary_node(5, Node_pt[node_count]);
3538 element_num = Nx - 1 + (Nz - 1) * Nx * Ny;
3539 Element_pt[element_num] =
new ELEMENT;
3542 for (
unsigned l1 = 0; l1 < n_p; l1++)
3544 for (
unsigned l2 = 0; l2 < n_p; l2++)
3546 finite_element_pt(Nx - 1 + (Nz - 1) * Nx * Ny)->node_pt(l2 + n_p * l1) =
3547 finite_element_pt(Nx - 1 + (Nz - 2) * Nx * Ny)
3548 ->node_pt(l2 + n_p * l1 + (n_p - 1) * n_p * n_p);
3554 for (
unsigned l3 = 1; l3 < (n_p - 1); l3++)
3557 finite_element_pt(Nx - 1 + (Nz - 1) * Nx * Ny)->node_pt(l3 * n_p * n_p) =
3558 finite_element_pt(Nx - 2 + (Nz - 1) * Nx * Ny)
3559 ->node_pt(l3 * n_p * n_p + (n_p - 1));
3562 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
3565 local_node_num = l2 + l3 * n_p * n_p;
3568 Node_pt[node_count] =
3569 finite_element_pt(element_num)
3570 ->construct_boundary_node(local_node_num, time_stepper_pt);
3572 finite_element_pt(element_num)->node_pt(local_node_num) =
3573 Node_pt[node_count];
3576 finite_element_pt(element_num)
3577 ->local_fraction_of_node(local_node_num, s_fraction);
3580 Node_pt[node_count]->x(0) =
3581 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
3582 Node_pt[node_count]->x(1) = Ymin;
3583 Node_pt[node_count]->x(2) =
3584 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
3587 add_boundary_node(1, Node_pt[node_count]);
3595 local_node_num = (n_p - 1) + l3 * n_p * n_p;
3598 Node_pt[node_count] =
3599 finite_element_pt(element_num)
3600 ->construct_boundary_node(local_node_num, time_stepper_pt);
3602 finite_element_pt(element_num)->node_pt(local_node_num) =
3603 Node_pt[node_count];
3606 finite_element_pt(element_num)
3607 ->local_fraction_of_node(local_node_num, s_fraction);
3610 Node_pt[node_count]->x(0) = Xmax;
3611 Node_pt[node_count]->x(1) = Ymin;
3612 Node_pt[node_count]->x(2) =
3613 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
3616 add_boundary_node(1, Node_pt[node_count]);
3617 add_boundary_node(2, Node_pt[node_count]);
3622 for (
unsigned l1 = 1; l1 < n_p; l1++)
3625 finite_element_pt(Nx - 1 + (Nz - 1) * Nx * Ny)
3626 ->node_pt(l1 * n_p + l3 * n_p * n_p) =
3627 finite_element_pt(Nx - 2 + (Nz - 1) * Nx * Ny)
3628 ->node_pt(l1 * n_p + (n_p - 1) + l3 * n_p * n_p);
3631 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
3634 local_node_num = l1 * n_p + l2 + l3 * n_p * n_p;
3637 Node_pt[node_count] =
3638 finite_element_pt(element_num)
3639 ->construct_node(local_node_num, time_stepper_pt);
3641 finite_element_pt(element_num)->node_pt(local_node_num) =
3642 Node_pt[node_count];
3645 finite_element_pt(element_num)
3646 ->local_fraction_of_node(local_node_num, s_fraction);
3649 Node_pt[node_count]->x(0) =
3650 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
3651 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
3652 Node_pt[node_count]->x(2) =
3653 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
3663 local_node_num = l1 * n_p + (n_p - 1) + l3 * n_p * n_p;
3665 Node_pt[node_count] =
3666 finite_element_pt(element_num)
3667 ->construct_boundary_node(local_node_num, time_stepper_pt);
3669 finite_element_pt(element_num)->node_pt(local_node_num) =
3670 Node_pt[node_count];
3673 Node_pt[node_count]->x(0) = Xmax;
3674 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
3675 Node_pt[node_count]->x(2) =
3676 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
3679 add_boundary_node(2, Node_pt[node_count]);
3688 finite_element_pt(Nx - 1 + (Nz - 1) * Nx * Ny)
3689 ->node_pt((n_p - 1) * n_p * n_p) =
3690 finite_element_pt(Nx - 2 + (Nz - 1) * Nx * Ny)
3691 ->node_pt((n_p - 1) * n_p * n_p + (n_p - 1));
3694 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
3697 local_node_num = l2 + (n_p - 1) * n_p * n_p;
3700 Node_pt[node_count] =
3701 finite_element_pt(element_num)
3702 ->construct_boundary_node(local_node_num, time_stepper_pt);
3704 finite_element_pt(element_num)->node_pt(local_node_num) =
3705 Node_pt[node_count];
3708 finite_element_pt(element_num)
3709 ->local_fraction_of_node(local_node_num, s_fraction);
3712 Node_pt[node_count]->x(0) =
3713 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
3714 Node_pt[node_count]->x(1) = Ymin;
3715 Node_pt[node_count]->x(2) = Zmax;
3718 add_boundary_node(1, Node_pt[node_count]);
3719 add_boundary_node(5, Node_pt[node_count]);
3728 local_node_num = (n_p - 1) + (n_p - 1) * n_p * n_p;
3731 Node_pt[node_count] =
3732 finite_element_pt(element_num)
3733 ->construct_boundary_node(local_node_num, time_stepper_pt);
3735 finite_element_pt(element_num)->node_pt(local_node_num) =
3736 Node_pt[node_count];
3739 finite_element_pt(element_num)
3740 ->local_fraction_of_node(local_node_num, s_fraction);
3743 Node_pt[node_count]->x(0) = Xmax;
3744 Node_pt[node_count]->x(1) = Ymin;
3745 Node_pt[node_count]->x(2) = Zmax;
3748 add_boundary_node(1, Node_pt[node_count]);
3749 add_boundary_node(2, Node_pt[node_count]);
3750 add_boundary_node(5, Node_pt[node_count]);
3755 for (
unsigned l1 = 1; l1 < n_p; l1++)
3758 finite_element_pt(Nx - 1 + (Nz - 1) * Nx * Ny)
3759 ->node_pt(l1 * n_p + (n_p - 1) * n_p * n_p) =
3760 finite_element_pt(Nx - 2 + (Nz - 1) * Nx * Ny)
3761 ->node_pt(l1 * n_p + (n_p - 1) + (n_p - 1) * n_p * n_p);
3764 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
3767 local_node_num = l1 * n_p + l2 + (n_p - 1) * n_p * n_p;
3770 Node_pt[node_count] =
3771 finite_element_pt(element_num)
3772 ->construct_boundary_node(local_node_num, time_stepper_pt);
3774 finite_element_pt(element_num)->node_pt(local_node_num) =
3775 Node_pt[node_count];
3778 finite_element_pt(element_num)
3779 ->local_fraction_of_node(local_node_num, s_fraction);
3782 Node_pt[node_count]->x(0) =
3783 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
3784 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
3785 Node_pt[node_count]->x(2) = Zmax;
3788 add_boundary_node(5, Node_pt[node_count]);
3796 local_node_num = l1 * n_p + (n_p - 1) + (n_p - 1) * n_p * n_p;
3798 Node_pt[node_count] =
3799 finite_element_pt(element_num)
3800 ->construct_boundary_node(local_node_num, time_stepper_pt);
3802 finite_element_pt(element_num)->node_pt(local_node_num) =
3803 Node_pt[node_count];
3806 finite_element_pt(element_num)
3807 ->local_fraction_of_node(local_node_num, s_fraction);
3810 Node_pt[node_count]->x(0) = Xmax;
3811 Node_pt[node_count]->x(1) = Ymin + el_length[1] * s_fraction[1];
3812 Node_pt[node_count]->x(2) = Zmax;
3815 add_boundary_node(2, Node_pt[node_count]);
3816 add_boundary_node(5, Node_pt[node_count]);
3828 for (
unsigned i = 1;
i < (Ny - 1);
i++)
3833 element_num = Nx *
i + Nx * Ny * (Nz - 1);
3834 Element_pt[element_num] =
new ELEMENT;
3837 for (
unsigned l1 = 0; l1 < n_p; l1++)
3839 for (
unsigned l2 = 0; l2 < n_p; l2++)
3841 finite_element_pt(Nx *
i + (Nz - 1) * Nx * Ny)
3842 ->node_pt(l2 + n_p * l1) =
3843 finite_element_pt(Nx *
i + (Nz - 2) * Nx * Ny)
3844 ->node_pt(l2 + n_p * l1 + (n_p - 1) * n_p * n_p);
3850 for (
unsigned l3 = 1; l3 < (n_p - 1); l3++)
3853 for (
unsigned l2 = 0; l2 < n_p; l2++)
3855 finite_element_pt(Nx *
i + (Nz - 1) * Nx * Ny)
3856 ->node_pt(l2 + l3 * n_p * n_p) =
3857 finite_element_pt(Nx * (
i - 1) + (Nz - 1) * Nx * Ny)
3858 ->node_pt((n_p - 1) * n_p + l2 + l3 * n_p * n_p);
3862 for (
unsigned l1 = 1; l1 < n_p; l1++)
3867 local_node_num = l1 * n_p + l3 * n_p * n_p;
3870 Node_pt[node_count] =
3871 finite_element_pt(element_num)
3872 ->construct_boundary_node(local_node_num, time_stepper_pt);
3874 finite_element_pt(element_num)->node_pt(local_node_num) =
3875 Node_pt[node_count];
3878 finite_element_pt(element_num)
3879 ->local_fraction_of_node(local_node_num, s_fraction);
3882 Node_pt[node_count]->x(0) = Xmin;
3883 Node_pt[node_count]->x(1) = Ymin + el_length[1] * (
i + s_fraction[1]);
3884 Node_pt[node_count]->x(2) =
3885 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
3888 add_boundary_node(4, Node_pt[node_count]);
3894 for (
unsigned l2 = 1; l2 < n_p; l2++)
3897 local_node_num = l1 * n_p + l2 + n_p * n_p * l3;
3900 Node_pt[node_count] =
3901 finite_element_pt(element_num)
3902 ->construct_node(local_node_num, time_stepper_pt);
3904 finite_element_pt(element_num)->node_pt(local_node_num) =
3905 Node_pt[node_count];
3908 finite_element_pt(element_num)
3909 ->local_fraction_of_node(local_node_num, s_fraction);
3912 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
3913 Node_pt[node_count]->x(1) =
3914 Ymin + el_length[1] * (
i + s_fraction[1]);
3915 Node_pt[node_count]->x(2) =
3916 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
3929 for (
unsigned l2 = 0; l2 < n_p; l2++)
3931 finite_element_pt(Nx *
i + (Nz - 1) * Nx * Ny)
3932 ->node_pt(l2 + (n_p - 1) * n_p * n_p) =
3933 finite_element_pt(Nx * (
i - 1) + (Nz - 1) * Nx * Ny)
3934 ->node_pt((n_p - 1) * n_p + l2 + (n_p - 1) * n_p * n_p);
3938 for (
unsigned l1 = 1; l1 < n_p; l1++)
3943 local_node_num = l1 * n_p + (n_p - 1) * n_p * n_p;
3946 Node_pt[node_count] =
3947 finite_element_pt(element_num)
3948 ->construct_boundary_node(local_node_num, time_stepper_pt);
3950 finite_element_pt(element_num)->node_pt(local_node_num) =
3951 Node_pt[node_count];
3954 finite_element_pt(element_num)
3955 ->local_fraction_of_node(local_node_num, s_fraction);
3958 Node_pt[node_count]->x(0) = Xmin;
3959 Node_pt[node_count]->x(1) = Ymin + el_length[1] * (
i + s_fraction[1]);
3960 Node_pt[node_count]->x(2) = Zmax;
3963 add_boundary_node(4, Node_pt[node_count]);
3964 add_boundary_node(5, Node_pt[node_count]);
3970 for (
unsigned l2 = 1; l2 < n_p; l2++)
3973 local_node_num = l1 * n_p + l2 + n_p * n_p * (n_p - 1);
3976 Node_pt[node_count] =
3977 finite_element_pt(element_num)
3978 ->construct_boundary_node(local_node_num, time_stepper_pt);
3980 finite_element_pt(element_num)->node_pt(local_node_num) =
3981 Node_pt[node_count];
3984 finite_element_pt(element_num)
3985 ->local_fraction_of_node(local_node_num, s_fraction);
3988 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
3989 Node_pt[node_count]->x(1) = Ymin + el_length[1] * (
i + s_fraction[1]);
3990 Node_pt[node_count]->x(2) = Zmax;
3993 add_boundary_node(5, Node_pt[node_count]);
4002 for (
unsigned j = 1; j < (Nx - 1); j++)
4005 element_num = Nx *
i + j + (Nz - 1) * Nx * Ny;
4006 Element_pt[element_num] =
new ELEMENT;
4009 for (
unsigned l1 = 0; l1 < n_p; l1++)
4011 for (
unsigned l2 = 0; l2 < n_p; l2++)
4013 finite_element_pt(Nx *
i + j + (Nz - 1) * Nx * Ny)
4014 ->node_pt(l2 + n_p * l1) =
4015 finite_element_pt(Nx *
i + j + (Nz - 2) * Nx * Ny)
4016 ->node_pt(l2 + n_p * l1 + (n_p - 1) * n_p * n_p);
4022 for (
unsigned l3 = 1; l3 < (n_p - 1); l3++)
4026 for (
unsigned l2 = 0; l2 < n_p; l2++)
4028 finite_element_pt(Nx *
i + j + (Nz - 1) * Nx * Ny)
4029 ->node_pt(l2 + l3 * n_p * n_p) =
4030 finite_element_pt(Nx * (
i - 1) + j + (Nz - 1) * Nx * Ny)
4031 ->node_pt((n_p - 1) * n_p + l2 + l3 * n_p * n_p);
4034 for (
unsigned l1 = 1; l1 < n_p; l1++)
4037 finite_element_pt(Nx *
i + j + (Nz - 1) * Nx * Ny)
4038 ->node_pt(l1 * n_p + l3 * n_p * n_p) =
4039 finite_element_pt(Nx *
i + (j - 1) + (Nz - 1) * Nx * Ny)
4040 ->node_pt(l1 * n_p + l3 * n_p * n_p + (n_p - 1));
4043 for (
unsigned l2 = 1; l2 < n_p; l2++)
4046 local_node_num = l1 * n_p + l2 + l3 * n_p * n_p;
4049 Node_pt[node_count] =
4050 finite_element_pt(element_num)
4051 ->construct_node(local_node_num, time_stepper_pt);
4053 finite_element_pt(element_num)->node_pt(local_node_num) =
4054 Node_pt[node_count];
4056 finite_element_pt(element_num)
4057 ->local_fraction_of_node(local_node_num, s_fraction);
4061 Node_pt[node_count]->x(0) =
4062 Xmin + el_length[0] * (j + s_fraction[0]);
4063 Node_pt[node_count]->x(1) =
4064 Ymin + el_length[1] * (
i + s_fraction[1]);
4065 Node_pt[node_count]->x(2) =
4066 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
4079 for (
unsigned l2 = 0; l2 < n_p; l2++)
4081 finite_element_pt(Nx *
i + j + (Nz - 1) * Nx * Ny)
4082 ->node_pt(l2 + (n_p - 1) * n_p * n_p) =
4083 finite_element_pt(Nx * (
i - 1) + j + (Nz - 1) * Nx * Ny)
4084 ->node_pt((n_p - 1) * n_p + l2 + (n_p - 1) * n_p * n_p);
4087 for (
unsigned l1 = 1; l1 < n_p; l1++)
4090 finite_element_pt(Nx *
i + j + (Nz - 1) * Nx * Ny)
4091 ->node_pt(l1 * n_p + (n_p - 1) * n_p * n_p) =
4092 finite_element_pt(Nx *
i + (j - 1) + (Nz - 1) * Nx * Ny)
4093 ->node_pt(l1 * n_p + (n_p - 1) * n_p * n_p + (n_p - 1));
4096 for (
unsigned l2 = 1; l2 < n_p; l2++)
4099 local_node_num = l1 * n_p + l2 + (n_p - 1) * n_p * n_p;
4102 Node_pt[node_count] =
4103 finite_element_pt(element_num)
4104 ->construct_boundary_node(local_node_num, time_stepper_pt);
4106 finite_element_pt(element_num)->node_pt(local_node_num) =
4107 Node_pt[node_count];
4110 finite_element_pt(element_num)
4111 ->local_fraction_of_node(local_node_num, s_fraction);
4114 Node_pt[node_count]->x(0) =
4115 Xmin + el_length[0] * (j + s_fraction[0]);
4116 Node_pt[node_count]->x(1) =
4117 Ymin + el_length[1] * (
i + s_fraction[1]);
4118 Node_pt[node_count]->x(2) = Zmax;
4121 add_boundary_node(5, Node_pt[node_count]);
4135 element_num = Nx *
i + Nx - 1 + (Nz - 1) * Nx * Ny;
4136 Element_pt[element_num] =
new ELEMENT;
4139 for (
unsigned l1 = 0; l1 < n_p; l1++)
4141 for (
unsigned l2 = 0; l2 < n_p; l2++)
4143 finite_element_pt(Nx *
i + Nx - 1 + (Nz - 1) * Nx * Ny)
4144 ->node_pt(l2 + n_p * l1) =
4145 finite_element_pt(Nx *
i + Nx - 1 + (Nz - 2) * Nx * Ny)
4146 ->node_pt(l2 + n_p * l1 + (n_p - 1) * n_p * n_p);
4152 for (
unsigned l3 = 1; l3 < (n_p - 1); l3++)
4155 for (
unsigned l2 = 0; l2 < n_p; l2++)
4157 finite_element_pt(Nx *
i + Nx - 1 + (Nz - 1) * Nx * Ny)
4158 ->node_pt(l2 + l3 * n_p * n_p) =
4159 finite_element_pt(Nx * (
i - 1) + Nx - 1 + (Nz - 1) * Nx * Ny)
4160 ->node_pt((n_p - 1) * n_p + l2 + l3 * n_p * n_p);
4163 for (
unsigned l1 = 1; l1 < n_p; l1++)
4166 finite_element_pt(Nx *
i + Nx - 1 + (Nz - 1) * Nx * Ny)
4167 ->node_pt(l1 * n_p + l3 * n_p * n_p) =
4168 finite_element_pt(Nx *
i + Nx - 2 + (Nz - 1) * Nx * Ny)
4169 ->node_pt(l1 * n_p + (n_p - 1) + l3 * n_p * n_p);
4172 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
4175 local_node_num = l1 * n_p + l2 + l3 * n_p * n_p;
4178 Node_pt[node_count] =
4179 finite_element_pt(element_num)
4180 ->construct_node(local_node_num, time_stepper_pt);
4182 finite_element_pt(element_num)->node_pt(local_node_num) =
4183 Node_pt[node_count];
4186 finite_element_pt(element_num)
4187 ->local_fraction_of_node(local_node_num, s_fraction);
4190 Node_pt[node_count]->x(0) =
4191 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
4192 Node_pt[node_count]->x(1) =
4193 Ymin + el_length[1] * (
i + s_fraction[1]);
4194 Node_pt[node_count]->x(2) =
4195 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
4206 local_node_num = l1 * n_p + (n_p - 1) + l3 * n_p * n_p;
4209 Node_pt[node_count] =
4210 finite_element_pt(element_num)
4211 ->construct_boundary_node(local_node_num, time_stepper_pt);
4213 finite_element_pt(element_num)->node_pt(local_node_num) =
4214 Node_pt[node_count];
4217 finite_element_pt(element_num)
4218 ->local_fraction_of_node(local_node_num, s_fraction);
4221 Node_pt[node_count]->x(0) = Xmax;
4222 Node_pt[node_count]->x(1) = Ymin + el_length[1] * (
i + s_fraction[1]);
4223 Node_pt[node_count]->x(2) =
4224 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
4227 add_boundary_node(2, Node_pt[node_count]);
4239 for (
unsigned l2 = 0; l2 < n_p; l2++)
4241 finite_element_pt(Nx *
i + Nx - 1 + (Nz - 1) * Nx * Ny)
4242 ->node_pt(l2 + (n_p - 1) * n_p * n_p) =
4243 finite_element_pt(Nx * (
i - 1) + Nx - 1 + (Nz - 1) * Nx * Ny)
4244 ->node_pt((n_p - 1) * n_p + l2 + (n_p - 1) * n_p * n_p);
4247 for (
unsigned l1 = 1; l1 < n_p; l1++)
4250 finite_element_pt(Nx *
i + Nx - 1 + (Nz - 1) * Nx * Ny)
4251 ->node_pt(l1 * n_p + (n_p - 1) * n_p * n_p) =
4252 finite_element_pt(Nx *
i + Nx - 2 + (Nz - 1) * Nx * Ny)
4253 ->node_pt(l1 * n_p + (n_p - 1) + (n_p - 1) * n_p * n_p);
4256 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
4259 local_node_num = l1 * n_p + l2 + (n_p - 1) * n_p * n_p;
4262 Node_pt[node_count] =
4263 finite_element_pt(element_num)
4264 ->construct_boundary_node(local_node_num, time_stepper_pt);
4266 finite_element_pt(element_num)->node_pt(local_node_num) =
4267 Node_pt[node_count];
4270 finite_element_pt(element_num)
4271 ->local_fraction_of_node(local_node_num, s_fraction);
4274 Node_pt[node_count]->x(0) =
4275 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
4276 Node_pt[node_count]->x(1) = Ymin + el_length[1] * (
i + s_fraction[1]);
4277 Node_pt[node_count]->x(2) = Zmax;
4280 add_boundary_node(5, Node_pt[node_count]);
4289 local_node_num = l1 * n_p + (n_p - 1) + (n_p - 1) * n_p * n_p;
4292 Node_pt[node_count] =
4293 finite_element_pt(element_num)
4294 ->construct_boundary_node(local_node_num, time_stepper_pt);
4296 finite_element_pt(element_num)->node_pt(local_node_num) =
4297 Node_pt[node_count];
4300 finite_element_pt(element_num)
4301 ->local_fraction_of_node(local_node_num, s_fraction);
4304 Node_pt[node_count]->x(0) = Xmax;
4305 Node_pt[node_count]->x(1) = Ymin + el_length[1] * (
i + s_fraction[1]);
4306 Node_pt[node_count]->x(2) = Zmax;
4309 add_boundary_node(2, Node_pt[node_count]);
4310 add_boundary_node(5, Node_pt[node_count]);
4328 element_num = Nx * (Ny - 1) + (Nz - 1) * Nx * Ny;
4329 Element_pt[element_num] =
new ELEMENT;
4332 for (
unsigned l1 = 0; l1 < n_p; l1++)
4334 for (
unsigned l2 = 0; l2 < n_p; l2++)
4336 finite_element_pt(Nx * (Ny - 1) + (Nz - 1) * Nx * Ny)
4337 ->node_pt(l2 + n_p * l1) =
4338 finite_element_pt(Nx * (Ny - 1) + (Nz - 2) * Nx * Ny)
4339 ->node_pt(l2 + n_p * l1 + (n_p - 1) * n_p * n_p);
4344 for (
unsigned l3 = 1; l3 < (n_p - 1); l3++)
4347 for (
unsigned l2 = 0; l2 < n_p; l2++)
4349 finite_element_pt(Nx * (Ny - 1) + (Nz - 1) * Nx * Ny)
4350 ->node_pt(l2 + l3 * n_p * n_p) =
4351 finite_element_pt(Nx * (Ny - 2) + (Nz - 1) * Nx * Ny)
4352 ->node_pt((n_p - 1) * n_p + l2 + l3 * n_p * n_p);
4357 for (
unsigned l1 = 1; l1 < (n_p - 1); l1++)
4360 local_node_num = n_p * l1 + l3 * n_p * n_p;
4363 Node_pt[node_count] =
4364 finite_element_pt(element_num)
4365 ->construct_boundary_node(local_node_num, time_stepper_pt);
4367 finite_element_pt(element_num)->node_pt(local_node_num) =
4368 Node_pt[node_count];
4371 finite_element_pt(element_num)
4372 ->local_fraction_of_node(local_node_num, s_fraction);
4375 Node_pt[node_count]->x(0) = Xmin;
4376 Node_pt[node_count]->x(1) =
4377 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
4378 Node_pt[node_count]->x(2) =
4379 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
4382 add_boundary_node(4, Node_pt[node_count]);
4388 for (
unsigned l2 = 1; l2 < n_p; l2++)
4391 local_node_num = n_p * l1 + l2 + l3 * n_p * n_p;
4394 Node_pt[node_count] =
4395 finite_element_pt(element_num)
4396 ->construct_node(local_node_num, time_stepper_pt);
4398 finite_element_pt(element_num)->node_pt(local_node_num) =
4399 Node_pt[node_count];
4402 finite_element_pt(element_num)
4403 ->local_fraction_of_node(local_node_num, s_fraction);
4406 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
4407 Node_pt[node_count]->x(1) =
4408 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
4409 Node_pt[node_count]->x(2) =
4410 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
4423 local_node_num = n_p * (n_p - 1) + l3 * n_p * n_p;
4425 Node_pt[node_count] =
4426 finite_element_pt(element_num)
4427 ->construct_boundary_node(local_node_num, time_stepper_pt);
4429 finite_element_pt(element_num)->node_pt(local_node_num) =
4430 Node_pt[node_count];
4433 finite_element_pt(element_num)
4434 ->local_fraction_of_node(local_node_num, s_fraction);
4437 Node_pt[node_count]->x(0) = Xmin;
4438 Node_pt[node_count]->x(1) = Ymax;
4439 Node_pt[node_count]->x(2) =
4440 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
4443 add_boundary_node(3, Node_pt[node_count]);
4444 add_boundary_node(4, Node_pt[node_count]);
4450 for (
unsigned l2 = 1; l2 < n_p; l2++)
4453 local_node_num = n_p * (n_p - 1) + l2 + l3 * n_p * n_p;
4455 Node_pt[node_count] =
4456 finite_element_pt(element_num)
4457 ->construct_boundary_node(local_node_num, time_stepper_pt);
4459 finite_element_pt(element_num)->node_pt(local_node_num) =
4460 Node_pt[node_count];
4463 finite_element_pt(element_num)
4464 ->local_fraction_of_node(local_node_num, s_fraction);
4467 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
4468 Node_pt[node_count]->x(1) = Ymax;
4469 Node_pt[node_count]->x(2) =
4470 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
4473 add_boundary_node(3, Node_pt[node_count]);
4482 for (
unsigned l2 = 0; l2 < n_p; l2++)
4484 finite_element_pt(Nx * (Ny - 1) + (Nz - 1) * Nx * Ny)
4485 ->node_pt(l2 + (n_p - 1) * n_p * n_p) =
4486 finite_element_pt(Nx * (Ny - 2) + (Nz - 1) * Nx * Ny)
4487 ->node_pt((n_p - 1) * n_p + l2 + (n_p - 1) * n_p * n_p);
4492 for (
unsigned l1 = 1; l1 < (n_p - 1); l1++)
4495 local_node_num = n_p * l1 + (n_p - 1) * n_p * n_p;
4498 Node_pt[node_count] =
4499 finite_element_pt(element_num)
4500 ->construct_boundary_node(local_node_num, time_stepper_pt);
4502 finite_element_pt(element_num)->node_pt(local_node_num) =
4503 Node_pt[node_count];
4506 finite_element_pt(element_num)
4507 ->local_fraction_of_node(local_node_num, s_fraction);
4510 Node_pt[node_count]->x(0) = Xmin;
4511 Node_pt[node_count]->x(1) =
4512 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
4513 Node_pt[node_count]->x(2) = Zmax;
4516 add_boundary_node(4, Node_pt[node_count]);
4517 add_boundary_node(5, Node_pt[node_count]);
4523 for (
unsigned l2 = 1; l2 < n_p; l2++)
4526 local_node_num = n_p * l1 + l2 + (n_p - 1) * n_p * n_p;
4529 Node_pt[node_count] =
4530 finite_element_pt(element_num)
4531 ->construct_boundary_node(local_node_num, time_stepper_pt);
4533 finite_element_pt(element_num)->node_pt(local_node_num) =
4534 Node_pt[node_count];
4536 finite_element_pt(element_num)
4537 ->local_fraction_of_node(local_node_num, s_fraction);
4540 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
4541 Node_pt[node_count]->x(1) =
4542 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
4543 Node_pt[node_count]->x(2) = Zmax;
4546 add_boundary_node(5, Node_pt[node_count]);
4557 local_node_num = n_p * (n_p - 1) + (n_p - 1) * n_p * n_p;
4559 Node_pt[node_count] =
4560 finite_element_pt(element_num)
4561 ->construct_boundary_node(local_node_num, time_stepper_pt);
4563 finite_element_pt(element_num)->node_pt(local_node_num) =
4564 Node_pt[node_count];
4566 finite_element_pt(element_num)
4567 ->local_fraction_of_node(local_node_num, s_fraction);
4570 Node_pt[node_count]->x(0) = Xmin;
4571 Node_pt[node_count]->x(1) = Ymax;
4572 Node_pt[node_count]->x(2) = Zmax;
4575 add_boundary_node(3, Node_pt[node_count]);
4576 add_boundary_node(4, Node_pt[node_count]);
4577 add_boundary_node(5, Node_pt[node_count]);
4583 for (
unsigned l2 = 1; l2 < n_p; l2++)
4586 local_node_num = n_p * (n_p - 1) + l2 + (n_p - 1) * n_p * n_p;
4588 Node_pt[node_count] =
4589 finite_element_pt(element_num)
4590 ->construct_boundary_node(local_node_num, time_stepper_pt);
4592 finite_element_pt(element_num)->node_pt(local_node_num) =
4593 Node_pt[node_count];
4596 finite_element_pt(element_num)
4597 ->local_fraction_of_node(local_node_num, s_fraction);
4600 Node_pt[node_count]->x(0) = Xmin + el_length[0] * s_fraction[0];
4601 Node_pt[node_count]->x(1) = Ymax;
4602 Node_pt[node_count]->x(2) = Zmax;
4605 add_boundary_node(3, Node_pt[node_count]);
4606 add_boundary_node(5, Node_pt[node_count]);
4614 for (
unsigned j = 1; j < (Nx - 1); j++)
4617 element_num = Nx * (Ny - 1) + j + (Nz - 1) * Nx * Ny;
4618 Element_pt[element_num] =
new ELEMENT;
4621 for (
unsigned l1 = 0; l1 < n_p; l1++)
4623 for (
unsigned l2 = 0; l2 < n_p; l2++)
4625 finite_element_pt(Nx * (Ny - 1) + j + (Nz - 1) * Nx * Ny)
4626 ->node_pt(l2 + n_p * l1) =
4627 finite_element_pt(Nx * (Ny - 1) + j + (Nz - 2) * Nx * Ny)
4628 ->node_pt(l2 + n_p * l1 + (n_p - 1) * n_p * n_p);
4634 for (
unsigned l3 = 1; l3 < (n_p - 1); l3++)
4637 for (
unsigned l2 = 0; l2 < n_p; l2++)
4639 finite_element_pt(Nx * (Ny - 1) + j + (Nz - 1) * Nx * Ny)
4640 ->node_pt(l2 + l3 * n_p * n_p) =
4641 finite_element_pt(Nx * (Ny - 2) + j + (Nz - 1) * Nx * Ny)
4642 ->node_pt((n_p - 1) * n_p + l2 + l3 * n_p * n_p);
4646 for (
unsigned l1 = 1; l1 < (n_p - 1); l1++)
4649 finite_element_pt(Nx * (Ny - 1) + j + (Nz - 1) * Nx * Ny)
4650 ->node_pt(n_p * l1 + l3 * n_p * n_p) =
4651 finite_element_pt(Nx * (Ny - 1) + (j - 1) + (Nz - 1) * Nx * Ny)
4652 ->node_pt(n_p * l1 + (n_p - 1) + l3 * n_p * n_p);
4655 for (
unsigned l2 = 1; l2 < n_p; l2++)
4658 local_node_num = n_p * l1 + l2 + l3 * n_p * n_p;
4660 Node_pt[node_count] =
4661 finite_element_pt(element_num)
4662 ->construct_node(local_node_num, time_stepper_pt);
4665 finite_element_pt(element_num)->node_pt(local_node_num) =
4666 Node_pt[node_count];
4669 finite_element_pt(element_num)
4670 ->local_fraction_of_node(local_node_num, s_fraction);
4673 Node_pt[node_count]->x(0) =
4674 Xmin + el_length[0] * (j + s_fraction[0]);
4675 Node_pt[node_count]->x(1) =
4676 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
4677 Node_pt[node_count]->x(2) =
4678 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
4690 finite_element_pt(Nx * (Ny - 1) + j + (Nz - 1) * Nx * Ny)
4691 ->node_pt(n_p * (n_p - 1) + l3 * n_p * n_p) =
4692 finite_element_pt(Nx * (Ny - 1) + (j - 1) + (Nz - 1) * Nx * Ny)
4693 ->node_pt(n_p * (n_p - 1) + (n_p - 1) + l3 * n_p * n_p);
4695 for (
unsigned l2 = 1; l2 < n_p; l2++)
4698 local_node_num = n_p * (n_p - 1) + l2 + l3 * n_p * n_p;
4700 Node_pt[node_count] =
4701 finite_element_pt(element_num)
4702 ->construct_boundary_node(local_node_num, time_stepper_pt);
4704 finite_element_pt(element_num)->node_pt(local_node_num) =
4705 Node_pt[node_count];
4708 finite_element_pt(element_num)
4709 ->local_fraction_of_node(local_node_num, s_fraction);
4712 Node_pt[node_count]->x(0) = Xmin + el_length[0] * (j + s_fraction[0]);
4713 Node_pt[node_count]->x(1) = Ymax;
4714 Node_pt[node_count]->x(2) =
4715 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
4718 add_boundary_node(3, Node_pt[node_count]);
4728 for (
unsigned l2 = 0; l2 < n_p; l2++)
4730 finite_element_pt(Nx * (Ny - 1) + j + (Nz - 1) * Nx * Ny)
4731 ->node_pt(l2 + (n_p - 1) * n_p * n_p) =
4732 finite_element_pt(Nx * (Ny - 2) + j + (Nz - 1) * Nx * Ny)
4733 ->node_pt((n_p - 1) * n_p + l2 + (n_p - 1) * n_p * n_p);
4737 for (
unsigned l1 = 1; l1 < (n_p - 1); l1++)
4740 finite_element_pt(Nx * (Ny - 1) + j + (Nz - 1) * Nx * Ny)
4741 ->node_pt(n_p * l1 + (n_p - 1) * n_p * n_p) =
4742 finite_element_pt(Nx * (Ny - 1) + (j - 1) + (Nz - 1) * Nx * Ny)
4743 ->node_pt(n_p * l1 + (n_p - 1) + (n_p - 1) * n_p * n_p);
4746 for (
unsigned l2 = 1; l2 < n_p; l2++)
4749 local_node_num = n_p * l1 + l2 + (n_p - 1) * n_p * n_p;
4751 Node_pt[node_count] =
4752 finite_element_pt(element_num)
4753 ->construct_boundary_node(local_node_num, time_stepper_pt);
4756 finite_element_pt(element_num)->node_pt(local_node_num) =
4757 Node_pt[node_count];
4760 finite_element_pt(element_num)
4761 ->local_fraction_of_node(local_node_num, s_fraction);
4764 Node_pt[node_count]->x(0) = Xmin + el_length[0] * (j + s_fraction[0]);
4765 Node_pt[node_count]->x(1) =
4766 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
4767 Node_pt[node_count]->x(2) = Zmax;
4770 add_boundary_node(5, Node_pt[node_count]);
4779 finite_element_pt(Nx * (Ny - 1) + j + (Nz - 1) * Nx * Ny)
4780 ->node_pt(n_p * (n_p - 1) + (n_p - 1) * n_p * n_p) =
4781 finite_element_pt(Nx * (Ny - 1) + (j - 1) + (Nz - 1) * Nx * Ny)
4782 ->node_pt(n_p * (n_p - 1) + (n_p - 1) + (n_p - 1) * n_p * n_p);
4784 for (
unsigned l2 = 1; l2 < n_p; l2++)
4787 local_node_num = n_p * (n_p - 1) + l2 + (n_p - 1) * n_p * n_p;
4789 Node_pt[node_count] =
4790 finite_element_pt(element_num)
4791 ->construct_boundary_node(local_node_num, time_stepper_pt);
4793 finite_element_pt(element_num)->node_pt(local_node_num) =
4794 Node_pt[node_count];
4797 finite_element_pt(element_num)
4798 ->local_fraction_of_node(local_node_num, s_fraction);
4801 Node_pt[node_count]->x(0) = Xmin + el_length[0] * (j + s_fraction[0]);
4802 Node_pt[node_count]->x(1) = Ymax;
4803 Node_pt[node_count]->x(2) = Zmax;
4806 add_boundary_node(3, Node_pt[node_count]);
4807 add_boundary_node(5, Node_pt[node_count]);
4821 element_num = Nx * (Ny - 1) + Nx - 1 + (Nz - 1) * Nx * Ny;
4822 Element_pt[element_num] =
new ELEMENT;
4825 for (
unsigned l1 = 0; l1 < n_p; l1++)
4827 for (
unsigned l2 = 0; l2 < n_p; l2++)
4829 finite_element_pt(Nx * (Ny - 1) + Nx - 1 + (Nz - 1) * Nx * Ny)
4830 ->node_pt(l2 + n_p * l1) =
4831 finite_element_pt(Nx * (Ny - 1) + Nx - 1 + (Nz - 2) * Nx * Ny)
4832 ->node_pt(l2 + n_p * l1 + (n_p - 1) * n_p * n_p);
4838 for (
unsigned l3 = 1; l3 < (n_p - 1); l3++)
4841 for (
unsigned l2 = 0; l2 < n_p; l2++)
4843 finite_element_pt(Nx * (Ny - 1) + Nx - 1 + (Nz - 1) * Nx * Ny)
4844 ->node_pt(l2 + l3 * n_p * n_p) =
4845 finite_element_pt(Nx * (Ny - 2) + Nx - 1 + (Nz - 1) * Nx * Ny)
4846 ->node_pt((n_p - 1) * n_p + l2 + l3 * n_p * n_p);
4850 for (
unsigned l1 = 1; l1 < (n_p - 1); l1++)
4853 finite_element_pt(Nx * (Ny - 1) + Nx - 1 + (Nz - 1) * Nx * Ny)
4854 ->node_pt(n_p * l1 + l3 * n_p * n_p) =
4855 finite_element_pt(Nx * (Ny - 1) + Nx - 2 + (Nz - 1) * Nx * Ny)
4856 ->node_pt(n_p * l1 + (n_p - 1) + l3 * n_p * n_p);
4859 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
4862 local_node_num = n_p * l1 + l2 + l3 * n_p * n_p;
4864 Node_pt[node_count] =
4865 finite_element_pt(element_num)
4866 ->construct_node(local_node_num, time_stepper_pt);
4868 finite_element_pt(element_num)->node_pt(local_node_num) =
4869 Node_pt[node_count];
4872 finite_element_pt(element_num)
4873 ->local_fraction_of_node(local_node_num, s_fraction);
4876 Node_pt[node_count]->x(0) =
4877 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
4878 Node_pt[node_count]->x(1) =
4879 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
4880 Node_pt[node_count]->x(2) =
4881 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
4891 local_node_num = n_p * l1 + (n_p - 1) + l3 * n_p * n_p;
4893 Node_pt[node_count] =
4894 finite_element_pt(element_num)
4895 ->construct_boundary_node(local_node_num, time_stepper_pt);
4897 finite_element_pt(element_num)->node_pt(local_node_num) =
4898 Node_pt[node_count];
4901 finite_element_pt(element_num)
4902 ->local_fraction_of_node(local_node_num, s_fraction);
4905 Node_pt[node_count]->x(0) = Xmax;
4906 Node_pt[node_count]->x(1) =
4907 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
4908 Node_pt[node_count]->x(2) =
4909 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
4912 add_boundary_node(2, Node_pt[node_count]);
4922 finite_element_pt(Nx * (Ny - 1) + Nx - 1 + (Nz - 1) * Nx * Ny)
4923 ->node_pt(n_p * (n_p - 1) + l3 * n_p * n_p) =
4924 finite_element_pt(Nx * (Ny - 1) + Nx - 2 + (Nz - 1) * Nx * Ny)
4925 ->node_pt(n_p * (n_p - 1) + (n_p - 1) + l3 * n_p * n_p);
4928 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
4931 local_node_num = n_p * (n_p - 1) + l2 + l3 * n_p * n_p;
4933 Node_pt[node_count] =
4934 finite_element_pt(element_num)
4935 ->construct_boundary_node(local_node_num, time_stepper_pt);
4937 finite_element_pt(element_num)->node_pt(local_node_num) =
4938 Node_pt[node_count];
4941 finite_element_pt(element_num)
4942 ->local_fraction_of_node(local_node_num, s_fraction);
4945 Node_pt[node_count]->x(0) =
4946 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
4947 Node_pt[node_count]->x(1) = Ymax;
4948 Node_pt[node_count]->x(2) =
4949 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
4952 add_boundary_node(3, Node_pt[node_count]);
4960 local_node_num = n_p * (n_p - 1) + (n_p - 1) + l3 * n_p * n_p;
4962 Node_pt[node_count] =
4963 finite_element_pt(element_num)
4964 ->construct_boundary_node(local_node_num, time_stepper_pt);
4966 finite_element_pt(element_num)->node_pt(local_node_num) =
4967 Node_pt[node_count];
4970 finite_element_pt(element_num)
4971 ->local_fraction_of_node(local_node_num, s_fraction);
4974 Node_pt[node_count]->x(0) = Xmax;
4976 Node_pt[node_count]->x(1) = Ymax;
4977 Node_pt[node_count]->x(2) =
4978 Zmin + el_length[2] * (Nz - 1 + s_fraction[2]);
4981 add_boundary_node(2, Node_pt[node_count]);
4982 add_boundary_node(3, Node_pt[node_count]);
4993 for (
unsigned l2 = 0; l2 < n_p; l2++)
4995 finite_element_pt(Nx * (Ny - 1) + Nx - 1 + (Nz - 1) * Nx * Ny)
4996 ->node_pt(l2 + (n_p - 1) * n_p * n_p) =
4997 finite_element_pt(Nx * (Ny - 2) + Nx - 1 + (Nz - 1) * Nx * Ny)
4998 ->node_pt((n_p - 1) * n_p + l2 + (n_p - 1) * n_p * n_p);
5002 for (
unsigned l1 = 1; l1 < (n_p - 1); l1++)
5005 finite_element_pt(Nx * (Ny - 1) + Nx - 1 + (Nz - 1) * Nx * Ny)
5006 ->node_pt(n_p * l1 + (n_p - 1) * n_p * n_p) =
5007 finite_element_pt(Nx * (Ny - 1) + Nx - 2 + (Nz - 1) * Nx * Ny)
5008 ->node_pt(n_p * l1 + (n_p - 1) + (n_p - 1) * n_p * n_p);
5011 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
5014 local_node_num = n_p * l1 + l2 + (n_p - 1) * n_p * n_p;
5016 Node_pt[node_count] =
5017 finite_element_pt(element_num)
5018 ->construct_boundary_node(local_node_num, time_stepper_pt);
5020 finite_element_pt(element_num)->node_pt(local_node_num) =
5021 Node_pt[node_count];
5024 finite_element_pt(element_num)
5025 ->local_fraction_of_node(local_node_num, s_fraction);
5028 Node_pt[node_count]->x(0) =
5029 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
5030 Node_pt[node_count]->x(1) =
5031 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
5032 Node_pt[node_count]->x(2) = Zmax;
5035 add_boundary_node(5, Node_pt[node_count]);
5043 local_node_num = n_p * l1 + (n_p - 1) + (n_p - 1) * n_p * n_p;
5045 Node_pt[node_count] =
5046 finite_element_pt(element_num)
5047 ->construct_boundary_node(local_node_num, time_stepper_pt);
5049 finite_element_pt(element_num)->node_pt(local_node_num) =
5050 Node_pt[node_count];
5053 Node_pt[node_count]->x(0) = Xmax;
5054 Node_pt[node_count]->x(1) =
5055 Ymin + el_length[1] * (Ny - 1 + s_fraction[1]);
5056 Node_pt[node_count]->x(2) = Zmax;
5059 add_boundary_node(2, Node_pt[node_count]);
5060 add_boundary_node(5, Node_pt[node_count]);
5069 finite_element_pt(Nx * (Ny - 1) + Nx - 1 + (Nz - 1) * Nx * Ny)
5070 ->node_pt(n_p * (n_p - 1) + (n_p - 1) * n_p * n_p) =
5071 finite_element_pt(Nx * (Ny - 1) + Nx - 2 + (Nz - 1) * Nx * Ny)
5072 ->node_pt(n_p * (n_p - 1) + (n_p - 1) + (n_p - 1) * n_p * n_p);
5075 for (
unsigned l2 = 1; l2 < (n_p - 1); l2++)
5078 local_node_num = n_p * (n_p - 1) + l2 + (n_p - 1) * n_p * n_p;
5080 Node_pt[node_count] =
5081 finite_element_pt(element_num)
5082 ->construct_boundary_node(local_node_num, time_stepper_pt);
5084 finite_element_pt(element_num)->node_pt(local_node_num) =
5085 Node_pt[node_count];
5088 finite_element_pt(element_num)
5089 ->local_fraction_of_node(local_node_num, s_fraction);
5092 Node_pt[node_count]->x(0) =
5093 Xmin + el_length[0] * (Nx - 1 + s_fraction[0]);
5094 Node_pt[node_count]->x(1) = Ymax;
5095 Node_pt[node_count]->x(2) = Zmax;
5098 add_boundary_node(3, Node_pt[node_count]);
5099 add_boundary_node(5, Node_pt[node_count]);
5108 local_node_num = n_p * (n_p - 1) + (n_p - 1) + (n_p - 1) * n_p * n_p;
5110 Node_pt[node_count] =
5111 finite_element_pt(element_num)
5112 ->construct_boundary_node(local_node_num, time_stepper_pt);
5114 finite_element_pt(element_num)->node_pt(local_node_num) =
5115 Node_pt[node_count];
5118 finite_element_pt(element_num)
5119 ->local_fraction_of_node(local_node_num, s_fraction);
5122 Node_pt[node_count]->x(0) = Xmax;
5123 Node_pt[node_count]->x(1) = Ymax;
5124 Node_pt[node_count]->x(2) = Zmax;
5127 add_boundary_node(2, Node_pt[node_count]);
5128 add_boundary_node(3, Node_pt[node_count]);
5129 add_boundary_node(5, Node_pt[node_count]);
5137 setup_boundary_element_info();
An OomphLibError object which should be thrown when an run-time error is encountered....
void build_mesh(TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Generic mesh construction function: contains all the hard work.
////////////////////////////////////////////////////////////////////// //////////////////////////////...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...