28 #ifndef OOMPH_QELEMENT_HEADER
29 #define OOMPH_QELEMENT_HEADER
33 #include <oomph-lib-config.h>
115 unsigned ncoord =
dim();
116 for (
unsigned i = 0;
i < ncoord;
i++)
131 unsigned ncoord =
dim();
132 for (
unsigned i = 0;
i < ncoord;
i++)
146 unsigned n_dim =
dim();
173 for (
unsigned i = 0;
i < n_dim;
i++)
255 throw OomphLibError(
"Macro Element pointer not set in this element\n",
281 throw OomphLibError(
"Macro Element pointer not set in this element\n",
303 static_cast<double>(
dim() - 1)));
387 unsigned n_xi = xi_fe.size();
388 for (
unsigned i = 0;
i < n_xi;
i++)
396 unsigned n_xi = xi.size();
397 for (
unsigned i = 0;
i < n_xi;
i++)
417 unsigned n_x = x_fe.size();
418 for (
unsigned i = 0;
i < n_x;
i++)
426 for (
unsigned i = 0;
i < n_x;
i++)
457 template<
unsigned DIM,
unsigned NNODE_1D>
481 template<
unsigned NNODE_1D>
497 this->set_n_node(NNODE_1D);
499 this->set_dimension(1);
501 this->set_integration_scheme(&Default_integration_scheme);
533 return FiniteElement::invert_jacobian<1>(jacobian, inverse_jacobian);
557 unsigned n_node_1d = nnode_1d();
565 nod_pt = node_pt(n_node_1d - 1);
568 std::ostringstream error_message;
569 error_message <<
"Vertex node number is " <<
j
570 <<
" but must be from 0 to 1\n";
583 s[0] = this->s_min() +
584 double(
j) /
double(NNODE_1D - 1) * (this->s_max() - this->s_min());
591 s_fraction.resize(1);
632 const unsigned& nplot,
633 unsigned& counter)
const
636 unsigned plot = nsub_elements_paraview(nplot);
639 for (
unsigned i = 0;
i <
plot;
i++)
641 file_out <<
i + counter <<
" " <<
i + 1 + counter << std::endl;
643 counter += nplot_points_paraview(nplot);
651 const unsigned& nplot)
const
653 unsigned local_loop = nsub_elements_paraview(nplot);
654 for (
unsigned i = 0;
i < local_loop;
i++)
656 file_out <<
"3" << std::endl;
664 const unsigned& nplot,
665 unsigned& offset_sum)
const
669 unsigned local_loop = nsub_elements_paraview(nplot);
670 for (
unsigned i = 0;
i < local_loop;
i++)
673 file_out << offset_sum << std::endl;
678 void output(std::ostream& outfile);
681 void output(std::ostream& outfile,
const unsigned& n_plot);
684 void output(FILE* file_pt);
687 void output(FILE* file_pt,
const unsigned& n_plot);
694 const unsigned& nplot,
696 const bool& use_equally_spaced_interior_sample_points =
false)
const
701 if (use_equally_spaced_interior_sample_points)
704 double dx_new = range /
double(nplot);
705 double range_new =
double(nplot - 1) * dx_new;
706 s[0] = -1.0 + 0.5 * dx_new + range_new * (1.0 +
s[0]) / range;
719 std::ostringstream header;
720 header <<
"ZONE I=" << nplot <<
"\n";
730 for (
unsigned i = 0;
i <
DIM;
i++)
740 const unsigned&
i)
const
742 face_node_number_error_check(
i);
744 if (face_index == -1)
748 else if (face_index == +1)
750 return nnode_1d() - 1;
754 std::string err =
"Face index should be in {-1, +1}.";
766 std::string err =
"Face index should be in {-1, +1}.";
777 const int& face_index)
const
783 else if (face_index == -1)
789 std::string err =
"Face index should be in {-1, +1}.";
798 const int& face_index)
const
804 else if (face_index == -1)
810 std::string err =
"Face index should be in {-1, +1}.";
836 template<
unsigned NNODE_1D>
852 this->set_n_node(NNODE_1D * NNODE_1D);
856 set_integration_scheme(&Default_integration_scheme);
890 return FiniteElement::invert_jacobian<2>(jacobian, inverse_jacobian);
915 unsigned n_node_1d = nnode_1d();
923 nod_pt = node_pt(n_node_1d - 1);
926 nod_pt = node_pt(n_node_1d * (n_node_1d - 1));
929 nod_pt = node_pt(n_node_1d * n_node_1d - 1);
932 std::ostringstream error_message;
933 error_message <<
"Vertex node number is " <<
j
934 <<
" but must be from 0 to 3\n";
948 unsigned j0 =
j % NNODE_1D;
949 unsigned j1 =
j / NNODE_1D;
950 const double S_min = this->s_min();
951 const double S_range = this->s_max() - S_min;
959 s_fraction.resize(2);
960 unsigned j0 =
j % NNODE_1D;
961 unsigned j1 =
j / NNODE_1D;
988 return nplot * nplot;
995 return (nplot - 1) * (nplot - 1);
1002 const unsigned& nplot,
1003 unsigned& counter)
const
1006 unsigned plot = nsub_elements_paraview(nplot);
1009 for (
unsigned i = 0;
i <
plot;
i++)
1011 unsigned d = (
i - (
i % (nplot - 1))) / (nplot - 1);
1013 file_out <<
i % (nplot - 1) + d * nplot + counter <<
" "
1014 <<
i % (nplot - 1) + 1 + d * nplot + counter <<
" "
1015 <<
i % (nplot - 1) + 1 + (d + 1) * nplot + counter <<
" "
1016 <<
i % (nplot - 1) + (d + 1) * nplot + counter << std::endl;
1018 counter += nplot_points_paraview(nplot);
1026 const unsigned& nplot)
const
1028 unsigned local_loop = nsub_elements_paraview(nplot);
1029 for (
unsigned i = 0;
i < local_loop;
i++)
1031 file_out <<
"9" << std::endl;
1039 const unsigned& nplot,
1040 unsigned& offset_sum)
const
1044 unsigned local_loop = nsub_elements_paraview(nplot);
1045 for (
unsigned i = 0;
i < local_loop;
i++)
1048 file_out << offset_sum << std::endl;
1053 void output(std::ostream& outfile);
1056 void output(std::ostream& outfile,
const unsigned& n_plot);
1059 void output(FILE* file_pt);
1062 void output(FILE* file_pt,
const unsigned& n_plot);
1069 const unsigned& nplot,
1071 const bool& use_equally_spaced_interior_sample_points =
false)
const
1075 unsigned i0 =
i % nplot;
1076 unsigned i1 = (
i - i0) / nplot;
1080 if (use_equally_spaced_interior_sample_points)
1083 double dx_new = range /
double(nplot);
1084 double range_new =
double(nplot - 1) * dx_new;
1085 s[0] = -1.0 + 0.5 * dx_new + range_new * (1.0 +
s[0]) / range;
1086 s[1] = -1.0 + 0.5 * dx_new + range_new * (1.0 +
s[1]) / range;
1100 std::ostringstream header;
1101 header <<
"ZONE I=" << nplot <<
", J=" << nplot <<
"\n";
1102 return header.str();
1111 for (
unsigned i = 0;
i <
DIM;
i++)
1121 const unsigned&
i)
const
1123 face_node_number_error_check(
i);
1125 const unsigned nn1d = nnode_1d();
1127 if (face_index == -1)
1131 else if (face_index == +1)
1133 return nn1d *
i + nn1d - 1;
1135 else if (face_index == -2)
1139 else if (face_index == +2)
1141 return nn1d * (nn1d - 1) +
i;
1145 std::string err =
"Face index should be in {-1, +1, -2, +2}.";
1158 else if (face_index > 0)
1164 std::string err =
"Face index should be one of {-1, +1, -2, +2}.";
1173 const int& face_index)
const
1175 if (face_index == 1)
1179 else if (face_index == -1)
1183 else if (face_index == -2)
1187 else if (face_index == 2)
1193 std::string err =
"Face index should be in {-1, +1}.";
1202 const int& face_index)
const
1204 if (face_index == 1)
1208 else if (face_index == -1)
1212 else if (face_index == -2)
1216 else if (face_index == 2)
1222 std::string err =
"Face index should be in {-1, +1}.";
1248 template<
unsigned NNODE_1D>
1264 this->set_n_node(NNODE_1D * NNODE_1D * NNODE_1D);
1268 set_integration_scheme(&Default_integration_scheme);
1307 return FiniteElement::invert_jacobian<3>(jacobian, inverse_jacobian);
1331 unsigned N = nnode_1d();
1336 nod_pt = node_pt(0);
1339 nod_pt = node_pt(
N - 1);
1342 nod_pt = node_pt(
N * (
N - 1));
1345 nod_pt = node_pt(
N *
N - 1);
1348 nod_pt = node_pt(
N *
N * (
N - 1));
1351 nod_pt = node_pt(
N *
N * (
N - 1) + (
N - 1));
1354 nod_pt = node_pt(
N *
N *
N -
N);
1357 nod_pt = node_pt(
N *
N *
N - 1);
1360 std::ostringstream error_message;
1361 error_message <<
"Vertex node number is " <<
j
1362 <<
" but must be from 0 to 7\n";
1375 unsigned j0 =
j % NNODE_1D;
1376 unsigned j1 = (
j / NNODE_1D) % NNODE_1D;
1377 unsigned j2 =
j / (NNODE_1D * NNODE_1D);
1378 const double S_min = this->s_min();
1379 const double S_range = this->s_max() - S_min;
1389 s_fraction.resize(3);
1390 unsigned j0 =
j % NNODE_1D;
1391 unsigned j1 = (
j / NNODE_1D) % NNODE_1D;
1392 unsigned j2 =
j / (NNODE_1D * NNODE_1D);
1420 return nplot * nplot * nplot;
1427 return (nplot - 1) * (nplot - 1) * (nplot - 1);
1434 const unsigned& nplot,
1435 unsigned& counter)
const
1438 unsigned plot = nsub_elements_paraview(nplot);
1440 for (
unsigned j = 0;
j <
plot;
j += (nplot - 1) * (nplot - 1) + 1)
1443 unsigned r = ((
j - (
j % ((nplot - 1) * (nplot - 1)))) /
1444 ((nplot - 1) * (nplot - 1)));
1447 unsigned sub_plot = (nplot - 1) * (nplot - 1);
1450 for (
unsigned i = 0;
i < sub_plot;
i++)
1452 unsigned d = ((
i - (
i % (nplot - 1))) / (nplot - 1));
1457 <<
i % (nplot - 1) + d * nplot +
r * nplot * nplot + counter <<
" "
1458 <<
i % (nplot - 1) + 1 + d * nplot +
r * nplot * nplot + counter
1460 <<
i % (nplot - 1) + 1 + (d + 1) * nplot +
r * nplot * nplot +
1463 <<
i % (nplot - 1) + (d + 1) * nplot +
r * nplot * nplot + counter
1467 <<
i % (nplot - 1) + d * nplot + (
r + 1) * nplot * nplot + counter
1469 <<
i % (nplot - 1) + 1 + d * nplot + (
r + 1) * nplot * nplot +
1472 <<
i % (nplot - 1) + 1 + (d + 1) * nplot + (
r + 1) * nplot * nplot +
1475 <<
i % (nplot - 1) + (d + 1) * nplot + (
r + 1) * nplot * nplot +
1480 counter += nplot_points_paraview(nplot);
1488 const unsigned& nplot)
const
1490 unsigned local_loop = nsub_elements_paraview(nplot);
1491 for (
unsigned i = 0;
i < local_loop;
i++)
1493 file_out <<
"12" << std::endl;
1501 const unsigned& nplot,
1502 unsigned& offset_sum)
const
1504 unsigned local_loop = nsub_elements_paraview(nplot);
1505 for (
unsigned i = 0;
i < local_loop;
i++)
1508 file_out << offset_sum << std::endl;
1513 void output(std::ostream& outfile);
1516 void output(std::ostream& outfile,
const unsigned& n_plot);
1519 void output(FILE* file_pt);
1522 void output(FILE* file_pt,
const unsigned& n_plot);
1528 const unsigned& nplot,
1530 const bool& use_equally_spaced_interior_sample_points =
false)
const
1534 unsigned i01 =
i % (nplot * nplot);
1535 unsigned i0 = i01 % nplot;
1536 unsigned i1 = (i01 - i0) / nplot;
1537 unsigned i2 = (
i - i01) / (nplot * nplot);
1542 if (use_equally_spaced_interior_sample_points)
1545 double dx_new = range /
double(nplot);
1546 double range_new =
double(nplot - 1) * dx_new;
1547 s[0] = -1.0 + 0.5 * dx_new + range_new * (1.0 +
s[0]) / range;
1548 s[1] = -1.0 + 0.5 * dx_new + range_new * (1.0 +
s[1]) / range;
1549 s[2] = -1.0 + 0.5 * dx_new + range_new * (1.0 +
s[2]) / range;
1564 std::ostringstream header;
1565 header <<
"ZONE I=" << nplot <<
", J=" << nplot <<
", K=" << nplot
1567 return header.str();
1576 for (
unsigned i = 0;
i <
DIM;
i++)
1586 const unsigned&
i)
const
1588 face_node_number_error_check(
i);
1590 const unsigned nn1d = nnode_1d();
1592 if (face_index == -1)
1596 else if (face_index == +1)
1598 return i * nn1d + (nn1d - 1);
1600 else if (face_index == -2)
1602 return i % nn1d + (
i / nn1d) * nn1d * nn1d;
1604 else if (face_index == +2)
1606 return i % nn1d + (
i / nn1d) * nn1d * nn1d + (nn1d * (nn1d - 1));
1608 else if (face_index == -3)
1612 else if (face_index == +3)
1614 return i + (nn1d * nn1d) * (nn1d - 1);
1618 std::string err =
"Face index should be in {-1, +1, -2, +2, -3, +3}.";
1627 if (face_index == -3)
1631 else if (face_index == +3)
1635 else if (face_index == -2)
1639 else if (face_index == 2)
1643 else if (face_index == -1)
1647 else if (face_index == 1)
1653 std::string err =
"Face index should be in {-1, +1, -2, +2, -3, +3}.";
1662 const int& face_index)
const
1664 if (face_index == 1)
1668 else if (face_index == -1)
1672 else if (face_index == -2)
1676 else if (face_index == 2)
1680 else if (face_index == -3)
1684 else if (face_index == 3)
1690 std::string err =
"Face index should be in {-1, +1}.";
1699 const int& face_index)
const
1701 if (face_index == 1)
1705 else if (face_index == -1)
1709 else if (face_index == -2)
1713 else if (face_index == 2)
1717 else if (face_index == -3)
1721 else if (face_index == 3)
1727 std::string err =
"Face index should be in {-1, +1}.";
1740 template<
unsigned DIM,
unsigned NNODE_1D>
1749 template<
unsigned NNODE_1D>
1758 set_lagrangian_dimension(1);
1774 inline void output(std::ostream& outfile,
const unsigned& n_plot);
1783 inline void output(FILE* file_pt,
const unsigned& n_plot);
1791 inline void build_face_element(
const int& face_index,
1812 template<
unsigned NNODE_1D>
1814 const unsigned& n_plot)
1820 outfile <<
"ZONE I=" << n_plot << std::endl;
1823 unsigned n_dim = this->nodal_dimension();
1826 unsigned n_lagr =
static_cast<SolidNode*
>(node_pt(0))->nlagrangian();
1829 for (
unsigned l = 0; l < n_plot; l++)
1831 s[0] = -1.0 + l * 2.0 / (n_plot - 1);
1834 for (
unsigned i = 0;
i < n_dim;
i++)
1836 outfile << QElement<1, NNODE_1D>::interpolated_x(
s,
i) <<
" ";
1839 for (
unsigned i = 0;
i < n_lagr;
i++)
1841 outfile << SolidQElement<1, NNODE_1D>::interpolated_xi(
s,
i) <<
" ";
1843 outfile << std::endl;
1845 outfile << std::endl;
1852 template<
unsigned NNODE_1D>
1859 fprintf(file_pt,
"ZONE I=%i\n", n_plot);
1862 unsigned n_dim = this->nodal_dimension();
1865 unsigned n_lagr =
static_cast<SolidNode*
>(node_pt(0))->nlagrangian();
1868 for (
unsigned l = 0; l < n_plot; l++)
1870 s[0] = -1.0 + l * 2.0 / (n_plot - 1);
1873 for (
unsigned i = 0;
i < n_dim;
i++)
1878 for (
unsigned i = 0;
i < n_lagr;
i++)
1883 fprintf(file_pt,
"\n");
1885 fprintf(file_pt,
"\n");
1893 template<
unsigned NNODE_1D>
1895 const int& face_index,
FaceElement* face_element_pt)
1902 ->set_lagrangian_dimension(
1910 template<
unsigned NNODE_1D>
1923 set_lagrangian_dimension(2);
1939 inline void output(std::ostream& outfile,
const unsigned& n_plot);
1948 inline void output(FILE* file_pt,
const unsigned& n_plot);
1958 inline void build_face_element(
const int& face_index,
1970 template<
unsigned NNODE_1D>
1972 const unsigned& n_plot)
1978 outfile <<
"ZONE I=" << n_plot <<
", J=" << n_plot << std::endl;
1981 unsigned n_dim = this->nodal_dimension();
1984 unsigned n_lagr =
static_cast<SolidNode*
>(node_pt(0))->nlagrangian();
1987 for (
unsigned l2 = 0; l2 < n_plot; l2++)
1989 s[1] = -1.0 + l2 * 2.0 / (n_plot - 1);
1990 for (
unsigned l1 = 0; l1 < n_plot; l1++)
1992 s[0] = -1.0 + l1 * 2.0 / (n_plot - 1);
1995 for (
unsigned i = 0;
i < n_dim;
i++)
1997 outfile << QElement<2, NNODE_1D>::interpolated_x(
s,
i) <<
" ";
2000 for (
unsigned i = 0;
i < n_lagr;
i++)
2002 outfile << SolidQElement<2, NNODE_1D>::interpolated_xi(
s,
i) <<
" ";
2004 outfile << std::endl;
2007 outfile << std::endl;
2014 template<
unsigned NNODE_1D>
2021 fprintf(file_pt,
"ZONE I=%i, J=%i\n", n_plot, n_plot);
2024 unsigned n_dim = this->nodal_dimension();
2027 unsigned n_lagr =
static_cast<SolidNode*
>(node_pt(0))->nlagrangian();
2030 for (
unsigned l2 = 0; l2 < n_plot; l2++)
2032 s[1] = -1.0 + l2 * 2.0 / (n_plot - 1);
2033 for (
unsigned l1 = 0; l1 < n_plot; l1++)
2035 s[0] = -1.0 + l1 * 2.0 / (n_plot - 1);
2038 for (
unsigned i = 0;
i < n_dim;
i++)
2043 for (
unsigned i = 0;
i < n_lagr;
i++)
2048 fprintf(file_pt,
"\n");
2051 fprintf(file_pt,
"\n");
2059 template<
unsigned NNODE_1D>
2061 const int& face_index,
FaceElement* face_element_pt)
2068 ->set_lagrangian_dimension(
2076 template<
unsigned NNODE_1D>
2089 set_lagrangian_dimension(3);
2105 inline void output(std::ostream& outfile,
const unsigned& n_plot);
2114 inline void output(FILE* file_pt,
const unsigned& n_plot);
2127 inline void build_face_element(
const int& face_index,
2139 template<
unsigned NNODE_1D>
2141 const unsigned& n_plot)
2147 outfile <<
"ZONE I=" << n_plot <<
", J=" << n_plot <<
", K=" << n_plot
2151 unsigned n_dim = this->nodal_dimension();
2154 unsigned n_lagr =
static_cast<SolidNode*
>(node_pt(0))->nlagrangian();
2157 for (
unsigned l3 = 0; l3 < n_plot; l3++)
2159 s[2] = -1.0 + l3 * 2.0 / (n_plot - 1);
2160 for (
unsigned l2 = 0; l2 < n_plot; l2++)
2162 s[1] = -1.0 + l2 * 2.0 / (n_plot - 1);
2163 for (
unsigned l1 = 0; l1 < n_plot; l1++)
2165 s[0] = -1.0 + l1 * 2.0 / (n_plot - 1);
2168 for (
unsigned i = 0;
i < n_dim;
i++)
2170 outfile << QElement<3, NNODE_1D>::interpolated_x(
s,
i) <<
" ";
2173 for (
unsigned i = 0;
i < n_lagr;
i++)
2175 outfile << SolidQElement<3, NNODE_1D>::interpolated_xi(
s,
i) <<
" ";
2177 outfile << std::endl;
2181 outfile << std::endl;
2188 template<
unsigned NNODE_1D>
2195 fprintf(file_pt,
"ZONE I=%i, J=%i, K=%i\n", n_plot, n_plot, n_plot);
2198 unsigned n_dim = this->nodal_dimension();
2201 unsigned n_lagr =
static_cast<SolidNode*
>(node_pt(0))->nlagrangian();
2204 for (
unsigned l3 = 0; l3 < n_plot; l3++)
2206 s[2] = -1.0 + l3 * 2.0 / (n_plot - 1);
2207 for (
unsigned l2 = 0; l2 < n_plot; l2++)
2209 s[1] = -1.0 + l2 * 2.0 / (n_plot - 1);
2210 for (
unsigned l1 = 0; l1 < n_plot; l1++)
2212 s[0] = -1.0 + l1 * 2.0 / (n_plot - 1);
2215 for (
unsigned i = 0;
i < n_dim;
i++)
2221 for (
unsigned i = 0;
i < n_lagr;
i++)
2227 fprintf(file_pt,
"\n");
2231 fprintf(file_pt,
"\n");
2239 template<
unsigned NNODE_1D>
2241 const int& face_index,
FaceElement* face_element_pt)
2248 ->set_lagrangian_dimension(
2257 template<
unsigned DIM>
2272 template<
unsigned DIM,
unsigned INITIAL_NNODE_1D = 2>
2284 template<
unsigned DIM>
AnnoyingScalar abs(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:135
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Base class for all brick elements.
Definition: Qelements.h:1233
virtual Node * vertex_node_pt(const unsigned &j) const =0
Pointer to the j-th vertex node in the element.
virtual unsigned nvertex_node() const =0
Number of vertex nodes in the element.
BrickElementBase()
Constructor. Empty.
Definition: Qelements.h:1236
Definition: elements.h:4338
Definition: elements.h:1313
virtual void set_macro_elem_pt(MacroElement *macro_elem_pt)
Definition: elements.h:1872
virtual void output(std::ostream &outfile)
Definition: elements.h:3050
virtual double s_min() const
Min value of local coordinate.
Definition: elements.h:2793
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
Definition: elements.cc:3962
unsigned dim() const
Definition: elements.h:2611
MacroElement * Macro_elem_pt
Pointer to the element's macro element (NULL by default)
Definition: elements.h:1683
virtual double s_max() const
Max. value of local coordinate.
Definition: elements.h:2803
MacroElement * macro_elem_pt()
Access function to pointer to macro element.
Definition: elements.h:1878
virtual unsigned nnode_1d() const
Definition: elements.h:2218
Base class for all line elements.
Definition: Qelements.h:466
LineElementBase()
Constructor. Empty.
Definition: Qelements.h:469
virtual Node * vertex_node_pt(const unsigned &j) const =0
Pointer to the j-th vertex node in the element.
virtual unsigned nvertex_node() const =0
Number of vertex nodes in the element.
Definition: macro_element.h:73
void macro_map(const Vector< double > &s, Vector< double > &r)
The mapping from local to global coordinates at the current time : r(s)
Definition: macro_element.h:126
Definition: oomph_definitions.h:222
Definition: Qelements.h:2274
PRefineableQElement()
Empty constuctor.
Definition: Qelements.h:2277
Base class for Qelements.
Definition: Qelements.h:91
virtual void set_macro_elem_pt(MacroElement *macro_elem_pt)
Definition: Qelements.h:143
QElementBase(const QElementBase &)=delete
Broken copy constructor.
Vector< double > * S_macro_ur_pt
Pointer to vector of upper right vertex coords. in macro element.
Definition: Qelements.h:317
QElementBase()
Constructor: Initialise pointers to macro element reference coords.
Definition: Qelements.h:94
bool local_coord_is_valid(const Vector< double > &s)
Check whether the local coordinate are valid or not.
Definition: Qelements.h:113
ElementGeometry::ElementGeometry element_geometry() const
It's a Q element!
Definition: Qelements.h:307
void get_x_from_macro_element(const unsigned &t, const Vector< double > &s, Vector< double > &x)
Definition: Qelements.h:274
double & s_macro_ll(const unsigned &i)
Definition: Qelements.h:186
void get_x_from_macro_element(const Vector< double > &s, Vector< double > &x) const
Definition: Qelements.h:249
void move_local_coord_back_into_element(Vector< double > &s) const
Definition: Qelements.h:129
double s_macro_ll(const unsigned &i) const
Definition: Qelements.h:218
unsigned nnode_on_face() const
Definition: Qelements.h:299
Vector< double > * S_macro_ll_pt
Pointer to vector of lower left vertex coords. in macro element.
Definition: Qelements.h:314
double s_macro_ur(const unsigned &i) const
Definition: Qelements.h:234
double & s_macro_ur(const unsigned &i)
Definition: Qelements.h:202
virtual ~QElementBase()
Broken assignment operator.
Definition: Qelements.h:103
Definition: Qelements.h:64
QElementGeometricBase()
Empty default constructor.
Definition: Qelements.h:67
QElementGeometricBase(const QElementGeometricBase &)=delete
Broken copy constructor.
std::string tecplot_zone_string(const unsigned &nplot) const
Definition: Qelements.h:717
QElement()
Constructor.
Definition: Qelements.h:494
BulkCoordinateDerivativesFctPt bulk_coordinate_derivatives_fct_pt(const int &face_index) const
Definition: Qelements.h:797
void write_paraview_output_offset_information(std::ofstream &file_out, const unsigned &nplot, unsigned &counter) const
Definition: Qelements.h:631
QElement(const QElement &)=delete
Broken copy constructor.
void local_fraction_of_node(const unsigned &j, Vector< double > &s_fraction)
Get the local fraction of node j in the element.
Definition: Qelements.h:589
unsigned get_bulk_node_number(const int &face_index, const unsigned &i) const
Definition: Qelements.h:739
unsigned nvertex_node() const
Number of vertex nodes in the element.
Definition: Qelements.h:549
unsigned nplot_points_paraview(const unsigned &nplot) const
Definition: Qelements.h:616
static Gauss< 1, NNODE_1D > Default_integration_scheme
Assign the static Default_integration_scheme.
Definition: Qelements.h:490
double invert_jacobian_mapping(const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Definition: Qelements.h:530
CoordinateMappingFctPt face_to_bulk_coordinate_fct_pt(const int &face_index) const
Definition: Qelements.h:776
double s_min() const
Min. value of local coordinate.
Definition: Qelements.h:537
unsigned nnode_1d() const
Number of nodes along each element edge.
Definition: Qelements.h:609
double local_one_d_fraction_of_node(const unsigned &n1d, const unsigned &i)
Definition: Qelements.h:598
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
Definition: Qelements.h:555
unsigned nsub_elements_paraview(const unsigned &nplot) const
Definition: Qelements.h:623
void write_paraview_type(std::ofstream &file_out, const unsigned &nplot) const
Definition: Qelements.h:650
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Get local coordinates of node j in the element; vector sets its own size.
Definition: Qelements.h:580
unsigned nplot_points(const unsigned &nplot) const
Definition: Qelements.h:726
void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &use_equally_spaced_interior_sample_points=false) const
Definition: Qelements.h:692
int face_outer_unit_normal_sign(const int &face_index) const
Get the sign of the outer unit normal on the face given by face_index.
Definition: Qelements.h:761
double s_max() const
Max. value of local coordinate.
Definition: Qelements.h:543
void write_paraview_offsets(std::ofstream &file_out, const unsigned &nplot, unsigned &offset_sum) const
Definition: Qelements.h:663
CoordinateMappingFctPt face_to_bulk_coordinate_fct_pt(const int &face_index) const
Definition: Qelements.h:1172
double s_min() const
Min. value of local coordinate.
Definition: Qelements.h:894
unsigned nplot_points(const unsigned &nplot) const
Definition: Qelements.h:1107
void write_paraview_type(std::ofstream &file_out, const unsigned &nplot) const
Definition: Qelements.h:1025
double invert_jacobian_mapping(const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Definition: Qelements.h:887
void write_paraview_offsets(std::ofstream &file_out, const unsigned &nplot, unsigned &offset_sum) const
Definition: Qelements.h:1038
QElement()
Constructor.
Definition: Qelements.h:849
unsigned nvertex_node() const
Number of vertex nodes in the element.
Definition: Qelements.h:907
BulkCoordinateDerivativesFctPt bulk_coordinate_derivatives_fct_pt(const int &face_index) const
Definition: Qelements.h:1201
void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &use_equally_spaced_interior_sample_points=false) const
Definition: Qelements.h:1067
void local_fraction_of_node(const unsigned &j, Vector< double > &s_fraction)
Get the local fraction of node j in the element.
Definition: Qelements.h:957
unsigned nnode_1d() const
Number of nodes along each element edge.
Definition: Qelements.h:979
unsigned nplot_points_paraview(const unsigned &nplot) const
Definition: Qelements.h:986
void write_paraview_output_offset_information(std::ofstream &file_out, const unsigned &nplot, unsigned &counter) const
Definition: Qelements.h:1001
static Gauss< 2, NNODE_1D > Default_integration_scheme
Assign the spatial integration scheme.
Definition: Qelements.h:845
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
Definition: Qelements.h:913
QElement(const QElement &)=delete
Broken copy constructor.
std::string tecplot_zone_string(const unsigned &nplot) const
Definition: Qelements.h:1098
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Get local coordinates of node j in the element; vector sets its own size.
Definition: Qelements.h:945
unsigned nsub_elements_paraview(const unsigned &nplot) const
Definition: Qelements.h:993
double local_one_d_fraction_of_node(const unsigned &n1d, const unsigned &i)
Definition: Qelements.h:968
double s_max() const
Max. value of local coordinate.
Definition: Qelements.h:900
int face_outer_unit_normal_sign(const int &face_index) const
Get the sign of the outer unit normal on the face given by face_index.
Definition: Qelements.h:1152
unsigned get_bulk_node_number(const int &face_index, const unsigned &i) const
Definition: Qelements.h:1120
unsigned nplot_points(const unsigned &nplot) const
Definition: Qelements.h:1572
double local_one_d_fraction_of_node(const unsigned &n1d, const unsigned &i)
Definition: Qelements.h:1400
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
Definition: Qelements.h:1329
int face_outer_unit_normal_sign(const int &face_index) const
Get the sign of the outer unit normal on the face given by face_index.
Definition: Qelements.h:1625
BulkCoordinateDerivativesFctPt bulk_coordinate_derivatives_fct_pt(const int &face_index) const
Definition: Qelements.h:1698
double s_max() const
Max. value of local coordinate.
Definition: Qelements.h:1317
unsigned nnode_1d() const
Number of nodes along each element edge.
Definition: Qelements.h:1411
void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &use_equally_spaced_interior_sample_points=false) const
Definition: Qelements.h:1526
double s_min() const
Min. value of local coordinate.
Definition: Qelements.h:1311
unsigned nplot_points_paraview(const unsigned &nplot) const
Definition: Qelements.h:1418
QElement()
Constructor.
Definition: Qelements.h:1261
CoordinateMappingFctPt face_to_bulk_coordinate_fct_pt(const int &face_index) const
Definition: Qelements.h:1661
void local_fraction_of_node(const unsigned &j, Vector< double > &s_fraction)
Get the local fraction of node j in the element.
Definition: Qelements.h:1387
unsigned nvertex_node() const
Number of vertex nodes in the element.
Definition: Qelements.h:1323
unsigned get_bulk_node_number(const int &face_index, const unsigned &i) const
Definition: Qelements.h:1585
std::string tecplot_zone_string(const unsigned &nplot) const
Definition: Qelements.h:1562
void write_paraview_offsets(std::ofstream &file_out, const unsigned &nplot, unsigned &offset_sum) const
Definition: Qelements.h:1500
double invert_jacobian_mapping(const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Definition: Qelements.h:1304
QElement(const QElement &)=delete
Broken copy constructor.
void write_paraview_type(std::ofstream &file_out, const unsigned &nplot) const
Definition: Qelements.h:1487
static Gauss< 3, NNODE_1D > Default_integration_scheme
Assign the spatial integration scheme.
Definition: Qelements.h:1257
unsigned nsub_elements_paraview(const unsigned &nplot) const
Definition: Qelements.h:1425
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Get local coordinates of node j in the element; vector sets its own size.
Definition: Qelements.h:1372
void write_paraview_output_offset_information(std::ofstream &file_out, const unsigned &nplot, unsigned &counter) const
Definition: Qelements.h:1433
Definition: Qelements.h:459
Base class for Solid Qelements.
Definition: Qelements.h:331
virtual void set_macro_elem_pt(MacroElement *macro_elem_pt)
Broken assignment operator.
Definition: Qelements.h:349
void get_x_and_xi(const Vector< double > &s, Vector< double > &x_fe, Vector< double > &x, Vector< double > &xi_fe, Vector< double > &xi) const
Definition: Qelements.h:379
QSolidElementBase()
Constructor: Empty.
Definition: Qelements.h:334
virtual void set_macro_elem_pt(MacroElement *macro_elem_pt, MacroElement *undeformed_macro_elem_pt)
Set pointers to "current" and "undeformed" MacroElements.
Definition: Qelements.h:360
QSolidElementBase(const QSolidElementBase &)=delete
Broken copy constructor.
Base class for all quad elements.
Definition: Qelements.h:821
QuadElementBase()
Constructor. Empty.
Definition: Qelements.h:824
virtual Node * vertex_node_pt(const unsigned &j) const =0
Pointer to the j-th vertex node in the element.
virtual unsigned nvertex_node() const =0
Number of vertex nodes in the element.
Definition: Qelements.h:2259
RefineableQElement()
Empty constuctor.
Definition: Qelements.h:2262
Definition: Qelements.h:2286
RefineableSolidQElement()
Empty constuctor.
Definition: Qelements.h:2289
Definition: elements.h:3561
void set_undeformed_macro_elem_pt(MacroElement *undeformed_macro_elem_pt)
Definition: elements.h:3699
MacroElement * undeformed_macro_elem_pt()
Access function to pointer to "undeformed" macro element.
Definition: elements.h:3706
MacroElement * Undeformed_macro_elem_pt
Pointer to the element's "undeformed" macro element (NULL by default)
Definition: elements.h:4076
virtual double interpolated_xi(const Vector< double > &s, const unsigned &i) const
Definition: elements.cc:7104
unsigned nlagrangian() const
Return number of lagrangian coordinates.
Definition: nodes.h:1870
void output(FILE *file_pt)
C-style output.
Definition: Qelements.h:1777
SolidQElement()
Constructor.
Definition: Qelements.h:1755
void output(std::ostream &outfile)
Broken assignment operator.
Definition: Qelements.h:1768
SolidQElement(const SolidQElement &)=delete
Broken copy constructor.
void output(FILE *file_pt)
C-style output.
Definition: Qelements.h:1942
SolidQElement(const SolidQElement &)=delete
Broken copy constructor.
void output(std::ostream &outfile)
Broken assignment operator.
Definition: Qelements.h:1933
SolidQElement()
Constructor.
Definition: Qelements.h:1916
void output(std::ostream &outfile)
Broken assignment operator.
Definition: Qelements.h:2099
SolidQElement()
Constructor.
Definition: Qelements.h:2082
void output(FILE *file_pt)
C-style output.
Definition: Qelements.h:2108
SolidQElement(const SolidQElement &)=delete
Broken copy constructor.
Definition: Qelements.h:1742
@ N
Definition: constructor.cpp:22
RealScalar s
Definition: level1_cplx_impl.h:130
#define DIM
Definition: linearised_navier_stokes_elements.h:44
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 pow(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:625
void plot()
Plot.
Definition: sphere_scattering.cc:180
ElementGeometry
Definition: elements.h:1240
@ Q
Definition: elements.h:1241
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
void shape(const double &s, double *Psi)
Definition: shape.h:564
void faces0(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for both faces – the bulk coordinate is fixed on both.
Definition: Qelement_face_coordinate_translation_schemes.cc:59
void face1(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s0 = 1.0.
Definition: Qelement_face_coordinate_translation_schemes.cc:44
void face0(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the face s0 = -1.0.
Definition: Qelement_face_coordinate_translation_schemes.cc:38
void faces1(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for the north and south faces, along which s1 is fixed.
Definition: Qelement_face_coordinate_translation_schemes.cc:131
void faces0(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for the east and west faces, along which s0 is fixed.
Definition: Qelement_face_coordinate_translation_schemes.cc:116
void face2(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the east face (s0 = 1.0)
Definition: Qelement_face_coordinate_translation_schemes.cc:93
void face1(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the south face (s1 = -1.0)
Definition: Qelement_face_coordinate_translation_schemes.cc:86
void face0(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the west face (s0 = -1.0)
Definition: Qelement_face_coordinate_translation_schemes.cc:79
void face3(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the north face (s1 = 1.0)
Definition: Qelement_face_coordinate_translation_schemes.cc:100
void faces2(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for the left and right faces, along which s2 is fixed.
Definition: Qelement_face_coordinate_translation_schemes.cc:249
void faces0(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for the back and front faces, along which s0 is fixed.
Definition: Qelement_face_coordinate_translation_schemes.cc:210
void faces1(const Vector< double > &s, DenseMatrix< double > &dsbulk_dsface, unsigned &interior_direction)
Function for the up and down faces, along which s1 is fixed.
Definition: Qelement_face_coordinate_translation_schemes.cc:230
void face4(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the up face (s1 = 1.0)
Definition: Qelement_face_coordinate_translation_schemes.cc:185
void face1(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the down face (s1 = -1.0)
Definition: Qelement_face_coordinate_translation_schemes.cc:161
void face2(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the back face (s2 = -1.0)
Definition: Qelement_face_coordinate_translation_schemes.cc:169
void face0(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the left face (s0 = -1.0)
Definition: Qelement_face_coordinate_translation_schemes.cc:153
void face5(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the front face (s2 = 1.0)
Definition: Qelement_face_coordinate_translation_schemes.cc:193
void face3(const Vector< double > &s, Vector< double > &s_bulk)
The translation scheme for the right face (s0 = 1.0)
Definition: Qelement_face_coordinate_translation_schemes.cc:177
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
void(* BulkCoordinateDerivativesFctPt)(const Vector< double > &s, DenseMatrix< double > &ds_bulk_dsface, unsigned &interior_direction)
Definition: elements.h:1290
void output(std::ostream &outfile)
Output with default number of plot points.
Definition: gen_axisym_advection_diffusion_elements.h:161
void(* CoordinateMappingFctPt)(const Vector< double > &s, Vector< double > &s_bulk)
Definition: elements.h:1282
list x
Definition: plotDoE.py:28
t
Definition: plotPSD.py:36
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
unsigned el_dim
dimension
Definition: overloaded_cartesian_element_body.h:30
void output(std::ostream &outfile, const unsigned &nplot)
Overload output function.
Definition: overloaded_element_body.h:490
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2