32 #ifndef OOMPH_GENERALISED_NEWTONIAN_REFINEABLE_NAVIER_STOKES_ELEMENTS_HEADER 33 #define OOMPH_GENERALISED_NEWTONIAN_REFINEABLE_NAVIER_STOKES_ELEMENTS_HEADER 37 #include <oomph-lib-config.h> 41 #include "../generic/refineable_quad_element.h" 42 #include "../generic/refineable_brick_element.h" 43 #include "../generic/hp_refineable_elements.h" 44 #include "../generic/error_estimator.h" 63 template<
unsigned DIM>
102 unsigned n_element = element_pt.size();
103 for(
unsigned e=0;
e<n_element;
e++)
116 unsigned n_element = element_pt.size();
117 for(
unsigned e=0;
e<n_element;
e++)
135 const unsigned& which_one=0);
142 return DIM + (DIM*(DIM-1))/2;
150 unsigned num_entries=DIM+(DIM*(DIM-1))/2;
151 if (flux.size() < num_entries)
153 std::ostringstream error_message;
154 error_message <<
"The flux vector has the wrong number of entries, " 155 << flux.size() <<
", whereas it should be at least " 156 << num_entries << std::endl;
158 OOMPH_CURRENT_FUNCTION,
159 OOMPH_EXCEPTION_LOCATION);
171 for(
unsigned i=0;
i<DIM;
i++)
173 flux[icount]=strainrate(
i,
i);
178 for(
unsigned i=0;
i<DIM;
i++)
180 for(
unsigned j=
i+1;j<DIM;j++)
182 flux[icount]=strainrate(
i,j);
193 cast_father_element_pt
202 this->
Re_pt = cast_father_element_pt->
re_pt();
208 this->
G_pt = cast_father_element_pt->
g_pt();
233 unsigned n_node = this->
nnode();
240 const unsigned u_nodal_index = this->
u_index_nst(i);
249 for(
unsigned l=0;l<n_node;l++)
251 unsigned n_master = 1;
260 n_master = hang_info_pt->
nmaster();
269 for(
unsigned m=0;m<n_master;m++)
285 if(global_eqn >= 0) {++n_u_dof;}
290 du_ddata.resize(n_u_dof,0.0);
291 global_eqn_number.resize(n_u_dof,0);
296 for(
unsigned l=0;l<n_node;l++)
298 unsigned n_master = 1;
299 double hang_weight = 1.0;
308 n_master = hang_info_pt->
nmaster();
317 for(
unsigned m=0;m<n_master;m++)
347 global_eqn_number[count] = global_eqn;
349 du_ddata[count] = psi[l]*hang_weight;
377 dresidual_dnodal_coordinates);
386 template<
unsigned DIM>
399 unsigned n_node = this->
nnode();
401 for(
unsigned n=0;n<n_node;n++)
411 unsigned n_node = this->
nnode();
413 for(
unsigned n=0;n<n_node;n++) {this->
node_pt(n)->
pin(p_index);}
417 for(
unsigned l=0;l<n_pres;l++)
463 values.resize(DIM+1,0.0);
480 values.resize(DIM+1);
483 for(
unsigned i=0;
i<DIM+1;
i++) {values[
i]=0.0;}
486 unsigned n_node = this->
nnode();
493 for(
unsigned i=0;
i<DIM;
i++)
497 for(
unsigned l=0;l<n_node;l++)
499 values[
i] += this->
nodal_value(t,l,u_nodal_index)*psif[l];
519 {
return this->
node_pt(this->Pconv[n_p]);}
532 else {
return this->
node_pt(n);}
564 unsigned total_index=0;
566 unsigned NNODE_1D = 2;
570 for(
unsigned i=0;
i<DIM;
i++)
580 index[
i] = NNODE_1D-1;
586 double float_index = 0.5*(1.0 + s[
i])*(NNODE_1D-1);
587 index[
i] = int(float_index);
590 double excess = float_index - index[
i];
600 total_index += index[
i]*
601 static_cast<unsigned>(pow(static_cast<float>(NNODE_1D),
602 static_cast<int>(
i)));
619 if(value_id==DIM) {
return 2;}
628 {
return static_cast<unsigned>(pow(2.0,static_cast<int>(DIM)));}
629 else {
return this->
nnode();}
636 const int &value_id)
const 638 if(value_id==DIM) {
return this->
pshape_nst(s,psi);}
639 else {
return this->
shape(s,psi);}
653 std::set<std::pair<Data*,unsigned> > &paired_load_data)
656 unsigned u_index[DIM];
660 unsigned n_node = this->
nnode();
661 for(
unsigned n=0;n<n_node;n++)
673 for (
unsigned j=0;j<nmaster;j++)
679 for(
unsigned i=0;
i<DIM;
i++)
681 paired_load_data.insert(std::make_pair(master_nod_pt,u_index[
i]));
690 for(
unsigned i=0;
i<DIM;
i++)
692 paired_load_data.insert(std::make_pair(this->
node_pt(n),u_index[
i]));
702 for(
unsigned l=0;l<n_pres;l++)
714 unsigned nmaster = hang_info_pt->
nmaster();
717 for(
unsigned m=0;m<nmaster;m++)
721 paired_load_data.insert(
730 paired_load_data.insert(std::make_pair(pres_node_pt,p_index));
744 template<
unsigned DIM>
746 public virtual FaceGeometry<GeneralisedNewtonianQTaylorHoodElement<DIM> >
758 template<
unsigned DIM>
762 GeneralisedNewtonianQTaylorHoodElement<DIM> > >
779 template<
unsigned DIM>
792 for(
unsigned l=0;l<n_pres;l++)
811 "RefineableGeneralisedNewtonianQCrouzeixRaviartElement");
854 values.resize(DIM,0.0);
876 for(
unsigned i=0;
i<DIM;
i++) {values[
i]=0.0;}
879 unsigned n_node = this->
nnode();
886 for(
unsigned i=0;
i<DIM;
i++)
890 for(
unsigned l=0;l<n_node;l++)
892 values[
i] += this->
nodal_value(t,l,u_nodal_index)*psif[l];
918 std::set<std::pair<Data*,unsigned> > &paired_load_data)
921 unsigned u_index[DIM];
925 unsigned n_node = this->
nnode();
926 for(
unsigned n=0;n<n_node;n++)
938 for (
unsigned j=0;j<nmaster;j++)
944 for(
unsigned i=0;
i<DIM;
i++)
946 paired_load_data.insert(std::make_pair(master_nod_pt,u_index[
i]));
955 for(
unsigned i=0;
i<DIM;
i++)
957 paired_load_data.insert(std::make_pair(this->
node_pt(n),u_index[
i]));
965 for(
unsigned l=0;l<n_pres;l++)
969 paired_load_data.insert(
982 template<
unsigned DIM>
996 for(
unsigned l=0;l<n_pres;l++)
1045 "PRefineableGeneralisedNewtonianQCrouzeixRaviartElement");
1062 double p_nst(
const unsigned &
t,
const unsigned &
i)
const 1066 unsigned npres_nst()
const {
return (this->p_order()-2)*(this->p_order()-2);}
1148 values.resize(DIM,0.0);
1170 for(
unsigned i=0;
i<DIM;
i++) {values[
i]=0.0;}
1173 unsigned n_node = this->
nnode();
1177 this->
shape(s,psif);
1180 for(
unsigned i=0;
i<DIM;
i++)
1184 for(
unsigned l=0;l<n_node;l++)
1186 values[
i] += this->
nodal_value(t,l,u_nodal_index)*psif[l];
1208 template<
unsigned DIM>
1211 public virtual FaceGeometry<GeneralisedNewtonianQCrouzeixRaviartElement<DIM> >
1224 template<
unsigned DIM>
1228 FaceGeometry<GeneralisedNewtonianQCrouzeixRaviartElement<DIM> > >
1246 using namespace QuadTreeNames;
1255 double av_press=0.0;
1258 for (
unsigned ison=0;ison<4;ison++)
1263 av_press += quadtree_pt()->son_pt(ison)->object_pt()->
1280 quadtree_pt()->son_pt(
SE)->object_pt()->
1282 quadtree_pt()->son_pt(
SW)->object_pt()->
1286 quadtree_pt()->son_pt(
NE)->object_pt()->
1288 quadtree_pt()->son_pt(
NW)->object_pt()->
1294 set_value(1,0.5*(slope1+slope2));
1307 quadtree_pt()->son_pt(
NE)->object_pt()
1308 ->internal_data_pt(this->P_nst_internal_index)->value(0) -
1309 quadtree_pt()->son_pt(
SE)->object_pt()
1310 ->internal_data_pt(this->P_nst_internal_index)->value(0);
1313 quadtree_pt()->son_pt(
NW)->object_pt()
1314 ->internal_data_pt(this->P_nst_internal_index)->value(0) -
1315 quadtree_pt()->son_pt(
SW)->object_pt()
1316 ->internal_data_pt(this->P_nst_internal_index)->value(0);
1321 set_value(2,0.5*(slope1+slope2));
1333 using namespace OcTreeNames;
1342 double av_press=0.0;
1345 for (
unsigned ison=0;ison<8;ison++)
1348 av_press += octree_pt()->son_pt(ison)->object_pt()->
1354 set_value(0,0.125*av_press);
1366 octree_pt()->son_pt(
RDF)->object_pt()->
1368 octree_pt()->son_pt(
LDF)->object_pt()->
1372 octree_pt()->son_pt(
RUF)->object_pt()->
1374 octree_pt()->son_pt(
LUF)->object_pt()->
1378 octree_pt()->son_pt(
RDB)->object_pt()->
1380 octree_pt()->son_pt(
LDB)->object_pt()->
1384 octree_pt()->son_pt(
RUB)->object_pt()->
1386 octree_pt()->son_pt(
LUB)->object_pt()->
1392 set_value(1,0.25*(slope1+slope2+slope3+slope4));
1404 octree_pt()->son_pt(
LUB)->object_pt()
1405 ->internal_data_pt(this->P_nst_internal_index)->value(0) -
1406 octree_pt()->son_pt(
LDB)->object_pt()
1407 ->internal_data_pt(this->P_nst_internal_index)->value(0);
1410 octree_pt()->son_pt(
RUB)->object_pt()
1411 ->internal_data_pt(this->P_nst_internal_index)->value(0) -
1412 octree_pt()->son_pt(
RDB)->object_pt()
1413 ->internal_data_pt(this->P_nst_internal_index)->value(0);
1416 octree_pt()->son_pt(
LUF)->object_pt()
1417 ->internal_data_pt(this->P_nst_internal_index)->value(0) -
1418 octree_pt()->son_pt(
LDF)->object_pt()
1419 ->internal_data_pt(this->P_nst_internal_index)->value(0);
1422 octree_pt()->son_pt(
RUF)->object_pt()
1423 ->internal_data_pt(this->P_nst_internal_index)->value(0) -
1424 octree_pt()->son_pt(
RDF)->object_pt()
1425 ->internal_data_pt(this->P_nst_internal_index)->value(0);
1430 set_value(2,0.25*(slope1+slope2+slope3+slope4));
1442 octree_pt()->son_pt(
LUF)->object_pt()
1443 ->internal_data_pt(this->P_nst_internal_index)->value(0) -
1444 octree_pt()->son_pt(
LUB)->object_pt()
1445 ->internal_data_pt(this->P_nst_internal_index)->value(0);
1448 octree_pt()->son_pt(
RUF)->object_pt()
1449 ->internal_data_pt(this->P_nst_internal_index)->value(0) -
1450 octree_pt()->son_pt(
RUB)->object_pt()
1451 ->internal_data_pt(this->P_nst_internal_index)->value(0);
1454 octree_pt()->son_pt(
LDF)->object_pt()
1455 ->internal_data_pt(this->P_nst_internal_index)->value(0) -
1456 octree_pt()->son_pt(
LDB)->object_pt()
1457 ->internal_data_pt(this->P_nst_internal_index)->value(0);
1460 octree_pt()->son_pt(
RDF)->object_pt()
1461 ->internal_data_pt(this->P_nst_internal_index)->value(0) -
1462 octree_pt()->son_pt(
RDB)->object_pt()
1463 ->internal_data_pt(this->P_nst_internal_index)->value(0);
1467 set_value(3,0.25*(slope1+slope2+slope3+slope4));
1485 using namespace QuadTreeNames;
1488 int son_type=quadtree_pt()->son_type();
1504 else if (son_type==
SE)
1510 else if (son_type==
NE)
1517 else if (son_type==
NW)
1525 cast_father_element_pt=
1535 for(
unsigned i=1;
i<3;
i++)
1537 double half_father_slope = 0.5*cast_father_element_pt->
1541 set_value(
i,half_father_slope);
1558 using namespace OcTreeNames;
1561 int son_type=octree_pt()->son_type();
1566 octree_pt()->father_pt()->object_pt());
1571 for(
unsigned i=0;
i<3;
i++)
1578 cast_father_element_pt=
1588 for(
unsigned i=1;
i<4;
i++)
1590 double half_father_slope = 0.5*cast_father_element_pt
1618 dtestdx(
i,0) = dpsidx(
i,0);
1619 dtestdx(
i,1) = dpsidx(
i,1);
1646 dtestdx(
i,0) = dpsidx(
i,0);
1647 dtestdx(
i,1) = dpsidx(
i,1);
1674 dtestdx(
i,0) = dpsidx(
i,0);
1675 dtestdx(
i,1) = dpsidx(
i,1);
1676 dtestdx(
i,2) = dpsidx(
i,2);
1703 dtestdx(
i,0) = dpsidx(
i,0);
1704 dtestdx(
i,1) = dpsidx(
i,1);
1705 dtestdx(
i,2) = dpsidx(
i,2);
1728 unsigned npres_1d = (int) std::sqrt((
double)npres);
1737 for(
unsigned i=0;
i<npres_1d;
i++)
1739 for(
unsigned j=0;j<npres_1d;j++)
1742 psi[
i*npres_1d + j] = psi2[
i]*psi1[j];
1783 unsigned npres_1d = (int) std::sqrt((
double)npres);
1793 for(
unsigned i=0;
i<npres_1d;
i++)
1795 for(
unsigned j=0;j<npres_1d;j++)
1797 for(
unsigned k=0;k<npres_1d;k++)
1800 psi[
i*npres_1d*npres_1d + j*npres_1d + k] = psi3[
i]*psi2[j]*psi1[k];
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 unpin(const unsigned &i)
Unpin the i-th stored variable.
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 double interpolated_p_nst(const Vector< double > &s) const
Return FE interpolated pressure at local coordinate s.
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
double * Viscosity_Ratio_pt
Pointer to the viscosity ratio (relative to the viscosity used in the definition of the Reynolds numb...
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...
void further_setup_hanging_nodes()
Perform additional hanging node procedures for variables that are not interpolated by all nodes...
Base class for finite elements that can compute the quantities that are required for the Z2 error est...
virtual RefineableElement * father_element_pt() const
Return a pointer to the father element.
unsigned nvertex_node() const
Number of vertex nodes in the element.
void further_build()
Further build, pass the pointers down to the sons.
virtual double dshape_eulerian_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsidx) const
Return the geometric shape functions and also first derivatives w.r.t. global coordinates at the ipt-...
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
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.
double *& re_st_pt()
Pointer to product of Reynolds and Strouhal number (=Womersley number)
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...
HangInfo *const & hanging_pt() const
Return pointer to hanging node data (this refers to the geometric hanging node status) (const version...
unsigned nrecovery_order()
Order of recovery shape functions for Z2 error estimation: Same order as shape functions.
void rebuild_from_sons(Mesh *&mesh_pt)
Rebuild from sons: Reconstruct pressure from the (merged) sons This must be specialised for each dime...
virtual void pin_elemental_redundant_nodal_pressure_dofs()
Pin unused nodal pressure dofs (empty by default, because by default pressure dofs are not associated...
NavierStokesSourceFctPt & source_fct_pt()
Access function for the source-function pointer.
virtual void set_integration_scheme(Integral *const &integral_pt)
Set the spatial integration scheme.
unsigned ncont_interpolated_values() const
Number of continuously interpolated values: DIM (velocities)
virtual void unpin_elemental_pressure_dofs()=0
Unpin all pressure dofs in the element.
void pin_elemental_redundant_nodal_pressure_dofs()
Pin all nodal pressure dofs that are not required.
double * ReSt_pt
Pointer to global Reynolds number x Strouhal number (=Womersley)
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 interpolated_u_nst(const Vector< double > &s, Vector< double > &veloc) const
Compute vector of FE interpolated velocity u at local coordinate s.
Node * pressure_node_pt(const unsigned &n_p)
Pointer to n_p-th pressure node.
double const & master_weight(const unsigned &i) const
Return weight for dofs on i-th master node.
virtual void pshape_nst(const Vector< double > &s, Shape &psi) const =0
Compute the pressure shape functions at local coordinate s.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
unsigned nmaster() const
Return the number of master nodes.
double * ReInvFr_pt
Pointer to global Reynolds number x inverse Froude number (= Bond number / Capillary number) ...
bool is_hanging() const
Test whether the node is geometrically hanging.
long & eqn_number(const unsigned &i)
Return the equation number of the i-th stored variable.
~PRefineableGeneralisedNewtonianQCrouzeixRaviartElement()
Destructor.
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
virtual unsigned u_index_nst(const unsigned &i) const
Return the index at which the i-th unknown velocity component.
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...
unsigned ncont_interpolated_values() const
Broken assignment operator.
PRefineableGeneralisedNewtonianQCrouzeixRaviartElement()
Constructor.
void pin(const unsigned &i)
Pin the i-th stored variable.
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 n...
void unpin_elemental_pressure_dofs()
Unpin all internal pressure dofs.
void further_setup_hanging_nodes()
Perform additional hanging node procedures for variables that are not interpolated by all nodes...
void unpin_elemental_pressure_dofs()
Unpin all internal pressure dofs.
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
unsigned ncont_interpolated_values() const
Number of continuously interpolated values: (DIM velocities + 1 pressure)
virtual double dshape_and_dtest_eulerian_at_knot_nst(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
Compute the shape functions and derivatives w.r.t. global coords at ipt-th integration point Return J...
virtual void get_dresidual_dnodal_coordinates(RankThreeTensor< double > &dresidual_dnodal_coordinates)
Compute derivatives of elemental residual vector with respect to nodal coordinates. Overwrites default implementation in FiniteElement base class. dresidual_dnodal_coordinates(l,i,j) = d res(l) / dX_{ij}.
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...
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...
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 dshape_eulerian(const Vector< double > &s, Shape &psi, DShape &dpsidx) const
Compute the geometric shape functions and also first derivatives w.r.t. global coordinates at local c...
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...
RefineableGeneralisedNewtonianNavierStokesEquations()
Constructor.
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
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...
void unpin_elemental_pressure_dofs()
Unpin all pressure dofs.
virtual unsigned nvertex_node() const
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...
Vector< double > * G_pt
Pointer to global gravity Vector.
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 identify_load_data(std::set< std::pair< Data *, unsigned > > &paired_load_data)
Add to the set paired_load_data pairs containing.
unsigned long eqn_number(const unsigned &ieqn_local) const
Return the global equation number corresponding to the ieqn_local-th local equation number...
void pshape_nst(const Vector< double > &s, Shape &psi) const
Pressure shape functions at local coordinate s.
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)
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...
unsigned npres_nst() const
Return number of pressure values.
static void unpin_all_pressure_dofs(const Vector< GeneralisedElement *> &element_pt)
Unpin all pressure dofs in elements listed in vector.
double p_nst(const unsigned &i) const
Broken assignment operator.
NavierStokesSourceFctPt Source_fct_pt
Pointer to volumetric source function.
A class that represents a collection of data; each Data object may contain many different individual ...
virtual int p_nodal_index_nst() const
Return the index at which the pressure is stored if it is stored at the nodes. If not stored at the n...
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...
Node *const & master_node_pt(const unsigned &i) const
Return a pointer to the i-th master node.
NavierStokesBodyForceFctPt & body_force_fct_pt()
Access function for the body-force pointer.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
static const double Node_location_tolerance
Default value for the tolerance to be used when locating nodes via local coordinates.
Vector< double > *& g_pt()
Pointer to Vector of gravitational components.
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...
Class that contains data for hanging nodes.
double *& re_pt()
Pointer to Reynolds number.
virtual void rebuild_from_sons(Mesh *&mesh_pt)=0
Rebuild the element, e.g. set internal values in line with those of the sons that have now merged...
void identify_load_data(std::set< std::pair< Data *, unsigned > > &paired_load_data)
Add to the set paired_load_data pairs containing.
void rebuild_from_sons(Mesh *&mesh_pt)
Rebuild from sons: empty.
virtual unsigned nnode_1d() const
Return the number of nodes along one edge of the element Default is to return zero — must be overloa...
unsigned nvertex_node() const
Number of vertex nodes in the element.
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...
unsigned nrecovery_order()
Order of recovery shape functions for Z2 error estimation:
unsigned nrecovery_order()
Order of recovery shape functions for Z2 error estimation: Same order as shape functions.
virtual double dshape_and_dtest_eulerian_nst(const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
Compute the shape functions and derivatives w.r.t. global coords at local coordinate s...
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
bool ALE_is_disabled
Boolean flag to indicate if ALE formulation is disabled when time-derivatives are computed...
virtual void resize(const unsigned &n_value)
Change (increase) the number of values that may be stored.
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 * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element. Broken virtual function in "pure" finite elements...
void further_setup_hanging_nodes()
Perform additional hanging node procedures for variables that are not interpolated by all nodes...
void rebuild_from_sons(Mesh *&mesh_pt)
Rebuild from sons: Reconstruct pressure from the (merged) sons This must be specialised for each dime...
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
double * Re_pt
Pointer to global Reynolds number.
double *& density_ratio_pt()
Pointer to Density ratio.
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.
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...
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...
RefineableGeneralisedNewtonianQCrouzeixRaviartElement()
Constructor.
unsigned required_nvalue(const unsigned &n) const
Number of values (pinned or dofs) required at local node n.
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...
double *& viscosity_ratio_pt()
Pointer to Viscosity Ratio.
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...
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 ...
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)...
unsigned nnode() const
Return the number of nodes.
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...
Refineable version of Crouzeix Raviart elements. Generic class definitions.
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 ...
virtual unsigned npres_nst() const =0
Function to return number of pressure degrees of freedom.
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...
double *& re_invfr_pt()
Pointer to global inverse Froude number.
double * Density_Ratio_pt
Pointer to the density ratio (relative to the density used in the definition of the Reynolds number) ...
NavierStokesBodyForceFctPt Body_force_fct_pt
Pointer to body force function.
RefineableGeneralisedNewtonianQTaylorHoodElement()
Constructor.