37 template<
unsigned DIM>
66 unsigned n_pres = this->npres_nst();
76 for (
unsigned i = 0;
i <
DIM;
i++)
83 int p_index = this->p_nodal_index_nst();
124 for (
unsigned i = 0;
i <
DIM;
i++)
170 for (
unsigned i = 0;
i <
DIM;
i++)
220 this->pshape_nst(
s,
psi_p);
289 template<
unsigned DIM>
295 if (
ndof() == 0)
return;
301 unsigned n_pres = this->npres_nst();
305 for (
unsigned i = 0;
i <
DIM;
i++)
313 int p_index = this->p_nodal_index_nst();
332 "Pressure advection diffusion does not work in this case\n",
359 double scaled_re = this->re() * this->density_ratio();
395 for (
unsigned i = 0;
i <
DIM;
i++)
407 for (
unsigned i = 0;
i <
DIM;
i++)
418 if (this->Press_adv_diff_source_fct_pt != 0)
471 for (
unsigned k = 0;
k <
DIM;
k++)
493 this->pressure_node_pt(
l2)->hanging_pt(
p_index);
527 this->Pinned_fp_pressure_eqn) &&
529 this->Pinned_fp_pressure_eqn))
531 for (
unsigned k = 0;
k <
DIM;
k++)
543 this->Pinned_fp_pressure_eqn) &&
545 this->Pinned_fp_pressure_eqn))
561 this->Pressure_advection_diffusion_robin_element_pt.
size();
564 this->Pressure_advection_diffusion_robin_element_pt[
e]
565 ->fill_in_generic_residual_contribution_fp_press_adv_diff_robin_bc(
577 template<
unsigned DIM>
591 unsigned n_pres = this->npres_nst();
595 for (
unsigned i = 0;
i <
DIM;
i++)
602 int p_index = this->p_nodal_index_nst();
641 double scaled_re = this->re() * this->density_ratio();
642 double scaled_re_st = this->re_st() * this->density_ratio();
660 for (
unsigned i = 0;
i <
DIM;
i++)
669 double J = this->dshape_and_dtest_eulerian_at_knot_nst(
680 double interpolated_p = 0.0;
690 interpolated_p += this->p_nst(
l) *
psip[
l];
700 for (
unsigned i = 0;
i <
DIM;
i++)
709 for (
unsigned j = 0;
j <
DIM;
j++)
722 for (
unsigned i = 0;
i <
DIM;
i++)
768 for (
unsigned i = 0;
i <
DIM;
i++)
797 sum += body_force[
i];
806 for (
unsigned k = 0;
k <
DIM;
k++)
813 sum -=
tmp * interpolated_dudx(
i,
k);
824 for (
unsigned k = 0;
k <
DIM;
k++)
827 (interpolated_dudx(
i,
k) +
828 this->Gamma[
i] * interpolated_dudx(
k,
i)) *
917 for (
unsigned k = 0;
k <
DIM;
k++)
931 for (
unsigned k = 0;
k <
DIM;
k++)
950 this->pressure_node_pt(
l2)->hanging_pt(
p_index);
1049 for (
unsigned k = 0;
k <
DIM;
k++)
1129 template<
unsigned DIM>
1146 const unsigned n_pres = this->npres_nst();
1150 for (
unsigned i = 0;
i <
DIM;
i++)
1157 const int p_index = this->p_nodal_index_nst();
1216 double scaled_re = this->re() * this->density_ratio();
1217 double scaled_re_st = this->re_st() * this->density_ratio();
1231 shape_controlling_node_lookup();
1234 for (std::map<Node*, unsigned>::iterator
it =
1243 unsigned q =
it->second;
1246 if (
nod_pt->has_auxiliary_node_update_fct_pt())
1252 for (
unsigned i = 0;
i <
DIM;
i++)
1258 for (
unsigned p = 0;
p <
DIM;
p++)
1268 nod_pt->perform_auxiliary_node_update_fct();
1278 nod_pt->perform_auxiliary_node_update_fct();
1293 for (
unsigned i = 0;
i <
DIM;
i++)
1303 this->dshape_and_dtest_eulerian_at_knot_nst(
ipt,
1317 double interpolated_p = 0.0;
1327 interpolated_p += this->p_nst(
l) *
psip[
l];
1336 for (
unsigned i = 0;
i <
DIM;
i++)
1345 for (
unsigned j = 0;
j <
DIM;
j++)
1358 for (
unsigned i = 0;
i <
DIM;
i++)
1371 for (
unsigned p = 0;
p <
DIM;
p++)
1373 for (
unsigned i = 0;
i <
DIM;
i++)
1375 for (
unsigned k = 0;
k <
DIM;
k++)
1405 this->get_body_force_gradient_nst(
1447 for (
unsigned i = 0;
i <
DIM;
i++)
1473 for (
unsigned p = 0;
p <
DIM;
p++)
1494 for (
unsigned k = 0;
k <
DIM;
k++)
1497 (interpolated_dudx(
i,
k) +
1498 this->Gamma[
i] * interpolated_dudx(
k,
i)) *
1508 for (
unsigned k = 0;
k <
DIM;
k++)
1533 for (
unsigned k = 0;
k <
DIM;
k++)
1537 this->Gamma[
i] * interpolated_dudx(
k,
i)) *
1545 for (
unsigned k = 0;
k <
DIM;
k++)
1557 interpolated_dudx(
i,
p) *
testf(
l);
1615 for (
unsigned p = 0;
p <
DIM;
p++)
1620 interpolated_dudx(
i,
p) *
testf(
l);
1625 for (
unsigned k = 0;
k <
DIM;
k++)
1697 for (
unsigned p = 0;
p <
DIM;
p++)
1706 double aux = -source;
1709 for (
unsigned k = 0;
k <
DIM;
k++)
1711 aux += interpolated_dudx(
k,
k);
1724 for (
unsigned k = 0;
k <
DIM;
k++)
1782 for (
unsigned p = 0;
p <
DIM;
p++)
1807 if (this->tree_pt()->father_pt() != 0)
1820 ->
resize(this->npres_nst());
1829 if (this->tree_pt()->father_pt() != 0)
1834 quadtree_pt()->father_pt()->object_pt());
1838 if (father_element_pt->p_order() == this->p_order())
1840 using namespace QuadTreeNames;
1843 int son_type = quadtree_pt()->son_type();
1879 double press = father_element_pt->interpolated_p_nst(
s_father);
1882 for (
unsigned p = 0;
p < this->npres_nst();
p++)
1888 if (this->npres_nst() == 1)
1892 else if (this->npres_nst() == 3)
1918 if (this->tree_pt()->father_pt() != 0)
1931 ->
resize(this->npres_nst());
1940 if (this->tree_pt()->father_pt() != 0)
1945 octree_pt()->father_pt()->object_pt());
1949 if (father_element_pt->p_order() == this->p_order())
1951 using namespace OcTreeNames;
1954 int son_type = octree_pt()->son_type();
1961 for (
unsigned i = 0;
i < 3;
i++)
1967 double press = father_element_pt->interpolated_p_nst(
s_father);
1970 for (
unsigned p = 0;
p < this->npres_nst();
p++)
1976 if (this->npres_nst() == 1)
bool ALE_is_disabled
Boolean flag to indicate if ALE formulation is disabled when time-derivatives are computed....
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 ...
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
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...
virtual void resize(const unsigned &n_value)
Change (increase) the number of values that may be stored.
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
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 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-...
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
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.
unsigned nnode() const
Return the number of nodes.
double nodal_position(const unsigned &n, const unsigned &i) const
Return the i-th coordinate at local node n. If the node is hanging, the appropriate interpolation is ...
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
virtual double J_eulerian_at_knot(const unsigned &ipt) const
Return the Jacobian of the mapping from local to global coordinates at the ipt-th integration point.
double dnodal_position_dt(const unsigned &n, const unsigned &i) const
Return the i-th component of nodal velocity: dx/dt at local node n.
virtual void shape_at_knot(const unsigned &ipt, Shape &psi) const
Return the geometric shape function at the ipt-th integration point.
static double Default_fd_jacobian_step
Double used for the default finite difference step in elemental jacobian calculations.
unsigned ndof() const
Return the number of equations/dofs in the element.
unsigned long eqn_number(const unsigned &ieqn_local) const
Return the global equation number corresponding to the ieqn_local-th local equation number.
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
Class that contains data for hanging nodes.
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
TimeStepper *& position_time_stepper_pt()
Return a pointer to the position timestepper.
bool is_hanging() const
Test whether the node is geometrically hanging.
HangInfo *const & hanging_pt() const
Return pointer to hanging node data (this refers to the geometric hanging node status) (const version...
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...
An OomphLibError object which should be thrown when an run-time error is encountered....
void further_build()
Further build for Crouzeix_Raviart interpolates the internal pressure dofs from father element: Make ...
A class that is used to template the p-refineable Q elements by dimension. It's really nothing more t...
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 further_build()
Further build, pass the pointers down to the sons.
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,...
void fill_in_generic_pressure_advection_diffusion_contribution_nst(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
Compute the residuals for the associated pressure advection diffusion problem. Used by the Fp precond...
virtual void get_dresidual_dnodal_coordinates(RankThreeTensor< double > &dresidual_dnodal_coordinates)
Compute derivatives of elemental residual vector with respect to nodal coordinates....
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
TAdvectionDiffusionReactionElement()
Constructor: Call constructors for TElement and AdvectionDiffusionReaction equations.
virtual double weight(const unsigned &i, const unsigned &j) const
Access function for j-th weight for the i-th derivative.
Time *const & time_pt() const
Access function for the pointer to time (const version)
double & time()
Return the current value of the continuous time.
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).