26 #ifndef OOMPH_TAXISYM_POROELASTICITY_ELEMENTS_HEADER
27 #define OOMPH_TAXISYM_POROELASTICITY_ELEMENTS_HEADER
31 #include <oomph-lib-config.h>
35 #include "../generic/Telements.h"
47 template<
unsigned ORDER>
115 s[0] = flux_interpolation_point[0];
118 s[0] = 1.0 - flux_interpolation_point[0];
121 s[0] = flux_interpolation_point[0];
136 #ifdef RANGE_CHECKING
139 std::ostringstream error_message;
140 error_message <<
"Range Error: j " << j <<
" is not in the range (0,1)";
142 OOMPH_CURRENT_FUNCTION,
143 OOMPH_EXCEPTION_LOCATION);
153 #ifdef RANGE_CHECKING
156 std::ostringstream error_message;
157 error_message <<
"Range Error: j " << j <<
" is not in the range (0,"
160 OOMPH_CURRENT_FUNCTION,
161 OOMPH_EXCEPTION_LOCATION);
170 #ifdef RANGE_CHECKING
173 std::ostringstream error_message;
174 error_message <<
"Range Error: j " << j <<
" is not in the range (0,"
177 OOMPH_CURRENT_FUNCTION,
178 OOMPH_EXCEPTION_LOCATION);
212 #ifdef RANGE_CHECKING
215 std::ostringstream error_message;
216 error_message <<
"Range Error: j " << j <<
" is not in the range (0,"
219 OOMPH_CURRENT_FUNCTION,
220 OOMPH_EXCEPTION_LOCATION);
223 return j % (ORDER + 1) + 2;
229 #ifdef RANGE_CHECKING
232 std::ostringstream error_message;
233 error_message <<
"Range Error: j " << j <<
" is not in the range (0,"
236 OOMPH_CURRENT_FUNCTION,
237 OOMPH_EXCEPTION_LOCATION);
253 #ifdef RANGE_CHECKING
256 std::ostringstream error_message;
257 error_message <<
"Range Error: j " << j <<
" is not in the range (0,"
260 OOMPH_CURRENT_FUNCTION,
261 OOMPH_EXCEPTION_LOCATION);
269 double q_edge(
const unsigned&
t,
const unsigned& j)
const
271 #ifdef RANGE_CHECKING
274 std::ostringstream error_message;
275 error_message <<
"Range Error: j " << j <<
" is not in the range (0,"
278 OOMPH_CURRENT_FUNCTION,
279 OOMPH_EXCEPTION_LOCATION);
288 #ifdef RANGE_CHECKING
291 std::ostringstream error_message;
292 error_message <<
"Range Error: j " << j <<
" is not in the range (0,"
295 OOMPH_CURRENT_FUNCTION,
296 OOMPH_EXCEPTION_LOCATION);
306 #ifdef RANGE_CHECKING
309 std::ostringstream error_message;
310 error_message <<
"Range Error: j " << j <<
" is not in the range (0,"
313 OOMPH_CURRENT_FUNCTION,
314 OOMPH_EXCEPTION_LOCATION);
335 void set_q_edge(
const unsigned&
t,
const unsigned& j,
const double& value)
368 Shape& div_q_basis_ds)
const;
377 const unsigned& j)
const
379 #ifdef RANGE_CHECKING
382 std::ostringstream error_message;
383 error_message <<
"Range Error: edge " << edge
384 <<
" is not in the range (0,2)";
386 OOMPH_CURRENT_FUNCTION,
387 OOMPH_EXCEPTION_LOCATION);
391 std::ostringstream error_message;
392 error_message <<
"Range Error: j " << j <<
" is not in the range (0,"
395 OOMPH_CURRENT_FUNCTION,
396 OOMPH_EXCEPTION_LOCATION);
400 coord[0] = (1.0 -
sign_edge(edge)) / 2.0 +
411 #ifdef RANGE_CHECKING
414 std::ostringstream error_message;
415 error_message <<
"Range Error: edge " << edge
416 <<
" is not in the range (0,2)";
418 OOMPH_CURRENT_FUNCTION,
419 OOMPH_EXCEPTION_LOCATION);
423 std::ostringstream error_message;
424 error_message <<
"Range Error: j " << j <<
" is not in the range (0,"
427 OOMPH_CURRENT_FUNCTION,
428 OOMPH_EXCEPTION_LOCATION);
449 s_flux_interpolation[0] = 1.0 - flux_interpolation_point[0];
450 s_flux_interpolation[1] = flux_interpolation_point[0];
453 s_flux_interpolation[0] = 0.0;
454 s_flux_interpolation[1] = 1.0 - flux_interpolation_point[0];
457 s_flux_interpolation[0] = flux_interpolation_point[0];
458 s_flux_interpolation[1] = 0.0;
469 #ifdef RANGE_CHECKING
472 std::ostringstream error_message;
473 error_message <<
"Range Error: j " << j <<
" is not in the range (0,"
476 OOMPH_CURRENT_FUNCTION,
477 OOMPH_EXCEPTION_LOCATION);
487 #ifdef RANGE_CHECKING
490 std::ostringstream error_message;
491 error_message <<
"Range Error: j " << j <<
" is not in the range (0,"
494 OOMPH_CURRENT_FUNCTION,
495 OOMPH_EXCEPTION_LOCATION);
504 #ifdef RANGE_CHECKING
507 std::ostringstream error_message;
508 error_message <<
"Range Error: j " << j <<
" is not in the range (0,"
511 OOMPH_CURRENT_FUNCTION,
512 OOMPH_EXCEPTION_LOCATION);
527 #ifdef RANGE_CHECKING
530 std::ostringstream error_message;
531 error_message <<
"Range Error: j " << j <<
" is not in the range (0,"
534 OOMPH_CURRENT_FUNCTION,
535 OOMPH_EXCEPTION_LOCATION);
561 double x0, y0, x1, y1;
565 for (
unsigned i = 0;
i < 3;
i++)
572 length[
i] = std::sqrt(std::pow(y1 - y0, 2) + std::pow(x1 - x0, 2));
577 const double ref_length[3] = {std::sqrt(2.0), 1, 1};
584 const unsigned n_index2 = basis.
nindex2();
585 for (
unsigned i = 0;
i < n_index2;
i++)
587 for (
unsigned l = 0; l < n_q_basis_edge; l++)
590 (length[l / (ORDER + 1)] / ref_length[l / (ORDER + 1)]);
615 void output(std::ostream& outfile,
const unsigned& Nplot)
653 Shape& div_q_basis_ds,
654 Shape& div_q_test_ds)
const
656 const unsigned n_q_basis = this->
nq_basis();
658 Shape q_basis_local(n_q_basis, 2);
663 double J = this->
transform_basis(s, q_basis_local, psi, dpsi, q_basis);
674 div_q_test_ds = div_q_basis_ds;
692 Shape& div_q_basis_ds,
693 Shape& div_q_test_ds)
const
696 for (
unsigned i = 0;
i < 2;
i++)
Class implementing the generic maths of the axisym poroelasticity equations: axisym linear elasticity...
double transform_basis(const Vector< double > &s, const Shape &q_basis_local, Shape &psi, DShape &dpsi, Shape &q_basis) const
Performs a div-conserving transformation of the vector basis functions from the reference element to ...
virtual unsigned nq_basis() const
Return the total number of computational basis functions for q.
void output(std::ostream &outfile)
Output with default number of plot points.
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
A class that represents a collection of data; each Data object may contain many different individual ...
void pin(const unsigned &i)
Pin the i-th stored variable.
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...
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 ...
FaceGeometry()
Constructor: Call constructor of base.
FaceGeometry()
Constructor: Call constructor of base class.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
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...
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
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.
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
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.
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
double & x(const unsigned &i)
Return the i-th nodal coordinate.
An OomphLibError object which should be thrown when an run-time error is encountered....
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
unsigned nindex2() const
Return the range of index 2 of the shape function object.
================================================================= Element which solves the Darcy/line...
void set_q_internal(const unsigned &t, const unsigned &j, const double &value)
Set the values of the j-th internal degree of freedom at time history level t.
void edge_flux_interpolation_point_global(const unsigned &edge, const unsigned &j, Vector< double > &x) const
Compute the global coordinates of the jth flux_interpolation point along specified edge.
unsigned nvertex_node() const
Number of vertex nodes in the element.
double q_internal(const unsigned &t, const unsigned &j) const
Return the value of the j-th internal degree of freedom at time history level t.
void get_p_basis(const Vector< double > &s, Shape &p_basis) const
Return the pressure basis.
double q_edge(const unsigned &j) const
Return the values of the j-th edge (flux) degree of freedom.
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
std::vector< short > Sign_edge
Unit normal signs associated with each edge to ensure inter-element continuity of the flux.
Node * edge_flux_node_pt(const unsigned &edge)
Get pointer to node that stores the edge flux dofs for specified edge.
unsigned Q_internal_data_index
The internal data index where the internal q degrees of freedom are stored.
Data * q_internal_data_pt() const
Return pointer to the Data object that stores the internal flux values.
unsigned q_edge_index(const unsigned &j) const
Return the nodal index at which the jth edge unknown is stored.
Vector< double > edge_flux_interpolation_point(const unsigned &edge, const unsigned &j) const
Returns the local coordinate of the jth flux_interpolation point along specified edge.
short & sign_edge(const unsigned &n)
Accessor for the unit normal sign of edge n.
unsigned P_internal_data_index
The internal data index where the p degrees of freedom are stored.
unsigned required_nvalue(const unsigned &n) const
Number of values required at node n.
double p_value(const unsigned &j) const
Return the jth pressure value.
static const unsigned Initial_Nvalue[]
The number of values stored at each node.
unsigned q_internal_index() const
Return the index of the internal data where the q_internal degrees of freedom are stored.
unsigned nq_basis_edge() const
Return the number of edge basis functions for flux q.
unsigned face_index_of_edge(const unsigned &j) const
Return the face index associated with specified edge.
unsigned q_edge_node_number(const unsigned &j) const
Return the number of the node where the jth edge unknown is stored.
void get_q_basis_local(const Vector< double > &s, Shape &q_basis) const
Returns the local form of the q basis at local coordinate s.
~TAxisymmetricPoroelasticityElement()
Destructor.
void set_q_internal(const unsigned &j, const double &value)
Set the values of the j-th internal degree of freedom.
void set_p_value(const unsigned &j, const double &value)
Set the jth pressure value.
Data * p_data_pt() const
Return pointer to the Data object that stores the pressure values.
static const double Flux_interpolation_point[]
The points along each edge where the fluxes are taken to be.
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.
void pin_p_value(const unsigned &j, const double &p)
Pin the jth pressure value and set to specified value.
void pin_q_internal_value(const unsigned &j, const double &q)
Pin the jth internal q value and set it to specified value.
void get_div_q_basis_local(const Vector< double > &s, Shape &div_q_basis_ds) const
Returns the local form of the q basis and dbasis/ds at local coordinate s.
TAxisymmetricPoroelasticityElement()
Constructor.
void set_q_edge(const unsigned &t, const unsigned &j, const double &value)
Set the values of the j-th edge (flux) degree of freedom at time history level t.
const short & sign_edge(const unsigned &n) const
Accessor for the unit normal sign of edge n (const version)
int p_local_eqn(const unsigned &j) const
Return the equation number of the j-th pressure degree of freedom.
double shape_basis_test_local(const Vector< double > &s, Shape &psi, DShape &dpsi, Shape &u_basis, Shape &u_test, DShape &du_basis_dx, DShape &du_test_dx, Shape &q_basis, Shape &q_test, Shape &p_basis, Shape &p_test, Shape &div_q_basis_ds, Shape &div_q_test_ds) const
Returns the geometric basis, and the u, p and divergence basis functions and test functions at local ...
void set_q_edge(const unsigned &j, const double &value)
Set the values of the j-th edge (flux) degree of freedom.
void pin_q_edge_value(const unsigned &j, const double &value)
Pin the j-th edge (flux) degree of freedom and set it to specified value.
void output(std::ostream &outfile)
Output with default number of plot points.
unsigned nedge_flux_interpolation_point() const
Returns the number of flux_interpolation points along each edge of the element.
int q_edge_local_eqn(const unsigned &j) const
Return the equation number of the j-th edge (flux) degree of freedom.
unsigned face_index_of_q_edge_basis_fct(const unsigned &j) const
Return the face index associated with j-th edge flux degree of freedom.
double shape_basis_test_local_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsi, Shape &u_basis, Shape &u_test, DShape &du_basis_dx, DShape &du_test_dx, Shape &q_basis, Shape &q_test, Shape &p_basis, Shape &p_test, Shape &div_q_basis_ds, Shape &div_q_test_ds) const
Returns the geometric basis, and the u, p and divergence basis functions and test functions at integr...
void scale_basis(Shape &basis) const
Scale the edge basis to allow arbitrary edge mappings.
unsigned nq_basis_internal() const
Return the number of internal basis functions for flux q.
unsigned u_index_axisym_poroelasticity(const unsigned &j) const
Return the nodal index of the j-th solid displacement unknown [0: r; 1: z].
int q_internal_local_eqn(const unsigned &j) const
Return the equation number of the j-th internal degree of freedom.
unsigned np_basis() const
Return the total number of pressure basis functions.
static const unsigned Q_edge_conv[]
Conversion scheme from an edge degree of freedom to the node it's stored at.
static const unsigned Face_index_of_edge_flux[]
Face index associated with edge flux degree of freedom.
double q_edge(const unsigned &t, const unsigned &j) const
Return the values of the j-th edge (flux) degree of freedom at time history level t.
Vector< Data * > q_edge_data_pt() const
Return vector of pointers to the Data objects that store the edge flux values.
double q_internal(const unsigned &j) const
Return the values of the internal degree of freedom.
unsigned nrecovery_order()
Recovery order for Z2 error estimator.
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.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...