31 #ifndef OOMPH_TELEMENT_HEADER 32 #define OOMPH_TELEMENT_HEADER 36 #include <oomph-lib-config.h> 71 if ( (node1_pt==node2_pt) || (node2_pt==node3_pt) || (node1_pt==node3_pt) )
74 std::ostringstream error_stream;
75 error_stream <<
"TFace cannot have two identical vertex nodes\n";
78 OOMPH_CURRENT_FUNCTION,
79 OOMPH_EXCEPTION_LOCATION);
84 std::set<Node*> nodes;
85 nodes.insert(node1_pt);
86 nodes.insert(node2_pt);
87 nodes.insert(node3_pt);
88 std::set<Node*>::iterator it=nodes.begin();
174 return ((dynamic_cast<BoundaryNodeBase*>(
Node1_pt)!=0)&&
175 (dynamic_cast<BoundaryNodeBase*>(
Node2_pt)!=0)&&
176 (dynamic_cast<BoundaryNodeBase*>(
Node3_pt)!=0));
185 std::set<unsigned> set1;
186 std::set<unsigned>* set1_pt=&set1;
188 std::set<unsigned> set2;
189 std::set<unsigned>* set2_pt=&set2;
191 std::set<unsigned> set3;
192 std::set<unsigned>* set3_pt=&set3;
194 std::set<unsigned> aux_set;
195 set_intersection((*set1_pt).begin(),(*set1_pt).end(),
196 (*set2_pt).begin(),(*set2_pt).end(),
197 inserter(aux_set, aux_set.begin()));
198 set_intersection(aux_set.begin(),aux_set.end(),
199 (*set3_pt).begin(),(*set3_pt).end(),
200 inserter((*boundaries_pt), (*boundaries_pt).begin()));
233 template<
unsigned DIM,
unsigned NNODE_1D>
262 std::ostringstream error_message;
263 error_message <<
"Element only has two nodes; called with node number " 267 OOMPH_CURRENT_FUNCTION,
268 OOMPH_EXCEPTION_LOCATION);
306 this->dshape_local(s, psi,dpsids);
340 std::ostringstream error_message;
342 <<
"Element only has three nodes; called with node number " 346 OOMPH_CURRENT_FUNCTION,
347 OOMPH_EXCEPTION_LOCATION);
357 psi[0] = 2.0*(s[0] - 1.0)*(s[0]-0.5);
358 psi[1] = 4.0*(1.0-s[0])*s[0];
359 psi[2] = 2.0*(s[0] - 0.5)*s[0];
372 dpsids(0,0) = 4.0*s[0] - 3.0;
373 dpsids(1,0) = 4.0 - 8.0*s[0];
374 dpsids(2,0) = 4.0*s[0] - 1.0;
388 this->dshape_local(s, psi,dpsids);
427 std::ostringstream error_message;
428 error_message <<
"Element only has four nodes; called with node number " 432 OOMPH_CURRENT_FUNCTION,
433 OOMPH_EXCEPTION_LOCATION);
443 psi[0] = 0.5*(1.0 - s[0])*(3.0*s[0] -2.0)*(3.0*s[0] - 1.0);
444 psi[1] = -4.5*s[0]*(1.0-s[0])*(3.0*s[0] - 2.0);
445 psi[2] = 4.5*s[0]*(1.0-s[0])*(3.0*s[0] - 1.0);
446 psi[3] = 0.5*s[0]*(3.0*s[0] -2.0)*(3.0*s[0] - 1.0);
458 dpsids(0,0) = -13.5*s[0]*s[0] + 18.0*s[0] - 5.5;
459 dpsids(1,0) = 40.5*s[0]*s[0] - 45.0*s[0] + 9.0;
460 dpsids(2,0) = -40.5*s[0]*s[0] + 36.0*s[0] - 4.5;
461 dpsids(3,0) = 13.5*s[0]*s[0] - 9.0*s[0] + 1.0;
474 OOMPH_CURRENT_FUNCTION,
475 OOMPH_EXCEPTION_LOCATION);
478 this->dshape_local(s, psi,dpsids);
520 std::ostringstream error_message;
521 error_message <<
"Element only has three nodes; called with node number " 525 OOMPH_CURRENT_FUNCTION,
526 OOMPH_EXCEPTION_LOCATION);
538 psi[2] = 1.0-s[0]-s[1];
571 this->dshape_local(s, psi,dpsids);
573 for(
unsigned i=0;
i<3;
i++)
627 std::ostringstream error_message;
628 error_message <<
"Element only has six nodes; called with node number " 632 OOMPH_CURRENT_FUNCTION,
633 OOMPH_EXCEPTION_LOCATION);
644 double s_2=1.0-s[0]-s[1];
649 psi[0] = 2.0*s[0]*(s[0]-0.5);
650 psi[1] = 2.0*s[1]*(s[1]-0.5);
651 psi[2] = 2.0*s_2 *(s_2 -0.5);
652 psi[3] = 4.0*s[0]*s[1];
653 psi[4] = 4.0*s[1]*s_2;
654 psi[5] = 4.0*s_2*s[0];
667 dpsids(0,0) = 4.0*s[0]-1.0;
670 dpsids(1,1) = 4.0*s[1]-1.0;
671 dpsids(2,0) = 2.0*(2.0*s[0]-1.5+2.0*s[1]);
672 dpsids(2,1) = 2.0*(2.0*s[0]-1.5+2.0*s[1]);
673 dpsids(3,0) = 4.0*s[1];
674 dpsids(3,1) = 4.0*s[0];
675 dpsids(4,0) = -4.0*s[1];
676 dpsids(4,1) = 4.0*(1.0-s[0]-2.0*s[1]);
677 dpsids(5,0) = 4.0*(1.0-2.0*s[0]-s[1]);
678 dpsids(5,1) = -4.0*s[0];
694 this->dshape_local(s, psi,dpsids);
788 std::ostringstream error_message;
789 error_message <<
"Element only has ten nodes; called with node number " 793 OOMPH_CURRENT_FUNCTION,
794 OOMPH_EXCEPTION_LOCATION);
804 psi[0] = 0.5*s[0]*(3.0*s[0]-2.0)*(3.0*s[0]-1.0);
805 psi[1] = 0.5*s[1]*(3.0*s[1]-2.0)*(3.0*s[1]-1.0);
806 psi[2] = 0.5*(1.0-s[0]-s[1])*(1.0-3.0*s[0]-3.0*s[1])*(2.0-3.0*s[0]-3.0*s[1]);
807 psi[3] = 4.5*s[0]*s[1]*(3.0*s[0]-1.0);
808 psi[4] = 4.5*s[0]*s[1]*(3.0*s[1]-1.0);
809 psi[5] = 4.5*s[1]*(1.0-s[0]-s[1])*(3.0*s[1]-1.0);
810 psi[6] = 4.5*s[1]*(1.0-s[0]-s[1])*(3.0*(1.0-s[0]-s[1])-1.0);
811 psi[7] = 4.5*s[0]*(1.0-s[0]-s[1])*(2.0-3*s[0]-3*s[1]);
812 psi[8] = 4.5*s[0]*(1.0-s[0]-s[1])*(3.0*s[0]-1.0);
813 psi[9] = 27.0*s[0]*s[1]*(1.0-s[0]-s[1]);
826 dpsids(0,0) = 13.5*s[0]*s[0]-9.0*s[0]+1.0;
829 dpsids(1,1) = 13.5*s[1]*s[1]-9.0*s[1]+1.0;
830 dpsids(2,0) = 0.5*(36.0*s[0]+36.0*s[1]-27.0*s[0]*s[0]-
831 27.0*s[1]*s[1]-54.0*s[0]*s[1]-11.0);
832 dpsids(2,1) = 0.5*(36.0*s[0]+36.0*s[1]-27.0*s[0]*s[0]-
833 27.0*s[1]*s[1]-54.0*s[0]*s[1]-11.0);
834 dpsids(3,0) = 27.0*s[0]*s[1]-4.5*s[1];
835 dpsids(3,1) = 4.5*s[0]*(3.0*s[0]-1.0);
836 dpsids(4,0) = 4.5*s[1]*(3.0*s[1]-1.0);
837 dpsids(4,1) = 27.0*s[0]*s[1]-4.5*s[0];
838 dpsids(5,0) = 4.5*(s[1]-3.0*s[1]*s[1]);
839 dpsids(5,1) = 4.5*(s[0]-6.0*s[0]*s[1]-9.0*s[1]*s[1]+8*s[1]-1.0);
840 dpsids(6,0) = 4.5*(6.0*s[0]*s[1]-5.0*s[1]+6.0*s[1]*s[1]);
841 dpsids(6,1) = 4.5*(2.0-5.0*s[0]+3.0*s[0]*s[0]+12.0*s[0]*s[1]-
842 10.0*s[1]+9.0*s[1]*s[1]);
843 dpsids(7,0) = 4.5*(2.0-10.0*s[0]+9.0*s[0]*s[0]+12.0*s[0]*s[1]-
844 5.0*s[1]+3.0*s[1]*s[1]);
845 dpsids(7,1) = 4.5*(6.0*s[0]*s[0]-5.0*s[0]+6.0*s[0]*s[1]);
846 dpsids(8,0) = 4.5*(s[1]-6.0*s[0]*s[1]-9.0*s[0]*s[0]+8*s[0]-1.0);
847 dpsids(8,1) = 4.5*(s[0]-3.0*s[0]*s[0]);
848 dpsids(9,0) = 27.0*s[1]-54.0*s[0]*s[1]-27.0*s[1]*s[1];
849 dpsids(9,1) = 27.0*s[0]-54.0*s[0]*s[1]-27.0*s[0]*s[0];
865 OOMPH_CURRENT_FUNCTION,
866 OOMPH_EXCEPTION_LOCATION);
869 this->dshape_local(s, psi,dpsids);
871 d2psids(0,0) = 9.0*(3.0*s[0]-1.0);
876 d2psids(1,2) = 9.0*(3.0*s[1]-1.0);
877 d2psids(2,0) = 9.0*(2.0-3.0*s[0]-3.0*s[1]);
878 d2psids(2,1) = 9.0*(2.0-3.0*s[0]-3.0*s[1]);
879 d2psids(2,2) = 9.0*(2.0-3.0*s[0]-3.0*s[1]);
880 d2psids(3,0) = 27.0*s[1];
882 d2psids(3,2) = 27.0*s[0]-4.5;
884 d2psids(4,1) = 27.0*s[0];
885 d2psids(4,2) = 27.0*s[1]-4.5;
887 d2psids(5,1) = 9.0*(4.0-3.0*s[0]-9.0*s[1]);
888 d2psids(5,2) = 4.5*(1.0-6.0*s[1]);
889 d2psids(6,0) = 27.0*s[1];
890 d2psids(6,1) = 9.0*(6.0*s[0]+9.0*s[1]-5.0);
891 d2psids(6,2) = 4.5*(6.0*s[0]+12.0*s[1]-5.0);
892 d2psids(8,0) = 9.0*(4.0-9.0*s[0]-3.0*s[1]);
894 d2psids(8,2) = 4.5*(1.0-6.0*s[0]);
895 d2psids(7,0) = 9.0*(9.0*s[0]+6.0*s[1]-5.0);
896 d2psids(7,1) = 27.0*s[0];
897 d2psids(7,2) = 4.5*(12.0*s[0]+6.0*s[1]-5.0);
898 d2psids(9,0) = -54.0*s[1];
899 d2psids(9,1) = -54.0*s[0];
900 d2psids(9,2) = 27.0-54.0*s[0]-54.0*s[1];
914 template<
unsigned DIM,
unsigned NNODE_1D>
984 std::ostringstream error_message;
986 "Element only has seven nodes; called with node number " 990 OOMPH_CURRENT_FUNCTION,
991 OOMPH_EXCEPTION_LOCATION);
1002 const double s_2=1.0-s[0]-s[1];
1005 const double cubic_bubble = s[0]*s[1]*s_2;
1013 psi[0] = 2.0*s[0]*(s[0]-0.5) + 3.0*cubic_bubble;
1014 psi[1] = 2.0*s[1]*(s[1]-0.5) + 3.0*cubic_bubble;
1015 psi[2] = 2.0*s_2 *(s_2 -0.5) + 3.0*cubic_bubble;
1016 psi[3] = 4.0*s[0]*s[1] - 12.0*cubic_bubble;
1017 psi[4] = 4.0*s[1]*s_2 - 12.0*cubic_bubble;
1018 psi[5] = 4.0*s_2*s[0] - 12.0*cubic_bubble;
1020 psi[6] = 27.0*cubic_bubble;
1031 this->
shape(s, psi);
1034 const double d_bubble_ds0 = s[1]*(1.0 - s[1] - 2.0*s[0]);
1035 const double d_bubble_ds1 = s[0]*(1.0 - s[0] - 2.0*s[1]);
1038 dpsids(0,0) = 4.0*s[0]-1.0 + 3.0*d_bubble_ds0;
1039 dpsids(0,1) = 0.0 + 3.0*d_bubble_ds1;
1040 dpsids(1,0) = 0.0 + 3.0*d_bubble_ds0;
1041 dpsids(1,1) = 4.0*s[1]-1.0 + 3.0*d_bubble_ds1;
1042 dpsids(2,0) = 2.0*(2.0*s[0]-1.5+2.0*s[1]) + 3.0*d_bubble_ds0;
1043 dpsids(2,1) = 2.0*(2.0*s[0]-1.5+2.0*s[1]) + 3.0*d_bubble_ds1;
1044 dpsids(3,0) = 4.0*s[1] - 12.0*d_bubble_ds0;
1045 dpsids(3,1) = 4.0*s[0] - 12.0*d_bubble_ds1;
1046 dpsids(4,0) = -4.0*s[1] - 12.0*d_bubble_ds0;
1047 dpsids(4,1) = 4.0*(1.0-s[0]-2.0*s[1]) - 12.0*d_bubble_ds1;
1048 dpsids(5,0) = 4.0*(1.0-2.0*s[0]-s[1]) - 12.0*d_bubble_ds0;
1049 dpsids(5,1) = -4.0*s[0] - 12.0*d_bubble_ds1;
1050 dpsids(6,0) = 27.0*d_bubble_ds0;
1051 dpsids(6,1) = 27.0*d_bubble_ds1;
1068 this->dshape_local(s, psi,dpsids);
1071 const double d2_bubble_ds0 = -2.0*s[1];
1072 const double d2_bubble_ds1 = -2.0*s[0];
1073 const double d2_bubble_ds2 = 1.0 - 2.0*s[0] - 2.0*s[1];
1075 d2psids(0,0) = 4.0 + 3.0*d2_bubble_ds0;
1076 d2psids(0,1) = 0.0 + 3.0*d2_bubble_ds1;
1077 d2psids(0,2) = 0.0 + 3.0*d2_bubble_ds2;
1079 d2psids(1,0) = 0.0 + 3.0*d2_bubble_ds0;
1080 d2psids(1,1) = 4.0 + 3.0*d2_bubble_ds1;
1081 d2psids(1,2) = 0.0 + 3.0*d2_bubble_ds2;
1083 d2psids(2,0) = 4.0 + 3.0*d2_bubble_ds0;
1084 d2psids(2,1) = 4.0 + 3.0*d2_bubble_ds1;
1085 d2psids(2,2) = 4.0 + 3.0*d2_bubble_ds2;
1087 d2psids(3,0) = 0.0 - 12.0*d2_bubble_ds0;
1088 d2psids(3,1) = 0.0 - 12.0*d2_bubble_ds1;
1089 d2psids(3,2) = 4.0 - 12.0*d2_bubble_ds2;
1091 d2psids(4,0) = 0.0 - 12.0*d2_bubble_ds0;
1092 d2psids(4,1) = -8.0 - 12.0*d2_bubble_ds1;
1093 d2psids(4,2) = -4.0 - 12.0*d2_bubble_ds2;
1095 d2psids(5,0) = -8.0 - 12.0*d2_bubble_ds0;
1096 d2psids(5,1) = 0.0 - 12.0*d2_bubble_ds1;
1097 d2psids(5,2) = -4.0 - 12.0*d2_bubble_ds2;
1099 d2psids(6,0) = 27.0*d2_bubble_ds0;
1100 d2psids(6,1) = 27.0*d2_bubble_ds1;
1101 d2psids(6,2) = 27.0*d2_bubble_ds2;
1183 unsigned ncoord=dim();
1185 for (
unsigned i=0;
i<ncoord;
i++)
1211 unsigned ncoord=dim();
1213 for (
unsigned i=0;
i<ncoord;
i++)
1216 if (s[
i]<0.0) s[
i]=0.0;
1221 double excess=sum-1.0;
1225 double sub=excess/double(ncoord);
1226 for (
unsigned i=0;
i<ncoord;
i++)
1242 template<
unsigned DIM,
unsigned NNODE_1D>
1254 template<
unsigned NNODE_1D>
1281 "One-dimensional TElements are currently only implemented for\n";
1283 "three and six nodes, i.e. NNODE_1D=2 , 3 , 4\n";
1286 OOMPH_CURRENT_FUNCTION,
1287 OOMPH_EXCEPTION_LOCATION);
1291 unsigned n_node = NNODE_1D;
1292 this->set_n_node(n_node);
1298 set_integration_scheme(&Default_integration_scheme);
1338 return node_pt(NNODE_1D-1);
1343 std::ostringstream error_message;
1345 <<
"Element only has two vertex nodes; called with node number " 1348 OOMPH_CURRENT_FUNCTION,
1349 OOMPH_EXCEPTION_LOCATION);
1377 {
return FiniteElement::invert_jacobian<1>(jacobian,inverse_jacobian);}
1407 const unsigned& nplot,
1408 unsigned& counter)
const 1411 unsigned plot=nsub_elements_paraview(nplot);
1414 for(
unsigned i=0;
i<plot;
i++)
1416 file_out <<
i+counter <<
" " 1420 counter+=nplot_points_paraview(nplot);
1427 const unsigned& nplot)
const 1429 unsigned local_loop=nsub_elements_paraview(nplot);
1430 for(
unsigned i=0;
i<local_loop;
i++)
1432 file_out <<
"3" << std::endl;
1440 const unsigned& nplot,
1441 unsigned& offset_sum)
const 1444 unsigned local_loop=nsub_elements_paraview(nplot);
1445 for(
unsigned i=0;
i<local_loop;
i++)
1448 file_out << offset_sum << std::endl;
1456 void output(std::ostream &outfile,
const unsigned &nplot);
1459 void output(FILE* file_pt);
1462 void output(FILE* file_pt,
const unsigned &n_plot);
1468 const unsigned& nplot,
1470 const bool& use_equally_spaced_interior_sample_points=
false)
const 1474 s[0] = double(i)/double(nplot-1);
1476 if (use_equally_spaced_interior_sample_points)
1479 double dx_new=range/double(nplot);
1480 double range_new=double(nplot-1)*dx_new;
1481 s[0]=0.5*dx_new+range_new*s[0]/range;
1494 std::ostringstream header;
1495 header <<
"ZONE I=" << nplot <<
"\n";
1496 return header.str();
1509 void build_face_element(
const int &face_index,
1521 template<
unsigned NNODE_1D>
1528 static const unsigned Node_on_face[3][NNODE_1D];
1552 "Triangles are currently only implemented for\n";
1554 "three and six nodes, i.e. NNODE_1D=2 , 3 , 4\n";
1557 OOMPH_CURRENT_FUNCTION,
1558 OOMPH_EXCEPTION_LOCATION);
1562 unsigned n_node = (NNODE_1D*(NNODE_1D+1))/2;
1563 this->set_n_node(n_node);
1569 set_integration_scheme(&Default_integration_scheme);
1576 if(!allow_high_order)
1584 unsigned n_node = (NNODE_1D*(NNODE_1D+1))/2;
1585 this->set_n_node(n_node);
1591 set_integration_scheme(&Default_integration_scheme);
1621 const unsigned&
i)
const 1623 return Node_on_face[face_index][
i];
1633 std::ostringstream error_message;
1635 <<
"Element only has three vertex nodes; called with node number " 1638 OOMPH_CURRENT_FUNCTION,
1639 OOMPH_EXCEPTION_LOCATION);
1669 {
return FiniteElement::invert_jacobian<2>(jacobian,inverse_jacobian);}
1685 unsigned node_sum=0;
1686 for(
unsigned i=1;
i<=nplot;
i++) {node_sum+=
i;}
1694 unsigned local_sum=0;
1695 for(
unsigned i=1;
i<nplot;
i++) {local_sum+=2*(nplot-
i-1)+1;}
1703 const unsigned& nplot,
1704 unsigned& counter)
const 1710 unsigned node_count=0;
1711 for(
unsigned i=0;
i<nplot-1;
i++)
1713 for(
unsigned j=0;j<nplot-
i-1;j++)
1715 file_out << j+node_count+counter<<
" " 1716 << j+node_count+1+counter <<
" " 1717 << j+nplot+node_count-i+counter << std::endl;
1721 file_out << j+node_count+1+counter <<
" " 1722 << j+nplot+node_count-i+1+counter <<
" " 1723 << j+nplot+node_count-i+counter << std::endl;
1726 node_count+=(nplot-
i);
1728 counter+=nplot_points_paraview(nplot);
1735 const unsigned& nplot)
const 1737 unsigned local_loop=nsub_elements_paraview(nplot);
1740 for(
unsigned i=0;
i<local_loop;
i++)
1742 file_out <<
"5" << std::endl;
1750 const unsigned& nplot,
1751 unsigned& offset_sum)
const 1753 unsigned local_loop=nsub_elements_paraview(nplot);
1756 for(
unsigned i=0;
i<local_loop;
i++)
1759 file_out << offset_sum << std::endl;
1767 void output(std::ostream &outfile,
const unsigned &nplot);
1770 void output(FILE* file_pt);
1773 void output(FILE* file_pt,
const unsigned &n_plot);
1778 const unsigned& iplot,
1779 const unsigned& nplot,
1781 const bool& use_equally_spaced_interior_sample_points=
false)
const 1786 for(
i=0;
i<nplot;++
i)
1788 for(j=0;j<nplot-
i;++j)
1792 s[0] = double(j)/double(nplot-1);
1793 s[1] = double(i)/double(nplot-1);
1794 if (use_equally_spaced_interior_sample_points)
1797 double dx_new=range/(double(nplot)+0.5);
1798 double range_new=double(nplot-1)*dx_new;
1799 s[0]=0.5*dx_new+range_new*s[0]/range;
1800 s[1]=0.5*dx_new+range_new*s[1]/range;
1819 std::ostringstream header;
1821 for (
unsigned i=1;
i<nplot;
i++) {nel+=2*
i-1;}
1822 header <<
"ZONE N=" << nplot_points(nplot) <<
", E=" 1823 << nel <<
", F=FEPOINT, ET=TRIANGLE\n";
1824 return header.str();
1832 const unsigned& nplot)
const 1836 unsigned nod_count=1;
1837 for(
unsigned i=0;
i<nplot;
i++)
1839 for(
unsigned j=0;j<nplot-
i;j++)
1843 outfile << nod_count <<
" " << nod_count+1
1844 <<
" " << nod_count+nplot-i << std::endl;
1847 outfile << nod_count+1 <<
" " 1848 << nod_count+nplot-i+1 <<
" " 1849 << nod_count+nplot-i << std::endl;
1862 const unsigned& nplot)
const 1866 unsigned nod_count=1;
1867 for(
unsigned i=0;
i<nplot;
i++)
1869 for(
unsigned j=0;j<nplot-
i;j++)
1873 fprintf(file_pt,
"%i %i %i \n",nod_count,nod_count+1,
1877 fprintf(file_pt,
"%i %i %i \n",nod_count+1,nod_count+nplot-i+1,
1891 for (
unsigned i=1;
i<=nplot;
i++) {np+=
i;}
1901 void build_face_element(
const int &face_index,
1952 std::ostringstream error_message;
1953 error_message <<
"Element only has four nodes; called with node number " 1957 OOMPH_CURRENT_FUNCTION,
1958 OOMPH_EXCEPTION_LOCATION);
1972 psi[3] = 1.0-s[0]-s[1]-s[2];
1983 this->
shape(s, psi);
2020 this->dshape_local(s, psi,dpsids);
2022 for(
unsigned i=0;
i<4;
i++)
2112 std::ostringstream error_message;
2113 error_message <<
"Element only has ten nodes; called with node number " 2117 OOMPH_CURRENT_FUNCTION,
2118 OOMPH_EXCEPTION_LOCATION);
2129 double s3=1.0-s[0]-s[1]-s[2];
2130 psi[0] = (2.0*s[0]-1.0)*s[0];
2131 psi[1] = (2.0*s[1]-1.0)*s[1];
2132 psi[2] = (2.0*s[2]-1.0)*s[2];
2133 psi[3] = (2.0*s3-1.0)*s3;
2134 psi[4] = 4.0*s[0]*s[1];
2135 psi[5] = 4.0*s[0]*s[2];
2136 psi[6] = 4.0*s[0]*s3;
2137 psi[7] = 4.0*s[1]*s[2];
2138 psi[8] = 4.0*s[2]*s3;
2139 psi[9] = 4.0*s[1]*s3;
2150 this->
shape(s, psi);
2153 double s3=1.0-s[0]-s[1]-s[2];
2155 dpsids(0,0) = 4.0*s[0]-1.0;
2160 dpsids(1,1) = 4.0*s[1]-1.0;
2165 dpsids(2,2) = 4.0*s[2]-1.0;
2167 dpsids(3,0) = -4.0*s3+1.0;
2168 dpsids(3,1) = -4.0*s3+1.0;
2169 dpsids(3,2) = -4.0*s3+1.0;
2171 dpsids(4,0) = 4.0*s[1];
2172 dpsids(4,1) = 4.0*s[0];
2175 dpsids(5,0) = 4.0*s[2];
2177 dpsids(5,2) = 4.0*s[0];
2179 dpsids(6,0) = 4.0*(s3-s[0]);
2180 dpsids(6,1) = -4.0*s[0];
2181 dpsids(6,2) = -4.0*s[0];
2184 dpsids(7,1) = 4.0*s[2];
2185 dpsids(7,2) = 4.0*s[1];
2187 dpsids(8,0) = -4.0*s[2];
2188 dpsids(8,1) = -4.0*s[2];
2189 dpsids(8,2) = 4.0*(s3-s[2]);
2191 dpsids(9,0) = -4.0*s[1];
2192 dpsids(9,1) = 4.0*(s3-s[1]);
2193 dpsids(9,2) = -4.0*s[1];
2214 this->dshape_local(s, psi,dpsids);
2266 d2psids(6,3) = -4.0;
2267 d2psids(6,4) = -4.0;
2279 d2psids(8,2) = -8.0;
2281 d2psids(8,4) = -4.0;
2282 d2psids(8,5) = -4.0;
2285 d2psids(9,1) = -8.0;
2287 d2psids(9,3) = -4.0;
2289 d2psids(9,5) = -4.0;
2422 std::ostringstream error_message;
2423 error_message <<
"Element only has fifteen nodes; called with node number " 2427 OOMPH_CURRENT_FUNCTION,
2428 OOMPH_EXCEPTION_LOCATION);
2440 const double s3=1.0-s[0]-s[1]-s[2];
2442 const double quartic_bubble = s[0]*s[1]*s[2]*s3;
2443 const double cubic_bubble012 = s[0]*s[1]*s[2];
2444 const double cubic_bubble013 = s[0]*s[1]*s3;
2445 const double cubic_bubble023 = s[0]*s[2]*s3;
2446 const double cubic_bubble123 = s[1]*s[2]*s3;
2453 psi[0] = (2.0*s[0]-1.0)*s[0]
2454 + 3.0*(cubic_bubble012 + cubic_bubble013 + cubic_bubble023)
2455 - 4.0*quartic_bubble;
2456 psi[1] = (2.0*s[1]-1.0)*s[1]
2457 + 3.0*(cubic_bubble012 + cubic_bubble013 + cubic_bubble123)
2458 - 4.0*quartic_bubble;
2459 psi[2] = (2.0*s[2]-1.0)*s[2]
2460 + 3.0*(cubic_bubble012 + cubic_bubble023 + cubic_bubble123)
2461 - 4.0*quartic_bubble;
2462 psi[3] = (2.0*s3-1.0)*s3
2463 + 3.0*(cubic_bubble013 + cubic_bubble023 + cubic_bubble123)
2464 -4.0*quartic_bubble;
2465 psi[4] = 4.0*s[0]*s[1]
2466 - 12.0*(cubic_bubble012 + cubic_bubble013)
2467 + 32.0*quartic_bubble;
2468 psi[5] = 4.0*s[0]*s[2]
2469 - 12.0*(cubic_bubble012 + cubic_bubble023)
2470 + 32.0*quartic_bubble;
2471 psi[6] = 4.0*s[0]*s3
2472 - 12.0*(cubic_bubble013 + cubic_bubble023)
2473 + 32.0*quartic_bubble;
2474 psi[7] = 4.0*s[1]*s[2]
2475 - 12.0*(cubic_bubble012 + cubic_bubble123)
2476 + 32.0*quartic_bubble;
2477 psi[8] = 4.0*s[2]*s3
2478 - 12.0*(cubic_bubble023 + cubic_bubble123)
2479 + 32.0*quartic_bubble;
2480 psi[9] = 4.0*s[1]*s3
2481 - 12.0*(cubic_bubble013 + cubic_bubble123)
2482 + 32.0*quartic_bubble;
2484 psi[10] = 27.0*cubic_bubble013 - 108.0*quartic_bubble;
2486 psi[11] = 27.0*cubic_bubble012 - 108.0*quartic_bubble;
2488 psi[12] = 27.0*cubic_bubble023 - 108.0*quartic_bubble;
2490 psi[13] = 27.0*cubic_bubble123 - 108.0*quartic_bubble;
2492 psi[14] = 256.0*quartic_bubble;
2503 this->
shape(s, psi);
2506 const double s3=1.0-s[0]-s[1]-s[2];
2509 const double d_quartic_bubble_ds0 = s[1]*s[2]*(1.0 - s[1] - s[2] - 2.0*s[0]);
2510 const double d_quartic_bubble_ds1 = s[0]*s[2]*(1.0 - s[0] - s[2] - 2.0*s[1]);
2511 const double d_quartic_bubble_ds2 = s[0]*s[1]*(1.0 - s[0] - s[1] - 2.0*s[2]);
2513 const double d_cubic_bubble012_ds0 = s[1]*s[2];
2514 const double d_cubic_bubble012_ds1 = s[0]*s[2];
2515 const double d_cubic_bubble012_ds2 = s[0]*s[1];
2517 const double d_cubic_bubble013_ds0 = s[1]*(s3 - s[0]);
2518 const double d_cubic_bubble013_ds1 = s[0]*(s3 - s[1]);
2519 const double d_cubic_bubble013_ds2 = -s[0]*s[1];
2521 const double d_cubic_bubble023_ds0 = s[2]*(s3 - s[0]);
2522 const double d_cubic_bubble023_ds1 = -s[0]*s[2];
2523 const double d_cubic_bubble023_ds2 = s[0]*(s3 - s[2]);
2525 const double d_cubic_bubble123_ds0 = -s[1]*s[2];
2526 const double d_cubic_bubble123_ds1 = s[2]*(s3 - s[1]);
2527 const double d_cubic_bubble123_ds2 = s[1]*(s3 - s[2]);
2532 dpsids(0,0) = 4.0*s[0]-1.0
2533 + 3.0*(d_cubic_bubble012_ds0 + d_cubic_bubble013_ds0 + d_cubic_bubble023_ds0)
2534 - 4.0*d_quartic_bubble_ds0;
2536 + 3.0*(d_cubic_bubble012_ds1 + d_cubic_bubble013_ds1 + d_cubic_bubble023_ds1)
2537 - 4.0*d_quartic_bubble_ds1;
2539 + 3.0*(d_cubic_bubble012_ds2 + d_cubic_bubble013_ds2 + d_cubic_bubble023_ds2)
2540 - 4.0*d_quartic_bubble_ds2;
2543 + 3.0*(d_cubic_bubble012_ds0 + d_cubic_bubble013_ds0 + d_cubic_bubble123_ds0)
2544 - 4.0*d_quartic_bubble_ds0;
2545 dpsids(1,1) = 4.0*s[1]-1.0
2546 + 3.0*(d_cubic_bubble012_ds1 + d_cubic_bubble013_ds1 + d_cubic_bubble123_ds1)
2547 - 4.0*d_quartic_bubble_ds1;
2549 + 3.0*(d_cubic_bubble012_ds2 + d_cubic_bubble013_ds2 + d_cubic_bubble123_ds2)
2550 - 4.0*d_quartic_bubble_ds2;
2553 + 3.0*(d_cubic_bubble012_ds0 + d_cubic_bubble023_ds0 + d_cubic_bubble123_ds0)
2554 - 4.0*d_quartic_bubble_ds0;
2556 + 3.0*(d_cubic_bubble012_ds1 + d_cubic_bubble023_ds1 + d_cubic_bubble123_ds1)
2557 - 4.0*d_quartic_bubble_ds1;
2558 dpsids(2,2) = 4.0*s[2]-1.0
2559 + 3.0*(d_cubic_bubble012_ds2 + d_cubic_bubble023_ds2 + d_cubic_bubble123_ds2)
2560 - 4.0*d_quartic_bubble_ds2;
2562 dpsids(3,0) = -4.0*s3+1.0
2563 + 3.0*(d_cubic_bubble013_ds0 + d_cubic_bubble023_ds0 + d_cubic_bubble123_ds0)
2564 -4.0*d_quartic_bubble_ds0;
2565 dpsids(3,1) = -4.0*s3+1.0
2566 + 3.0*(d_cubic_bubble013_ds1 + d_cubic_bubble023_ds1 + d_cubic_bubble123_ds1)
2567 -4.0*d_quartic_bubble_ds1;
2568 dpsids(3,2) = -4.0*s3+1.0
2569 + 3.0*(d_cubic_bubble013_ds2 + d_cubic_bubble023_ds2 + d_cubic_bubble123_ds2)
2570 -4.0*d_quartic_bubble_ds2;
2572 dpsids(4,0) = 4.0*s[1]
2573 - 12.0*(d_cubic_bubble012_ds0 + d_cubic_bubble013_ds0)
2574 + 32.0*d_quartic_bubble_ds0;
2575 dpsids(4,1) = 4.0*s[0]
2576 - 12.0*(d_cubic_bubble012_ds1 + d_cubic_bubble013_ds1)
2577 + 32.0*d_quartic_bubble_ds1;
2579 - 12.0*(d_cubic_bubble012_ds2 + d_cubic_bubble013_ds2)
2580 + 32.0*d_quartic_bubble_ds2;
2582 dpsids(5,0) = 4.0*s[2]
2583 - 12.0*(d_cubic_bubble012_ds0 + d_cubic_bubble023_ds0)
2584 + 32.0*d_quartic_bubble_ds0;
2586 - 12.0*(d_cubic_bubble012_ds1 + d_cubic_bubble023_ds1)
2587 + 32.0*d_quartic_bubble_ds1;
2588 dpsids(5,2) = 4.0*s[0]
2589 - 12.0*(d_cubic_bubble012_ds2 + d_cubic_bubble023_ds2)
2590 + 32.0*d_quartic_bubble_ds2;
2592 dpsids(6,0) = 4.0*(s3-s[0])
2593 - 12.0*(d_cubic_bubble013_ds0 + d_cubic_bubble023_ds0)
2594 + 32.0*d_quartic_bubble_ds0;
2595 dpsids(6,1) = -4.0*s[0]
2596 - 12.0*(d_cubic_bubble013_ds1 + d_cubic_bubble023_ds1)
2597 + 32.0*d_quartic_bubble_ds1;
2598 dpsids(6,2) = -4.0*s[0]
2599 - 12.0*(d_cubic_bubble013_ds2 + d_cubic_bubble023_ds2)
2600 + 32.0*d_quartic_bubble_ds2;
2603 - 12.0*(d_cubic_bubble012_ds0 + d_cubic_bubble123_ds0)
2604 + 32.0*d_quartic_bubble_ds0;
2605 dpsids(7,1) = 4.0*s[2]
2606 - 12.0*(d_cubic_bubble012_ds1 + d_cubic_bubble123_ds1)
2607 + 32.0*d_quartic_bubble_ds1;
2608 dpsids(7,2) = 4.0*s[1]
2609 - 12.0*(d_cubic_bubble012_ds2 + d_cubic_bubble123_ds2)
2610 + 32.0*d_quartic_bubble_ds2;
2612 dpsids(8,0) = -4.0*s[2]
2613 - 12.0*(d_cubic_bubble023_ds0 + d_cubic_bubble123_ds0)
2614 + 32.0*d_quartic_bubble_ds0;
2615 dpsids(8,1) = -4.0*s[2]
2616 - 12.0*(d_cubic_bubble023_ds1 + d_cubic_bubble123_ds1)
2617 + 32.0*d_quartic_bubble_ds1;
2618 dpsids(8,2) = 4.0*(s3-s[2])
2619 - 12.0*(d_cubic_bubble023_ds2 + d_cubic_bubble123_ds2)
2620 + 32.0*d_quartic_bubble_ds2;
2622 dpsids(9,0) = -4.0*s[1]
2623 - 12.0*(d_cubic_bubble013_ds0 + d_cubic_bubble123_ds0)
2624 + 32.0*d_quartic_bubble_ds0;
2625 dpsids(9,1) = 4.0*(s3-s[1])
2626 - 12.0*(d_cubic_bubble013_ds1 + d_cubic_bubble123_ds1)
2627 + 32.0*d_quartic_bubble_ds1;
2628 dpsids(9,2) = -4.0*s[1]
2629 - 12.0*(d_cubic_bubble013_ds2 + d_cubic_bubble123_ds2)
2630 + 32.0*d_quartic_bubble_ds2;
2633 dpsids(10,0) = 27.0*d_cubic_bubble013_ds0 - 108.0*d_quartic_bubble_ds0;
2634 dpsids(10,1) = 27.0*d_cubic_bubble013_ds1 - 108.0*d_quartic_bubble_ds1;
2635 dpsids(10,2) = 27.0*d_cubic_bubble013_ds2 - 108.0*d_quartic_bubble_ds2;
2638 dpsids(11,0) = 27.0*d_cubic_bubble012_ds0 - 108.0*d_quartic_bubble_ds0;
2639 dpsids(11,1) = 27.0*d_cubic_bubble012_ds1 - 108.0*d_quartic_bubble_ds1;
2640 dpsids(11,2) = 27.0*d_cubic_bubble012_ds2 - 108.0*d_quartic_bubble_ds2;
2643 dpsids(12,0) = 27.0*d_cubic_bubble023_ds0 - 108.0*d_quartic_bubble_ds0;
2644 dpsids(12,1) = 27.0*d_cubic_bubble023_ds1 - 108.0*d_quartic_bubble_ds1;
2645 dpsids(12,2) = 27.0*d_cubic_bubble023_ds2 - 108.0*d_quartic_bubble_ds2;
2648 dpsids(13,0) = 27.0*d_cubic_bubble123_ds0 - 108.0*d_quartic_bubble_ds0;
2649 dpsids(13,1) = 27.0*d_cubic_bubble123_ds1 - 108.0*d_quartic_bubble_ds1;
2650 dpsids(13,2) = 27.0*d_cubic_bubble123_ds2 - 108.0*d_quartic_bubble_ds2;
2653 dpsids(14,0) = 256.0*d_quartic_bubble_ds0;
2654 dpsids(14,1) = 256.0*d_quartic_bubble_ds1;
2655 dpsids(14,2) = 256.0*d_quartic_bubble_ds2;
2674 this->dshape_local(s, psi,dpsids);
2677 const double s3=1.0-s[0]-s[1]-s[2];
2685 const double d2_quartic_bubble_ds0 = -2.0*s[1]*s[2];
2686 const double d2_quartic_bubble_ds1 = -2.0*s[0]*s[2];
2687 const double d2_quartic_bubble_ds2 = -2.0*s[0]*s[1];
2688 const double d2_quartic_bubble_ds3 = s[2]*(1.0 - 2.0*s[0] - 2.0*s[1] - s[2]);
2689 const double d2_quartic_bubble_ds4 = s[1]*(1.0 - 2.0*s[0] - 2.0*s[2] - s[1]);
2690 const double d2_quartic_bubble_ds5 = s[0]*(1.0 - 2.0*s[1] - 2.0*s[2] - s[0]);
2692 const double d2_cubic_bubble012_ds0 = 0.0;
2693 const double d2_cubic_bubble012_ds1 = 0.0;
2694 const double d2_cubic_bubble012_ds2 = 0.0;
2695 const double d2_cubic_bubble012_ds3 = s[2];
2696 const double d2_cubic_bubble012_ds4 = s[1];
2697 const double d2_cubic_bubble012_ds5 = s[0];
2699 const double d2_cubic_bubble013_ds0 = -2.0*s[1];
2700 const double d2_cubic_bubble013_ds1 = -2.0*s[0];
2701 const double d2_cubic_bubble013_ds2 = 0.0;
2702 const double d2_cubic_bubble013_ds3 = s3 - s[0] - s[1];
2703 const double d2_cubic_bubble013_ds4 = -s[1];
2704 const double d2_cubic_bubble013_ds5 = -s[0];
2706 const double d2_cubic_bubble023_ds0 = -2.0*s[2];
2707 const double d2_cubic_bubble023_ds1 = 0.0;
2708 const double d2_cubic_bubble023_ds2 = -2.0*s[0];
2709 const double d2_cubic_bubble023_ds3 = -s[2];
2710 const double d2_cubic_bubble023_ds4 = s3 - s[0] - s[2];
2711 const double d2_cubic_bubble023_ds5 = -s[0];
2713 const double d2_cubic_bubble123_ds0 = 0.0;
2714 const double d2_cubic_bubble123_ds1 = -2.0*s[2];
2715 const double d2_cubic_bubble123_ds2 = -2.0*s[1];
2716 const double d2_cubic_bubble123_ds3 = -s[2];
2717 const double d2_cubic_bubble123_ds4 = -s[1];
2718 const double d2_cubic_bubble123_ds5 = s3 - s[1] - s[2];
2722 + 3.0*(d2_cubic_bubble012_ds0 + d2_cubic_bubble013_ds0
2723 + d2_cubic_bubble023_ds0)
2724 - 4.0*d2_quartic_bubble_ds0;
2726 + 3.0*(d2_cubic_bubble012_ds1 + d2_cubic_bubble013_ds1
2727 + d2_cubic_bubble023_ds1)
2728 - 4.0*d2_quartic_bubble_ds1;
2730 + 3.0*(d2_cubic_bubble012_ds2 + d2_cubic_bubble013_ds2
2731 + d2_cubic_bubble023_ds2)
2732 - 4.0*d2_quartic_bubble_ds2;
2734 + 3.0*(d2_cubic_bubble012_ds3 + d2_cubic_bubble013_ds3
2735 + d2_cubic_bubble023_ds3)
2736 - 4.0*d2_quartic_bubble_ds3;
2738 + 3.0*(d2_cubic_bubble012_ds4 + d2_cubic_bubble013_ds4
2739 + d2_cubic_bubble023_ds4)
2740 - 4.0*d2_quartic_bubble_ds4;
2742 + 3.0*(d2_cubic_bubble012_ds5 + d2_cubic_bubble013_ds5
2743 + d2_cubic_bubble023_ds5)
2744 - 4.0*d2_quartic_bubble_ds5;
2748 + 3.0*(d2_cubic_bubble012_ds0 + d2_cubic_bubble013_ds0
2749 + d2_cubic_bubble123_ds0)
2750 - 4.0*d2_quartic_bubble_ds0;
2752 + 3.0*(d2_cubic_bubble012_ds1 + d2_cubic_bubble013_ds1
2753 + d2_cubic_bubble123_ds1)
2754 - 4.0*d2_quartic_bubble_ds1;
2756 + 3.0*(d2_cubic_bubble012_ds2 + d2_cubic_bubble013_ds2
2757 + d2_cubic_bubble123_ds2)
2758 - 4.0*d2_quartic_bubble_ds2;
2760 + 3.0*(d2_cubic_bubble012_ds3 + d2_cubic_bubble013_ds3
2761 + d2_cubic_bubble123_ds3)
2762 - 4.0*d2_quartic_bubble_ds3;
2764 + 3.0*(d2_cubic_bubble012_ds4 + d2_cubic_bubble013_ds4
2765 + d2_cubic_bubble123_ds4)
2766 - 4.0*d2_quartic_bubble_ds4;
2768 + 3.0*(d2_cubic_bubble012_ds5 + d2_cubic_bubble013_ds5
2769 + d2_cubic_bubble123_ds5)
2770 - 4.0*d2_quartic_bubble_ds5;
2774 + 3.0*(d2_cubic_bubble012_ds0 + d2_cubic_bubble023_ds0
2775 + d2_cubic_bubble123_ds0)
2776 - 4.0*d2_quartic_bubble_ds0;
2778 + 3.0*(d2_cubic_bubble012_ds1 + d2_cubic_bubble023_ds1
2779 + d2_cubic_bubble123_ds1)
2780 - 4.0*d2_quartic_bubble_ds1;
2782 + 3.0*(d2_cubic_bubble012_ds2 + d2_cubic_bubble023_ds2
2783 + d2_cubic_bubble123_ds2)
2784 - 4.0*d2_quartic_bubble_ds2;
2786 + 3.0*(d2_cubic_bubble012_ds3 + d2_cubic_bubble023_ds3
2787 + d2_cubic_bubble123_ds3)
2788 - 4.0*d2_quartic_bubble_ds3;
2790 + 3.0*(d2_cubic_bubble012_ds4 + d2_cubic_bubble023_ds4
2791 + d2_cubic_bubble123_ds4)
2792 - 4.0*d2_quartic_bubble_ds4;
2794 + 3.0*(d2_cubic_bubble012_ds5 + d2_cubic_bubble023_ds5
2795 + d2_cubic_bubble123_ds5)
2796 - 4.0*d2_quartic_bubble_ds5;
2800 + 3.0*(d2_cubic_bubble013_ds0 + d2_cubic_bubble023_ds0
2801 + d2_cubic_bubble123_ds0)
2802 -4.0*d2_quartic_bubble_ds0;
2804 + 3.0*(d2_cubic_bubble013_ds1 + d2_cubic_bubble023_ds1
2805 + d2_cubic_bubble123_ds1)
2806 -4.0*d2_quartic_bubble_ds1;
2808 + 3.0*(d2_cubic_bubble013_ds2 + d2_cubic_bubble023_ds2
2809 + d2_cubic_bubble123_ds2)
2810 -4.0*d2_quartic_bubble_ds2;
2812 + 3.0*(d2_cubic_bubble013_ds3 + d2_cubic_bubble023_ds3
2813 + d2_cubic_bubble123_ds3)
2814 -4.0*d2_quartic_bubble_ds3;
2816 + 3.0*(d2_cubic_bubble013_ds4 + d2_cubic_bubble023_ds4
2817 + d2_cubic_bubble123_ds4)
2818 -4.0*d2_quartic_bubble_ds4;
2820 + 3.0*(d2_cubic_bubble013_ds5 + d2_cubic_bubble023_ds5
2821 + d2_cubic_bubble123_ds5)
2822 -4.0*d2_quartic_bubble_ds5;
2826 - 12.0*(d2_cubic_bubble012_ds0 + d2_cubic_bubble013_ds0)
2827 + 32.0*d2_quartic_bubble_ds0;
2829 - 12.0*(d2_cubic_bubble012_ds1 + d2_cubic_bubble013_ds1)
2830 + 32.0*d2_quartic_bubble_ds1;
2832 - 12.0*(d2_cubic_bubble012_ds2 + d2_cubic_bubble013_ds2)
2833 + 32.0*d2_quartic_bubble_ds2;
2835 - 12.0*(d2_cubic_bubble012_ds3 + d2_cubic_bubble013_ds3)
2836 + 32.0*d2_quartic_bubble_ds3;
2838 - 12.0*(d2_cubic_bubble012_ds4 + d2_cubic_bubble013_ds4)
2839 + 32.0*d2_quartic_bubble_ds4;
2841 - 12.0*(d2_cubic_bubble012_ds5 + d2_cubic_bubble013_ds5)
2842 + 32.0*d2_quartic_bubble_ds5;
2846 - 12.0*(d2_cubic_bubble012_ds0 + d2_cubic_bubble023_ds0)
2847 + 32.0*d2_quartic_bubble_ds0;
2849 - 12.0*(d2_cubic_bubble012_ds1 + d2_cubic_bubble023_ds1)
2850 + 32.0*d2_quartic_bubble_ds1;
2852 - 12.0*(d2_cubic_bubble012_ds2 + d2_cubic_bubble023_ds2)
2853 + 32.0*d2_quartic_bubble_ds2;
2855 - 12.0*(d2_cubic_bubble012_ds3 + d2_cubic_bubble023_ds3)
2856 + 32.0*d2_quartic_bubble_ds3;
2858 - 12.0*(d2_cubic_bubble012_ds4 + d2_cubic_bubble023_ds4)
2859 + 32.0*d2_quartic_bubble_ds4;
2861 - 12.0*(d2_cubic_bubble012_ds5 + d2_cubic_bubble023_ds5)
2862 + 32.0*d2_quartic_bubble_ds5;
2866 - 12.0*(d2_cubic_bubble013_ds0 + d2_cubic_bubble023_ds0)
2867 + 32.0*d2_quartic_bubble_ds0;
2869 - 12.0*(d2_cubic_bubble013_ds1 + d2_cubic_bubble023_ds1)
2870 + 32.0*d2_quartic_bubble_ds1;
2872 - 12.0*(d2_cubic_bubble013_ds2 + d2_cubic_bubble023_ds2)
2873 + 32.0*d2_quartic_bubble_ds2;
2875 - 12.0*(d2_cubic_bubble013_ds3 + d2_cubic_bubble023_ds3)
2876 + 32.0*d2_quartic_bubble_ds3;
2878 - 12.0*(d2_cubic_bubble013_ds4 + d2_cubic_bubble023_ds4)
2879 + 32.0*d2_quartic_bubble_ds4;
2881 - 12.0*(d2_cubic_bubble013_ds5 + d2_cubic_bubble023_ds5)
2882 + 32.0*d2_quartic_bubble_ds5;
2885 - 12.0*(d2_cubic_bubble012_ds0 + d2_cubic_bubble123_ds0)
2886 + 32.0*d2_quartic_bubble_ds0;
2888 - 12.0*(d2_cubic_bubble012_ds1 + d2_cubic_bubble123_ds1)
2889 + 32.0*d2_quartic_bubble_ds1;
2891 - 12.0*(d2_cubic_bubble012_ds2 + d2_cubic_bubble123_ds2)
2892 + 32.0*d2_quartic_bubble_ds2;
2894 - 12.0*(d2_cubic_bubble012_ds3 + d2_cubic_bubble123_ds3)
2895 + 32.0*d2_quartic_bubble_ds3;
2897 - 12.0*(d2_cubic_bubble012_ds4 + d2_cubic_bubble123_ds4)
2898 + 32.0*d2_quartic_bubble_ds4;
2900 - 12.0*(d2_cubic_bubble012_ds5 + d2_cubic_bubble123_ds5)
2901 + 32.0*d2_quartic_bubble_ds5;
2904 - 12.0*(d2_cubic_bubble023_ds0 + d2_cubic_bubble123_ds0)
2905 + 32.0*d2_quartic_bubble_ds0;
2907 - 12.0*(d2_cubic_bubble023_ds1 + d2_cubic_bubble123_ds1)
2908 + 32.0*d2_quartic_bubble_ds1;
2910 - 12.0*(d2_cubic_bubble023_ds2 + d2_cubic_bubble123_ds2)
2911 + 32.0*d2_quartic_bubble_ds2;
2913 - 12.0*(d2_cubic_bubble023_ds3 + d2_cubic_bubble123_ds3)
2914 + 32.0*d2_quartic_bubble_ds3;
2916 - 12.0*(d2_cubic_bubble023_ds4 + d2_cubic_bubble123_ds4)
2917 + 32.0*d2_quartic_bubble_ds4;
2919 - 12.0*(d2_cubic_bubble023_ds5 + d2_cubic_bubble123_ds5)
2920 + 32.0*d2_quartic_bubble_ds5;
2923 - 12.0*(d2_cubic_bubble013_ds0 + d2_cubic_bubble123_ds0)
2924 + 32.0*d2_quartic_bubble_ds0;
2926 - 12.0*(d2_cubic_bubble013_ds1 + d2_cubic_bubble123_ds1)
2927 + 32.0*d2_quartic_bubble_ds1;
2929 - 12.0*(d2_cubic_bubble013_ds2 + d2_cubic_bubble123_ds2)
2930 + 32.0*d2_quartic_bubble_ds3;
2932 - 12.0*(d2_cubic_bubble013_ds3 + d2_cubic_bubble123_ds3)
2933 + 32.0*d2_quartic_bubble_ds3;
2935 - 12.0*(d2_cubic_bubble013_ds4 + d2_cubic_bubble123_ds4)
2936 + 32.0*d2_quartic_bubble_ds4;
2938 - 12.0*(d2_cubic_bubble013_ds5 + d2_cubic_bubble123_ds5)
2939 + 32.0*d2_quartic_bubble_ds5;
2942 d2psids(10,0) = 27.0*d2_cubic_bubble013_ds0 - 108.0*d2_quartic_bubble_ds0;
2943 d2psids(10,1) = 27.0*d2_cubic_bubble013_ds1 - 108.0*d2_quartic_bubble_ds1;
2944 d2psids(10,2) = 27.0*d2_cubic_bubble013_ds2 - 108.0*d2_quartic_bubble_ds2;
2945 d2psids(10,3) = 27.0*d2_cubic_bubble013_ds3 - 108.0*d2_quartic_bubble_ds3;
2946 d2psids(10,4) = 27.0*d2_cubic_bubble013_ds4 - 108.0*d2_quartic_bubble_ds4;
2947 d2psids(10,5) = 27.0*d2_cubic_bubble013_ds5 - 108.0*d2_quartic_bubble_ds5;
2950 d2psids(11,0) = 27.0*d2_cubic_bubble012_ds0 - 108.0*d2_quartic_bubble_ds0;
2951 d2psids(11,1) = 27.0*d2_cubic_bubble012_ds1 - 108.0*d2_quartic_bubble_ds1;
2952 d2psids(11,2) = 27.0*d2_cubic_bubble012_ds2 - 108.0*d2_quartic_bubble_ds2;
2953 d2psids(11,3) = 27.0*d2_cubic_bubble012_ds3 - 108.0*d2_quartic_bubble_ds3;
2954 d2psids(11,4) = 27.0*d2_cubic_bubble012_ds4 - 108.0*d2_quartic_bubble_ds4;
2955 d2psids(11,5) = 27.0*d2_cubic_bubble012_ds5 - 108.0*d2_quartic_bubble_ds5;
2958 d2psids(12,0) = 27.0*d2_cubic_bubble023_ds0 - 108.0*d2_quartic_bubble_ds0;
2959 d2psids(12,1) = 27.0*d2_cubic_bubble023_ds1 - 108.0*d2_quartic_bubble_ds1;
2960 d2psids(12,2) = 27.0*d2_cubic_bubble023_ds2 - 108.0*d2_quartic_bubble_ds2;
2961 d2psids(12,3) = 27.0*d2_cubic_bubble023_ds3 - 108.0*d2_quartic_bubble_ds3;
2962 d2psids(12,4) = 27.0*d2_cubic_bubble023_ds4 - 108.0*d2_quartic_bubble_ds4;
2963 d2psids(12,5) = 27.0*d2_cubic_bubble023_ds5 - 108.0*d2_quartic_bubble_ds5;
2966 d2psids(13,0) = 27.0*d2_cubic_bubble123_ds0 - 108.0*d2_quartic_bubble_ds0;
2967 d2psids(13,1) = 27.0*d2_cubic_bubble123_ds1 - 108.0*d2_quartic_bubble_ds1;
2968 d2psids(13,2) = 27.0*d2_cubic_bubble123_ds2 - 108.0*d2_quartic_bubble_ds2;
2969 d2psids(13,3) = 27.0*d2_cubic_bubble123_ds3 - 108.0*d2_quartic_bubble_ds3;
2970 d2psids(13,4) = 27.0*d2_cubic_bubble123_ds4 - 108.0*d2_quartic_bubble_ds4;
2971 d2psids(13,5) = 27.0*d2_cubic_bubble123_ds5 - 108.0*d2_quartic_bubble_ds5;
2974 d2psids(14,0) = 256.0*d2_quartic_bubble_ds0;
2975 d2psids(14,1) = 256.0*d2_quartic_bubble_ds1;
2976 d2psids(14,2) = 256.0*d2_quartic_bubble_ds2;
2977 d2psids(14,3) = 256.0*d2_quartic_bubble_ds3;
2978 d2psids(14,4) = 256.0*d2_quartic_bubble_ds4;
2979 d2psids(14,5) = 256.0*d2_quartic_bubble_ds5;
2995 template<
unsigned NNODE_1D>
3002 static const unsigned Node_on_face[4][(NNODE_1D*(NNODE_1D+1))/2];
3027 "Tets are currently only implemented for\n";
3029 "four and ten nodes, i.e. NNODE_1D=2 , 3 \n";
3032 OOMPH_CURRENT_FUNCTION,
3033 OOMPH_EXCEPTION_LOCATION);
3038 unsigned n_node = (NNODE_1D*(NNODE_1D+1))/2 + 1 + 3*(NNODE_1D-2);
3039 this->set_n_node(n_node);
3045 set_integration_scheme(&Default_integration_scheme);
3076 const unsigned&
i)
const 3078 return Node_on_face[face_index][
i];
3088 std::ostringstream error_message;
3090 <<
"Element only has four vertex nodes; called with node number " 3093 OOMPH_CURRENT_FUNCTION,
3094 OOMPH_EXCEPTION_LOCATION);
3127 {
return FiniteElement::invert_jacobian<3>(jacobian,inverse_jacobian);}
3143 unsigned node_sum=0;
3144 for(
unsigned j=1;j<=nplot;j++)
3146 for(
unsigned i=1;
i<=j;
i++)
3158 return (nplot-1)*(nplot-1)*(nplot-1);
3165 const unsigned& nplot,
3166 unsigned& counter)
const 3171 unsigned paraview_fix=counter-1;
3172 unsigned nod_count=1;
3174 for(
unsigned i=0;
i<nplot;
i++)
3176 for(
unsigned j=0;j<nplot-
i;j++)
3178 for(
unsigned k=0;k<nplot-i-j;k++)
3182 file_out<< nod_count+paraview_fix <<
" " 3183 << nod_count+1+paraview_fix <<
" " 3184 << nod_count+nplot-i-j+paraview_fix <<
" " 3185 <<nod_count+nplot-i-j+((nplot-1-
i)*(nplot-i)/2)
3190 file_out << nod_count+1+paraview_fix <<
" " 3191 << nod_count+nplot-i-j+paraview_fix <<
" " 3192 << nod_count+nplot-i-j+((nplot-1-
i)*(nplot-i)/2)
3193 +paraview_fix <<
" " 3194 << nod_count+2*(nplot-i-j)-1+((nplot-1-
i)*(nplot-i)/2)
3197 file_out << nod_count+1+paraview_fix <<
" " 3198 << nod_count+nplot-i-j+paraview_fix <<
" " 3199 << nod_count+nplot-i-j+1+paraview_fix <<
" " 3200 << nod_count+2*(nplot-i-j)-1+((nplot-1-i)*(nplot-
i)/2)
3203 file_out << nod_count+1+paraview_fix <<
" " 3204 << nod_count+nplot-i-j+((nplot-1-
i)*(nplot-i)/2)
3205 +paraview_fix <<
" " 3206 << nod_count+nplot-i-j+((nplot-1-i)*(nplot-
i)/2)+1
3207 +paraview_fix <<
" " 3208 << nod_count+2*(nplot-i-j)-1+((nplot-1-i)*(nplot-
i)/2)
3211 file_out << nod_count+1+paraview_fix <<
" " 3212 << nod_count+nplot-i-j+1+paraview_fix <<
" " 3213 << nod_count+nplot-i-j+((nplot-1-
i)*(nplot-i)/2)+1
3216 << nod_count+2*(nplot-i-j)-1+((nplot-1-
i)*(nplot-i)/2)
3222 file_out << nod_count+nplot-i-j-1+paraview_fix <<
" " 3223 << nod_count+nplot-i-j+((nplot-1-
i)*(nplot-i)/2)-1
3226 << nod_count+2*(nplot-i-j-1)+((nplot-1-
i)*(nplot-i)/2)-1
3229 << nod_count+2*(nplot-i-j-1)+((nplot-1-
i)*(nplot-i)/2)
3240 counter+=nplot_points_paraview(nplot);
3248 const unsigned& nplot)
const 3250 unsigned local_loop=nsub_elements_paraview(nplot);
3251 for(
unsigned i=0;
i<local_loop;
i++)
3253 file_out <<
"10" << std::endl;
3261 const unsigned& nplot,
3262 unsigned& offset_sum)
const 3264 unsigned local_loop=nsub_elements_paraview(nplot);
3265 for(
unsigned i=0;
i<local_loop;
i++)
3268 file_out << offset_sum << std::endl;
3276 void output(std::ostream &outfile,
const unsigned &nplot);
3279 void output(FILE* file_pt);
3282 void output(FILE* file_pt,
const unsigned &n_plot);
3287 const unsigned& iplot,
3288 const unsigned& nplot,
3290 const bool& use_equally_spaced_interior_sample_points=
false)
const 3295 for(
unsigned i=0;
i<nplot;++
i)
3297 for(
unsigned j=0;j<nplot-
i;++j)
3299 for(
unsigned k=0;k<nplot-i-j;++k)
3304 s[0] = double(j)/double(nplot-1);
3305 s[1] = double(i)/double(nplot-1);
3306 s[2] = double(k)/double(nplot-1);
3307 if (use_equally_spaced_interior_sample_points)
3310 double dx_new=range/double(nplot+1);
3311 double range_new=double(nplot-1)*dx_new;
3312 s[0]=0.5*dx_new+range_new*s[0]/range;
3313 s[1]=0.5*dx_new+range_new*s[1]/range;
3314 s[2]=0.5*dx_new+range_new*s[2]/range;
3336 std::ostringstream header;
3338 nel=(nplot-1)*(nplot-1)*(nplot-1);
3339 header <<
"ZONE N=" << nplot_points(nplot) <<
", E=" 3340 << nel <<
", F=FEPOINT, ET=TETRAHEDRON\n";
3341 return header.str();
3349 const unsigned& nplot)
const 3354 unsigned nod_count=1;
3355 for(
unsigned i=0;
i<nplot;
i++)
3357 for(
unsigned j=0;j<nplot-
i;j++)
3359 for(
unsigned k=0;k<nplot-i-j;k++)
3363 outfile<< nod_count <<
" " 3364 << nod_count+1 <<
" " 3365 << nod_count+nplot-i-j <<
" " 3366 <<nod_count+nplot-i-j+((nplot-1-
i)*(nplot-i)/2)
3370 outfile << nod_count+1<<
" " 3371 << nod_count+nplot-i-j <<
" " 3372 << nod_count+nplot-i-j+((nplot-1-
i)*(nplot-i)/2) <<
" " 3373 << nod_count+2*(nplot-i-j)-1+((nplot-1-
i)*(nplot-i)/2)
3375 outfile << nod_count+1 <<
" " 3376 << nod_count+nplot-i-j <<
" " 3377 << nod_count+nplot-i-j+1<<
" " 3378 << nod_count+2*(nplot-i-j)-1+((nplot-1-i)*(nplot-
i)/2)
3380 outfile << nod_count+1<<
" " 3381 << nod_count+nplot-i-j+((nplot-1-
i)*(nplot-i)/2)<<
" " 3382 << nod_count+nplot-i-j+((nplot-1-i)*(nplot-
i)/2)+1<<
" " 3383 << nod_count+2*(nplot-i-j)-1+((nplot-1-i)*(nplot-
i)/2)
3385 outfile << nod_count+1<<
" " 3386 << nod_count+nplot-i-j+1<<
" " 3387 << nod_count+nplot-i-j+((nplot-1-
i)*(nplot-i)/2)+1
3389 << nod_count+2*(nplot-i-j)-1+((nplot-1-
i)*(nplot-i)/2)
3394 outfile << nod_count+nplot-i-j-1<<
" " 3395 << nod_count+nplot-i-j+((nplot-1-
i)*(nplot-i)/2)-1
3397 << nod_count+2*(nplot-i-j-1)+((nplot-1-
i)*(nplot-i)/2)-1
3399 << nod_count+2*(nplot-i-j-1)+((nplot-1-
i)*(nplot-i)/2)
3415 const unsigned& nplot)
const 3419 unsigned nod_count=1;
3420 for(
unsigned i=0;
i<nplot;
i++)
3422 for(
unsigned j=0;j<nplot-
i;j++)
3424 for(
unsigned k=0;k<nplot-i-j;k++)
3428 fprintf(file_pt,
"%i %i %i \n",nod_count,
3429 nod_count+1,nod_count+nplot-i);
3432 fprintf(file_pt,
"%i %i %i \n",nod_count+1,nod_count+nplot-i+1,
3450 for(
unsigned i=3;
i<=nplot;
i++)
3467 void build_face_element(
const int &face_index,
3485 template<
unsigned DIM,
unsigned NNODE_1D>
3496 template<
unsigned DIM,
unsigned NPTS_1D>
3538 template<
unsigned DIM>
3548 static const unsigned Central_node_on_face[DIM+1];
3557 unsigned n_node = this->nnode();
3558 this->set_n_node(n_node+
3561 this->set_integration_scheme(&Default_enriched_integration_scheme);
3604 void build_face_element(
const int &face_index,
3651 template <
unsigned DIM,
unsigned NNODE_1D>
3659 template <
unsigned NNODE_1D>
3669 set_lagrangian_dimension(1);
3689 inline void build_face_element(
const int &face_index,
3712 template<
unsigned NNODE_1D>
3722 set_lagrangian_dimension(static_cast<SolidNode*>(node_pt(0))->nlagrangian());
3730 template <
unsigned NNODE_1D>
3741 set_lagrangian_dimension(2);
3761 inline void build_face_element(
const int &face_index,
3778 template<
unsigned NNODE_1D>
3787 set_lagrangian_dimension(static_cast<SolidNode*>(node_pt(0))->nlagrangian());
3795 template <
unsigned NNODE_1D>
3806 set_lagrangian_dimension(3);
3829 inline void build_face_element(
const int &face_index,
3845 template<
unsigned NNODE_1D>
3855 set_lagrangian_dimension(static_cast<SolidNode*>(node_pt(0))->nlagrangian());
3871 template <
unsigned DIM,
unsigned NNODE_1D>
3879 template<
unsigned DIM>
3908 void build_face_element(
const int &face_index,
3920 template<
unsigned DIM,
unsigned NNODE_1D>
3922 public virtual TElement<DIM-1,NNODE_1D>
3938 template<
unsigned NNODE_1D>
3966 template<
unsigned NNODE_1D>
3968 public virtual TElement<1,NNODE_1D>
3987 template<
unsigned NNODE_1D>
4014 template<
unsigned DIM,
unsigned NNODE_1D>
4032 template<
unsigned NNODE_1D>
4058 template<
unsigned NNODE_1D>
4080 template<
unsigned NNODE_1D>
double s_max() const
Max. value of local coordinate.
unsigned nplot_points_paraview(const unsigned &nplot) const
Return the number of actual plot points for paraview plot with parameter nplot.
void shape(const Vector< double > &s, Shape &psi) const
Shape function for specific TElement<2,3>
double s_min() const
Min. value of local coordinate.
unsigned n_enriched_nodes()
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
double invert_jacobian_mapping(const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Overload the template-free interface for the calculation of inverse jacobian matrix. This is a three dimensional element, so use the 3D version.
unsigned nnode_1d() const
Number of nodes along each element edge.
void shape(const Vector< double > &s, Shape &psi) const
Shape function for specific TElement<1,2>
Node * Node1_pt
First vertex node.
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Derivatives of shape functions for specific TElement<2,4>
static TBubbleEnrichedGauss< DIM, 3 > Default_enriched_integration_scheme
FaceGeometry()
Constructor: Call the constructor for the appropriate lower-dimensional QElement. ...
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
Compute the geometric shape functions, derivatives and second derivatives w.r.t local coordinates at ...
Node * node1_pt() const
Access to the first vertex node.
void write_paraview_offsets(std::ofstream &file_out, const unsigned &nplot, unsigned &offset_sum) const
Return the offsets for the paraview sub-elements. Needs to be implemented for each new geometric elem...
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Return local coordinates of node j.
~TElement()
Broken assignment operator.
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Return local coordinates of node j.
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
SolidTElement()
Constructor.
bool is_on_boundary() const
Test whether the face lies on a boundary. Relatively simple test, based on all vertices lying on (som...
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
Base class for Solid Telements.
TElementGeometricBase()
Empty default constructor.
Node * node2_pt() const
Access to the second vertex node.
unsigned nplot_points(const unsigned &nplot) const
unsigned nsub_elements_paraview(const unsigned &nplot) const
Return the number of local sub-elements for paraview plot with parameter nplot.
unsigned nnode_1d() const
Number of nodes along each element edge.
void write_paraview_offsets(std::ofstream &file_out, const unsigned &nplot, unsigned &offset_sum) const
Return the offsets for the paraview sub-elements. Needs to be implemented for each new geometric elem...
~SolidTBubbleEnrichedElement()
Broken assignment operator.
void get_boundaries_pt(std::set< unsigned > *&boundaries_pt)
Access to pointer to set of mesh boundaries that this face occupies; NULL if the node is not on any b...
TSolidElementBase()
Constructor: Empty.
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Return local coordinates of node j.
SolidTBubbleEnrichedElement()
Constructor.
TElement(const TElement &)
Broken copy constructor.
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
A general Finite Element class.
void write_paraview_type(std::ofstream &file_out, const unsigned &nplot) const
Return the paraview element type. Needs to be implemented for each new geometric element type; see ht...
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
void shape(const Vector< double > &s, Shape &psi) const
Calculate the geometric shape functions at local coordinate s.
unsigned get_bulk_node_number(const int &face_index, const unsigned &i) const
Public access function for Node_on_face.
void shape(const Vector< double > &s, Shape &psi) const
Shape function for specific TBubbleEnrichedElement<3,3>
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Return local coordinates of node j.
void write_tecplot_zone_footer(FILE *file_pt, const unsigned &nplot) const
Add tecplot zone "footer" to C-style output. (when plotting nplot points in each "coordinate directio...
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
unsigned nvertex_node() const
Number of vertex nodes in the element: One more than spatial dimension.
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
void write_tecplot_zone_footer(std::ostream &outfile, const unsigned &nplot) const
Add tecplot zone "footer" to output stream (when plotting nplot points in each "coordinate direction)...
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
SolidTElement(const SolidTElement &)
Broken copy constructor.
TElementBase(const TElementBase &)
Broken copy constructor.
void write_paraview_output_offset_information(std::ofstream &file_out, const unsigned &nplot, unsigned &counter) const
Fill in the offset information for paraview plot. Needs to be implemented for each new geometric elem...
TFace(Node *node1_pt, Node *node2_pt, Node *node3_pt)
Constructor: Pass in the three vertex nodes.
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Compute the geometric shape functions and derivatives w.r.t. local coordinates at local coordinate s...
void shape(const Vector< double > &s, Shape &psi) const
Shape function for specific TElement<1,3>
void shape(const Vector< double > &s, Shape &psi) const
Shape function for specific TBubbleEnrichedElement<2,3>
FaceGeometry()
Constructor: Call the constructor for the appropriate lower-dimensional TElement. ...
TElement(const bool &allow_high_order)
Alternative constructor.
unsigned nplot_points(const unsigned &nplot) const
void write_paraview_type(std::ofstream &file_out, const unsigned &nplot) const
Return the paraview element type. Needs to be implemented for each new geometric element type; see ht...
ElementGeometry::ElementGeometry element_geometry() const
Broken assignment operator.
void write_paraview_type(std::ofstream &file_out, const unsigned &nplot) const
Return the paraview element type. Needs to be implemented for each new geometric element type; see ht...
bool is_boundary_face() const
Test whether the face is a boundary face, i.e. does it connnect three boundary nodes?
Node * node3_pt() const
Access to the third vertex node.
unsigned nvertex_node() const
Number of vertex nodes in the element: One more than spatial dimension.
double s_max() const
Max. value of local coordinate.
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Compute the geometric shape functions and derivatives w.r.t. local coordinates at local coordinate s...
void write_tecplot_zone_footer(std::ostream &outfile, const unsigned &nplot) const
Add tecplot zone "footer" to output stream (when plotting nplot points in each "coordinate direction)...
unsigned nplot_points(const unsigned &nplot) const
Return total number of plot points (when plotting nplot points in each "coordinate direction) ...
static TGauss< 1, NNODE_1D > Default_integration_scheme
Default integration rule: Gaussian integration of same 'order' as the element.
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Return local coordinates of node j.
TBubbleEnrichedElement()
Constructor.
FaceGeometry()
Constructor: Call the constructor for the appropriate lower-dimensional QElement. ...
void write_paraview_output_offset_information(std::ofstream &file_out, const unsigned &nplot, unsigned &counter) const
Fill in the offset information for paraview plot. Needs to be implemented for each new geometric elem...
virtual void get_boundaries_pt(std::set< unsigned > *&boundaries_pt)
Return a pointer to set of mesh boundaries that this node occupies; this will be overloaded by Bounda...
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
Compute the geometric shape functions, derivatives and second derivatives w.r.t local coordinates at ...
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Derivatives of shape functions for specific TElement<2,3>
FaceGeometry()
Constructor: Call the constructor for the appropriate lower-dimensional QElement. ...
TElementBase()
Empty default constructor.
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Return local coordinates of node j.
unsigned nnode_1d() const
Number of nodes along each element edge.
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
void write_paraview_offsets(std::ofstream &file_out, const unsigned &nplot, unsigned &offset_sum) const
Return the offsets for the paraview sub-elements. Needs to be implemented for each new geometric elem...
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Derivatives of shape functions for specific TElement<3,3>
unsigned nvertex_node() const
Number of vertex nodes in the element: One more than spatial dimension.
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Return local coordinates of node j.
FaceGeometry()
Constructor: Call the constructor for the appropriate lower-dimensional QElement. ...
std::string tecplot_zone_string(const unsigned &nplot) const
Return string for tecplot zone header (when plotting nplot points in each "coordinate direction) ...
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
TBubbleEnrichedElement(const TBubbleEnrichedElement &)
Broken copy constructor.
double s_min() const
Min. value of local coordinate.
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Derivatives of shape functions for specific TElement<3,2>
FaceGeometry()
Constructor: Call the constructor for the appropriate lower-dimensional QElement. ...
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
SolidTElement()
Constructor.
unsigned nplot_points_paraview(const unsigned &nplot) const
Return the number of actual plot points for paraview plot with parameter nplot.
void shape(const Vector< double > &s, Shape &psi) const
Shape function for specific TElement<3,3>
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
SolidTElement(const SolidTElement &)
Broken copy constructor.
TSolidElementBase(const TSolidElementBase &)
Broken copy constructor.
static TGauss< 2, NNODE_1D > Default_integration_scheme
Default integration rule: Gaussian integration of same 'order' as the element.
unsigned n_enriched_nodes()
Return the number of nodes required for enrichement.
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Derivatives of shape functions for specific TElement<1,4>
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
Compute the geometric shape functions, derivatives and second derivatives w.r.t local coordinates at ...
void shape(const Vector< double > &s, Shape &psi) const
Shape function for specific TElement<2,2>
double invert_jacobian_mapping(const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Overload the template-free interface for the calculation of inverse jacobian matrix. This is a one dimensional element, so use the 1D version.
FaceGeometry()
Constructor: Call the constructor for the appropriate lower-dimensional QElement. ...
SolidTElement()
Constructor.
void shape(const double &s, double *Psi)
Definition for 1D Lagrange shape functions. The value of all the shape functions at the local coordin...
void output(std::ostream &outfile)
Output with default number of plot points.
FaceGeometry()
Constructor: Call the constructor for the appropriate lower-dimensional TElement. ...
static TGauss< 3, NNODE_1D > Default_integration_scheme
Default integration rule: Gaussian integration of same 'order' as the element.
bool local_coord_is_valid(const Vector< double > &s)
Check whether the local coordinates are valid or not.
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Compute the geometric shape functions and derivatives w.r.t. local coordinates at local coordinate s...
TElement(const TElement &)
Broken copy constructor.
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Compute the geometric shape functions and derivatives w.r.t. local coordinates at local coordinate s...
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &use_equally_spaced_interior_sample_points=false) const
Get vector of local coordinates of plot point i (when plotting nplot points in each "coordinate direc...
~TBubbleEnrichedElement()
Broken assignment operator.
void write_paraview_output_offset_information(std::ofstream &file_out, const unsigned &nplot, unsigned &counter) const
Fill in the offset information for paraview plot.
bool operator==(const TFace &other) const
Comparison operator.
double invert_jacobian_mapping(const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Overload the template-free interface for the calculation of inverse jacobian matrix. This is a two dimensional element, so use the 2D version.
void get_s_plot(const unsigned &iplot, const unsigned &nplot, Vector< double > &s, const bool &use_equally_spaced_interior_sample_points=false) const
Get vector of local coordinates of plot point i (when plotting nplot points in each "coordinate direc...
void shape(const Vector< double > &s, Shape &psi) const
Calculate the geometric shape functions at local coordinate s.
bool operator<(const TFace &other) const
Less-than operator.
void shape(const Vector< double > &s, Shape &psi) const
Calculate the geometric shape functions at local coordinate s.
~TElement()
Broken assignment operator.
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
unsigned get_bulk_node_number(const int &face_index, const unsigned &i) const
Public access function for Node_on_face.
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Derivatives of shape functions for specific TElement<3,3>
TElementGeometricBase(const TElementGeometricBase &)
Broken copy constructor.
unsigned nsub_elements_paraview(const unsigned &nplot) const
Return the number of local sub-elements for paraview plot with parameter nplot.
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Return local coordinates of node j.
virtual bool is_on_boundary() const
Test whether the Node lies on a boundary. The "bulk" Node cannot lie on a boundary, so return false. This will be overloaded by BoundaryNodes.
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Return local coordinates of node j.
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Derivatives of shape functions for specific TElement<1,3>
double s_min() const
Min. value of local coordinate.
Node * Node3_pt
Third vertex node.
TElement(const TElement &)
Broken copy constructor.
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Derivatives of shape functions for specific TBubbleElement<2,3>
std::string tecplot_zone_string(const unsigned &nplot) const
Return string for tecplot zone header (when plotting nplot points in each "coordinate direction) ...
void write_tecplot_zone_footer(FILE *file_pt, const unsigned &nplot) const
Add tecplot zone "footer" to C-style output. (when plotting nplot points in each "coordinate directio...
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Derivatives of shape functions for specific TElement<2,2>
void shape(const Vector< double > &s, Shape &psi) const
Shape function for specific TElement<3,2>
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
SolidTBubbleEnrichedElement(const SolidTBubbleEnrichedElement &)
Broken copy constructor.
unsigned nplot_points_paraview(const unsigned &nplot) const
Return the number of actual plot points for paraview plot with parameter nplot.
Node * Node2_pt
Second vertex node.
std::string tecplot_zone_string(const unsigned &nplot) const
Return string for tecplot zone header (when plotting nplot points in each "coordinate direction) ...
void shape(const Vector< double > &s, Shape &psi) const
Shape function for specific TElement<2,4>
void get_s_plot(const unsigned &iplot, const unsigned &nplot, Vector< double > &s, const bool &use_equally_spaced_interior_sample_points=false) const
Get vector of local coordinates of plot point i (when plotting nplot points in each "coordinate direc...
double s_max() const
Max. value of local coordinate.
SolidFiniteElement class.
~TElement()
Broken assignment operator.
void move_local_coord_back_into_element(Vector< double > &s) const
Adjust local coordinates so that they're located inside the element.
unsigned nsub_elements_paraview(const unsigned &nplot) const
Return the number of local sub-elements for paraview plot with.
void shape(const Vector< double > &s, Shape &psi) const
Calculate the geometric shape functions at local coordinate s.
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Return local coordinates of node j.
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
Compute the geometric shape functions, derivatives and second derivatives w.r.t local coordinates at ...
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Derivatives of shape functions for specific TElement<2,2>
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Return local coordinates of node j.
void shape(const Vector< double > &s, Shape &psi) const
Shape function for specific TElement<1,4>
SolidTElement(const SolidTElement &)
Broken copy constructor.