26 #ifndef OOMPH_CYLINDER_WITH_FLAG_MESH_TEMPLATE_CC
27 #define OOMPH_CYLINDER_WITH_FLAG_MESH_TEMPLATE_CC
42 template<
class ELEMENT>
45 GeomObject* top_flag_pt,
46 GeomObject* bottom_flag_pt,
47 GeomObject* tip_flag_pt,
50 const double& flag_length,
51 const double& flag_height,
52 const double& centre_x,
53 const double& centre_y,
55 TimeStepper* time_stepper_pt)
58 MeshChecker::assert_geometric_element<QElementGeometricBase, ELEMENT>(2);
74 unsigned long node_count = 0;
81 Vector<Node*> tmp_node_pt;
85 unsigned nmacro_element = Domain_pt->nmacro_element();
86 for (
unsigned e = 0; e < nmacro_element; e++)
89 Element_pt.push_back(
new ELEMENT);
93 dynamic_cast<ELEMENT*
>(this->finite_element_pt(e))->nnode_1d();
96 for (
unsigned l1 = 0; l1 < np; l1++)
99 for (
unsigned l2 = 0; l2 < np; l2++)
102 tmp_node_pt.push_back(
103 this->finite_element_pt(e)->construct_boundary_node(
104 l1 * np + l2, time_stepper_pt));
107 s[0] = -1.0 + 2.0 * (double)l2 / (
double)(np - 1);
108 s[1] = -1.0 + 2.0 * (double)l1 / (
double)(np - 1);
109 Domain_pt->macro_element_pt(e)->macro_map(s, r);
112 tmp_node_pt[node_count]->x(0) = r[0];
113 tmp_node_pt[node_count]->x(1) = r[1];
127 dynamic_cast<ELEMENT*
>(this->finite_element_pt(0))->nnode_1d();
130 for (
unsigned n = 0; n < np; n++)
133 this->finite_element_pt(1)->node_pt(n * np) =
134 this->finite_element_pt(0)->node_pt((np - 1) * np + np - 1 - n);
137 delete tmp_node_pt[np * np + n * np];
138 tmp_node_pt[np * np + n * np] = 0;
142 for (
unsigned n = 0; n < np; n++)
145 this->finite_element_pt(2)->node_pt(n * np) =
146 this->finite_element_pt(1)->node_pt(np * n + np - 1);
149 delete tmp_node_pt[2 * np * np + n * np];
150 tmp_node_pt[2 * np * np + n * np] = 0;
154 for (
unsigned n = 0; n < np; n++)
157 this->finite_element_pt(3)->node_pt(np * (np - 1) + n) =
158 this->finite_element_pt(2)->node_pt(np * n + np - 1);
161 delete tmp_node_pt[3 * np * np + np * (np - 1) + n];
162 tmp_node_pt[3 * np * np + np * (np - 1) + n] = 0;
166 for (
unsigned n = 0; n < np; n++)
169 this->finite_element_pt(4)->node_pt(n) =
170 this->finite_element_pt(5)->node_pt(np * (np - n - 1) + np - 1);
173 delete tmp_node_pt[4 * np * np + n];
174 tmp_node_pt[4 * np * np + n] = 0;
178 for (
unsigned n = 0; n < np; n++)
181 this->finite_element_pt(5)->node_pt(n * np) =
182 this->finite_element_pt(6)->node_pt(np * n + np - 1);
185 delete tmp_node_pt[5 * np * np + n * np];
186 tmp_node_pt[5 * np * np + n * np] = 0;
190 for (
unsigned n = 0; n < np; n++)
193 this->finite_element_pt(6)->node_pt(n * np) =
194 this->finite_element_pt(0)->node_pt(n);
197 delete tmp_node_pt[6 * np * np + n * np];
198 tmp_node_pt[6 * np * np + n * np] = 0;
202 for (
unsigned n = 0; n < np; n++)
205 this->finite_element_pt(7)->node_pt(n * np) =
206 this->finite_element_pt(2)->node_pt((np - 1) * np + np - 1 - n);
209 delete tmp_node_pt[7 * np * np + n * np];
210 tmp_node_pt[7 * np * np + n * np] = 0;
214 for (
unsigned n = 0; n < np; n++)
217 this->finite_element_pt(8)->node_pt(n * np) =
218 this->finite_element_pt(3)->node_pt(np * n + np - 1);
221 delete tmp_node_pt[8 * np * np + n * np];
222 tmp_node_pt[8 * np * np + n * np] = 0;
226 for (
unsigned n = 0; n < np; n++)
229 this->finite_element_pt(9)->node_pt(n * np) =
230 this->finite_element_pt(4)->node_pt(np * n + np - 1);
233 delete tmp_node_pt[9 * np * np + n * np];
234 tmp_node_pt[9 * np * np + n * np] = 0;
239 for (
unsigned n = 0; n < np; n++)
242 this->finite_element_pt(10)->node_pt(n * np) =
243 this->finite_element_pt(5)->node_pt(n);
246 delete tmp_node_pt[10 * np * np + n * np];
247 tmp_node_pt[10 * np * np + n * np] = 0;
252 for (
unsigned n = 0; n < np; n++)
255 this->finite_element_pt(11)->node_pt(n * np) =
256 this->finite_element_pt(7)->node_pt(np * n + np - 1);
259 delete tmp_node_pt[11 * np * np + n * np];
260 tmp_node_pt[11 * np * np + n * np] = 0;
264 for (
unsigned n = 0; n < np; n++)
267 this->finite_element_pt(12)->node_pt(n * np) =
268 this->finite_element_pt(8)->node_pt(np * n + np - 1);
271 delete tmp_node_pt[12 * np * np + n * np];
272 tmp_node_pt[12 * np * np + n * np] = 0;
276 for (
unsigned n = 0; n < np; n++)
279 this->finite_element_pt(13)->node_pt(n * np) =
280 this->finite_element_pt(9)->node_pt(np * n + np - 1);
283 delete tmp_node_pt[13 * np * np + n * np];
284 tmp_node_pt[13 * np * np + n * np] = 0;
288 for (
unsigned n = 0; n < np; n++)
291 this->finite_element_pt(14)->node_pt(n * np) =
292 this->finite_element_pt(10)->node_pt(np * n + np - 1);
295 delete tmp_node_pt[14 * np * np + n * np];
296 tmp_node_pt[14 * np * np + n * np] = 0;
301 for (
unsigned n = 0; n < np; n++)
304 this->finite_element_pt(8)->node_pt(np * (np - 1) + n) =
305 this->finite_element_pt(7)->node_pt(n);
308 delete tmp_node_pt[8 * np * np + np * (np - 1) + n];
309 tmp_node_pt[8 * np * np + np * (np - 1) + n] = 0;
314 for (
unsigned n = 0; n < np; n++)
317 this->finite_element_pt(10)->node_pt(np * (np - 1) + n) =
318 this->finite_element_pt(9)->node_pt(n);
321 delete tmp_node_pt[10 * np * np + np * (np - 1) + n];
322 tmp_node_pt[10 * np * np + np * (np - 1) + n] = 0;
327 for (
unsigned n = 0; n < np; n++)
330 this->finite_element_pt(15)->node_pt(n * np) =
331 this->finite_element_pt(11)->node_pt(np * n + np - 1);
334 delete tmp_node_pt[15 * np * np + n * np];
335 tmp_node_pt[15 * np * np + n * np] = 0;
339 for (
unsigned n = 0; n < np; n++)
342 this->finite_element_pt(16)->node_pt(n * np) =
343 this->finite_element_pt(12)->node_pt(np * n + np - 1);
346 delete tmp_node_pt[16 * np * np + n * np];
347 tmp_node_pt[16 * np * np + n * np] = 0;
351 for (
unsigned n = 0; n < np; n++)
354 this->finite_element_pt(17)->node_pt(n * np) =
355 this->finite_element_pt(13)->node_pt(np * n + np - 1);
358 delete tmp_node_pt[17 * np * np + n * np];
359 tmp_node_pt[17 * np * np + n * np] = 0;
363 for (
unsigned n = 0; n < np; n++)
366 this->finite_element_pt(18)->node_pt(n * np) =
367 this->finite_element_pt(14)->node_pt(np * n + np - 1);
370 delete tmp_node_pt[18 * np * np + n * np];
371 tmp_node_pt[18 * np * np + n * np] = 0;
376 for (
unsigned n = 0; n < np; n++)
379 this->finite_element_pt(12)->node_pt(np * (np - 1) + n) =
380 this->finite_element_pt(11)->node_pt(n);
383 delete tmp_node_pt[12 * np * np + np * (np - 1) + n];
384 tmp_node_pt[12 * np * np + np * (np - 1) + n] = 0;
389 for (
unsigned n = 0; n < np; n++)
392 this->finite_element_pt(14)->node_pt(np * (np - 1) + n) =
393 this->finite_element_pt(13)->node_pt(n);
396 delete tmp_node_pt[14 * np * np + np * (np - 1) + n];
397 tmp_node_pt[14 * np * np + np * (np - 1) + n] = 0;
402 for (
unsigned n = 0; n < np; n++)
405 this->finite_element_pt(19)->node_pt(np * (np - 1) + n) =
406 this->finite_element_pt(15)->node_pt(np * n + np - 1);
409 delete tmp_node_pt[19 * np * np + np * (np - 1) + n];
410 tmp_node_pt[19 * np * np + np * (np - 1) + n] = 0;
415 for (
unsigned n = 0; n < np; n++)
418 this->finite_element_pt(16)->node_pt(np * n + np - 1) =
419 this->finite_element_pt(19)->node_pt(n * np);
422 delete tmp_node_pt[16 * np * np + np * (np - 1) + n];
423 tmp_node_pt[16 * np * np + np * (np - 1) + n] = 0;
428 for (
unsigned n = 0; n < np; n++)
431 this->finite_element_pt(16)->node_pt(np * (np - 1) + n) =
432 this->finite_element_pt(15)->node_pt(n);
435 delete tmp_node_pt[16 * np * np + np * (np - 1) + n];
436 tmp_node_pt[16 * np * np + np * (np - 1) + n] = 0;
441 for (
unsigned n = 0; n < np; n++)
444 this->finite_element_pt(20)->node_pt(n) =
445 this->finite_element_pt(18)->node_pt(np * (np - n - 1) + np - 1);
448 delete tmp_node_pt[20 * np * np + n];
449 tmp_node_pt[20 * np * np + n] = 0;
454 for (
unsigned n = 0; n < np; n++)
457 this->finite_element_pt(20)->node_pt(n * np) =
458 this->finite_element_pt(17)->node_pt(np * n + np - 1);
461 delete tmp_node_pt[20 * np * np + n * np];
462 tmp_node_pt[20 * np * np + n * np] = 0;
467 for (
unsigned n = 0; n < np; n++)
470 this->finite_element_pt(18)->node_pt(np * (np - 1) + n) =
471 this->finite_element_pt(17)->node_pt(n);
474 delete tmp_node_pt[18 * np * np + np * (np - 1) + n];
475 tmp_node_pt[18 * np * np + np * (np - 1) + n] = 0;
480 for (
unsigned n = 0; n < np; n++)
483 this->finite_element_pt(21)->node_pt(n * np) =
484 this->finite_element_pt(19)->node_pt(np * n + np - 1);
487 delete tmp_node_pt[21 * np * np + n * np];
488 tmp_node_pt[21 * np * np + n * np] = 0;
493 for (
unsigned n = 0; n < np; n++)
496 this->finite_element_pt(22)->node_pt(np * (np - 1) + n) =
497 this->finite_element_pt(21)->node_pt(n);
500 delete tmp_node_pt[22 * np * np + np * (np - 1) + n];
501 tmp_node_pt[22 * np * np + np * (np - 1) + n] = 0;
506 for (
unsigned n = 0; n < np; n++)
509 this->finite_element_pt(23)->node_pt(n * np) =
510 this->finite_element_pt(20)->node_pt(np * n + np - 1);
513 delete tmp_node_pt[23 * np * np + n * np];
514 tmp_node_pt[23 * np * np + n * np] = 0;
519 for (
unsigned n = 0; n < np; n++)
522 this->finite_element_pt(22)->node_pt(n) =
523 this->finite_element_pt(23)->node_pt(np * (np - 1) + n);
526 delete tmp_node_pt[22 * np * np + np * (np - 1) + n];
527 tmp_node_pt[22 * np * np + np * (np - 1) + n] = 0;
532 for (
unsigned n = 0; n < np; n++)
535 this->finite_element_pt(24)->node_pt(n * np) =
536 this->finite_element_pt(21)->node_pt(np * n + np - 1);
539 delete tmp_node_pt[24 * np * np + n * np];
540 tmp_node_pt[24 * np * np + n * np] = 0;
545 for (
unsigned n = 0; n < np; n++)
548 this->finite_element_pt(25)->node_pt(n * np) =
549 this->finite_element_pt(22)->node_pt(np * n + np - 1);
552 delete tmp_node_pt[25 * np * np + n * np];
553 tmp_node_pt[25 * np * np + n * np] = 0;
558 for (
unsigned n = 0; n < np; n++)
561 this->finite_element_pt(26)->node_pt(n * np) =
562 this->finite_element_pt(23)->node_pt(np * n + np - 1);
565 delete tmp_node_pt[26 * np * np + n * np];
566 tmp_node_pt[26 * np * np + n * np] = 0;
571 for (
unsigned n = 0; n < np; n++)
574 this->finite_element_pt(25)->node_pt(np * (np - 1) + n) =
575 this->finite_element_pt(24)->node_pt(n);
578 delete tmp_node_pt[25 * np * np + np * (np - 1) + n];
579 tmp_node_pt[25 * np * np + np * (np - 1) + n] = 0;
584 for (
unsigned n = 0; n < np; n++)
587 this->finite_element_pt(26)->node_pt(np * (np - 1) + n) =
588 this->finite_element_pt(25)->node_pt(n);
591 delete tmp_node_pt[26 * np * np + np * (np - 1) + n];
592 tmp_node_pt[26 * np * np + np * (np - 1) + n] = 0;
597 for (
unsigned n = 0; n < np; n++)
600 this->finite_element_pt(27)->node_pt(np * (np - 1) + n) =
601 this->finite_element_pt(24)->node_pt(np * n + np - 1);
604 delete tmp_node_pt[27 * np * np + np * (np - 1) + n];
605 tmp_node_pt[27 * np * np + np * (np - 1) + n] = 0;
610 for (
unsigned n = 0; n < np; n++)
613 this->finite_element_pt(27)->node_pt(n * np) =
614 this->finite_element_pt(25)->node_pt(np * n + np - 1);
617 delete tmp_node_pt[27 * np * np + n * np];
618 tmp_node_pt[27 * np * np + n * np] = 0;
623 for (
unsigned n = 0; n < np; n++)
626 this->finite_element_pt(27)->node_pt(n) =
627 this->finite_element_pt(26)->node_pt(np * (np - n - 1) + np - 1);
630 delete tmp_node_pt[27 * np * np + n];
631 tmp_node_pt[27 * np * np + n] = 0;
636 for (
unsigned n = 0; n < np; n++)
639 this->finite_element_pt(28)->node_pt(n * np) =
640 this->finite_element_pt(27)->node_pt(np * n + np - 1);
643 delete tmp_node_pt[28 * np * np + n * np];
644 tmp_node_pt[28 * np * np + n * np] = 0;
649 for (
unsigned n = 0; n < np; n++)
652 this->finite_element_pt(29)->node_pt(n * np) =
653 this->finite_element_pt(28)->node_pt(np * n + np - 1);
656 delete tmp_node_pt[29 * np * np + n * np];
657 tmp_node_pt[29 * np * np + n * np] = 0;
662 for (
unsigned n = 0; n < np; n++)
665 this->finite_element_pt(30)->node_pt(n * np) =
666 this->finite_element_pt(29)->node_pt(np * n + np - 1);
669 delete tmp_node_pt[30 * np * np + n * np];
670 tmp_node_pt[30 * np * np + n * np] = 0;
674 for (
unsigned long n = 0; n < node_count; n++)
676 if (tmp_node_pt[n] != 0)
678 Node_pt.push_back(tmp_node_pt[n]);
683 this->set_nboundary(8);
685 for (
unsigned n = 0; n < np; n++)
688 this->add_boundary_node(3, this->finite_element_pt(0)->node_pt(n * np));
690 this->add_boundary_node(
691 1, this->finite_element_pt(30)->node_pt(n * np + np - 1));
694 this->add_boundary_node(0, this->finite_element_pt(6)->node_pt(n));
697 this->add_boundary_node(
698 2, this->finite_element_pt(1)->node_pt(np * (np - 1) + n));
701 this->add_boundary_node(4, this->finite_element_pt(3)->node_pt(np * n));
704 this->add_boundary_node(
705 5, this->finite_element_pt(4)->node_pt(np * (np - 1) + n));
708 this->add_boundary_node(6, this->finite_element_pt(3)->node_pt(n));
711 this->add_boundary_node(7, this->finite_element_pt(22)->node_pt(n * np));
714 for (
unsigned n = 1; n < np; n++)
717 this->add_boundary_node(0, this->finite_element_pt(10)->node_pt(n));
720 this->add_boundary_node(
721 2, this->finite_element_pt(7)->node_pt(np * (np - 1) + n));
724 this->add_boundary_node(
725 5, this->finite_element_pt(9)->node_pt(np * (np - 1) + n));
728 this->add_boundary_node(6, this->finite_element_pt(8)->node_pt(n));
731 for (
unsigned n = np - 2; n > 0; n--)
734 this->add_boundary_node(4, this->finite_element_pt(2)->node_pt(n));
737 for (
unsigned n = 1; n < np; n++)
740 this->add_boundary_node(0, this->finite_element_pt(14)->node_pt(n));
743 this->add_boundary_node(
744 2, this->finite_element_pt(11)->node_pt(np * (np - 1) + n));
747 this->add_boundary_node(
748 5, this->finite_element_pt(13)->node_pt(np * (np - 1) + n));
751 this->add_boundary_node(6, this->finite_element_pt(12)->node_pt(n));
754 for (
unsigned n = np - 1; n > 0; n--)
757 this->add_boundary_node(4, this->finite_element_pt(1)->node_pt(n));
760 for (
unsigned n = 1; n < np; n++)
763 this->add_boundary_node(0, this->finite_element_pt(18)->node_pt(n));
765 this->add_boundary_node(
766 2, this->finite_element_pt(15)->node_pt(np * (np - 1) + n));
769 this->add_boundary_node(
770 5, this->finite_element_pt(17)->node_pt(np * (np - 1) + n));
773 this->add_boundary_node(6, this->finite_element_pt(16)->node_pt(n));
776 for (
unsigned n = np - 1; n > 0; n--)
779 this->add_boundary_node(
780 4, this->finite_element_pt(0)->node_pt(n * np + np - 1));
784 for (
unsigned n = 1; n < np; n++)
787 this->add_boundary_node(0, this->finite_element_pt(23)->node_pt(n));
789 this->add_boundary_node(
790 2, this->finite_element_pt(21)->node_pt(np * (np - 1) + n));
793 this->add_boundary_node(
794 4, this->finite_element_pt(6)->node_pt(np * (np - 1) + n));
797 this->add_boundary_node(
798 5, this->finite_element_pt(20)->node_pt(np * (np - 1) + n));
801 this->add_boundary_node(6, this->finite_element_pt(19)->node_pt(n));
804 for (
unsigned n = 0; n < np; n++)
807 this->add_boundary_node(
808 4, this->finite_element_pt(6)->node_pt(np * (np - 1) + n));
812 for (
unsigned n = 1; n < np; n++)
815 this->add_boundary_node(0, this->finite_element_pt(26)->node_pt(n));
817 this->add_boundary_node(
818 2, this->finite_element_pt(24)->node_pt(np * (np - 1) + n));
821 this->add_boundary_node(
822 4, this->finite_element_pt(5)->node_pt(np * (np - 1) + n));
826 for (
unsigned n = 1; n < np; n++)
829 this->add_boundary_node(0, this->finite_element_pt(28)->node_pt(n));
831 this->add_boundary_node(
832 2, this->finite_element_pt(28)->node_pt(np * (np - 1) + n));
835 this->add_boundary_node(4, this->finite_element_pt(4)->node_pt(np * n));
838 for (
unsigned n = 1; n < np; n++)
841 this->add_boundary_node(0, this->finite_element_pt(29)->node_pt(n));
843 this->add_boundary_node(
844 2, this->finite_element_pt(29)->node_pt(np * (np - 1) + n));
847 for (
unsigned n = 1; n < np; n++)
850 this->add_boundary_node(0, this->finite_element_pt(30)->node_pt(n));
852 this->add_boundary_node(
853 2, this->finite_element_pt(30)->node_pt(np * (np - 1) + n));
858 setup_boundary_element_info();
863 Vector<double> zeta(1);
866 unsigned nnode = this->nboundary_node(5);
867 for (
unsigned k = 0; k < nnode; k++)
869 Node* nod_pt = this->boundary_node_pt(5, k);
870 zeta[0] = double(k) * flag_length / double(nnode - 1);
871 nod_pt->set_coordinates_on_boundary(5, zeta);
875 nnode = this->nboundary_node(6);
876 for (
unsigned k = 0; k < nnode; k++)
878 Node* nod_pt = this->boundary_node_pt(6, k);
879 zeta[0] = double(k) * flag_length / double(nnode - 1);
880 nod_pt->set_coordinates_on_boundary(6, zeta);
884 nnode = this->nboundary_node(7);
885 for (
unsigned k = 0; k < nnode; k++)
887 Node* nod_pt = this->boundary_node_pt(7, k);
888 zeta[0] = -flag_height / 2. + double(k) / double(nnode - 1) * flag_height;
889 nod_pt->set_coordinates_on_boundary(7, zeta);
893 this->Boundary_coordinate_exists[5] =
true;
894 this->Boundary_coordinate_exists[6] =
true;
895 this->Boundary_coordinate_exists[7] =
true;
898 for (
unsigned e = 0; e < 31; e++)
900 dynamic_cast<ELEMENT*
>(this->element_pt(e))
901 ->set_macro_elem_pt(this->Domain_pt->macro_element_pt(e));
914 template<
class ELEMENT>
918 Vector<double> ref_value(6);
919 for (
unsigned i = 0; i < 5; i++)
925 for (
unsigned k = 0; k < 3; k++)
927 FiniteElement* el_pt = this->finite_element_pt(8 + k * 4);
928 unsigned nnode = el_pt->nnode();
929 for (
unsigned i = 0; i < nnode; i++)
932 Vector<double> coord_loc(2);
933 el_pt->local_coordinate_of_node(i, coord_loc);
936 ref_value[0] = 0.5 * (coord_loc[0] + 1.0);
939 ref_value[1] = 0.5 * (coord_loc[1] + 1.0);
942 ref_value[2] = double(k + 1) / 5. * Flag_length +
943 ref_value[0] * 1. / 5. * Flag_length;
946 GeomObject* geom_obj_pt;
948 Vector<double> zeta(1);
949 zeta[0] = ref_value[2];
950 Top_flag_pt->locate_zeta(zeta, geom_obj_pt, s);
953 Vector<GeomObject*> geom_object_pt(1);
954 geom_object_pt[0] = geom_obj_pt;
960 ref_value[4] = el_pt->node_pt(i)->x(0);
964 dynamic_cast<AlgebraicNode*
>(el_pt->node_pt(i))
965 ->add_node_update_info(1,
973 for (
unsigned k = 0; k < 3; k++)
975 FiniteElement* el_pt = this->finite_element_pt(9 + k * 4);
976 unsigned nnode = el_pt->nnode();
977 for (
unsigned i = 0; i < nnode; i++)
980 Vector<double> coord_loc(2);
981 el_pt->local_coordinate_of_node(i, coord_loc);
984 ref_value[0] = 0.5 * (coord_loc[0] + 1.0);
987 ref_value[1] = 0.5 * (coord_loc[1] + 1.0);
990 ref_value[2] = double(k + 1) / 5. * Flag_length +
991 ref_value[0] * 1. / 5. * Flag_length;
994 GeomObject* geom_obj_pt;
996 Vector<double> zeta(1);
997 zeta[0] = ref_value[2];
998 Bottom_flag_pt->locate_zeta(zeta, geom_obj_pt, s);
1001 Vector<GeomObject*> geom_object_pt(1);
1002 geom_object_pt[0] = geom_obj_pt;
1005 ref_value[3] = s[0];
1008 ref_value[4] = el_pt->node_pt(i)->x(0);
1012 dynamic_cast<AlgebraicNode*
>(el_pt->node_pt(i))
1013 ->add_node_update_info(2,
1021 FiniteElement* el_pt = this->finite_element_pt(22);
1022 unsigned nnode = el_pt->nnode();
1023 for (
unsigned i = 0; i < nnode; i++)
1026 Vector<double> coord_loc(2);
1027 el_pt->local_coordinate_of_node(i, coord_loc);
1030 ref_value[0] = 0.5 * (coord_loc[0] + 1.0);
1033 ref_value[1] = 0.5 * (coord_loc[1] + 1.0);
1036 ref_value[2] = coord_loc[1] * Flag_height / 2.;
1039 GeomObject* geom_obj_pt;
1040 Vector<double> s(1);
1041 Vector<double> zeta(1);
1042 zeta[0] = ref_value[2];
1043 Tip_flag_pt->locate_zeta(zeta, geom_obj_pt, s);
1046 Vector<GeomObject*> geom_object_pt(1);
1047 geom_object_pt[0] = geom_obj_pt;
1050 ref_value[3] = s[0];
1054 dynamic_cast<AlgebraicNode*
>(el_pt->node_pt(i))
1055 ->add_node_update_info(3,
1062 el_pt = this->finite_element_pt(21);
1063 nnode = el_pt->nnode();
1064 for (
unsigned i = 0; i < nnode; i++)
1067 Vector<double> coord_loc(2);
1068 el_pt->local_coordinate_of_node(i, coord_loc);
1071 ref_value[0] = 0.5 * (coord_loc[0] + 1.0);
1074 ref_value[1] = 0.5 * (coord_loc[1] + 1.0);
1077 GeomObject* geom_obj_pt;
1078 Vector<double> s(1);
1079 Vector<double> zeta(1);
1080 zeta[0] = Flag_height / 2.;
1081 Tip_flag_pt->locate_zeta(zeta, geom_obj_pt, s);
1084 Vector<GeomObject*> geom_object_pt(1);
1085 geom_object_pt[0] = geom_obj_pt;
1088 ref_value[2] = s[0];
1092 dynamic_cast<AlgebraicNode*
>(el_pt->node_pt(i))
1093 ->add_node_update_info(4,
1100 el_pt = this->finite_element_pt(23);
1101 nnode = el_pt->nnode();
1102 for (
unsigned i = 0; i < nnode; i++)
1105 Vector<double> coord_loc(2);
1106 el_pt->local_coordinate_of_node(i, coord_loc);
1109 ref_value[0] = 0.5 * (coord_loc[0] + 1.0);
1112 ref_value[1] = 0.5 * (coord_loc[1] + 1.0);
1115 GeomObject* geom_obj_pt;
1116 Vector<double> s(1);
1117 Vector<double> zeta(1);
1118 zeta[0] = -Flag_height / 2.;
1119 Tip_flag_pt->locate_zeta(zeta, geom_obj_pt, s);
1122 Vector<GeomObject*> geom_object_pt(1);
1123 geom_object_pt[0] = geom_obj_pt;
1126 ref_value[2] = s[0];
1130 dynamic_cast<AlgebraicNode*
>(el_pt->node_pt(i))
1131 ->add_node_update_info(5,
1138 el_pt = this->finite_element_pt(19);
1139 nnode = el_pt->nnode();
1140 for (
unsigned i = 0; i < nnode; i++)
1143 Vector<double> coord_loc(2);
1144 el_pt->local_coordinate_of_node(i, coord_loc);
1147 ref_value[0] = 0.5 * (coord_loc[0] + 1.0);
1150 ref_value[1] = 0.5 * (coord_loc[1] + 1.0);
1154 4. / 5. * Flag_length + ref_value[0] * 1. / 5. * Flag_length;
1157 GeomObject* geom_obj_pt;
1158 Vector<double> s(1);
1159 Vector<double> zeta(1);
1160 zeta[0] = ref_value[2];
1161 Top_flag_pt->locate_zeta(zeta, geom_obj_pt, s);
1164 Vector<GeomObject*> geom_object_pt(1);
1165 geom_object_pt[0] = geom_obj_pt;
1168 ref_value[3] = s[0];
1172 dynamic_cast<AlgebraicNode*
>(el_pt->node_pt(i))
1173 ->add_node_update_info(6,
1181 el_pt = this->finite_element_pt(20);
1182 nnode = el_pt->nnode();
1183 for (
unsigned i = 0; i < nnode; i++)
1186 Vector<double> coord_loc(2);
1187 el_pt->local_coordinate_of_node(i, coord_loc);
1190 ref_value[0] = 0.5 * (coord_loc[0] + 1.0);
1193 ref_value[1] = 0.5 * (coord_loc[1] + 1.0);
1197 4. / 5. * Flag_length + ref_value[0] * 1. / 5. * Flag_length;
1200 GeomObject* geom_obj_pt;
1201 Vector<double> s(1);
1202 Vector<double> zeta(1);
1203 zeta[0] = ref_value[2];
1204 Bottom_flag_pt->locate_zeta(zeta, geom_obj_pt, s);
1207 Vector<GeomObject*> geom_object_pt(1);
1208 geom_object_pt[0] = geom_obj_pt;
1211 ref_value[3] = s[0];
1215 dynamic_cast<AlgebraicNode*
>(el_pt->node_pt(i))
1216 ->add_node_update_info(7,
1223 el_pt = this->finite_element_pt(3);
1224 nnode = el_pt->nnode();
1225 for (
unsigned i = 0; i < nnode; i++)
1228 Vector<double> coord_loc(2);
1229 el_pt->local_coordinate_of_node(i, coord_loc);
1232 ref_value[0] = 0.5 * (coord_loc[0] + 1.0);
1235 ref_value[1] = 0.5 * (coord_loc[1] + 1.0);
1238 ref_value[2] = ref_value[0] * 1. / 5. * Flag_length;
1242 GeomObject* geom_obj_pt;
1243 Vector<double> s(1);
1244 Vector<double> zeta(1);
1245 zeta[0] = ref_value[2];
1246 Top_flag_pt->locate_zeta(zeta, geom_obj_pt, s);
1249 ref_value[3] = s[0];
1252 Vector<GeomObject*> geom_object_pt(2);
1253 geom_object_pt[0] = geom_obj_pt;
1256 ref_value[4] = 1. / 5. * Flag_length;
1260 zeta[0] = ref_value[4];
1261 Top_flag_pt->locate_zeta(zeta, geom_obj_pt, s);
1264 geom_object_pt[1] = geom_obj_pt;
1267 ref_value[5] = s[0];
1272 dynamic_cast<AlgebraicNode*
>(el_pt->node_pt(i))
1273 ->add_node_update_info(8,
1281 el_pt = this->finite_element_pt(4);
1282 nnode = el_pt->nnode();
1283 for (
unsigned i = 0; i < nnode; i++)
1286 Vector<double> coord_loc(2);
1287 el_pt->local_coordinate_of_node(i, coord_loc);
1290 ref_value[0] = 0.5 * (coord_loc[0] + 1.0);
1293 ref_value[1] = 0.5 * (coord_loc[1] + 1.0);
1296 ref_value[2] = ref_value[0] * 1. / 5. * Flag_length;
1300 GeomObject* geom_obj_pt;
1301 Vector<double> s(1);
1302 Vector<double> zeta(1);
1303 zeta[0] = ref_value[2];
1304 Bottom_flag_pt->locate_zeta(zeta, geom_obj_pt, s);
1307 ref_value[3] = s[0];
1310 Vector<GeomObject*> geom_object_pt(2);
1311 geom_object_pt[0] = geom_obj_pt;
1314 ref_value[4] = 1. / 5. * Flag_length;
1318 zeta[0] = ref_value[4];
1319 Bottom_flag_pt->locate_zeta(zeta, geom_obj_pt, s);
1322 geom_object_pt[1] = geom_obj_pt;
1325 ref_value[5] = s[0];
1329 dynamic_cast<AlgebraicNode*
>(el_pt->node_pt(i))
1330 ->add_node_update_info(9,
1343 template<
class ELEMENT>
1345 const unsigned& t, AlgebraicNode*& node_pt)
1347 unsigned id = node_pt->node_update_fct_id();
1352 node_update_I(t, node_pt);
1356 node_update_II(t, node_pt);
1360 node_update_III(t, node_pt);
1364 node_update_IV(t, node_pt);
1368 node_update_V(t, node_pt);
1372 node_update_VI(t, node_pt);
1376 node_update_VII(t, node_pt);
1380 node_update_VIII(t, node_pt);
1384 node_update_IX(t, node_pt);
1388 std::ostringstream error_message;
1389 error_message <<
"Wrong id " <<
id << std::endl;
1390 throw OomphLibError(error_message.str(),
1391 OOMPH_CURRENT_FUNCTION,
1392 OOMPH_EXCEPTION_LOCATION);
1401 template<
class ELEMENT>
1403 const unsigned& t, AlgebraicNode*& node_pt)
1406 Vector<double> ref_value(node_pt->vector_ref_value());
1409 Vector<GeomObject*> geom_object_pt(node_pt->vector_geom_object_pt());
1412 GeomObject* flag_pt = geom_object_pt[0];
1415 Vector<double> ref_point(2);
1416 ref_point[0] = ref_value[4];
1417 ref_point[1] = 0.778024390 * Height;
1420 Vector<double> flag_point(2);
1421 Vector<double> zeta(1);
1422 zeta[0] = ref_value[3];
1423 flag_pt->position(t, zeta, flag_point);
1427 double r = ref_value[1];
1431 ref_point[0] + (1.0 - r) * (flag_point[0] - ref_point[0]);
1433 ref_point[1] + (1.0 - r) * (flag_point[1] - ref_point[1]);
1440 template<
class ELEMENT>
1442 const unsigned& t, AlgebraicNode*& node_pt)
1445 Vector<double> ref_value(node_pt->vector_ref_value());
1448 Vector<GeomObject*> geom_object_pt(node_pt->vector_geom_object_pt());
1451 GeomObject* flag_pt = geom_object_pt[0];
1454 Vector<double> ref_point(2);
1455 ref_point[0] = ref_value[4];
1456 ref_point[1] = 0.197585366 * Height;
1459 Vector<double> flag_point(2);
1460 Vector<double> zeta(1);
1461 zeta[0] = ref_value[3];
1462 flag_pt->position(t, zeta, flag_point);
1466 double r = ref_value[1];
1469 node_pt->x(t, 0) = ref_point[0] + r * (flag_point[0] - ref_point[0]);
1470 node_pt->x(t, 1) = ref_point[1] + r * (flag_point[1] - ref_point[1]);
1476 template<
class ELEMENT>
1478 const unsigned& t, AlgebraicNode*& node_pt)
1481 Vector<double> p15(2);
1482 Vector<double> p35(2);
1484 p15[0] = 0.285123967 * Length;
1485 p15[1] = 0.625 * Height;
1487 p35[0] = 0.285123967 * Length;
1488 p35[1] = 0.350609756 * Height;
1491 Vector<double> ref_value(node_pt->vector_ref_value());
1494 Vector<GeomObject*> geom_object_pt(node_pt->vector_geom_object_pt());
1497 GeomObject* flag_pt = geom_object_pt[0];
1500 Vector<double> ref_point(2);
1501 ref_point[0] = p15[0];
1502 ref_point[1] = p35[1] + ref_value[1] * (p15[1] - p35[1]);
1505 Vector<double> flag_point(2);
1506 Vector<double> zeta(1);
1507 zeta[0] = ref_value[3];
1508 flag_pt->position(t, zeta, flag_point);
1512 double r = ref_value[0];
1515 node_pt->x(t, 0) = flag_point[0] + r * (ref_point[0] - flag_point[0]);
1516 node_pt->x(t, 1) = flag_point[1] + r * (ref_point[1] - flag_point[1]);
1522 template<
class ELEMENT>
1524 const unsigned& t, AlgebraicNode*& node_pt)
1527 Vector<double> p15(2);
1528 Vector<double> p25(2);
1529 Vector<double> top_flag(2);
1531 p15[0] = 0.285123967 * Length;
1532 p15[1] = 0.625 * Height;
1535 A * sqrt(1.0 - Flag_height * Flag_height / (4.0 * A * A)) +
1537 p25[1] = Centre_y + Flag_height / 2.0;
1540 Vector<double> ref_value(node_pt->vector_ref_value());
1543 Vector<GeomObject*> geom_object_pt(node_pt->vector_geom_object_pt());
1546 GeomObject* flag_pt = geom_object_pt[0];
1548 Vector<double> zeta(1);
1549 zeta[0] = ref_value[2];
1550 flag_pt->position(t, zeta, top_flag);
1553 Vector<double> p1(2);
1554 p1[0] = top_flag[0] + ref_value[0] * (p15[0] - top_flag[0]);
1555 p1[1] = top_flag[1] + ref_value[0] * (p15[1] - top_flag[1]);
1558 Vector<double> p2(2);
1559 p2[0] = p25[0] + ref_value[0] * (p15[0] - p25[0]);
1563 node_pt->x(t, 0) = p1[0] + ref_value[1] * (p2[0] - p1[0]);
1564 node_pt->x(t, 1) = p1[1] + ref_value[1] * (p2[1] - p1[1]);
1570 template<
class ELEMENT>
1572 const unsigned& t, AlgebraicNode*& node_pt)
1575 Vector<double> p31(2);
1576 Vector<double> p35(2);
1577 Vector<double> top_flag(2);
1580 A * sqrt(1.0 - Flag_height * Flag_height / (4.0 * A * A)) +
1582 p31[1] = Centre_y - Flag_height / 2.;
1584 p35[0] = 0.285123967 * Length;
1585 p35[1] = 0.350609756 * Height;
1588 Vector<double> ref_value(node_pt->vector_ref_value());
1591 Vector<GeomObject*> geom_object_pt(node_pt->vector_geom_object_pt());
1594 GeomObject* flag_pt = geom_object_pt[0];
1596 Vector<double> zeta(1);
1597 zeta[0] = ref_value[2];
1599 flag_pt->position(t, zeta, top_flag);
1602 Vector<double> p1(2);
1603 p1[0] = top_flag[0] + ref_value[0] * (p35[0] - top_flag[0]);
1604 p1[1] = top_flag[1] + ref_value[0] * (p35[1] - top_flag[1]);
1607 Vector<double> p2(2);
1608 p2[0] = p31[0] + ref_value[0] * (p35[0] - p31[0]);
1612 node_pt->x(t, 0) = p2[0] + ref_value[1] * (p1[0] - p2[0]);
1613 node_pt->x(t, 1) = p2[1] + ref_value[1] * (p1[1] - p2[1]);
1619 template<
class ELEMENT>
1621 const unsigned& t, AlgebraicNode*& node_pt)
1624 Vector<double> ref_value(node_pt->vector_ref_value());
1627 Vector<double> p14(2);
1628 Vector<double> p5(2);
1629 Vector<double> point_flag(2);
1631 p14[0] = 0.211596 * Length;
1632 p14[1] = 0.778024390 * Height;
1634 p5[0] = 0.239596 * Length;
1638 Vector<GeomObject*> geom_object_pt(node_pt->vector_geom_object_pt());
1641 GeomObject* flag_pt = geom_object_pt[0];
1643 Vector<double> zeta(1);
1644 zeta[0] = ref_value[3];
1645 flag_pt->position(t, zeta, point_flag);
1648 Vector<double> p1(2);
1649 p1[0] = p14[0] + ref_value[0] * (p5[0] - p14[0]);
1650 p1[1] = p14[1] + ref_value[0] * (p5[1] - p14[1]);
1654 node_pt->x(t, 0) = point_flag[0] + ref_value[1] * (p1[0] - point_flag[0]);
1655 node_pt->x(t, 1) = point_flag[1] + ref_value[1] * (p1[1] - point_flag[1]);
1661 template<
class ELEMENT>
1663 const unsigned& t, AlgebraicNode*& node_pt)
1666 Vector<double> ref_value(node_pt->vector_ref_value());
1669 Vector<double> p40(2);
1670 Vector<double> p45(2);
1671 Vector<double> point_flag(2);
1673 p40[0] = 0.211596 * Length;
1674 p40[1] = 0.197585366 * Height;
1676 p45[0] = 0.239596 * Length;
1680 Vector<GeomObject*> geom_object_pt(node_pt->vector_geom_object_pt());
1683 GeomObject* flag_pt = geom_object_pt[0];
1685 Vector<double> zeta(1);
1686 zeta[0] = ref_value[3];
1687 flag_pt->position(t, zeta, point_flag);
1690 Vector<double> p1(2);
1691 p1[0] = p40[0] + ref_value[0] * (p45[0] - p40[0]);
1692 p1[1] = p40[1] + ref_value[0] * (p45[1] - p40[1]);
1697 point_flag[0] + (1 - ref_value[1]) * (p1[0] - point_flag[0]);
1699 point_flag[1] + (1 - ref_value[1]) * (p1[1] - point_flag[1]);
1706 template<
class ELEMENT>
1708 const unsigned& t, AlgebraicNode*& node_pt)
1711 Vector<double> p11(2);
1712 p11[0] = 0.127596 * Length;
1713 p11[1] = 0.778024390 * Height;
1716 double zeta_circle_top = atan(1.0);
1717 double zeta_circle_bot = asin(Flag_height / 2. / A);
1720 Vector<double> ref_value(node_pt->vector_ref_value());
1723 Vector<GeomObject*> geom_object_pt(node_pt->vector_geom_object_pt());
1726 GeomObject* flag_ref_pt = geom_object_pt[0];
1729 GeomObject* flag_end_pt = geom_object_pt[1];
1731 double omega_horizontal = ref_value[0];
1732 double omega_vertical = ref_value[1];
1735 Vector<double> flag_end(2);
1736 Vector<double> zeta(1);
1737 zeta[0] = ref_value[5];
1738 flag_end_pt->position(t, zeta, flag_end);
1740 Vector<double> outer_point(p11);
1743 Vector<double> ref_point_on_circle(2);
1745 zeta_circle_bot + (zeta_circle_top - zeta_circle_bot) * omega_vertical;
1746 Cylinder_pt->position(zeta, ref_point_on_circle);
1749 Vector<double> ref_point_on_right_line(2);
1750 ref_point_on_right_line[0] =
1751 outer_point[0] + (flag_end[0] - outer_point[0]) * (1.0 - omega_vertical);
1752 ref_point_on_right_line[1] =
1753 outer_point[1] + (flag_end[1] - outer_point[1]) * (1.0 - omega_vertical);
1756 Vector<double> ref_point_on_flag(2);
1757 zeta[0] = ref_value[3];
1758 flag_ref_pt->position(t, zeta, ref_point_on_flag);
1761 Vector<double> circle_bot(2);
1762 zeta[0] = zeta_circle_bot;
1763 Cylinder_pt->position(zeta, circle_bot);
1767 Vector<double> r_bot(2);
1768 r_bot[0] = circle_bot[0] + (flag_end[0] - circle_bot[0]) * omega_horizontal;
1769 r_bot[1] = circle_bot[1] + (flag_end[1] - circle_bot[1]) * omega_horizontal;
1775 ref_point_on_circle[0] +
1776 (ref_point_on_right_line[0] - ref_point_on_circle[0]) * omega_horizontal;
1778 ref_point_on_circle[1] +
1779 (ref_point_on_right_line[1] - ref_point_on_circle[1]) * omega_horizontal;
1784 (ref_point_on_flag[0] - r_bot[0]) * (1.0 - omega_vertical);
1786 (ref_point_on_flag[1] - r_bot[1]) * (1.0 - omega_vertical);
1792 template<
class ELEMENT>
1794 const unsigned& t, AlgebraicNode*& node_pt)
1797 Vector<double> p37(2);
1798 p37[0] = 0.127596 * Length;
1799 p37[1] = 0.197585366 * Height;
1802 double zeta_circle_top = -asin(Flag_height / 2. / A);
1803 double zeta_circle_bot = -atan(1.0);
1806 Vector<double> ref_value(node_pt->vector_ref_value());
1809 Vector<GeomObject*> geom_object_pt(node_pt->vector_geom_object_pt());
1812 GeomObject* flag_ref_pt = geom_object_pt[0];
1815 GeomObject* flag_end_pt = geom_object_pt[1];
1817 double omega_horizontal = ref_value[0];
1818 double omega_vertical = ref_value[1];
1821 Vector<double> flag_end(2);
1822 Vector<double> zeta(1);
1823 zeta[0] = ref_value[5];
1824 flag_end_pt->position(t, zeta, flag_end);
1826 Vector<double> outer_point(p37);
1829 Vector<double> ref_point_on_circle(2);
1831 zeta_circle_bot + (zeta_circle_top - zeta_circle_bot) * omega_vertical;
1832 Cylinder_pt->position(zeta, ref_point_on_circle);
1835 Vector<double> ref_point_on_right_line(2);
1836 ref_point_on_right_line[0] =
1837 outer_point[0] + (flag_end[0] - outer_point[0]) * omega_vertical;
1838 ref_point_on_right_line[1] =
1839 outer_point[1] + (flag_end[1] - outer_point[1]) * omega_vertical;
1842 Vector<double> ref_point_on_flag(2);
1843 zeta[0] = ref_value[3];
1844 flag_ref_pt->position(t, zeta, ref_point_on_flag);
1847 Vector<double> circle_top(2);
1848 zeta[0] = zeta_circle_top;
1849 Cylinder_pt->position(zeta, circle_top);
1853 Vector<double> r_top(2);
1854 r_top[0] = circle_top[0] + (flag_end[0] - circle_top[0]) * omega_horizontal;
1855 r_top[1] = circle_top[1] + (flag_end[1] - circle_top[1]) * omega_horizontal;
1861 ref_point_on_circle[0] +
1862 (ref_point_on_right_line[0] - ref_point_on_circle[0]) * omega_horizontal;
1864 ref_point_on_circle[1] +
1865 (ref_point_on_right_line[1] - ref_point_on_circle[1]) * omega_horizontal;
1869 node_pt->x(t, 0) += (ref_point_on_flag[0] - r_top[0]) * omega_vertical;
1870 node_pt->x(t, 1) += (ref_point_on_flag[1] - r_top[1]) * omega_vertical;
1882 template<
class ELEMENT>
1884 AlgebraicNode*& node_pt)
1887 unsigned id = node_pt->node_update_fct_id();
1893 Vector<GeomObject*> geom_object_pt(node_pt->vector_geom_object_pt());
1896 Vector<double> ref_value(node_pt->vector_ref_value());
1899 Vector<double> zeta_ref_flag(1);
1900 zeta_ref_flag[0] = ref_value[2];
1904 Vector<double> s(1);
1905 GeomObject* geom_obj_pt;
1906 this->Top_flag_pt->locate_zeta(zeta_ref_flag, geom_obj_pt, s);
1911 geom_object_pt[0] = geom_obj_pt;
1915 ref_value[3] = s[0];
1919 Vector<double> zeta_end_flag(1);
1920 zeta_end_flag[0] = ref_value[4];
1924 this->Top_flag_pt->locate_zeta(zeta_end_flag, geom_obj_pt, s);
1929 geom_object_pt[1] = geom_obj_pt;
1933 ref_value[5] = s[0];
1936 node_pt->kill_node_update_info(8);
1939 node_pt->add_node_update_info(8,
1947 Vector<GeomObject*> geom_object_pt(node_pt->vector_geom_object_pt());
1950 Vector<double> ref_value(node_pt->vector_ref_value());
1953 Vector<double> zeta_ref_flag(1);
1954 zeta_ref_flag[0] = ref_value[2];
1958 Vector<double> s(1);
1959 GeomObject* geom_obj_pt;
1960 this->Bottom_flag_pt->locate_zeta(zeta_ref_flag, geom_obj_pt, s);
1964 geom_object_pt[0] = geom_obj_pt;
1968 ref_value[3] = s[0];
1972 Vector<double> zeta_end_flag(1);
1973 zeta_end_flag[0] = ref_value[4];
1977 this->Bottom_flag_pt->locate_zeta(zeta_end_flag, geom_obj_pt, s);
1981 geom_object_pt[1] = geom_obj_pt;
1985 ref_value[5] = s[0];
1988 node_pt->kill_node_update_info(9);
1991 node_pt->add_node_update_info(9,
1998 if ((
id == 1) || (
id == 6))
2001 Vector<double> ref_value(node_pt->vector_ref_value());
2004 Vector<double> zeta_flag(1);
2005 zeta_flag[0] = ref_value[2];
2008 Vector<double> s(1);
2009 GeomObject* geom_obj_pt;
2010 this->Top_flag_pt->locate_zeta(zeta_flag, geom_obj_pt, s);
2013 Vector<GeomObject*> geom_object_pt(node_pt->vector_geom_object_pt());
2019 geom_object_pt[0] = geom_obj_pt;
2023 ref_value[3] = s[0];
2028 node_pt->kill_node_update_info(1);
2031 node_pt->add_node_update_info(1,
2039 node_pt->kill_node_update_info(6);
2042 node_pt->add_node_update_info(6,
2050 if ((
id == 2) || (
id == 7))
2053 Vector<double> ref_value(node_pt->vector_ref_value());
2056 Vector<double> zeta_flag(1);
2057 zeta_flag[0] = ref_value[2];
2060 Vector<double> s(1);
2061 GeomObject* geom_obj_pt;
2062 this->Bottom_flag_pt->locate_zeta(zeta_flag, geom_obj_pt, s);
2065 Vector<GeomObject*> geom_object_pt(node_pt->vector_geom_object_pt());
2071 geom_object_pt[0] = geom_obj_pt;
2075 ref_value[3] = s[0];
2080 node_pt->kill_node_update_info(2);
2083 node_pt->add_node_update_info(2,
2091 node_pt->kill_node_update_info(7);
2094 node_pt->add_node_update_info(7,
2101 if ((
id == 3) || (
id == 4) || (
id == 5))
2104 Vector<double> ref_value(node_pt->vector_ref_value());
2107 Vector<double> zeta_flag(1);
2110 zeta_flag[0] = ref_value[2];
2114 zeta_flag[0] = this->Flag_height / 2.;
2118 zeta_flag[0] = -this->Flag_height / 2.;
2122 Vector<double> s(1);
2123 GeomObject* geom_obj_pt;
2124 this->Tip_flag_pt->locate_zeta(zeta_flag, geom_obj_pt, s);
2127 Vector<GeomObject*> geom_object_pt(node_pt->vector_geom_object_pt());
2133 geom_object_pt[0] = geom_obj_pt;
2140 ref_value[3] = s[0];
2143 node_pt->kill_node_update_info(3);
2146 node_pt->add_node_update_info(3,
2155 ref_value[2] = s[0];
2158 node_pt->kill_node_update_info(4);
2161 node_pt->add_node_update_info(4,
2170 ref_value[2] = s[0];
2173 node_pt->kill_node_update_info(5);
2176 node_pt->add_node_update_info(5,
void node_update_V(const unsigned &t, AlgebraicNode *&node_pt)
Helper function.
void node_update_II(const unsigned &t, AlgebraicNode *&node_pt)
Helper function.
void node_update_III(const unsigned &t, AlgebraicNode *&node_pt)
Helper function.
void algebraic_node_update(const unsigned &t, AlgebraicNode *&node_pt)
Update nodal position at time level t (t=0: present; t>0: previous)
void node_update_IV(const unsigned &t, AlgebraicNode *&node_pt)
Helper function.
void node_update_I(const unsigned &t, AlgebraicNode *&node_pt)
Helper function.
void node_update_VIII(const unsigned &t, AlgebraicNode *&node_pt)
Helper function.
void node_update_VI(const unsigned &t, AlgebraicNode *&node_pt)
Helper function.
void node_update_VII(const unsigned &t, AlgebraicNode *&node_pt)
Helper function.
void setup_algebraic_node_update()
Function to setup the algebraic node update.
void node_update_IX(const unsigned &t, AlgebraicNode *&node_pt)
Helper function.
Domain for cylinder with flag as in Turek benchmark.
CylinderWithFlagMesh(Circle *cylinder_pt, GeomObject *top_flag_pt, GeomObject *bottom_flag_pt, GeomObject *tip_flag_pt, const double &length, const double &height, const double &flag_length, const double &flag_height, const double ¢re_x, const double ¢re_y, const double &a, TimeStepper *time_stepper_pt=&Mesh::Default_TimeStepper)
Constructor. Pass the pointers to the GeomObjects that parametrise the cylinder, the three edges of t...
void update_node_update(AlgebraicNode *&node_pt)
Update the node update data for specified node following any mesh adapation.
////////////////////////////////////////////////////////////////////// //////////////////////////////...