27#ifndef OOMPH_TELEMENT_HEADER
28#define OOMPH_TELEMENT_HEADER
32#include <oomph-lib-config.h>
66 error_stream <<
"TFace cannot have two identical vertex nodes\n";
73 std::set<Node*>
nodes;
77 std::set<Node*>::iterator
it =
nodes.begin();
180 std::set<unsigned>
set1;
183 std::set<unsigned>
set2;
186 std::set<unsigned>
set3;
227 template<
unsigned DIM,
unsigned NNODE_1D>
256 std::ostringstream error_message;
258 <<
"Element only has two nodes; called with node number " <<
j
333 std::ostringstream error_message;
335 <<
"Element only has three nodes; called with node number " <<
j
350 psi[0] = 2.0 * (
s[0] - 1.0) * (
s[0] - 0.5);
351 psi[1] = 4.0 * (1.0 -
s[0]) *
s[0];
352 psi[2] = 2.0 * (
s[0] - 0.5) *
s[0];
364 dpsids(0, 0) = 4.0 *
s[0] - 3.0;
365 dpsids(1, 0) = 4.0 - 8.0 *
s[0];
366 dpsids(2, 0) = 4.0 *
s[0] - 1.0;
417 std::ostringstream error_message;
419 <<
"Element only has four nodes; called with node number " <<
j
434 psi[0] = 0.5 * (1.0 -
s[0]) * (3.0 *
s[0] - 2.0) * (3.0 *
s[0] - 1.0);
435 psi[1] = -4.5 *
s[0] * (1.0 -
s[0]) * (3.0 *
s[0] - 2.0);
436 psi[2] = 4.5 *
s[0] * (1.0 -
s[0]) * (3.0 *
s[0] - 1.0);
437 psi[3] = 0.5 *
s[0] * (3.0 *
s[0] - 2.0) * (3.0 *
s[0] - 1.0);
448 dpsids(0, 0) = -13.5 *
s[0] *
s[0] + 18.0 *
s[0] - 5.5;
449 dpsids(1, 0) = 40.5 *
s[0] *
s[0] - 45.0 *
s[0] + 9.0;
450 dpsids(2, 0) = -40.5 *
s[0] *
s[0] + 36.0 *
s[0] - 4.5;
451 dpsids(3, 0) = 13.5 *
s[0] *
s[0] - 9.0 *
s[0] + 1.0;
506 std::ostringstream error_message;
508 <<
"Element only has three nodes; called with node number " <<
j
525 psi[2] = 1.0 -
s[0] -
s[1];
559 for (
unsigned i = 0;
i < 3;
i++)
612 std::ostringstream error_message;
614 <<
"Element only has six nodes; called with node number " <<
j
630 double s_2 = 1.0 -
s[0] -
s[1];
635 psi[0] = 2.0 *
s[0] * (
s[0] - 0.5);
636 psi[1] = 2.0 *
s[1] * (
s[1] - 0.5);
638 psi[3] = 4.0 *
s[0] *
s[1];
652 dpsids(0, 0) = 4.0 *
s[0] - 1.0;
655 dpsids(1, 1) = 4.0 *
s[1] - 1.0;
656 dpsids(2, 0) = 2.0 * (2.0 *
s[0] - 1.5 + 2.0 *
s[1]);
657 dpsids(2, 1) = 2.0 * (2.0 *
s[0] - 1.5 + 2.0 *
s[1]);
661 dpsids(4, 1) = 4.0 * (1.0 -
s[0] - 2.0 *
s[1]);
662 dpsids(5, 0) = 4.0 * (1.0 - 2.0 *
s[0] -
s[1]);
771 std::ostringstream error_message;
773 <<
"Element only has ten nodes; called with node number " <<
j
788 psi[0] = 0.5 *
s[0] * (3.0 *
s[0] - 2.0) * (3.0 *
s[0] - 1.0);
789 psi[1] = 0.5 *
s[1] * (3.0 *
s[1] - 2.0) * (3.0 *
s[1] - 1.0);
790 psi[2] = 0.5 * (1.0 -
s[0] -
s[1]) * (1.0 - 3.0 *
s[0] - 3.0 *
s[1]) *
791 (2.0 - 3.0 *
s[0] - 3.0 *
s[1]);
792 psi[3] = 4.5 *
s[0] *
s[1] * (3.0 *
s[0] - 1.0);
793 psi[4] = 4.5 *
s[0] *
s[1] * (3.0 *
s[1] - 1.0);
794 psi[5] = 4.5 *
s[1] * (1.0 -
s[0] -
s[1]) * (3.0 *
s[1] - 1.0);
796 4.5 *
s[1] * (1.0 -
s[0] -
s[1]) * (3.0 * (1.0 -
s[0] -
s[1]) - 1.0);
797 psi[7] = 4.5 *
s[0] * (1.0 -
s[0] -
s[1]) * (2.0 - 3 *
s[0] - 3 *
s[1]);
798 psi[8] = 4.5 *
s[0] * (1.0 -
s[0] -
s[1]) * (3.0 *
s[0] - 1.0);
799 psi[9] = 27.0 *
s[0] *
s[1] * (1.0 -
s[0] -
s[1]);
810 dpsids(0, 0) = 13.5 *
s[0] *
s[0] - 9.0 *
s[0] + 1.0;
813 dpsids(1, 1) = 13.5 *
s[1] *
s[1] - 9.0 *
s[1] + 1.0;
814 dpsids(2, 0) = 0.5 * (36.0 *
s[0] + 36.0 *
s[1] - 27.0 *
s[0] *
s[0] -
815 27.0 *
s[1] *
s[1] - 54.0 *
s[0] *
s[1] - 11.0);
816 dpsids(2, 1) = 0.5 * (36.0 *
s[0] + 36.0 *
s[1] - 27.0 *
s[0] *
s[0] -
817 27.0 *
s[1] *
s[1] - 54.0 *
s[0] *
s[1] - 11.0);
818 dpsids(3, 0) = 27.0 *
s[0] *
s[1] - 4.5 *
s[1];
819 dpsids(3, 1) = 4.5 *
s[0] * (3.0 *
s[0] - 1.0);
820 dpsids(4, 0) = 4.5 *
s[1] * (3.0 *
s[1] - 1.0);
821 dpsids(4, 1) = 27.0 *
s[0] *
s[1] - 4.5 *
s[0];
822 dpsids(5, 0) = 4.5 * (
s[1] - 3.0 *
s[1] *
s[1]);
824 4.5 * (
s[0] - 6.0 *
s[0] *
s[1] - 9.0 *
s[1] *
s[1] + 8 *
s[1] - 1.0);
825 dpsids(6, 0) = 4.5 * (6.0 *
s[0] *
s[1] - 5.0 *
s[1] + 6.0 *
s[1] *
s[1]);
827 4.5 * (2.0 - 5.0 *
s[0] + 3.0 *
s[0] *
s[0] + 12.0 *
s[0] *
s[1] -
828 10.0 *
s[1] + 9.0 *
s[1] *
s[1]);
830 4.5 * (2.0 - 10.0 *
s[0] + 9.0 *
s[0] *
s[0] + 12.0 *
s[0] *
s[1] -
831 5.0 *
s[1] + 3.0 *
s[1] *
s[1]);
832 dpsids(7, 1) = 4.5 * (6.0 *
s[0] *
s[0] - 5.0 *
s[0] + 6.0 *
s[0] *
s[1]);
834 4.5 * (
s[1] - 6.0 *
s[0] *
s[1] - 9.0 *
s[0] *
s[0] + 8 *
s[0] - 1.0);
835 dpsids(8, 1) = 4.5 * (
s[0] - 3.0 *
s[0] *
s[0]);
836 dpsids(9, 0) = 27.0 *
s[1] - 54.0 *
s[0] *
s[1] - 27.0 *
s[1] *
s[1];
837 dpsids(9, 1) = 27.0 *
s[0] - 54.0 *
s[0] *
s[1] - 27.0 *
s[0] *
s[0];
857 d2psids(0, 0) = 9.0 * (3.0 *
s[0] - 1.0);
862 d2psids(1, 2) = 9.0 * (3.0 *
s[1] - 1.0);
863 d2psids(2, 0) = 9.0 * (2.0 - 3.0 *
s[0] - 3.0 *
s[1]);
864 d2psids(2, 1) = 9.0 * (2.0 - 3.0 *
s[0] - 3.0 *
s[1]);
865 d2psids(2, 2) = 9.0 * (2.0 - 3.0 *
s[0] - 3.0 *
s[1]);
873 d2psids(5, 1) = 9.0 * (4.0 - 3.0 *
s[0] - 9.0 *
s[1]);
874 d2psids(5, 2) = 4.5 * (1.0 - 6.0 *
s[1]);
876 d2psids(6, 1) = 9.0 * (6.0 *
s[0] + 9.0 *
s[1] - 5.0);
877 d2psids(6, 2) = 4.5 * (6.0 *
s[0] + 12.0 *
s[1] - 5.0);
878 d2psids(8, 0) = 9.0 * (4.0 - 9.0 *
s[0] - 3.0 *
s[1]);
880 d2psids(8, 2) = 4.5 * (1.0 - 6.0 *
s[0]);
881 d2psids(7, 0) = 9.0 * (9.0 *
s[0] + 6.0 *
s[1] - 5.0);
883 d2psids(7, 2) = 4.5 * (12.0 *
s[0] + 6.0 *
s[1] - 5.0);
886 d2psids(9, 2) = 27.0 - 54.0 *
s[0] - 54.0 *
s[1];
899 template<
unsigned DIM,
unsigned NNODE_1D>
972 std::ostringstream error_message;
974 <<
"Element only has seven nodes; called with node number " <<
j
990 const double s_2 = 1.0 -
s[0] -
s[1];
1018 this->shape(
s,
psi);
1183 if (
s[
i] < 0.0)
s[
i] = 0.0;
1206 template<
unsigned DIM,
unsigned NNODE_1D>
1218 template<
unsigned NNODE_1D>
1243 std::string error_message =
1244 "One-dimensional TElements are currently only implemented for\n";
1245 error_message +=
"three and six nodes, i.e. NNODE_1D=2 , 3 , 4\n";
1253 this->set_n_node(
n_node);
1259 set_integration_scheme(&Default_integration_scheme);
1304 std::ostringstream error_message;
1306 <<
"Element only has two vertex nodes; called with node number "
1388 const unsigned&
nplot,
1392 unsigned plot = nsub_elements_paraview(
nplot);
1395 for (
unsigned i = 0;
i < plot;
i++)
1406 const unsigned&
nplot)
const
1419 const unsigned&
nplot,
1433 void output(std::ostream& output);
1436 void output(std::ostream&
outfile,
const unsigned&
nplot);
1448 const unsigned&
nplot,
1474 std::ostringstream
header;
1491 void build_face_element(
const int& face_index,
1502 template<
unsigned NNODE_1D>
1531 std::string error_message =
1532 "Triangles are currently only implemented for\n";
1533 error_message +=
"three and six nodes, i.e. NNODE_1D=2 , 3 , 4\n";
1541 this->set_n_node(
n_node);
1547 set_integration_scheme(&Default_integration_scheme);
1563 this->set_n_node(
n_node);
1569 set_integration_scheme(&Default_integration_scheme);
1599 const unsigned&
i)
const
1611 std::ostringstream error_message;
1613 <<
"Element only has three vertex nodes; called with node number "
1684 for (
unsigned i = 1;
i <=
nplot;
i++)
1696 for (
unsigned i = 1;
i <
nplot;
i++)
1707 const unsigned&
nplot,
1714 for (
unsigned i = 0;
i <
nplot - 1;
i++)
1716 for (
unsigned j = 0;
j <
nplot -
i - 1;
j++)
1738 const unsigned&
nplot)
const
1753 const unsigned&
nplot,
1768 void output(std::ostream& output);
1771 void output(std::ostream&
outfile,
const unsigned&
nplot);
1782 const unsigned&
iplot,
1783 const unsigned&
nplot,
1789 unsigned np = 0,
i,
j;
1823 std::ostringstream
header;
1825 for (
unsigned i = 1;
i <
nplot;
i++)
1830 <<
", F=FEPOINT, ET=TRIANGLE\n";
1839 const unsigned&
nplot)
const
1844 for (
unsigned i = 0;
i <
nplot;
i++)
1846 for (
unsigned j = 0;
j <
nplot -
i;
j++)
1872 for (
unsigned i = 0;
i <
nplot;
i++)
1874 for (
unsigned j = 0;
j <
nplot -
i;
j++)
1902 for (
unsigned i = 1;
i <=
nplot;
i++)
1915 void build_face_element(
const int& face_index,
1963 std::ostringstream error_message;
1965 <<
"Element only has four nodes; called with node number " <<
j
1983 psi[3] = 1.0 -
s[0] -
s[1] -
s[2];
1993 this->shape(
s,
psi);
2031 for (
unsigned i = 0;
i < 4;
i++)
2118 std::ostringstream error_message;
2120 <<
"Element only has ten nodes; called with node number " <<
j
2135 double s3 = 1.0 -
s[0] -
s[1] -
s[2];
2136 psi[0] = (2.0 *
s[0] - 1.0) *
s[0];
2137 psi[1] = (2.0 *
s[1] - 1.0) *
s[1];
2138 psi[2] = (2.0 *
s[2] - 1.0) *
s[2];
2139 psi[3] = (2.0 *
s3 - 1.0) *
s3;
2140 psi[4] = 4.0 *
s[0] *
s[1];
2141 psi[5] = 4.0 *
s[0] *
s[2];
2142 psi[6] = 4.0 *
s[0] *
s3;
2143 psi[7] = 4.0 *
s[1] *
s[2];
2144 psi[8] = 4.0 *
s[2] *
s3;
2145 psi[9] = 4.0 *
s[1] *
s3;
2155 this->shape(
s,
psi);
2158 double s3 = 1.0 -
s[0] -
s[1] -
s[2];
2160 dpsids(0, 0) = 4.0 *
s[0] - 1.0;
2165 dpsids(1, 1) = 4.0 *
s[1] - 1.0;
2170 dpsids(2, 2) = 4.0 *
s[2] - 1.0;
2423 std::ostringstream error_message;
2425 <<
"Element only has fifteen nodes; called with node number " <<
j
2441 const double s3 = 1.0 -
s[0] -
s[1] -
s[2];
2454 psi[0] = (2.0 *
s[0] - 1.0) *
s[0] +
2457 psi[1] = (2.0 *
s[1] - 1.0) *
s[1] +
2460 psi[2] = (2.0 *
s[2] - 1.0) *
s[2] +
2463 psi[3] = (2.0 *
s3 - 1.0) *
s3 +
2497 this->shape(
s,
psi);
2500 const double s3 = 1.0 -
s[0] -
s[1] -
s[2];
2504 s[1] *
s[2] * (1.0 -
s[1] -
s[2] - 2.0 *
s[0]);
2506 s[0] *
s[2] * (1.0 -
s[0] -
s[2] - 2.0 *
s[1]);
2508 s[0] *
s[1] * (1.0 -
s[0] -
s[1] - 2.0 *
s[2]);
2529 dpsids(0, 0) = 4.0 *
s[0] - 1.0 +
2546 dpsids(1, 1) = 4.0 *
s[1] - 1.0 +
2563 dpsids(2, 2) = 4.0 *
s[2] - 1.0 +
2698 const double s3 = 1.0 -
s[0] -
s[1] -
s[2];
2710 s[2] * (1.0 - 2.0 *
s[0] - 2.0 *
s[1] -
s[2]);
2712 s[1] * (1.0 - 2.0 *
s[0] - 2.0 *
s[2] -
s[1]);
2714 s[0] * (1.0 - 2.0 *
s[1] - 2.0 *
s[2] -
s[0]);
3039 template<
unsigned NNODE_1D>
3069 std::string error_message =
3070 "Tets are currently only implemented for\n";
3071 error_message +=
"four and ten nodes, i.e. NNODE_1D=2 , 3 \n";
3081 this->set_n_node(
n_node);
3087 set_integration_scheme(&Default_integration_scheme);
3117 const unsigned&
i)
const
3129 std::ostringstream error_message;
3131 <<
"Element only has four vertex nodes; called with node number " <<
j
3205 for (
unsigned j = 1;
j <=
nplot;
j++)
3207 for (
unsigned i = 1;
i <=
j;
i++)
3226 const unsigned&
nplot,
3235 for (
unsigned i = 0;
i <
nplot;
i++)
3237 for (
unsigned j = 0;
j <
nplot -
i;
j++)
3316 const unsigned&
nplot)
const
3329 const unsigned&
nplot,
3341 void output(std::ostream& output);
3344 void output(std::ostream&
outfile,
const unsigned&
nplot);
3355 const unsigned&
iplot,
3356 const unsigned&
nplot,
3363 for (
unsigned i = 0;
i <
nplot; ++
i)
3365 for (
unsigned j = 0;
j <
nplot -
i; ++
j)
3404 std::ostringstream
header;
3408 <<
", F=FEPOINT, ET=TETRAHEDRON\n";
3417 const unsigned&
nplot)
const
3422 for (
unsigned i = 0;
i <
nplot;
i++)
3424 for (
unsigned j = 0;
j <
nplot -
i;
j++)
3499 for (
unsigned i = 0;
i <
nplot;
i++)
3501 for (
unsigned j = 0;
j <
nplot -
i;
j++)
3535 for (
unsigned i = 3;
i <=
nplot;
i++)
3537 res += (
i * (
i + 1) / 2);
3552 void build_face_element(
const int& face_index,
3568 template<
unsigned DIM,
unsigned NNODE_1D>
3579 template<
unsigned DIM,
unsigned NPTS_1D>
3620 template<
unsigned DIM>
3638 unsigned n_node = this->nnode();
3639 this->set_n_node(
n_node +
3642 this->set_integration_scheme(&Default_enriched_integration_scheme);
3726 template<
unsigned DIM,
unsigned NNODE_1D>
3735 template<
unsigned NNODE_1D>
3744 set_lagrangian_dimension(1);
3758 inline void build_face_element(
const int& face_index,
3779 template<
unsigned NNODE_1D>
3781 const int& face_index,
FaceElement* face_element_pt)
3788 ->set_lagrangian_dimension(
3796 template<
unsigned NNODE_1D>
3809 set_lagrangian_dimension(2);
3823 inline void build_face_element(
const int& face_index,
3839 template<
unsigned NNODE_1D>
3841 const int& face_index,
FaceElement* face_element_pt)
3848 ->set_lagrangian_dimension(
3856 template<
unsigned NNODE_1D>
3869 set_lagrangian_dimension(3);
3886 inline void build_face_element(
const int& face_index,
3900 template<
unsigned NNODE_1D>
3902 const int& face_index,
FaceElement* face_element_pt)
3909 ->set_lagrangian_dimension(
3924 template<
unsigned DIM,
unsigned NNODE_1D>
3933 template<
unsigned DIM>
3967 template<
unsigned DIM,
unsigned NNODE_1D>
3969 :
public virtual TElement<DIM - 1, NNODE_1D>
3981 template<
unsigned NNODE_1D>
4003 template<
unsigned NNODE_1D>
4005 :
public virtual TElement<1, NNODE_1D>
4021 template<
unsigned NNODE_1D>
4043 template<
unsigned DIM,
unsigned NNODE_1D>
4057 template<
unsigned NNODE_1D>
4080 template<
unsigned NNODE_1D>
4098 template<
unsigned NNODE_1D>
A class that contains the information required by Nodes that are located on Mesh boundaries....
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
FaceElements are elements that coincide with the faces of higher-dimensional "bulk" elements....
FaceGeometry()
Constructor: Call the constructor for the appropriate lower-dimensional QElement.
FaceGeometry()
Constructor: Call the constructor for the appropriate lower-dimensional QElement.
FaceGeometry()
Constructor: Call the constructor for the appropriate lower-dimensional TElement.
FaceGeometry()
Constructor: Call the constructor for the appropriate lower-dimensional QElement.
FaceGeometry()
Constructor: Call the constructor for the appropriate lower-dimensional QElement.
FaceGeometry()
Constructor: Call the constructor for the appropriate lower-dimensional QElement.
FaceGeometry()
Constructor: Call the constructor for the appropriate lower-dimensional TElement.
FaceGeometry()
Constructor: Call the constructor for the appropriate lower-dimensional QElement.
FaceGeometry class definition: This policy class is used to allow construction of face elements that ...
A general Finite Element class.
unsigned dim() const
Return the spatial dimension of the element, i.e. the number of local coordinates required to paramet...
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
virtual bool is_on_boundary() const
Test whether the Node lies on a boundary. The "bulk" Node cannot lie on a boundary,...
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...
An OomphLibError object which should be thrown when an run-time error is encountered....
Point element has just a single node and a single shape function which is identically equal to one.
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
SolidFiniteElement class.
A Class for nodes that deform elastically (i.e. position is an unknown in the problem)....
unsigned nlagrangian() const
Return number of lagrangian coordinates.
SolidTBubbleEnrichedElement(const SolidTBubbleEnrichedElement &)=delete
Broken copy constructor.
SolidTBubbleEnrichedElement()
Constructor.
void build_face_element(const int &face_index, FaceElement *face_element_pt)
Build the lower-dimensional FaceElement Need to put in a final override here.
~SolidTBubbleEnrichedElement()
Broken assignment operator.
SolidTBubbleEnrichedElement elements are the enriched version of the SolidTElements....
SolidTElement(const SolidTElement &)=delete
Broken copy constructor.
SolidTElement()
Constructor.
SolidTElement()
Constructor.
SolidTElement(const SolidTElement &)=delete
Broken copy constructor.
SolidTElement()
Constructor.
SolidTElement(const SolidTElement &)=delete
Broken copy constructor.
SolidTElement elements are triangular/tet elements whose derivatives also include those based upon th...
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
unsigned n_enriched_nodes()
Return the number of nodes required for enrichement.
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
Second derivatives of shape functions for specific TBubbleElement<2,3>: d2psids(i,...
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Derivatives of shape functions for specific TBubbleElement<2,3>
void shape(const Vector< double > &s, Shape &psi) const
Shape function for specific TBubbleEnrichedElement<2,3>
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Return local coordinates of node j.
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
Second derivatives of shape functions for specific TElement<3,3>: d2psids(i,0) = d2psids(i,...
unsigned n_enriched_nodes()
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Derivatives of shape functions for specific TElement<3,3>
void shape(const Vector< double > &s, Shape &psi) const
Shape function for specific TBubbleEnrichedElement<3,3>
A class for those member functions that must be fully specialised for Telements that are enriched by ...
TBubbleEnrichedElement(const TBubbleEnrichedElement &)=delete
Broken copy constructor.
void build_face_element(const int &face_index, FaceElement *face_element_pt)
Build the lower-dimensional FaceElement.
void shape(const Vector< double > &s, Shape &psi) const
Calculate the geometric shape functions at local coordinate s.
~TBubbleEnrichedElement()
Broken assignment operator.
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.
static TBubbleEnrichedGauss< DIM, 3 > Default_enriched_integration_scheme
TBubbleEnrichedElement()
Constructor.
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 ...
TElement class for which the shape functions have been enriched by a single bubble function of the ne...
const unsigned Central_node_on_face[3]
Define integration schemes that are required to exactly integrate the mass matrices of the bubble-enr...
Empty base class for Telements (created so that we can use dynamic_cast<>() to figure out if a an ele...
void move_local_coord_back_into_element(Vector< double > &s) const
Adjust local coordinates so that they're located inside the element.
TElementBase()
Empty default constructor.
ElementGeometry::ElementGeometry element_geometry() const
Broken assignment operator.
TElementBase(const TElementBase &)=delete
Broken copy constructor.
bool local_coord_is_valid(const Vector< double > &s)
Check whether the local coordinates are valid or not.
Empty base class for Telements (created so that we can use dynamic_cast<>() to figure out if a an ele...
TElementGeometricBase(const TElementGeometricBase &)=delete
Broken copy constructor.
TElementGeometricBase()
Empty default constructor.
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<2,2>
void shape(const Vector< double > &s, Shape &psi) const
Shape function for specific TElement<1,2>
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
Second derivatives of shape functions for specific TElement<1,2>: d2psids(i,0) = .
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>
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
Second derivatives of shape functions for specific TElement<1,3>: d2psids(i,0) = .
void shape(const Vector< double > &s, Shape &psi) const
Shape function for specific TElement<1,3>
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>
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
Second derivatives of shape functions for specific TElement<2,4>: d2psids(i,0) = .
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Derivatives of shape functions for specific TElement<1,4>
void shape(const Vector< double > &s, Shape &psi) const
Shape function for specific TElement<2,2>
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
Second derivatives of shape functions for specific TElement<2,2>: d2psids(i,0) = d2psids(i,...
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<2,3>
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Derivatives of shape functions for specific TElement<2,3>
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
Second derivatives of shape functions for specific TElement<2,3>: d2psids(i,0) = d2psids(i,...
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Derivatives of shape functions for specific TElement<2,4>
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<2,4>
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
Second derivatives of shape functions for specific TElement<2,4>: d2psids(i,0) = d2psids(i,...
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Derivatives of shape functions for specific TElement<3,2>
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
Second derivatives of shape functions for specific TElement<3,2>: d2psids(i,0) = d2psids(i,...
void shape(const Vector< double > &s, Shape &psi) const
Shape function for specific TElement<3,2>
void shape(const Vector< double > &s, Shape &psi) const
Shape function for specific TElement<3,3>
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
Second derivatives of shape functions for specific TElement<3,3>: d2psids(i,0) = d2psids(i,...
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Derivatives of shape functions for specific TElement<3,3>
A class for those member functions that must be fully specialised for the Telements....
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.
std::string tecplot_zone_string(const unsigned &nplot) const
Return string for tecplot zone header (when plotting nplot points in each "coordinate direction)
unsigned nvertex_node() const
Number of vertex nodes in the element: One more than spatial dimension.
unsigned nplot_points(const unsigned &nplot) const
Return total number of plot points (when plotting nplot points in each "coordinate direction)
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 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...
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...
~TElement()
Broken assignment operator.
double s_max() const
Max. value of local coordinate.
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...
unsigned nsub_elements_paraview(const unsigned &nplot) const
Return the number of local sub-elements for paraview plot with parameter nplot.
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....
TElement(const TElement &)=delete
Broken copy constructor.
unsigned nnode_1d() const
Number of nodes along each element edge.
void shape(const Vector< double > &s, Shape &psi) const
Calculate the geometric shape functions at local coordinate s.
static TGauss< 1, NNODE_1D > Default_integration_scheme
Default integration rule: Gaussian integration of same 'order' as the element.
double s_min() const
Min. value of local coordinate.
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.
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...
unsigned nplot_points_paraview(const unsigned &nplot) const
Return the number of actual plot points for paraview plot with parameter nplot.
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...
unsigned nvertex_node() const
Number of vertex nodes in the element: One more than spatial dimension.
double s_min() const
Min. value of local coordinate.
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)...
void shape(const Vector< double > &s, Shape &psi) const
Calculate the geometric shape functions at local coordinate s.
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...
std::string tecplot_zone_string(const unsigned &nplot) const
Return string for tecplot zone header (when plotting nplot points in each "coordinate direction)
unsigned nplot_points_paraview(const unsigned &nplot) const
Return the number of actual plot points for paraview plot with parameter nplot.
double s_max() const
Max. value of local coordinate.
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...
~TElement()
Broken assignment 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....
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...
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
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.
static TGauss< 2, NNODE_1D > Default_integration_scheme
Default integration rule: Gaussian integration of same 'order' as the element.
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 ...
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 local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Return local coordinates of node j.
unsigned nplot_points(const unsigned &nplot) const
Return total number of plot points (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...
unsigned get_bulk_node_number(const int &face_index, const unsigned &i) const
Public access function for Node_on_face.
TElement(const TElement &)=delete
Broken copy constructor.
TElement(const bool &allow_high_order)
Alternative constructor.
unsigned get_bulk_node_number(const int &face_index, const unsigned &i) const
Public access function for Node_on_face.
TElement(const TElement &)=delete
Broken copy constructor.
unsigned nnode_1d() const
Number of nodes along each element edge.
double s_max() const
Max. value of local coordinate.
static TGauss< 3, NNODE_1D > Default_integration_scheme
Default integration rule: Gaussian integration of same 'order' as the element.
unsigned nsub_elements_paraview(const unsigned &nplot) const
Return the number of local sub-elements for paraview plot with parameter nplot.
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)...
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 ...
~TElement()
Broken assignment operator.
unsigned nplot_points_paraview(const unsigned &nplot) const
Return the number of actual plot points for paraview plot with parameter nplot.
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_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...
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
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 shape(const Vector< double > &s, Shape &psi) const
Calculate the geometric shape functions at local coordinate s.
unsigned nvertex_node() const
Number of vertex nodes in the element: One more than spatial dimension.
unsigned nplot_points(const unsigned &nplot) const
Return total number of plot points (when plotting nplot points in each "coordinate direction)
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Return local coordinates of node j.
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...
double s_min() const
Min. value of local coordinate.
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 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.
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....
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...
const unsigned Node_on_face[3][2]
Assign the nodal translation schemes.
bool is_on_boundary() const
Test whether the face lies on a boundary. Relatively simple test, based on all vertices lying on (som...
Node * Node2_pt
Second vertex node.
Node * node3_pt() const
Access to the third vertex node.
Node * Node3_pt
Third vertex node.
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...
Node * node1_pt() const
Access to the first vertex node.
TFace(Node *node1_pt, Node *node2_pt, Node *node3_pt)
Constructor: Pass in the three vertex nodes.
Node * Node1_pt
First vertex node.
bool operator<(const TFace &other) const
Less-than operator.
bool is_boundary_face() const
Test whether the face is a boundary face, i.e. does it connnect three boundary nodes?
Node * node2_pt() const
Access to the second vertex node.
bool operator==(const TFace &other) const
Comparison operator.
Class for Gaussian integration rules for triangles/tets.
Base class for Solid Telements.
TSolidElementBase()
Constructor: Empty.
TSolidElementBase(const TSolidElementBase &)=delete
Broken copy constructor.
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).