47 template<
unsigned DIM>
63 for(
unsigned l=0;l<2;l++)
66 for(
unsigned k=0;k<2;k++)
82 double Psi[2][2], DPsi[2][2];
88 for(
unsigned l=0;l<2;l++)
91 for(
unsigned k=0;k<2;k++)
94 dpsids(l,k,0) = DPsi[l][k];
111 double Psi[2][2], DPsi[2][2], D2Psi[2][2];
118 for(
unsigned l=0;l<2;l++)
121 for(
unsigned k=0;k<2;k++)
123 psi(l,k) = Psi[l][k];
124 dpsids(l,k,0) = DPsi[l][k];
125 d2psids(l,k,0) = D2Psi[l][k];
139 outfile <<
"ZONE I=" << 2 << std::endl;
142 unsigned n_dim = this->nodal_dimension();
145 for(
unsigned l=0;l<2;l++)
148 for(
unsigned i=0;
i<n_dim;
i++)
150 outfile << node_pt(l)->x(
i) <<
" ";
154 unsigned n_position_type = node_pt(l)->nposition_type();
156 for(
unsigned k=1;k<n_position_type;k++)
158 for(
unsigned i=0;
i<n_dim;
i++)
160 outfile << node_pt(l)->x_gen(k,
i) <<
" ";
165 unsigned initial_nvalue = node_pt(l)->nvalue();
167 for(
unsigned i=0;
i<initial_nvalue;
i++)
169 outfile << node_pt(l)->is_pinned(
i) <<
" ";
171 outfile << std::endl;
173 outfile << std::endl;
186 outfile <<
"ZONE I=" << n_plot << std::endl;
189 unsigned n_dim = this->nodal_dimension();
192 for(
unsigned l=0;l<n_plot;l++)
194 s[0] = -1.0 + l*2.0/(n_plot-1);
197 for (
unsigned i=0;
i<n_dim;
i++)
199 outfile << interpolated_x(s,
i) <<
" " ;
201 outfile << std::endl;
203 outfile << std::endl;
216 fprintf(file_pt,
"ZONE I=2\n");
219 unsigned n_dim = this->nodal_dimension();
222 for(
unsigned l=0;l<2;l++)
225 for(
unsigned i=0;
i<n_dim;
i++)
227 fprintf(file_pt,
"%g ",node_pt(l)->x(
i));
231 unsigned n_position_type = node_pt(l)->nposition_type();
233 for(
unsigned k=1;k<n_position_type;k++)
235 for(
unsigned i=0;
i<n_dim;
i++)
237 fprintf(file_pt,
"%g ",node_pt(l)->x_gen(k,
i));
242 unsigned initial_nvalue = node_pt(l)->nvalue();
244 for(
unsigned i=0;
i<initial_nvalue;
i++)
246 fprintf(file_pt,
"%i ",node_pt(l)->is_pinned(
i));
248 fprintf(file_pt,
"\n");
250 fprintf(file_pt,
"\n");
264 fprintf(file_pt,
"ZONE I=%i \n",n_plot);
267 unsigned n_dim = this->nodal_dimension();
270 for(
unsigned l=0;l<n_plot;l++)
272 s[0] = -1.0 + l*2.0/(n_plot-1);
274 for (
unsigned i=0;
i<n_dim;
i++)
276 fprintf(file_pt,
"%g ",interpolated_x(s,
i));
278 fprintf(file_pt,
"\n");
300 face_element_pt->
set_halo(Non_halo_proc_ID);
321 face_element_pt->
node_pt(0) = node_pt(0);
337 face_element_pt->
nbulk_value(0) = required_nvalue(0);
342 face_element_pt->
node_pt(0) = node_pt(1);
358 face_element_pt->
nbulk_value(0) = required_nvalue(1);
363 std::ostringstream error_message;
364 error_message <<
"Face_index should only take " 365 <<
"the values +/-1, not " << face_index << std::endl;
368 OOMPH_CURRENT_FUNCTION,
369 OOMPH_EXCEPTION_LOCATION);
395 psi(0,0) = Psi[0][0][0]*Psi[1][0][0];
397 psi(0,1) = Psi[0][0][1]*Psi[1][0][0];
399 psi(0,2) = Psi[0][0][0]*Psi[1][0][1];
401 psi(0,3) = Psi[0][0][1]*Psi[1][0][1];
405 psi(1,0) = Psi[0][1][0]*Psi[1][0][0];
407 psi(1,1) = Psi[0][1][1]*Psi[1][0][0];
409 psi(1,2) = Psi[0][1][0]*Psi[1][0][1];
411 psi(1,3) = Psi[0][1][1]*Psi[1][0][1];
415 psi(2,0) = Psi[0][0][0]*Psi[1][1][0];
417 psi(2,1) = Psi[0][0][1]*Psi[1][1][0];
419 psi(2,2) = Psi[0][0][0]*Psi[1][1][1];
421 psi(2,3) = Psi[0][0][1]*Psi[1][1][1];
425 psi(3,0) = Psi[0][1][0]*Psi[1][1][0];
427 psi(3,1) = Psi[0][1][1]*Psi[1][1][0];
429 psi(3,2) = Psi[0][1][0]*Psi[1][1][1];
431 psi(3,3) = Psi[0][1][1]*Psi[1][1][1];
444 double DPsi[2][2][2];
455 psi(0,0) = Psi[0][0][0]*Psi[1][0][0];
457 psi(0,1) = Psi[0][0][1]*Psi[1][0][0];
459 psi(0,2) = Psi[0][0][0]*Psi[1][0][1];
461 psi(0,3) = Psi[0][0][1]*Psi[1][0][1];
465 psi(1,0) = Psi[0][1][0]*Psi[1][0][0];
467 psi(1,1) = Psi[0][1][1]*Psi[1][0][0];
469 psi(1,2) = Psi[0][1][0]*Psi[1][0][1];
471 psi(1,3) = Psi[0][1][1]*Psi[1][0][1];
475 psi(2,0) = Psi[0][0][0]*Psi[1][1][0];
477 psi(2,1) = Psi[0][0][1]*Psi[1][1][0];
479 psi(2,2) = Psi[0][0][0]*Psi[1][1][1];
481 psi(2,3) = Psi[0][0][1]*Psi[1][1][1];
485 psi(3,0) = Psi[0][1][0]*Psi[1][1][0];
487 psi(3,1) = Psi[0][1][1]*Psi[1][1][0];
489 psi(3,2) = Psi[0][1][0]*Psi[1][1][1];
491 psi(3,3) = Psi[0][1][1]*Psi[1][1][1];
498 dpsids(0,0,0) = DPsi[0][0][0]*Psi[1][0][0];
499 dpsids(0,1,0) = DPsi[0][0][1]*Psi[1][0][0];
500 dpsids(0,2,0) = DPsi[0][0][0]*Psi[1][0][1];
501 dpsids(0,3,0) = DPsi[0][0][1]*Psi[1][0][1];
504 dpsids(1,0,0) = DPsi[0][1][0]*Psi[1][0][0];
505 dpsids(1,1,0) = DPsi[0][1][1]*Psi[1][0][0];
506 dpsids(1,2,0) = DPsi[0][1][0]*Psi[1][0][1];
507 dpsids(1,3,0) = DPsi[0][1][1]*Psi[1][0][1];
510 dpsids(2,0,0) = DPsi[0][0][0]*Psi[1][1][0];
511 dpsids(2,1,0) = DPsi[0][0][1]*Psi[1][1][0];
512 dpsids(2,2,0) = DPsi[0][0][0]*Psi[1][1][1];
513 dpsids(2,3,0) = DPsi[0][0][1]*Psi[1][1][1];
516 dpsids(3,0,0) = DPsi[0][1][0]*Psi[1][1][0];
517 dpsids(3,1,0) = DPsi[0][1][1]*Psi[1][1][0];
518 dpsids(3,2,0) = DPsi[0][1][0]*Psi[1][1][1];
519 dpsids(3,3,0) = DPsi[0][1][1]*Psi[1][1][1];
524 dpsids(0,0,1) = Psi[0][0][0]*DPsi[1][0][0];
525 dpsids(0,1,1) = Psi[0][0][1]*DPsi[1][0][0];
526 dpsids(0,2,1) = Psi[0][0][0]*DPsi[1][0][1];
527 dpsids(0,3,1) = Psi[0][0][1]*DPsi[1][0][1];
530 dpsids(1,0,1) = Psi[0][1][0]*DPsi[1][0][0];
531 dpsids(1,1,1) = Psi[0][1][1]*DPsi[1][0][0];
532 dpsids(1,2,1) = Psi[0][1][0]*DPsi[1][0][1];
533 dpsids(1,3,1) = Psi[0][1][1]*DPsi[1][0][1];
536 dpsids(2,0,1) = Psi[0][0][0]*DPsi[1][1][0];
537 dpsids(2,1,1) = Psi[0][0][1]*DPsi[1][1][0];
538 dpsids(2,2,1) = Psi[0][0][0]*DPsi[1][1][1];
539 dpsids(2,3,1) = Psi[0][0][1]*DPsi[1][1][1];
542 dpsids(3,0,1) = Psi[0][1][0]*DPsi[1][1][0];
543 dpsids(3,1,1) = Psi[0][1][1]*DPsi[1][1][0];
544 dpsids(3,2,1) = Psi[0][1][0]*DPsi[1][1][1];
545 dpsids(3,3,1) = Psi[0][1][1]*DPsi[1][1][1];
563 double DPsi[2][2][2];
564 double D2Psi[2][2][2];
577 psi(0,0) = Psi[0][0][0]*Psi[1][0][0];
579 psi(0,1) = Psi[0][0][1]*Psi[1][0][0];
581 psi(0,2) = Psi[0][0][0]*Psi[1][0][1];
583 psi(0,3) = Psi[0][0][1]*Psi[1][0][1];
587 psi(1,0) = Psi[0][1][0]*Psi[1][0][0];
589 psi(1,1) = Psi[0][1][1]*Psi[1][0][0];
591 psi(1,2) = Psi[0][1][0]*Psi[1][0][1];
593 psi(1,3) = Psi[0][1][1]*Psi[1][0][1];
597 psi(2,0) = Psi[0][0][0]*Psi[1][1][0];
599 psi(2,1) = Psi[0][0][1]*Psi[1][1][0];
601 psi(2,2) = Psi[0][0][0]*Psi[1][1][1];
603 psi(2,3) = Psi[0][0][1]*Psi[1][1][1];
607 psi(3,0) = Psi[0][1][0]*Psi[1][1][0];
609 psi(3,1) = Psi[0][1][1]*Psi[1][1][0];
611 psi(3,2) = Psi[0][1][0]*Psi[1][1][1];
613 psi(3,3) = Psi[0][1][1]*Psi[1][1][1];
620 dpsids(0,0,0) = DPsi[0][0][0]*Psi[1][0][0];
621 dpsids(0,1,0) = DPsi[0][0][1]*Psi[1][0][0];
622 dpsids(0,2,0) = DPsi[0][0][0]*Psi[1][0][1];
623 dpsids(0,3,0) = DPsi[0][0][1]*Psi[1][0][1];
626 dpsids(1,0,0) = DPsi[0][1][0]*Psi[1][0][0];
627 dpsids(1,1,0) = DPsi[0][1][1]*Psi[1][0][0];
628 dpsids(1,2,0) = DPsi[0][1][0]*Psi[1][0][1];
629 dpsids(1,3,0) = DPsi[0][1][1]*Psi[1][0][1];
632 dpsids(2,0,0) = DPsi[0][0][0]*Psi[1][1][0];
633 dpsids(2,1,0) = DPsi[0][0][1]*Psi[1][1][0];
634 dpsids(2,2,0) = DPsi[0][0][0]*Psi[1][1][1];
635 dpsids(2,3,0) = DPsi[0][0][1]*Psi[1][1][1];
638 dpsids(3,0,0) = DPsi[0][1][0]*Psi[1][1][0];
639 dpsids(3,1,0) = DPsi[0][1][1]*Psi[1][1][0];
640 dpsids(3,2,0) = DPsi[0][1][0]*Psi[1][1][1];
641 dpsids(3,3,0) = DPsi[0][1][1]*Psi[1][1][1];
646 dpsids(0,0,1) = Psi[0][0][0]*DPsi[1][0][0];
647 dpsids(0,1,1) = Psi[0][0][1]*DPsi[1][0][0];
648 dpsids(0,2,1) = Psi[0][0][0]*DPsi[1][0][1];
649 dpsids(0,3,1) = Psi[0][0][1]*DPsi[1][0][1];
652 dpsids(1,0,1) = Psi[0][1][0]*DPsi[1][0][0];
653 dpsids(1,1,1) = Psi[0][1][1]*DPsi[1][0][0];
654 dpsids(1,2,1) = Psi[0][1][0]*DPsi[1][0][1];
655 dpsids(1,3,1) = Psi[0][1][1]*DPsi[1][0][1];
658 dpsids(2,0,1) = Psi[0][0][0]*DPsi[1][1][0];
659 dpsids(2,1,1) = Psi[0][0][1]*DPsi[1][1][0];
660 dpsids(2,2,1) = Psi[0][0][0]*DPsi[1][1][1];
661 dpsids(2,3,1) = Psi[0][0][1]*DPsi[1][1][1];
664 dpsids(3,0,1) = Psi[0][1][0]*DPsi[1][1][0];
665 dpsids(3,1,1) = Psi[0][1][1]*DPsi[1][1][0];
666 dpsids(3,2,1) = Psi[0][1][0]*DPsi[1][1][1];
667 dpsids(3,3,1) = Psi[0][1][1]*DPsi[1][1][1];
677 d2psids(0,0,0) = D2Psi[0][0][0]*Psi[1][0][0];
678 d2psids(0,1,0) = D2Psi[0][0][1]*Psi[1][0][0];
679 d2psids(0,2,0) = D2Psi[0][0][0]*Psi[1][0][1];
680 d2psids(0,3,0) = D2Psi[0][0][1]*Psi[1][0][1];
683 d2psids(1,0,0) = D2Psi[0][1][0]*Psi[1][0][0];
684 d2psids(1,1,0) = D2Psi[0][1][1]*Psi[1][0][0];
685 d2psids(1,2,0) = D2Psi[0][1][0]*Psi[1][0][1];
686 d2psids(1,3,0) = D2Psi[0][1][1]*Psi[1][0][1];
689 d2psids(2,0,0) = D2Psi[0][0][0]*Psi[1][1][0];
690 d2psids(2,1,0) = D2Psi[0][0][1]*Psi[1][1][0];
691 d2psids(2,2,0) = D2Psi[0][0][0]*Psi[1][1][1];
692 d2psids(2,3,0) = D2Psi[0][0][1]*Psi[1][1][1];
695 d2psids(3,0,0) = D2Psi[0][1][0]*Psi[1][1][0];
696 d2psids(3,1,0) = D2Psi[0][1][1]*Psi[1][1][0];
697 d2psids(3,2,0) = D2Psi[0][1][0]*Psi[1][1][1];
698 d2psids(3,3,0) = D2Psi[0][1][1]*Psi[1][1][1];
703 d2psids(0,0,1) = Psi[0][0][0]*D2Psi[1][0][0];
704 d2psids(0,1,1) = Psi[0][0][1]*D2Psi[1][0][0];
705 d2psids(0,2,1) = Psi[0][0][0]*D2Psi[1][0][1];
706 d2psids(0,3,1) = Psi[0][0][1]*D2Psi[1][0][1];
709 d2psids(1,0,1) = Psi[0][1][0]*D2Psi[1][0][0];
710 d2psids(1,1,1) = Psi[0][1][1]*D2Psi[1][0][0];
711 d2psids(1,2,1) = Psi[0][1][0]*D2Psi[1][0][1];
712 d2psids(1,3,1) = Psi[0][1][1]*D2Psi[1][0][1];
715 d2psids(2,0,1) = Psi[0][0][0]*D2Psi[1][1][0];
716 d2psids(2,1,1) = Psi[0][0][1]*D2Psi[1][1][0];
717 d2psids(2,2,1) = Psi[0][0][0]*D2Psi[1][1][1];
718 d2psids(2,3,1) = Psi[0][0][1]*D2Psi[1][1][1];
721 d2psids(3,0,1) = Psi[0][1][0]*D2Psi[1][1][0];
722 d2psids(3,1,1) = Psi[0][1][1]*D2Psi[1][1][0];
723 d2psids(3,2,1) = Psi[0][1][0]*D2Psi[1][1][1];
724 d2psids(3,3,1) = Psi[0][1][1]*D2Psi[1][1][1];
729 d2psids(0,0,2) = DPsi[0][0][0]*DPsi[1][0][0];
730 d2psids(0,1,2) = DPsi[0][0][1]*DPsi[1][0][0];
731 d2psids(0,2,2) = DPsi[0][0][0]*DPsi[1][0][1];
732 d2psids(0,3,2) = DPsi[0][0][1]*DPsi[1][0][1];
735 d2psids(1,0,2) = DPsi[0][1][0]*DPsi[1][0][0];
736 d2psids(1,1,2) = DPsi[0][1][1]*DPsi[1][0][0];
737 d2psids(1,2,2) = DPsi[0][1][0]*DPsi[1][0][1];
738 d2psids(1,3,2) = DPsi[0][1][1]*DPsi[1][0][1];
741 d2psids(2,0,2) = DPsi[0][0][0]*DPsi[1][1][0];
742 d2psids(2,1,2) = DPsi[0][0][1]*DPsi[1][1][0];
743 d2psids(2,2,2) = DPsi[0][0][0]*DPsi[1][1][1];
744 d2psids(2,3,2) = DPsi[0][0][1]*DPsi[1][1][1];
747 d2psids(3,0,2) = DPsi[0][1][0]*DPsi[1][1][0];
748 d2psids(3,1,2) = DPsi[0][1][1]*DPsi[1][1][0];
749 d2psids(3,2,2) = DPsi[0][1][0]*DPsi[1][1][1];
750 d2psids(3,3,2) = DPsi[0][1][1]*DPsi[1][1][1];
762 outfile <<
"ZONE I=" << 2 <<
", J=" << 2 << std::endl;
765 unsigned n_dim = this->nodal_dimension();
768 for(
unsigned l2=0;l2<2;l2++)
770 for(
unsigned l1=0;l1<2;l1++)
772 unsigned l = l2*2 + l1;
775 for(
unsigned i=0;
i<n_dim;
i++)
777 outfile << node_pt(l)->x(
i) <<
" ";
781 unsigned n_position_type = node_pt(l)->nposition_type();
783 for(
unsigned k=1;k<n_position_type;k++)
785 for(
unsigned i=0;
i<n_dim;
i++)
787 outfile << node_pt(l)->x_gen(k,
i) <<
" ";
792 unsigned initial_nvalue = node_pt(l)->nvalue();
794 for(
unsigned i=0;
i<initial_nvalue;
i++)
796 outfile << node_pt(l)->is_pinned(
i) <<
" ";
798 outfile << std::endl;
801 outfile << std::endl;
814 outfile <<
"ZONE I=" << n_plot <<
", J=" << n_plot << std::endl;
817 unsigned n_dim = this->nodal_dimension();
820 for(
unsigned l2=0;l2<n_plot;l2++)
822 s[1] = -1.0 + l2*2.0/(n_plot-1);
824 for(
unsigned l1=0;l1<n_plot;l1++)
826 s[0] = -1.0 + l1*2.0/(n_plot-1);
829 for (
unsigned i=0;
i<n_dim;
i++)
831 outfile << interpolated_x(s,
i) <<
" " ;
835 outfile << std::endl;
853 fprintf(file_pt,
"ZONE I=2, J=2");
856 unsigned n_dim = this->nodal_dimension();
859 for(
unsigned l2=0;l2<2;l2++)
861 for(
unsigned l1=0;l1<2;l1++)
863 unsigned l = l2*2 + l1;
866 for(
unsigned i=0;
i<n_dim;
i++)
868 fprintf(file_pt,
"%g ",node_pt(l)->x(
i));
872 unsigned n_position_type = node_pt(l)->nposition_type();
874 for(
unsigned k=1;k<n_position_type;k++)
876 for(
unsigned i=0;
i<n_dim;
i++)
878 fprintf(file_pt,
"%g ",node_pt(l)->x_gen(k,
i));
883 unsigned initial_nvalue = node_pt(l)->nvalue();
885 for(
unsigned i=0;
i<initial_nvalue;
i++)
887 fprintf(file_pt,
"%i ",node_pt(l)->is_pinned(
i));
889 fprintf(file_pt,
"\n");
892 fprintf(file_pt,
"\n");
905 fprintf(file_pt,
"ZONE I=%i, J=%i \n",n_plot,n_plot);
908 unsigned n_dim = this->nodal_dimension();
911 for(
unsigned l2=0;l2<n_plot;l2++)
913 s[1] = -1.0 + l2*2.0/(n_plot-1);
914 for(
unsigned l1=0;l1<n_plot;l1++)
916 s[0] = -1.0 + l1*2.0/(n_plot-1);
919 for (
unsigned i=0;
i<n_dim;
i++)
921 fprintf(file_pt,
"%g ",interpolated_x(s,
i));
925 fprintf(file_pt,
"\n");
953 face_element_pt->
set_halo(Non_halo_proc_ID);
986 unsigned bulk_number;
997 for(
unsigned i=0;
i<2;
i++)
1000 face_element_pt->
node_pt(
i) = node_pt(bulk_number);
1004 face_element_pt->
nbulk_value(
i) = required_nvalue(bulk_number);
1020 for(
unsigned i=0;
i<2;
i++)
1023 face_element_pt->
node_pt(
i) = node_pt(bulk_number);
1027 face_element_pt->
nbulk_value(
i) = required_nvalue(bulk_number);
1043 for(
unsigned i=0;
i<2;
i++)
1045 bulk_number = 2*
i + 1;
1046 face_element_pt->
node_pt(
i) = node_pt(bulk_number);
1050 face_element_pt->
nbulk_value(
i) = required_nvalue(bulk_number);
1066 for(
unsigned i=0;
i<2;
i++)
1068 bulk_number = 2 +
i;
1069 face_element_pt->
node_pt(
i) = node_pt(bulk_number);
1073 face_element_pt->
nbulk_value(
i) = required_nvalue(bulk_number);
1082 std::ostringstream error_message;
1083 error_message <<
"Face index should only take the values +/- 1 or +/- 2," 1084 <<
" not " << face_index << std::endl;
1086 OOMPH_CURRENT_FUNCTION,
1087 OOMPH_EXCEPTION_LOCATION);
1100 template<
unsigned DIM>
1111 const unsigned &n_plot)
1117 outfile <<
"ZONE I=" << n_plot << std::endl;
1120 unsigned n_dim = this->nodal_dimension();
1123 unsigned n_lagr =
static_cast<SolidNode*
>(node_pt(0))->nlagrangian();
1126 for(
unsigned l=0;l<n_plot;l++)
1128 s[0] = -1.0 + l*2.0/(n_plot-1);
1131 for (
unsigned i=0;
i<n_dim;
i++)
1133 outfile << interpolated_x(s,
i) <<
" " ;
1137 for(
unsigned i=0;
i<n_lagr;
i++)
1139 outfile << interpolated_xi(s,
i) <<
" " ;
1141 outfile << std::endl;
1150 template<
unsigned DIM>
1161 const unsigned &n_plot)
1167 fprintf(file_pt,
"ZONE I=%i\n",n_plot);
1170 unsigned n_dim = this->nodal_dimension();
1173 unsigned n_lagr =
static_cast<SolidNode*
>(node_pt(0))->nlagrangian();
1176 for(
unsigned l=0;l<n_plot;l++)
1178 s[0] = -1.0 + l*2.0/(n_plot-1);
1181 for (
unsigned i=0;
i<n_dim;
i++)
1183 fprintf(file_pt,
"%g ",interpolated_x(s,
i));
1187 for(
unsigned i=0;
i<n_lagr;
i++)
1189 fprintf(file_pt,
"%g ",interpolated_xi(s,
i));
1191 fprintf(file_pt,
"\n");
1211 outfile <<
"ZONE I=" << n_p <<
", J=" << n_p << std::endl;
1214 unsigned n_dim = this->nodal_dimension();
1217 unsigned n_lagr =
static_cast<SolidNode*
>(node_pt(0))->nlagrangian();
1220 for(
unsigned l2=0;l2<n_p;l2++)
1222 s[1] = -1.0 + l2*2.0/(n_p-1);
1223 for(
unsigned l1=0;l1<n_p;l1++)
1225 s[0] = -1.0 + l1*2.0/(n_p-1);
1228 for (
unsigned i=0;
i<n_dim;
i++)
1230 outfile << interpolated_x(s,
i) <<
" " ;
1234 for(
unsigned i=0;
i<n_lagr;
i++)
1236 outfile << interpolated_xi(s,
i) <<
" " ;
1238 outfile << std::endl;
1241 outfile << std::endl;
1255 fprintf(file_pt,
"ZONE I=%i, J=%i\n",n_plot,n_plot);
1258 unsigned n_dim = this->nodal_dimension();
1261 unsigned n_lagr =
static_cast<SolidNode*
>(node_pt(0))->nlagrangian();
1264 for(
unsigned l2=0;l2<n_plot;l2++)
1266 s[1] = -1.0 + l2*2.0/(n_plot-1);
1267 for(
unsigned l1=0;l1<n_plot;l1++)
1269 s[0] = -1.0 + l1*2.0/(n_plot-1);
1272 for (
unsigned i=0;
i<n_dim;
i++)
1274 fprintf(file_pt,
"%g ",interpolated_x(s,
i));
1278 for(
unsigned i=0;
i<n_lagr;
i++)
1280 fprintf(file_pt,
"%g ",interpolated_xi(s,
i));
1282 fprintf(file_pt,
"\n");
1285 fprintf(file_pt,
"\n");
1296 template<
unsigned DIM>
1307 set_lagrangian_dimension(static_cast<SolidNode*>(node_pt(0))->nlagrangian());
void face1(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the south face (s1 = -1.0)
void shape(const double &s, double Psi[2][2])
Constructor sets the values of the shape functions at the position s.
void face0(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s0 = -1.0.
void face1(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s0 = 1.0.
void face2(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the east face (s0 = 1.0)
int & face_index()
Index of the face (a number that uniquely identifies the face in the element)
void faces0(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for the east and west faces, along which s0 is fixed.
void d2shape(const double &s, double DPsi[2][2])
Second derivatives of the Hermite shape functions.
BulkCoordinateDerivativesFctPt & bulk_coordinate_derivatives_fct_pt()
Return the pointer to the function that returns the derivatives of the bulk coordinates wrt the face ...
void build_face_element(const int &face_index, FaceElement *face_element_pt)
Build the lower-dimensional FaceElement of the type QHermiteElement<DIM-1>. The face index takes a va...
void shape(const Vector< double > &s, Shape &psi) const
Function to calculate the geometric shape functions at local coordinate s.
unsigned & bulk_node_number(const unsigned &n)
Return the bulk node number that corresponds to the n-th local node number.
int & normal_sign()
Sign of outer unit normal (relative to cross-products of tangent vectors in the corresponding "bulk" ...
void faces1(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for the north and south faces, along which s1 is fixed.
void bulk_position_type_resize(const unsigned &i)
Resize the storage for bulk_position_type to i entries.
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
Function to compute the geometric shape functions and also first and second derivatives wrt local coo...
void output(std::ostream &outfile)
Overload the output function.
void set_halo(const unsigned &non_halo_proc_ID)
Label the element as halo and specify processor that holds non-halo counterpart.
void nbulk_value_resize(const unsigned &i)
Resize the storage for the number of values originally stored at the local nodes to i entries...
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
void output(std::ostream &outfile)
Output with default number of plot points.
unsigned & bulk_position_type(const unsigned &i)
Return the position type in the "bulk" element that corresponds to position type i on the FaceElement...
void dshape(const double &s, double DPsi[2][2])
Derivatives of 1D Hermite shape functions.
void faces0(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for both faces – the bulk coordinate is fixed on both.
A Class for nodes that deform elastically (i.e. position is an unknown in the problem). The idea is that the Eulerian positions are stored in a Data object and the Lagrangian coordinates are stored in addition. The pointer that addresses the Eulerian positions is set to the pointer to Value in the Data object. Hence, SolidNode uses knowledge of the internal structure of Data and must be a friend of the Data class. In order to allow a mesh to deform via an elastic-style equation in deforming-domain problems, the positions are stored separately from the values, so that elastic problems may be combined with any other type of problem.
void face0(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the west face (s0 = -1.0)
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Function to compute the geometric shape functions and derivatives w.r.t. local coordinates at local c...
static Gauss< DIM, 3 > Default_integration_scheme
Default integration rule: Gaussian integration of same 'order' as the element.
FiniteElement *& bulk_element_pt()
Pointer to higher-dimensional "bulk" element.
void set_nodal_dimension(const unsigned &nodal_dim)
Set the dimension of the nodes in the element. This will typically only be required when constructing...
CoordinateMappingFctPt & face_to_bulk_coordinate_fct_pt()
Return the pointer to the function that maps the face coordinate to the bulk coordinate.
void bulk_node_number_resize(const unsigned &i)
Resize the storage for the bulk node numbers.
unsigned & nbulk_value(const unsigned &n)
Return the number of values originally stored at local node n (before the FaceElement added additiona...
void face3(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the north face (s1 = 1.0)
SolidFiniteElement class.
void output(std::ostream &outfile)
Output.