91 q_basis(0,0) =
Sign_edge[0]*std::sqrt(2)*s[0];
92 q_basis(0,1) =
Sign_edge[0]*std::sqrt(2)*s[1];
107 Shape &div_q_basis_ds)
const 109 div_q_basis_ds(0) =
Sign_edge[0]*2*std::sqrt(2);
161 Shape &p_basis)
const 266 Shape &q_basis)
const 272 double g1=g1_vect[0];
273 double g2=g2_vect[0];
274 q_basis(0,0) =
Sign_edge[0]*std::sqrt(2.0)*s[0]*(s[1]-g2)/(g1-g2);
275 q_basis(0,1) =
Sign_edge[0]*std::sqrt(2.0)*s[1]*(s[1]-g2)/(g1-g2);
277 q_basis(1,0) =
Sign_edge[0]*std::sqrt(2.0)*s[0]*(s[1]-g1)/(g2-g1);
278 q_basis(1,1) =
Sign_edge[0]*std::sqrt(2.0)*s[1]*(s[1]-g1)/(g2-g1);
285 q_basis(2,0) =
Sign_edge[1]*(s[0]-1.0)*(s[1]-g1)/(g2-g1);
286 q_basis(2,1) =
Sign_edge[1]*s[1]*(s[1]-g1)/(g2-g1);
288 q_basis(3,0) =
Sign_edge[1]*(s[0]-1.0)*(s[1]-g2)/(g1-g2);
289 q_basis(3,1) =
Sign_edge[1]*s[1]*(s[1]-g2)/(g1-g2);
296 q_basis(4,0) =
Sign_edge[2]*s[0]*(s[0]-g2)/(g1-g2);
297 q_basis(4,1) =
Sign_edge[2]*(s[1]-1.0)*(s[0]-g2)/(g1-g2);
299 q_basis(5,0) =
Sign_edge[2]*s[0]*(s[0]-g1)/(g2-g1);
300 q_basis(5,1) =
Sign_edge[2]*(s[1]-1.0)*(s[0]-g1)/(g2-g1);
302 q_basis(6,0) = s[1]*s[0];
303 q_basis(6,1) = s[1]*(s[1]-1.0);
305 q_basis(7,0) = s[0]*(s[0]-1.0);
306 q_basis(7,1) = s[0]*s[1];
316 Shape &div_q_basis_ds)
const 321 double g1=g1_vect[0];
322 double g2=g2_vect[0];
323 div_q_basis_ds(0) =
Sign_edge[0]*std::sqrt(2.0)*(3.0*s[1]-2.0*g2)/(g1-g2);
324 div_q_basis_ds(1) =
Sign_edge[0]*std::sqrt(2.0)*(2.0*g1-3.0*s[1])/(g1-g2);
331 div_q_basis_ds(2) =
Sign_edge[1]*(2.0*g1-3.0*s[1])/(g1-g2);
332 div_q_basis_ds(3) =
Sign_edge[1]*(3.0*s[1]-2.0*g2)/(g1-g2);
340 div_q_basis_ds(4) =
Sign_edge[2]*(3.0*s[0]-2.0*g2)/(g1-g2);
341 div_q_basis_ds(5) =
Sign_edge[2]*(2.0*g1-3.0*s[0])/(g1-g2);
343 div_q_basis_ds(6) = 3.0*s[1]-1.0;
344 div_q_basis_ds(7) = 3.0*s[0]-1.0;
393 Shape &p_basis)
const 439 {0.5-std::sqrt(3.0)/6.0,
440 0.5+std::sqrt(3.0)/6.0};
double value(const unsigned &i) const
Return i-th stored value. This function is not virtual so that it can be inlined. This means that if ...
Class implementing the generic maths of the Darcy equations using Raviart-Thomas elements with both e...
void scale_basis(Shape &basis) const
Scale the edge basis to allow arbitrary edge mappings.
unsigned nrecovery_order()
Recovery order for Z2 error estimator.
unsigned np_basis() const
Return the total number of pressure basis functions.
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.
~TRaviartThomasDarcyElement()
Destructor.
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
Vector< double > edge_flux_interpolation_point(const unsigned &edge, const unsigned &n) const
A class that represents a collection of data; each Data object may contain many different individual ...
unsigned P_internal_data_index
The internal data index where the p degrees of freedom are stored.
std::vector< short > Sign_edge
Unit normal signs associated with each edge to ensure inter-element continuity of the flux...
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.
unsigned nq_basis_edge() const
Return the number of edge basis functions for q.
void get_p_basis(const Vector< double > &s, Shape &p_basis) const
Compute the pressure basis.
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 ...
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.
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 internal_local_eqn(const unsigned &i, const unsigned &j) const
Return the local equation number corresponding to the j-th value stored at the i-th internal data...