28 #ifndef OOMPH_GENERALISED_NEWTONIAN_REFINEABLE_NAVIER_STOKES_ELEMENTS_HEADER
29 #define OOMPH_GENERALISED_NEWTONIAN_REFINEABLE_NAVIER_STOKES_ELEMENTS_HEADER
33 #include <oomph-lib-config.h>
37 #include "../generic/refineable_quad_element.h"
38 #include "../generic/refineable_brick_element.h"
39 #include "../generic/hp_refineable_elements.h"
40 #include "../generic/error_estimator.h"
55 template<
unsigned DIM>
94 unsigned n_element = element_pt.size();
95 for (
unsigned e = 0;
e < n_element;
e++)
108 unsigned n_element = element_pt.size();
109 for (
unsigned e = 0;
e < n_element;
e++)
131 const unsigned& which_one = 0);
138 return DIM + (DIM * (DIM - 1)) / 2;
146 unsigned num_entries = DIM + (DIM * (DIM - 1)) / 2;
147 if (flux.size() < num_entries)
149 std::ostringstream error_message;
150 error_message <<
"The flux vector has the wrong number of entries, "
151 << flux.size() <<
", whereas it should be at least "
152 << num_entries << std::endl;
154 OOMPH_CURRENT_FUNCTION,
155 OOMPH_EXCEPTION_LOCATION);
167 for (
unsigned i = 0;
i < DIM;
i++)
169 flux[icount] = strainrate(
i,
i);
174 for (
unsigned i = 0;
i < DIM;
i++)
176 for (
unsigned j =
i + 1; j < DIM; j++)
178 flux[icount] = strainrate(
i, j);
189 DIM>* cast_father_element_pt =
198 this->
Re_pt = cast_father_element_pt->re_pt();
200 this->
ReSt_pt = cast_father_element_pt->re_st_pt();
202 this->
ReInvFr_pt = cast_father_element_pt->re_invfr_pt();
204 this->
G_pt = cast_father_element_pt->g_pt();
210 this->
Source_fct_pt = cast_father_element_pt->source_fct_pt();
229 unsigned n_node = this->
nnode();
236 const unsigned u_nodal_index = this->
u_index_nst(i);
244 unsigned n_u_dof = 0;
245 for (
unsigned l = 0; l < n_node; l++)
247 unsigned n_master = 1;
256 n_master = hang_info_pt->
nmaster();
265 for (
unsigned m = 0; m < n_master; m++)
289 du_ddata.resize(n_u_dof, 0.0);
290 global_eqn_number.resize(n_u_dof, 0);
295 for (
unsigned l = 0; l < n_node; l++)
297 unsigned n_master = 1;
298 double hang_weight = 1.0;
307 n_master = hang_info_pt->
nmaster();
316 for (
unsigned m = 0; m < n_master; m++)
346 global_eqn_number[count] = global_eqn;
348 du_ddata[count] = psi[l] * hang_weight;
381 template<
unsigned DIM>
393 unsigned n_node = this->
nnode();
395 for (
unsigned n = 0; n < n_node; n++)
407 unsigned n_node = this->
nnode();
409 for (
unsigned n = 0; n < n_node; n++)
416 for (
unsigned l = 0; l < n_pres; l++)
421 nod_pt->
unpin(p_index);
481 values.resize(DIM + 1, 0.0);
484 for (
unsigned i = 0;
i < DIM;
i++)
502 values.resize(DIM + 1);
505 for (
unsigned i = 0;
i < DIM + 1;
i++)
511 unsigned n_node = this->
nnode();
515 this->
shape(s, psif);
518 for (
unsigned i = 0;
i < DIM;
i++)
522 for (
unsigned l = 0; l < n_node; l++)
524 values[
i] += this->
nodal_value(t, l, u_nodal_index) * psif[l];
596 unsigned total_index = 0;
598 unsigned NNODE_1D = 2;
602 for (
unsigned i = 0;
i < DIM;
i++)
611 else if (
s[
i] == 1.0)
613 index[
i] = NNODE_1D - 1;
619 double float_index = 0.5 * (1.0 +
s[
i]) * (NNODE_1D - 1);
620 index[
i] = int(float_index);
623 double excess = float_index - index[
i];
634 index[
i] *
static_cast<unsigned>(pow(
static_cast<float>(NNODE_1D),
635 static_cast<int>(
i)));
668 return static_cast<unsigned>(pow(2.0,
static_cast<int>(DIM)));
672 return this->
nnode();
680 const int& value_id)
const
688 return this->
shape(s, psi);
703 std::set<std::pair<Data*, unsigned>>& paired_load_data)
706 unsigned u_index[DIM];
707 for (
unsigned i = 0;
i < DIM;
i++)
713 unsigned n_node = this->
nnode();
714 for (
unsigned n = 0; n < n_node; n++)
726 for (
unsigned j = 0; j < nmaster; j++)
732 for (
unsigned i = 0;
i < DIM;
i++)
734 paired_load_data.insert(
735 std::make_pair(master_nod_pt, u_index[
i]));
744 for (
unsigned i = 0;
i < DIM;
i++)
746 paired_load_data.insert(
747 std::make_pair(this->
node_pt(n), u_index[
i]));
757 for (
unsigned l = 0; l < n_pres; l++)
769 unsigned nmaster = hang_info_pt->
nmaster();
772 for (
unsigned m = 0; m < nmaster; m++)
776 paired_load_data.insert(
785 paired_load_data.insert(std::make_pair(pres_node_pt, p_index));
796 template<
unsigned DIM>
798 :
public virtual FaceGeometry<GeneralisedNewtonianQTaylorHoodElement<DIM>>
812 template<
unsigned DIM>
816 FaceGeometry<GeneralisedNewtonianQTaylorHoodElement<DIM>>>
835 template<
unsigned DIM>
847 for (
unsigned l = 0; l < n_pres; l++)
917 values.resize(DIM, 0.0);
920 for (
unsigned i = 0;
i < DIM;
i++)
943 for (
unsigned i = 0;
i < DIM;
i++)
949 unsigned n_node = this->
nnode();
953 this->
shape(s, psif);
956 for (
unsigned i = 0;
i < DIM;
i++)
960 for (
unsigned l = 0; l < n_node; l++)
962 values[
i] += this->
nodal_value(t, l, u_nodal_index) * psif[l];
988 std::set<std::pair<Data*, unsigned>>& paired_load_data)
991 unsigned u_index[DIM];
992 for (
unsigned i = 0;
i < DIM;
i++)
998 unsigned n_node = this->
nnode();
999 for (
unsigned n = 0; n < n_node; n++)
1011 for (
unsigned j = 0; j < nmaster; j++)
1017 for (
unsigned i = 0;
i < DIM;
i++)
1019 paired_load_data.insert(
1020 std::make_pair(master_nod_pt, u_index[
i]));
1029 for (
unsigned i = 0;
i < DIM;
i++)
1031 paired_load_data.insert(
1032 std::make_pair(this->
node_pt(n), u_index[
i]));
1040 for (
unsigned l = 0; l < n_pres; l++)
1044 paired_load_data.insert(std::make_pair(
1055 template<
unsigned DIM>
1068 for (
unsigned l = 0; l < n_pres; l++)
1083 this->p_order() = 3;
1131 double p_nst(
const unsigned&
t,
const unsigned&
i)
const
1139 return (this->p_order() - 2) * (this->p_order() - 2);
1169 for (
unsigned p = 0; p <
npres_nst(); p++)
1237 values.resize(DIM, 0.0);
1240 for (
unsigned i = 0;
i < DIM;
i++)
1263 for (
unsigned i = 0;
i < DIM;
i++)
1269 unsigned n_node = this->
nnode();
1273 this->
shape(s, psif);
1276 for (
unsigned i = 0;
i < DIM;
i++)
1280 for (
unsigned l = 0; l < n_node; l++)
1282 values[
i] += this->
nodal_value(t, l, u_nodal_index) * psif[l];
1302 template<
unsigned DIM>
1305 GeneralisedNewtonianQCrouzeixRaviartElement<DIM>>
1320 template<
unsigned DIM>
1324 FaceGeometry<GeneralisedNewtonianQCrouzeixRaviartElement<DIM>>>
1341 inline void RefineableGeneralisedNewtonianQCrouzeixRaviartElement<
1342 2>::rebuild_from_sons(
Mesh*& mesh_pt)
1344 using namespace QuadTreeNames;
1353 double av_press = 0.0;
1356 for (
unsigned ison = 0; ison < 4; ison++)
1361 av_press += quadtree_pt()
1369 internal_data_pt(this->P_nst_internal_index)->set_value(0, 0.25 * av_press);
1380 double slope1 = quadtree_pt()
1383 ->internal_data_pt(this->P_nst_internal_index)
1388 ->internal_data_pt(this->P_nst_internal_index)
1391 double slope2 = quadtree_pt()
1394 ->internal_data_pt(this->P_nst_internal_index)
1399 ->internal_data_pt(this->P_nst_internal_index)
1404 internal_data_pt(this->P_nst_internal_index)
1405 ->set_value(1, 0.5 * (slope1 + slope2));
1416 slope1 = quadtree_pt()
1419 ->internal_data_pt(this->P_nst_internal_index)
1424 ->internal_data_pt(this->P_nst_internal_index)
1427 slope2 = quadtree_pt()
1430 ->internal_data_pt(this->P_nst_internal_index)
1435 ->internal_data_pt(this->P_nst_internal_index)
1440 internal_data_pt(this->P_nst_internal_index)
1441 ->set_value(2, 0.5 * (slope1 + slope2));
1450 3>::rebuild_from_sons(
Mesh*& mesh_pt)
1452 using namespace OcTreeNames;
1461 double av_press = 0.0;
1464 for (
unsigned ison = 0; ison < 8; ison++)
1467 av_press += octree_pt()
1475 internal_data_pt(this->P_nst_internal_index)
1476 ->set_value(0, 0.125 * av_press);
1487 double slope1 = octree_pt()
1490 ->internal_data_pt(this->P_nst_internal_index)
1495 ->internal_data_pt(this->P_nst_internal_index)
1498 double slope2 = octree_pt()
1501 ->internal_data_pt(this->P_nst_internal_index)
1506 ->internal_data_pt(this->P_nst_internal_index)
1509 double slope3 = octree_pt()
1512 ->internal_data_pt(this->P_nst_internal_index)
1517 ->internal_data_pt(this->P_nst_internal_index)
1520 double slope4 = octree_pt()
1523 ->internal_data_pt(this->P_nst_internal_index)
1528 ->internal_data_pt(this->P_nst_internal_index)
1533 internal_data_pt(this->P_nst_internal_index)
1534 ->set_value(1, 0.25 * (slope1 + slope2 + slope3 + slope4));
1545 slope1 = octree_pt()
1548 ->internal_data_pt(this->P_nst_internal_index)
1553 ->internal_data_pt(this->P_nst_internal_index)
1556 slope2 = octree_pt()
1559 ->internal_data_pt(this->P_nst_internal_index)
1564 ->internal_data_pt(this->P_nst_internal_index)
1567 slope3 = octree_pt()
1570 ->internal_data_pt(this->P_nst_internal_index)
1575 ->internal_data_pt(this->P_nst_internal_index)
1578 slope4 = octree_pt()
1581 ->internal_data_pt(this->P_nst_internal_index)
1586 ->internal_data_pt(this->P_nst_internal_index)
1591 internal_data_pt(this->P_nst_internal_index)
1592 ->set_value(2, 0.25 * (slope1 + slope2 + slope3 + slope4));
1603 slope1 = octree_pt()
1606 ->internal_data_pt(this->P_nst_internal_index)
1611 ->internal_data_pt(this->P_nst_internal_index)
1614 slope2 = octree_pt()
1617 ->internal_data_pt(this->P_nst_internal_index)
1622 ->internal_data_pt(this->P_nst_internal_index)
1625 slope3 = octree_pt()
1628 ->internal_data_pt(this->P_nst_internal_index)
1633 ->internal_data_pt(this->P_nst_internal_index)
1636 slope4 = octree_pt()
1639 ->internal_data_pt(this->P_nst_internal_index)
1644 ->internal_data_pt(this->P_nst_internal_index)
1648 internal_data_pt(this->P_nst_internal_index)
1649 ->set_value(3, 0.25 * (slope1 + slope2 + slope3 + slope4));
1666 using namespace QuadTreeNames;
1669 int son_type = quadtree_pt()->son_type();
1685 else if (son_type ==
SE)
1691 else if (son_type ==
NE)
1698 else if (son_type ==
NW)
1706 cast_father_element_pt =
1713 internal_data_pt(this->P_nst_internal_index)->set_value(0, press);
1716 for (
unsigned i = 1;
i < 3;
i++)
1718 double half_father_slope =
1723 internal_data_pt(this->P_nst_internal_index)
1724 ->set_value(
i, half_father_slope);
1741 using namespace OcTreeNames;
1744 int son_type = octree_pt()->son_type();
1748 octree_pt()->father_pt()->object_pt());
1753 for (
unsigned i = 0;
i < 3;
i++)
1760 cast_father_element_pt =
1767 internal_data_pt(this->P_nst_internal_index)->set_value(0, press);
1770 for (
unsigned i = 1;
i < 4;
i++)
1772 double half_father_slope =
1777 internal_data_pt(this->P_nst_internal_index)
1778 ->set_value(
i, half_father_slope);
1797 double J = this->dshape_eulerian(
s, psi, dpsidx);
1801 for (
unsigned i = 0;
i < nnode_1d() * nnode_1d();
i++)
1804 dtestdx(
i, 0) = dpsidx(
i, 0);
1805 dtestdx(
i, 1) = dpsidx(
i, 1);
1820 2>::dshape_and_dtest_eulerian_at_knot_nst(
const unsigned& ipt,
1827 double J = this->dshape_eulerian_at_knot(ipt, psi, dpsidx);
1831 for (
unsigned i = 0;
i < nnode_1d() * nnode_1d();
i++)
1834 dtestdx(
i, 0) = dpsidx(
i, 0);
1835 dtestdx(
i, 1) = dpsidx(
i, 1);
1857 double J = this->dshape_eulerian(
s, psi, dpsidx);
1861 for (
unsigned i = 0;
i < nnode_1d() * nnode_1d() * nnode_1d();
i++)
1864 dtestdx(
i, 0) = dpsidx(
i, 0);
1865 dtestdx(
i, 1) = dpsidx(
i, 1);
1866 dtestdx(
i, 2) = dpsidx(
i, 2);
1881 3>::dshape_and_dtest_eulerian_at_knot_nst(
const unsigned& ipt,
1888 double J = this->dshape_eulerian_at_knot(ipt, psi, dpsidx);
1892 for (
unsigned i = 0;
i < nnode_1d() * nnode_1d() * nnode_1d();
i++)
1895 dtestdx(
i, 0) = dpsidx(
i, 0);
1896 dtestdx(
i, 1) = dpsidx(
i, 1);
1897 dtestdx(
i, 2) = dpsidx(
i, 2);
1912 unsigned npres = this->npres_nst();
1920 unsigned npres_1d = (int)std::sqrt((
double)npres);
1929 for (
unsigned i = 0;
i < npres_1d;
i++)
1931 for (
unsigned j = 0; j < npres_1d; j++)
1934 psi[
i * npres_1d + j] = psi2[
i] * psi1[j];
1949 if (this->npres_nst() == 1)
1955 for (
unsigned i = 0;
i < this->npres_nst();
i++) test[
i] = psi[
i];
1967 unsigned npres = this->npres_nst();
1975 unsigned npres_1d = (int)std::sqrt((
double)npres);
1985 for (
unsigned i = 0;
i < npres_1d;
i++)
1987 for (
unsigned j = 0; j < npres_1d; j++)
1989 for (
unsigned k = 0; k < npres_1d; k++)
1992 psi[
i * npres_1d * npres_1d + j * npres_1d + k] =
1993 psi3[
i] * psi2[j] * psi1[k];
2009 if (this->npres_nst() == 1)
2015 for (
unsigned i = 0;
i < this->npres_nst();
i++) test[
i] = psi[
i];
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 ...
long & eqn_number(const unsigned &i)
Return the equation number of the i-th stored variable.
void pin(const unsigned &i)
Pin the i-th stored variable.
void unpin(const unsigned &i)
Unpin 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...
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
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 ...
virtual void resize(const unsigned &n_value)
Change (increase) the number of values that may be stored.
Base class for finite elements that can compute the quantities that are required for the Z2 error est...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
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 Node * get_node_at_local_coordinate(const Vector< double > &s) const
If there is a node at this local coordinate, return the pointer to the node.
virtual unsigned nvertex_node() const
Return the number of vertex nodes in this element. Broken virtual function in "pure" finite elements.
static const double Node_location_tolerance
Default value for the tolerance to be used when locating nodes via local coordinates.
virtual void shape(const Vector< double > &s, Shape &psi) const =0
Calculate the geometric shape functions at local coordinate s. This function must be overloaded for e...
unsigned nnode() const
Return the number of nodes.
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
virtual Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element. Broken virtual function in "pure" finite elements.
virtual unsigned nnode_1d() const
Return the number of nodes along one edge of the element Default is to return zero — must be overload...
virtual void set_integration_scheme(Integral *const &integral_pt)
Set the spatial integration scheme.
virtual double local_one_d_fraction_of_node(const unsigned &n1d, const unsigned &i)
Get the local fraction of any node in the n-th position in a one dimensional expansion along the i-th...
Class for multidimensional Gauss Lobatto Legendre integration rules empty - just establishes template...
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
double * ReInvFr_pt
Pointer to global Reynolds number x inverse Froude number (= Bond number / Capillary number)
double * Viscosity_Ratio_pt
Pointer to the viscosity ratio (relative to the viscosity used in the definition of the Reynolds numb...
bool ALE_is_disabled
Boolean flag to indicate if ALE formulation is disabled when time-derivatives are computed....
void strain_rate(const Vector< double > &s, DenseMatrix< double > &strain_rate) const
Strain-rate tensor: 1/2 (du_i/dx_j + du_j/dx_i)
double * Density_Ratio_pt
Pointer to the density ratio (relative to the density used in the definition of the Reynolds number)
virtual unsigned u_index_nst(const unsigned &i) const
Return the index at which the i-th unknown velocity component is stored. The default value,...
void interpolated_u_nst(const Vector< double > &s, Vector< double > &veloc) const
Compute vector of FE interpolated velocity u at local coordinate s.
NavierStokesBodyForceFctPt Body_force_fct_pt
Pointer to body force function.
NavierStokesSourceFctPt Source_fct_pt
Pointer to volumetric source function.
double * Re_pt
Pointer to global Reynolds number.
double * ReSt_pt
Pointer to global Reynolds number x Strouhal number (=Womersley)
virtual double interpolated_p_nst(const Vector< double > &s) const
Return FE interpolated pressure at local coordinate s.
Vector< double > * G_pt
Pointer to global gravity Vector.
/////////////////////////////////////////////////////////////////////////// /////////////////////////...
unsigned P_nst_internal_index
Internal index that indicates at which internal data the pressure is stored.
unsigned npres_nst() const
Return number of pressure values.
/////////////////////////////////////////////////////////////////////////
virtual int p_nodal_index_nst() const
Set the value at which the pressure is stored in the nodes.
void pshape_nst(const Vector< double > &s, Shape &psi) const
Pressure shape functions at local coordinate s.
static const unsigned Pconv[]
Static array of ints to hold conversion from pressure node numbers to actual node numbers.
unsigned npres_nst() const
Return number of pressure values.
Class that contains data for hanging nodes.
double const & master_weight(const unsigned &i) const
Return weight for dofs on i-th master node.
Node *const & master_node_pt(const unsigned &i) const
Return a pointer to the i-th master node.
unsigned nmaster() const
Return the number of master nodes.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
HangInfo *const & hanging_pt() const
Return pointer to hanging node data (this refers to the geometric hanging node status) (const version...
bool is_hanging() const
Test whether the node is geometrically hanging.
static Vector< Vector< int > > Direction_to_vector
For each direction, i.e. a son_type (vertex), a face or an edge, this defines a vector that indicates...
Non-templated class that returns modal hierachical shape functions based on Legendre polynomials.
An OomphLibError object which should be thrown when an run-time error is encountered....
p-refineable version of Crouzeix Raviart elements. Generic class definitions
unsigned nrecovery_order()
Order of recovery shape functions for Z2 error estimation:
void pshape_nst(const Vector< double > &s, Shape &psi) const
Pressure shape functions at local coordinate s.
void further_setup_hanging_nodes()
Perform additional hanging node procedures for variables that are not interpolated by all nodes....
PRefineableGeneralisedNewtonianQCrouzeixRaviartElement()
Constructor.
double dshape_and_dtest_eulerian_at_knot_nst(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Velocity shape and test functions and their derivs w.r.t. to global coords at ipt-th integation point...
double p_nst(const unsigned &i) const
Broken assignment operator.
double p_nst(const unsigned &t, const unsigned &i) const
Return the i-th pressure value (Discontinous pressure interpolation – no need to cater for hanging no...
void unpin_elemental_pressure_dofs()
Unpin all internal pressure dofs.
void rebuild_from_sons(Mesh *&mesh_pt)
Rebuild from sons: Reconstruct pressure from the (merged) sons This must be specialised for each dime...
void further_build()
Further build for Crouzeix_Raviart interpolates the internal pressure dofs from father element: Make ...
double dshape_and_dtest_eulerian_nst(const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Velocity shape and test functions and their derivs w.r.t. to global coords at local coordinate s (tak...
void pshape_nst(const Vector< double > &s, Shape &psi, Shape &test) const
Pressure shape and test functions at local coordinte s.
unsigned npres_nst() const
// Return number of pressure values
~PRefineableGeneralisedNewtonianQCrouzeixRaviartElement()
Destructor.
unsigned required_nvalue(const unsigned &n) const
Number of values (pinned or dofs) required at local node n.
void fix_pressure(const unsigned &p_dof, const double &p_value)
Pin p_dof-th pressure dof and set it to value specified by p_value.
PRefineableGeneralisedNewtonianQCrouzeixRaviartElement(const PRefineableGeneralisedNewtonianQCrouzeixRaviartElement< DIM > &dummy)=delete
Broken copy constructor.
unsigned ncont_interpolated_values() const
Number of continuously interpolated values: DIM (velocities)
unsigned nvertex_node() const
Number of vertex nodes in the element.
void get_interpolated_values(const unsigned &t, const Vector< double > &s, Vector< double > &values)
Get all function values [u,v..,p] at previous timestep t (t=0: present; t>0: previous timestep).
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
void get_interpolated_values(const Vector< double > &s, Vector< double > &values)
Get the function value u in Vector. Note: Given the generality of the interface (this function is usu...
A class that is used to template the p-refineable Q elements by dimension. It's really nothing more t...
////////////////////////////////////////////////////////////////// //////////////////////////////////...
RefineableElements are FiniteElements that may be subdivided into children to provide a better local ...
virtual RefineableElement * father_element_pt() const
Return a pointer to the father element.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...
void dinterpolated_u_nst_ddata(const Vector< double > &s, const unsigned &i, Vector< double > &du_ddata, Vector< unsigned > &global_eqn_number)
Compute the derivatives of the i-th component of velocity at point s with respect to all data that ca...
virtual void get_dresidual_dnodal_coordinates(RankThreeTensor< double > &dresidual_dnodal_coordinates)
Compute derivatives of elemental residual vector with respect to nodal coordinates....
static void unpin_all_pressure_dofs(const Vector< GeneralisedElement * > &element_pt)
Unpin all pressure dofs in elements listed in vector.
static void pin_redundant_nodal_pressures(const Vector< GeneralisedElement * > &element_pt)
Loop over all elements in Vector (which typically contains all the elements in a fluid mesh) and pin ...
void further_build()
Further build, pass the pointers down to the sons.
virtual void unpin_elemental_pressure_dofs()=0
Unpin all pressure dofs in the element.
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Get 'flux' for Z2 error recovery: Upper triangular entries in strain rate tensor.
virtual Node * pressure_node_pt(const unsigned &n_p)
Pointer to n_p-th pressure node (Default: NULL, indicating that pressure is not based on nodal interp...
RefineableGeneralisedNewtonianNavierStokesEquations()
Constructor.
virtual void pin_elemental_redundant_nodal_pressure_dofs()
Pin unused nodal pressure dofs (empty by default, because by default pressure dofs are not associated...
void fill_in_generic_residual_contribution_nst(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix, unsigned flag)
Add element's contribution to elemental residual vector and/or Jacobian matrix flag=1: compute both f...
void get_pressure_and_velocity_mass_matrix_diagonal(Vector< double > &press_mass_diag, Vector< double > &veloc_mass_diag, const unsigned &which_one=0)
Compute the diagonal of the velocity/pressure mass matrices. If which one=0, both are computed,...
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
//////////////////////////////////////////////////////////////////////// ////////////////////////////...
RefineableGeneralisedNewtonianQCrouzeixRaviartElement(const RefineableGeneralisedNewtonianQCrouzeixRaviartElement< DIM > &dummy)=delete
Broken copy constructor.
void rebuild_from_sons(Mesh *&mesh_pt)
Rebuild from sons: Reconstruct pressure from the (merged) sons This must be specialised for each dime...
void identify_load_data(std::set< std::pair< Data *, unsigned >> &paired_load_data)
Add to the set paired_load_data pairs containing.
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
void unpin_elemental_pressure_dofs()
Unpin all internal pressure dofs.
unsigned nrecovery_order()
Order of recovery shape functions for Z2 error estimation: Same order as shape functions.
void get_interpolated_values(const unsigned &t, const Vector< double > &s, Vector< double > &values)
Get all function values [u,v..,p] at previous timestep t (t=0: present; t>0: previous timestep).
void further_setup_hanging_nodes()
Perform additional hanging node procedures for variables that are not interpolated by all nodes....
RefineableGeneralisedNewtonianQCrouzeixRaviartElement()
Constructor.
unsigned ncont_interpolated_values() const
Broken assignment operator.
void further_build()
Further build for Crouzeix_Raviart interpolates the internal pressure dofs from father element: Make ...
unsigned nvertex_node() const
Number of vertex nodes in the element.
void get_interpolated_values(const Vector< double > &s, Vector< double > &values)
Get the function value u in Vector. Note: Given the generality of the interface (this function is usu...
Refineable version of Taylor Hood elements. These classes can be written in total generality.
unsigned ncont_interpolated_values() const
Number of continuously interpolated values: (DIM velocities + 1 pressure)
unsigned ninterpolating_node(const int &value_id)
The number of pressure nodes is 2^DIM. The number of velocity nodes is the same as the number of geom...
Node * get_interpolating_node_at_local_coordinate(const Vector< double > &s, const int &value_id)
The velocity nodes are the same as the geometric nodes. The pressure nodes must be calculated by usin...
void identify_load_data(std::set< std::pair< Data *, unsigned >> &paired_load_data)
Add to the set paired_load_data pairs containing.
void further_setup_hanging_nodes()
Perform additional hanging node procedures for variables that are not interpolated by all nodes....
unsigned nvertex_node() const
Number of vertex nodes in the element.
void get_interpolated_values(const unsigned &t, const Vector< double > &s, Vector< double > &values)
Get the function value u in Vector. Note: Given the generality of the interface (this function is usu...
void rebuild_from_sons(Mesh *&mesh_pt)
Rebuild from sons: empty.
Node * pressure_node_pt(const unsigned &n_p)
Pointer to n_p-th pressure node.
Node * interpolating_node_pt(const unsigned &n, const int &value_id)
The velocities are isoparametric and so the "nodes" interpolating the velocities are the geometric no...
void pin_elemental_redundant_nodal_pressure_dofs()
Pin all nodal pressure dofs that are not required.
unsigned required_nvalue(const unsigned &n) const
Number of values required at local node n. In order to simplify matters, we allocate storage for pres...
RefineableGeneralisedNewtonianQTaylorHoodElement()
Constructor.
void unpin_elemental_pressure_dofs()
Unpin all pressure dofs.
unsigned nrecovery_order()
Order of recovery shape functions for Z2 error estimation: Same order as shape functions.
void get_interpolated_values(const Vector< double > &s, Vector< double > &values)
Get the function value u in Vector. Note: Given the generality of the interface (this function is usu...
unsigned ninterpolating_node_1d(const int &value_id)
The number of 1d pressure nodes is 2, the number of 1d velocity nodes is the same as the number of 1d...
void interpolating_basis(const Vector< double > &s, Shape &psi, const int &value_id) const
The basis interpolating the pressure is given by pshape(). / The basis interpolating the velocity is ...
double local_one_d_fraction_of_interpolating_node(const unsigned &n1d, const unsigned &i, const int &value_id)
The pressure nodes are the corner nodes, so when n_value==DIM, the fraction is the same as the 1d nod...
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
Refineable version of QElement<3,NNODE_1D>.
A class that is used to template the refineable Q elements by dimension. It's really nothing more tha...
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
A slight extension to the standard template vector class so that we can include "graceful" array rang...
//////////////////////////////////////////////////////////////////// ////////////////////////////////...