26 #ifndef OOMPH_TRAVIART_THOMAS_DARCY_HEADER
27 #define OOMPH_TRAVIART_THOMAS_DARCY_HEADER
31 #include <oomph-lib-config.h>
35 #include "../generic/Telements.h"
46 template<
unsigned ORDER>
110 s[0] = flux_interpolation_point[0];
113 s[0] = 1.0 - flux_interpolation_point[0];
116 s[0] = flux_interpolation_point[0];
167 return n % (ORDER + 1);
218 Shape& div_q_basis_ds)
const;
227 const unsigned&
n)
const
230 coord[0] = (1.0 -
sign_edge(edge)) / 2.0 +
270 s_flux_interpolation[0] = 1.0 - flux_interpolation_point[0];
271 s_flux_interpolation[1] = flux_interpolation_point[0];
274 s_flux_interpolation[0] = 0.0;
275 s_flux_interpolation[1] = 1.0 - flux_interpolation_point[0];
278 s_flux_interpolation[0] = flux_interpolation_point[0];
279 s_flux_interpolation[1] = 0.0;
331 double x0, y0,
x1, y1;
335 for (
unsigned i = 0;
i < 3;
i++)
347 const double ref_length[3] = {
std::sqrt(2.0), 1, 1};
354 const unsigned n_index2 = basis.
nindex2();
355 for (
unsigned i = 0;
i < n_index2;
i++)
357 for (
unsigned l = 0; l < n_q_basis_edge; l++)
360 (length[l / (ORDER + 1)] / ref_length[l / (ORDER + 1)]);
385 void output(std::ostream& outfile,
const unsigned& Nplot)
415 Shape& div_q_basis_ds,
416 Shape& div_q_test_ds)
const
418 const unsigned n_q_basis = this->
nq_basis();
420 Shape q_basis_local(n_q_basis, 2);
429 div_q_test_ds = div_q_basis_ds;
442 Shape& div_q_basis_ds,
443 Shape& div_q_test_ds)
const
446 for (
unsigned i = 0;
i < 2;
i++)
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
JacobiRotation< float > J
Definition: Jacobi_makeJacobi.cpp:3
Definition: darcy_elements.h:49
double transform_basis(const Vector< double > &s, const Shape &q_basis_local, Shape &psi, Shape &q_basis) const
Definition: darcy_elements.cc:35
unsigned nq_basis() const
Return the total number of computational basis functions for q.
Definition: darcy_elements.h:172
void output(std::ostream &outfile)
Output with default number of plot points.
Definition: darcy_elements.h:423
void pin(const unsigned &i)
Pin the i-th stored variable.
Definition: nodes.h:385
void set_value(const unsigned &i, const double &value_)
Definition: nodes.h:271
double value(const unsigned &i) const
Definition: nodes.h:293
FaceGeometry()
Constructor: Call constructor of base.
Definition: Tdarcy_elements.h:475
FaceGeometry()
Constructor: Call constructor of base class.
Definition: Tdarcy_elements.h:488
Definition: elements.h:4998
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
double nodal_value(const unsigned &n, const unsigned &i) const
Definition: elements.h:2593
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
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Definition: elements.h:1432
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
Definition: elements.h:1963
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
Definition: elements.h:622
int internal_local_eqn(const unsigned &i, const unsigned &j) const
Definition: elements.h:267
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
unsigned nindex2() const
Return the range of index 2 of the shape function object.
Definition: shape.h:265
Definition: Telements.h:1208
Definition: Tdarcy_elements.h:49
Node * edge_flux_node_pt(const unsigned &edge)
Get pointer to node that stores the edge flux dofs for specified edge.
Definition: Tdarcy_elements.h:178
void edge_flux_interpolation_point_global(const unsigned &j, Vector< double > &x) const
Definition: Tdarcy_elements.h:238
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.
unsigned face_index_of_edge(const unsigned &j) const
Return the face index associated with specified edge.
Definition: Tdarcy_elements.h:86
const short & sign_edge(const unsigned &n) const
Accessor for the unit normal sign of edge n (const version)
Definition: Tdarcy_elements.h:366
void face_local_coordinate_of_flux_interpolation_point(const unsigned &edge, const unsigned &n, Vector< double > &s) const
Definition: Tdarcy_elements.h:93
void pin_q_internal_value(const unsigned &n)
Pin the nth internal q value.
Definition: Tdarcy_elements.h:288
Data * p_data_pt() const
Return pointer to the Data object that stores the pressure values.
Definition: Tdarcy_elements.h:312
int p_local_eqn(const unsigned &n) const
Return the equation number of the n-th pressure degree of freedom.
unsigned required_nvalue(const unsigned &n) const
Number of values required at node n.
Definition: Tdarcy_elements.h:80
unsigned nvertex_node() const
Number of vertex nodes in the element.
Definition: Tdarcy_elements.h:391
void edge_flux_interpolation_point_global(const unsigned &edge, const unsigned &n, Vector< double > &x) const
Definition: Tdarcy_elements.h:249
Data * q_internal_data_pt() const
Return pointer to the Data object that stores the internal flux values.
Definition: Tdarcy_elements.h:152
double p_value(const unsigned &n) const
Return the nth pressure value.
unsigned q_edge_index(const unsigned &n) const
Return the nodal index at which the nth edge unknown is stored.
Definition: Tdarcy_elements.h:165
void output(std::ostream &outfile)
Output with default number of plot points.
Definition: Tdarcy_elements.h:378
short & sign_edge(const unsigned &n)
Accessor for the unit normal sign of edge n.
Definition: Tdarcy_elements.h:372
double q_internal(const unsigned &n) const
Return the values of the internal degree of freedom.
Definition: Tdarcy_elements.h:190
void set_q_internal(const unsigned &n, const double &value)
Set the values of the internal degree of freedom.
Definition: Tdarcy_elements.h:202
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.
static const unsigned Initial_Nvalue[]
The number of values stored at each node.
Definition: Tdarcy_elements.h:462
unsigned np_basis() const
Return the total number of pressure basis functions.
static const unsigned Q_edge_conv[]
Definition: Tdarcy_elements.h:56
unsigned face_index_of_q_edge_basis_fct(const unsigned &j) const
Return the face index associated with edge flux degree of freedom.
Definition: Tdarcy_elements.h:122
unsigned q_edge_node_number(const unsigned &n) const
Definition: Tdarcy_elements.h:172
double q_edge(const unsigned &n) const
Return the values of the edge (flux) degree of freedom.
Definition: Tdarcy_elements.h:184
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
Definition: Tdarcy_elements.h:397
static const unsigned Face_index_of_edge_flux[]
Face index associated with edge flux degree of freedom.
Definition: Tdarcy_elements.h:52
std::vector< short > Sign_edge
Definition: Tdarcy_elements.h:70
void set_p_value(const unsigned &n, const double &value)
Set the nth pressure value.
Definition: Tdarcy_elements.h:318
void output(std::ostream &outfile, const unsigned &Nplot)
Definition: Tdarcy_elements.h:385
int q_internal_local_eqn(const unsigned &n) const
Return the equation number of the n-th internal degree of freedom.
Definition: Tdarcy_elements.h:134
static const double Flux_interpolation_point[]
The points along each edge where the fluxes are interpolated.
Definition: Tdarcy_elements.h:59
unsigned q_internal_index() const
Definition: Tdarcy_elements.h:159
void scale_basis(Shape &basis) const
Scale the edge basis to allow arbitrary edge mappings.
Definition: Tdarcy_elements.h:325
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.
Definition: Tdarcy_elements.h:66
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
Definition: Tdarcy_elements.h:409
int q_edge_local_eqn(const unsigned &n) const
Return the equation nunmber of the n-th edge (flux) degree of freedom.
Definition: Tdarcy_elements.h:128
Vector< Data * > q_edge_data_pt() const
Definition: Tdarcy_elements.h:141
void set_q_edge(const unsigned &n, const double &value)
Set the values of the edge (flux) degree of freedom.
Definition: Tdarcy_elements.h:196
unsigned nrecovery_order()
Recovery order for Z2 error estimator.
TRaviartThomasDarcyElement()
Constructor.
Vector< double > edge_flux_interpolation_point(const unsigned &edge, const unsigned &n) const
Definition: Tdarcy_elements.h:226
void pin_p_value(const unsigned &n)
Pin the nth pressure value.
Definition: Tdarcy_elements.h:306
unsigned Q_internal_data_index
Definition: Tdarcy_elements.h:63
unsigned nedge_flux_interpolation_point() const
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.
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
Definition: Tdarcy_elements.h:436
RealScalar s
Definition: level1_cplx_impl.h:130
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 pow(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:625
squared absolute value
Definition: GlobalFunctions.h:87
Vector< double > x1(const Vector< double > &coord)
Cartesian coordinates centered at the point (0.5,1)
Definition: poisson/poisson_with_singularity/two_d_poisson.cc:86
Vector< double > x0(2, 0.0)
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
list x
Definition: plotDoE.py:28
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2