30 #ifndef OOMPH_TRAVIART_THOMAS_DARCY_HEADER 31 #define OOMPH_TRAVIART_THOMAS_DARCY_HEADER 35 #include <oomph-lib-config.h> 39 #include "../generic/Telements.h" 52 template<
unsigned ORDER>
112 unsigned node_number=Q_edge_conv[edge];
119 s[0]=flux_interpolation_point[0];
122 s[0]=1.0-flux_interpolation_point[0];
125 s[0]=flux_interpolation_point[0];
134 return Face_index_of_edge_flux[j];
184 return Q_edge_conv[n/(ORDER+1)];
190 return node_pt(Q_edge_conv[edge]);
225 Shape &q_basis)
const;
229 Shape &div_q_basis_ds)
const;
238 const unsigned &n)
const 242 Flux_interpolation_point[n];
271 unsigned node_number=Q_edge_conv[edge];
281 s_flux_interpolation[0]=1.0-flux_interpolation_point[0];
282 s_flux_interpolation[1]=flux_interpolation_point[0];
285 s_flux_interpolation[0]=0.0;
286 s_flux_interpolation[1]=1.0-flux_interpolation_point[0];
289 s_flux_interpolation[0]=flux_interpolation_point[0];
290 s_flux_interpolation[1]=0.0;
308 double p_value(
const unsigned &n)
const;
315 Shape &p_basis)
const;
348 for(
unsigned i=0;
i<3;
i++)
355 length[
i]=std::sqrt(std::pow(y1-y0,2)+std::pow(x1-x0,2));
360 const double ref_length[3]={std::sqrt(2.0),1,1};
367 const unsigned n_index2 = basis.
nindex2();
368 for(
unsigned i=0;
i<n_index2;
i++)
370 for(
unsigned l=0;l<n_q_basis_edge;l++)
372 basis(l,
i)*=(length[l/(ORDER+1)]/ref_length[l/(ORDER+1)]);
397 void output(std::ostream &outfile,
const unsigned &Nplot)
424 Shape &div_q_basis_ds,
425 Shape &div_q_test_ds)
const 427 const unsigned n_q_basis = this->
nq_basis();
429 Shape q_basis_local(n_q_basis,2);
438 div_q_test_ds = div_q_basis_ds;
451 Shape &div_q_basis_ds,
452 Shape &div_q_test_ds)
const 458 s,psi,q_basis,q_test,p_basis,p_test,div_q_basis_ds,div_q_test_ds);
unsigned nindex2() const
Return the range of index 2 of the shape function object.
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.
const double Flux_interpolation_point[1]
The points along each edge where the fluxes are taken to be.
short & sign_edge(const unsigned &n)
Accessor for the unit normal sign of edge n.
unsigned nrecovery_order()
Recovery order for Z2 error estimator.
unsigned np_basis() const
Return the total number of pressure basis functions.
void face_local_coordinate_of_flux_interpolation_point(const unsigned &edge, const unsigned &n, Vector< double > &s) const
Compute the face element coordinates of the nth flux interpolation point along specified edge...
TRaviartThomasDarcyElement()
Constructor.
const unsigned Initial_Nvalue[6]
unsigned Q_internal_data_index
The internal data index where the internal q degrees of freedom are stored.
void edge_flux_interpolation_point_global(const unsigned &j, Vector< double > &x) const
Compute the global coordinates of the flux interpolation point associated with the j-th edge-based q ...
double q_edge(const unsigned &n) const
Return the values of the edge (flux) degree of freedom.
unsigned nedge_flux_interpolation_point() const
Return the number of flux interpolation points along each edge of the element.
double shape_basis_test_local_at_knot(const unsigned &ipt, Shape &psi, Shape &q_basis, Shape &q_test, Shape &p_basis, Shape &p_test, Shape &div_q_basis_ds, Shape &div_q_test_ds) const
Return the geometric basis, and the q, p and divergence basis functions and test functions at integra...
unsigned nvertex_node() const
Number of vertex nodes in the element.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
void edge_flux_interpolation_point_global(const unsigned &edge, const unsigned &n, Vector< double > &x) const
Compute the global coordinates of the nth flux interpolation point along an edge. ...
unsigned nq_basis_internal() const
Return the number of internal basis functions for q.
void set_q_internal(const unsigned &n, const double &value)
Set the values of the internal degree of freedom.
void pin(const unsigned &i)
Pin the i-th stored variable.
double shape_basis_test_local(const Vector< double > &s, Shape &psi, Shape &q_basis, Shape &q_test, Shape &p_basis, Shape &p_test, Shape &div_q_basis_ds, Shape &div_q_test_ds) const
Return the geometric basis, and the q, p and divergence basis functions and test functions at local c...
unsigned q_internal_index() const
Return the index of the internal data where the q_internal degrees of freedom are stored...
Data * q_internal_data_pt() const
Return pointer to the Data object that stores the internal flux values.
void set_p_value(const unsigned &n, const double &value)
Set the nth pressure value.
~TRaviartThomasDarcyElement()
Destructor.
FaceGeometry()
Constructor: Call constructor of base.
const short & sign_edge(const unsigned &n) const
Accessor for the unit normal sign of edge n (const version)
void output(std::ostream &outfile, const unsigned &Nplot)
Output FE representation of soln: x,y,u1,u2,div_q,p at Nplot^DIM plot points.
double & x(const unsigned &i)
Return the i-th nodal coordinate.
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
unsigned q_edge_index(const unsigned &n) const
Return the nodal index at which the nth edge unknown is stored.
double transform_basis(const Vector< double > &s, const Shape &q_basis_local, Shape &psi, Shape &q_basis) const
Performs a div-conserving transformation of the vector basis functions from the reference element to ...
unsigned face_index_of_edge(const unsigned &j) const
Return the face index associated with specified edge.
unsigned nq_basis() const
Return the total number of computational basis functions for q.
FaceGeometry()
Constructor: Call constructor of base class.
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
void set_q_edge(const unsigned &n, const double &value)
Set the values of the edge (flux) degree of freedom.
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
Vector< Data * > q_edge_data_pt() const
Return vector of pointers to the Data objects that store the edge flux values.
void pin_p_value(const unsigned &n)
Pin the nth pressure value.
void set_value(const unsigned &i, const double &value_)
Set the i-th stored data value to specified value. The only reason that we require an explicit set fu...
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
void output(std::ostream &outfile)
Output with default number of plot points.
void pin_q_internal_value(const unsigned &n)
Pin the nth internal q value.
unsigned required_nvalue(const unsigned &n) const
Number of values required at node n.
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.
const unsigned Face_index_of_edge_flux[3]
Face index associated with edge flux degree of freedom.
const unsigned Q_edge_conv[3]
Fluxes are stored at mid-side nodes.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
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.
int q_internal_local_eqn(const unsigned &n) const
Return the equation number of the n-th internal degree of freedom.
double nodal_value(const unsigned &n, const unsigned &i) const
Return the i-th value stored at local node n. Produces suitably interpolated values for hanging nodes...
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
double p_value(const unsigned &n) const
Return the nth pressure value.
Node * edge_flux_node_pt(const unsigned &edge)
Get pointer to node that stores the edge flux dofs for specified edge.
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 q_edge_node_number(const unsigned &n) const
Return the local node number of the node where the nth edge unknown is stored.
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.
double q_internal(const unsigned &n) const
Return the values of the internal degree of freedom.
unsigned face_index_of_q_edge_basis_fct(const unsigned &j) const
Return the face index associated with edge flux degree of freedom.
void output(std::ostream &outfile)
Output with default number of plot points.
int q_edge_local_eqn(const unsigned &n) const
Return the equation nunmber of the n-th edge (flux) degree of freedom.
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Return the local equation number corresponding to the i-th value at the n-th local node...
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.
Data * p_data_pt() const
Return pointer to the Data object that stores the pressure values.
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...