84     q_basis(0, 0) = Sign_edge[0] * std::sqrt(2) * 
s[0];
 
   85     q_basis(0, 1) = Sign_edge[0] * std::sqrt(2) * 
s[1];
 
   87     q_basis(1, 0) = Sign_edge[1] * (
s[0] - 1);
 
   88     q_basis(1, 1) = Sign_edge[1] * 
s[1];
 
   90     q_basis(2, 0) = Sign_edge[2] * 
s[0];
 
   91     q_basis(2, 1) = Sign_edge[2] * (
s[1] - 1);
 
  101     div_q_basis_ds(0) = Sign_edge[0] * 2 * std::sqrt(2);
 
  102     div_q_basis_ds(1) = Sign_edge[1] * 2;
 
  103     div_q_basis_ds(2) = Sign_edge[2] * 2;
 
  108     scale_basis(div_q_basis_ds);
 
  127     return this->internal_local_eqn(P_internal_data_index, n);
 
  136     return this->internal_data_pt(P_internal_data_index)->value(n);
 
  153                                                   Shape& p_basis)
 const 
  256                                                         Shape& q_basis)
 const 
  262     double g1 = g1_vect[0];
 
  263     double g2 = g2_vect[0];
 
  265       Sign_edge[0] * std::sqrt(2.0) * 
s[0] * (
s[1] - g2) / (g1 - g2);
 
  267       Sign_edge[0] * std::sqrt(2.0) * 
s[1] * (
s[1] - g2) / (g1 - g2);
 
  270       Sign_edge[0] * std::sqrt(2.0) * 
s[0] * (
s[1] - g1) / (g2 - g1);
 
  272       Sign_edge[0] * std::sqrt(2.0) * 
s[1] * (
s[1] - g1) / (g2 - g1);
 
  275     g1_vect = edge_flux_interpolation_point(1, 0);
 
  276     g2_vect = edge_flux_interpolation_point(1, 1);
 
  279     q_basis(2, 0) = Sign_edge[1] * (
s[0] - 1.0) * (
s[1] - g1) / (g2 - g1);
 
  280     q_basis(2, 1) = Sign_edge[1] * 
s[1] * (
s[1] - g1) / (g2 - g1);
 
  282     q_basis(3, 0) = Sign_edge[1] * (
s[0] - 1.0) * (
s[1] - g2) / (g1 - g2);
 
  283     q_basis(3, 1) = Sign_edge[1] * 
s[1] * (
s[1] - g2) / (g1 - g2);
 
  286     g1_vect = edge_flux_interpolation_point(2, 0);
 
  287     g2_vect = edge_flux_interpolation_point(2, 1);
 
  290     q_basis(4, 0) = Sign_edge[2] * 
s[0] * (
s[0] - g2) / (g1 - g2);
 
  291     q_basis(4, 1) = Sign_edge[2] * (
s[1] - 1.0) * (
s[0] - g2) / (g1 - g2);
 
  293     q_basis(5, 0) = Sign_edge[2] * 
s[0] * (
s[0] - g1) / (g2 - g1);
 
  294     q_basis(5, 1) = Sign_edge[2] * (
s[1] - 1.0) * (
s[0] - g1) / (g2 - g1);
 
  296     q_basis(6, 0) = 
s[1] * 
s[0];
 
  297     q_basis(6, 1) = 
s[1] * (
s[1] - 1.0);
 
  299     q_basis(7, 0) = 
s[0] * (
s[0] - 1.0);
 
  300     q_basis(7, 1) = 
s[0] * 
s[1];
 
  313     double g1 = g1_vect[0];
 
  314     double g2 = g2_vect[0];
 
  316       Sign_edge[0] * std::sqrt(2.0) * (3.0 * 
s[1] - 2.0 * g2) / (g1 - g2);
 
  318       Sign_edge[0] * std::sqrt(2.0) * (2.0 * g1 - 3.0 * 
s[1]) / (g1 - g2);
 
  321     g1_vect = edge_flux_interpolation_point(1, 0);
 
  322     g2_vect = edge_flux_interpolation_point(1, 1);
 
  325     div_q_basis_ds(2) = Sign_edge[1] * (2.0 * g1 - 3.0 * 
s[1]) / (g1 - g2);
 
  326     div_q_basis_ds(3) = Sign_edge[1] * (3.0 * 
s[1] - 2.0 * g2) / (g1 - g2);
 
  329     g1_vect = edge_flux_interpolation_point(2, 0);
 
  330     g2_vect = edge_flux_interpolation_point(2, 1);
 
  333     div_q_basis_ds(4) = Sign_edge[2] * (3.0 * 
s[0] - 2.0 * g2) / (g1 - g2);
 
  334     div_q_basis_ds(5) = Sign_edge[2] * (2.0 * g1 - 3.0 * 
s[0]) / (g1 - g2);
 
  336     div_q_basis_ds(6) = 3.0 * 
s[1] - 1.0;
 
  337     div_q_basis_ds(7) = 3.0 * 
s[0] - 1.0;
 
  341     scale_basis(div_q_basis_ds);
 
  360     return this->internal_local_eqn(P_internal_data_index, n);
 
  369     return this->internal_data_pt(P_internal_data_index)->value(n);
 
  386                                                   Shape& p_basis)
 const 
  433     0.5 - std::sqrt(3.0) / 6.0, 0.5 + std::sqrt(3.0) / 6.0};
 
Class implementing the generic maths of the Darcy equations using Raviart-Thomas elements with both e...
A class that represents a collection of data; each Data object may contain many different individual ...
unsigned add_internal_data(Data *const &data_pt, const bool &fd=true)
Add a (pointer to an) internal data object to the element and return the index required to obtain it ...
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
Element which solves the Darcy equations using TElements. Geometrically the element is always a six n...
void get_q_basis_local(const Vector< double > &s, Shape &q_basis) const
Return the local form of the q basis at local coordinate s.
int p_local_eqn(const unsigned &n) const
Return the equation number of the n-th pressure degree of freedom.
double p_value(const unsigned &n) const
Return the nth pressure value.
void get_div_q_basis_local(const Vector< double > &s, Shape &div_q_basis_ds) const
Return the local form of the q basis and dbasis/ds at local coordinate s.
~TRaviartThomasDarcyElement()
Destructor.
unsigned np_basis() const
Return the total number of pressure basis functions.
void get_p_basis(const Vector< double > &s, Shape &p_basis) const
Compute the pressure basis.
unsigned P_internal_data_index
The internal data index where the p degrees of freedom are stored.
unsigned nrecovery_order()
Recovery order for Z2 error estimator.
TRaviartThomasDarcyElement()
Constructor.
unsigned Q_internal_data_index
The internal data index where the internal q degrees of freedom are stored.
unsigned nedge_flux_interpolation_point() const
Return the number of flux interpolation points along each edge of the element.
unsigned nq_basis_internal() const
Return the number of internal basis functions for q.
unsigned nq_basis_edge() const
Return the number of edge basis functions for q.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...