34 #ifndef OOMPH_BOUSSINESQ_ELEMENTS_HEADER 35 #define OOMPH_BOUSSINESQ_ELEMENTS_HEADER 40 #include "advection_diffusion.h" 41 #include "navier_stokes.h" 70 template<
unsigned DIM>
136 "This function hasn't been implemented for this element",
137 OOMPH_CURRENT_FUNCTION,
138 OOMPH_EXCEPTION_LOCATION);
149 const unsigned& nplot)
const 152 "This function hasn't been implemented for this element",
153 OOMPH_CURRENT_FUNCTION,
154 OOMPH_EXCEPTION_LOCATION);
173 void output(std::ostream &outfile,
const unsigned &nplot)
183 for (
unsigned iplot=0;iplot<num_plot_points;iplot++)
189 for(
unsigned i=0;
i<DIM;
i++)
193 for(
unsigned i=0;
i<DIM;
i++)
202 outfile << std::endl;
214 void output(FILE* file_pt,
const unsigned &n_plot)
218 void output_fct(std::ostream &outfile,
const unsigned &Nplot,
226 void output_fct(std::ostream &outfile,
const unsigned &Nplot,
247 double& error,
double& norm)
258 double& error,
double& norm)
290 for (
unsigned i=0;
i<DIM;
i++)
292 result[
i] = -gravity[
i]*interpolated_t*
ra();
314 #ifdef USE_FD_JACOBIAN_FOR_BUOYANT_Q_ELEMENT 336 residuals,jacobian,mass_matrix);
342 #ifdef USE_OFF_DIAGONAL_FD_JACOBIAN_FOR_BUOYANT_Q_ELEMENT 351 unsigned u_nodal_nst[DIM];
352 for(
unsigned i=0;
i<DIM;
i++)
359 unsigned n_dof = this->
ndof();
365 int local_unknown =0, local_eqn = 0;
371 unsigned n_node = this->
nnode();
377 for(
unsigned n=0;n<n_node;n++)
380 for(
unsigned i=0;
i<DIM;
i++)
386 if(local_unknown >= 0)
392 double old_var = *value_pt;
395 *value_pt += fd_step;
401 for(
unsigned m=0;m<n_dof;m++) {newres[m] = 0.0;}
409 for(
unsigned m=0;m<n_node;m++)
417 double sum = (newres[local_eqn] - residuals[local_eqn])/fd_step;
418 jacobian(local_eqn,local_unknown) = sum;
435 if(local_unknown >= 0)
441 double old_var = *value_pt;
444 *value_pt += fd_step;
450 for(
unsigned m=0;m<n_dof;m++) {newres[m] = 0.0;}
457 for(
unsigned m=0;m<n_node;m++)
460 for(
unsigned j=0;j<DIM;j++)
466 double sum = (newres[local_eqn] - residuals[local_eqn])/fd_step;
467 jacobian(local_eqn,local_unknown) = sum;
511 residuals,jacobian,mass_matrix);
515 residuals,jacobian,mass_matrix);
538 unsigned u_nodal_nst[DIM];
545 const unsigned n_node = this->
nnode();
548 Shape psif(n_node), testf(n_node);
549 DShape dpsifdx(n_node,DIM), dtestfdx(n_node,DIM);
555 double Ra = this->
ra();
556 double Pe = this->
pe();
560 int local_eqn=0, local_unknown=0;
563 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
581 for(
unsigned l=0;l<n_node;l++)
586 for(
unsigned j=0;j<DIM;j++)
588 interpolated_du_adv_diff_dx[j] += u_value*dpsifdx(l,j);
595 for(
unsigned l=0;l<n_node;l++)
602 for(
unsigned i=0;
i<DIM;
i++)
609 for(
unsigned l2=0;l2<n_node;l2++)
614 if(local_unknown >= 0)
617 jacobian(local_eqn,local_unknown)
618 += -gravity[
i]*psif(l2)*Ra*testf(l)*
W;
632 for(
unsigned l2=0;l2<n_node;l2++)
635 for(
unsigned i2=0;i2<DIM;i2++)
640 if(local_unknown >= 0)
643 jacobian(local_eqn,local_unknown)
644 -= Pe*psif(l2)*interpolated_du_adv_diff_dx[i2]*testf(l)*
W;
685 residuals,jacobian,mass_matrix);
689 residuals,jacobian,mass_matrix);
712 template<
unsigned int DIM>
758 template<
unsigned DIM>
820 "This function hasn't been implemented for this element",
821 OOMPH_CURRENT_FUNCTION,
822 OOMPH_EXCEPTION_LOCATION);
833 const unsigned& nplot)
const 836 "This function hasn't been implemented for this element",
837 OOMPH_CURRENT_FUNCTION,
838 OOMPH_EXCEPTION_LOCATION);
856 void output(std::ostream &outfile,
const unsigned &nplot)
866 for (
unsigned iplot=0;iplot<num_plot_points;iplot++)
872 for(
unsigned i=0;
i<DIM;
i++)
876 for(
unsigned i=0;
i<DIM;
i++)
885 outfile << std::endl;
897 void output(FILE* file_pt,
const unsigned &n_plot)
901 void output_fct(std::ostream &outfile,
const unsigned &Nplot,
909 void output_fct(std::ostream &outfile,
const unsigned &Nplot,
959 for(
unsigned i=0;
i<DIM;
i++) {values.push_back(nst_values[
i]);}
962 values.push_back(advection_values[0]);
989 for(
unsigned i=0;
i<DIM;
i++) {values.push_back(nst_values[
i]);}
992 values.push_back(advection_values[0]);
1030 this->father_element_pt());
1034 this->Ra_pt = cast_father_element_pt->
ra_pt();
1057 unsigned n_fluid_flux =
1064 unsigned n_temp_flux =
1072 for(
unsigned i=0;
i<n_temp_flux;
i++)
1074 flux[n_fluid_flux+
i] = temp_flux[
i];
1088 unsigned n_fluid_flux =
1091 unsigned n_temp_flux =
1097 for(
unsigned i=0;
i<n_fluid_flux;
i++) {flux_index[
i] = 0;}
1100 for(
unsigned i=0;
i<n_temp_flux;
i++) {flux_index[n_fluid_flux +
i] = 1;}
1113 double& error,
double& norm)
1124 double& error,
double& norm)
1157 for (
unsigned i=0;
i<DIM;
i++)
1159 result[
i] = -gravity[
i]*interpolated_t*
ra();
1181 #ifdef USE_FD_JACOBIAN_FOR_REFINEABLE_BUOYANT_Q_ELEMENT 1206 residuals,jacobian,mass_matrix);
1219 HangInfo *hang_info_pt=0, *hang_info2_pt=0;
1223 unsigned u_nodal_nst[DIM];
1230 const unsigned n_node = this->
nnode();
1233 Shape psif(n_node), testf(n_node);
1234 DShape dpsifdx(n_node,DIM), dtestfdx(n_node,DIM);
1240 double Ra = this->
ra();
1241 double Pe = this->
pe();
1245 int local_eqn=0, local_unknown=0;
1248 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
1266 for(
unsigned l=0;l<n_node;l++)
1269 double u_value = this->
nodal_value(l,u_nodal_adv_diff);
1271 for(
unsigned j=0;j<DIM;j++)
1273 interpolated_du_adv_diff_dx[j] += u_value*dpsifdx(l,j);
1281 for(
unsigned l=0;l<n_node;l++)
1285 unsigned n_master=1;
1286 double hang_weight=1.0;
1295 n_master = hang_info_pt->
nmaster();
1304 for(
unsigned m=0;m<n_master;m++)
1323 for(
unsigned i=0;
i<DIM;
i++)
1330 local_eqn = this->local_hang_eqn(hang_info_pt->
master_node_pt(m),
1343 unsigned n_master2=1;
1344 double hang_weight2=1.0;
1347 for(
unsigned l2=0;l2<n_node;l2++)
1353 if(is_node2_hanging)
1356 n_master2 = hang_info2_pt->
nmaster();
1365 for(
unsigned m2=0;m2<n_master2;m2++)
1367 if(is_node2_hanging)
1371 this->local_hang_eqn(hang_info2_pt->master_node_pt(m2),
1374 hang_weight2 = hang_info2_pt->master_weight(m2);
1384 if(local_unknown >= 0)
1387 jacobian(local_eqn,local_unknown)
1388 += -gravity[
i]*psif(l2)*Ra*testf(l)*
1389 W*hang_weight*hang_weight2;
1404 local_eqn = this->local_hang_eqn(hang_info_pt->
master_node_pt(m),
1418 unsigned n_master2=1;
1419 double hang_weight2=1.0;
1422 for(
unsigned l2=0;l2<n_node;l2++)
1428 if(is_node2_hanging)
1431 n_master2 = hang_info2_pt->
nmaster();
1440 for(
unsigned m2=0;m2<n_master2;m2++)
1443 if(is_node2_hanging)
1446 hang_weight2 = hang_info2_pt->master_weight(m2);
1456 for(
unsigned i2=0;i2<DIM;i2++)
1459 if(is_node2_hanging)
1463 this->local_hang_eqn(hang_info2_pt->master_node_pt(m2),
1473 if(local_unknown >= 0)
1476 jacobian(local_eqn,local_unknown)
1477 -= Pe*psif(l2)*interpolated_du_adv_diff_dx[i2]*testf(l)
1478 *W*hang_weight*hang_weight2;
void output_fct(std::ostream &outfile, const unsigned &Nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output function for an exact solution: Broken default.
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
virtual std::string tecplot_zone_string(const unsigned &nplot) const
Return string for tecplot zone header (when plotting nplot points in each "coordinate direction") ...
void unpin(const unsigned &i)
Unpin the i-th stored variable.
double raw_nodal_value(const unsigned &n, const unsigned &i) const
Return the i-th value stored at local node n but do NOT take hanging nodes into account.
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Get 'flux' for Z2 error recovery: Upper triangular entries in strain rate tensor. ...
RefineableBuoyantQCrouzeixRaviartElement()
Constructor: call the underlying constructors and initialise the pointer to the Rayleigh number to ad...
void disable_ALE()
Final override for disable ALE.
void output(std::ostream &outfile)
Overload the standard output function with the broken default.
const double & ra() const
Access function for the Rayleigh number (const version)
virtual void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &shifted_to_interior=false) const
Get cector of local coordinates of plot point i (when plotting nplot points in each "coordinate direc...
virtual void output(std::ostream &outfile)
Output the element data — typically the values at the nodes in a format suitable for post-processing...
void output(std::ostream &outfile)
Overload the standard output function with the broken default.
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
unsigned u_index_adv_diff() const
Overload the index at which the temperature variable is stored. We choose to store it after the fluid...
void output(FILE *file_pt)
C-style output function: Broken default.
HangInfo *const & hanging_pt() const
Return pointer to hanging node data (this refers to the geometric hanging node status) (const version...
const double & ra() const
Access function for the Rayleigh number (const version)
void further_build()
Call the underlying single-physics element's further_build() functions and make sure that the pointer...
unsigned num_Z2_flux_terms()
The number of Z2 flux terms is the same as that in the fluid element plus that in the advection-diffu...
double * value_pt(const unsigned &i) const
Return the pointer to the i-the stored value. Typically this is required when direct access to the st...
void compute_error(std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
Validate against exact solution at given time Solution is provided via function pointer. Plot at a given number of plot points and compute L2 error and L2 norm of velocity solution over element Overload to broken default.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Fill in the constituent elements' contribution to the residual vector.
unsigned nvertex_node() const
Number of vertex nodes in the element is obtained from the geometric element.
void rebuild_from_sons(Mesh *&mesh_pt)
Rebuild from sons: Reconstruct pressure from the (merged) sons This must be specialised for each dime...
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Add the element's contribution to its residual vector (wrapper)
void further_build()
Further build: Copy source function pointer from father element.
static double Default_Physical_Constant_Value
The static default value of the Rayleigh number.
void output(FILE *file_pt, const unsigned &n_plot)
C-style output function: Broken default.
void get_wind_adv_diff(const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &wind) const
Overload the wind function in the advection-diffusion equations. This provides the coupling from the ...
void output_fct(std::ostream &outfile, const unsigned &Nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
Output function for a time-dependent exact solution. Broken default.
unsigned required_nvalue(const unsigned &n) const
The required number of values stored at the nodes is the sum of the required values of the two single...
void get_body_force_nst(const double &time, const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &result)
Overload the body force in the navier-stokes equations This provides the coupling from the advection-...
std::string scalar_name_paraview(const unsigned &i) const
Name of the i-th scalar field. Default implementation returns V1 for the first one, V2 for the second etc. Can (should!) be overloaded with more meaningful names.
void unfix_pressure(const unsigned &p_dof)
Unpin p_dof-th pressure dof.
QAdvectionDiffusionElement elements are linear/quadrilateral/brick-shaped Advection Diffusion element...
void enable_ALE()
(Re-)enable ALE, i.e. take possible mesh motion into account when evaluating the time-derivative. Note: By default, ALE is enabled, at the expense of possibly creating unnecessary work in problems where the mesh is, in fact, stationary.
void output_fct(std::ostream &outfile, const unsigned &Nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output function for an exact solution: Broken default.
void(* UnsteadyExactSolutionFctPt)(const double &, const Vector< double > &, Vector< double > &)
Function pointer for function that computes Vector-valued time-dependent function as ...
void disable_ALE()
Disable ALE, i.e. assert the mesh is not moving – you do this at your own risk!
double Default_Physical_Constant_Value
Set the default physical value to be zero.
double const & master_weight(const unsigned &i) const
Return weight for dofs on i-th master node.
void enable_ALE()
Final override for enable ALE.
void enable_ALE()
(Re-)enable ALE, i.e. take possible mesh motion into account when evaluating the time-derivative. Note: By default, ALE is enabled, at the expense of possibly creating unnecessary work in problems where the mesh is, in fact, stationary.
unsigned nrecovery_order()
Order of recovery shape functions for Z2 error estimation: Same order as shape functions.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Compute the element's residual vector and the Jacobian matrix. Jacobian is computed by finite-differe...
void get_interpolated_values(const Vector< double > &s, Vector< double > &values)
Get the continuously interpolated values at the local coordinate s. We choose to put the fluid veloci...
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.
bool is_hanging() const
Test whether the node is geometrically hanging.
void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Validate against exact solution. Solution is provided via function pointer. Plot at a given number of...
unsigned P_nst_internal_index
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
void get_body_force_nst(const double &time, const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &result)
Overload the body force in the Navier-Stokes equations This provides the coupling from the advection-...
virtual unsigned nplot_points(const unsigned &nplot) const
Return total number of plot points (when plotting nplot points in each "coordinate direction") ...
void get_interpolated_values(const unsigned &t, const Vector< double > &s, Vector< double > &values)
Get all continuously interpolated values at the local coordinate s at time level t (t=0: present; t>0...
void output(FILE *file_pt, const unsigned &n_plot)
C-style output function: Broken default.
void disable_ALE()
Final override for disable ALE.
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Get 'flux' for Z2 error recovery: Standard flux.from AdvectionDiffusion equations.
unsigned ndof() const
Return the number of equations/dofs in the element.
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
void fill_in_off_diagonal_jacobian_blocks_analytic(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Compute the contribution of the off-diagonal blocks analytically.
void output(FILE *file_pt)
C-style output function: Broken default.
unsigned nrecovery_order()
The recovery order is that of the NavierStokes elements.
void(* SteadyExactSolutionFctPt)(const Vector< double > &, Vector< double > &)
Function pointer for function that computes vector-valued steady "exact solution" as ...
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
virtual unsigned u_index_nst(const unsigned &i) const
Return the index at which the i-th unknown velocity component.
void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Validate against exact solution. Solution is provided via function pointer. Plot at a given number of...
double *& ra_pt()
Access function for the pointer to the Rayleigh number.
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
void get_wind_adv_diff(const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &wind) const
Overload the wind function in the advection-diffusion equations. This provides the coupling from the ...
void interpolated_u_nst(const Vector< double > &s, Vector< double > &veloc) const
Compute vector of FE interpolated velocity u at local coordinate s.
void further_setup_hanging_nodes()
Perform additional hanging node procedures for variables that are not interpolated by all nodes...
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...
void disable_ALE()
Disable ALE, i.e. assert the mesh is not moving – you do this at your own risk!
void further_setup_hanging_nodes()
The additional hanging node information must be set up for both single-physics elements.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Add the element's contribution to its residual vector and the element Jacobian matrix (wrapper) ...
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
void scalar_value_paraview(std::ofstream &file_out, const unsigned &i, const unsigned &nplot) const
Write values of the i-th scalar field at the plot points. Broken virtual. Needs to be implemented for...
virtual void write_tecplot_zone_footer(std::ostream &outfile, const unsigned &nplot) const
Add tecplot zone "footer" to output stream (when plotting nplot points in each "coordinate direction"...
std::string scalar_name_paraview(const unsigned &i) const
Name of the i-th scalar field. Default implementation returns V1 for the first one, V2 for the second etc. Can (should!) be overloaded with more meaningful names.
void rebuild_from_sons(Mesh *&mesh_pt)
Call the rebuild_from_sons functions for each of the constituent multi-physics elements.
void enable_ALE()
Final override for enable ALE.
void further_setup_hanging_nodes()
Perform additional hanging node procedures for variables that are not interpolated by all nodes...
Refineable version of Crouzeix Raviart elements. Generic class definitions.
double * Ra_pt
Pointer to a new physical variable, the Rayleigh number.
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 compute_error(std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
Validate against exact solution at given time Solution is provided via function pointer. Plot at a given number of plot points and compute L2 error and L2 norm of velocity solution over element Call the broken default.
virtual void output_fct(std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output an exact solution over the element.
unsigned required_nvalue(const unsigned &n) const
The required number of values stored at the nodes is the sum of the required values of the two single...
Node *const & master_node_pt(const unsigned &i) const
Return a pointer to the i-th master node.
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element, Call the geometric element's function.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
void fill_in_off_diagonal_jacobian_blocks_analytic(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Helper function to get the off-diagonal blocks of the Jacobian matrix analytically.
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 *& ra_pt()
Access function for the pointer to the Rayleigh number.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Compute the element's residual Vector.
void output(std::ostream &outfile, const unsigned &nplot)
Output function: x,y,u or x,y,z,u at Nplot^DIM plot points.
BuoyantQCrouzeixRaviartElement()
Constructor: call the underlying constructors and initialise the pointer to the Rayleigh number to po...
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 fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Compute the element's residual Vector and the jacobian matrix Virtual function can be overloaded by h...
void output(std::ostream &outfile, const unsigned &nplot)
Output function: Output x, y, u, v, p, theta at Nplot^DIM plot points.
unsigned nscalar_paraview() const
Number of scalars/fields output by this element. Broken virtual. Needs to be implemented for each new...
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
void rebuild_from_sons(Mesh *&mesh_pt)
Rebuild from sons: empty.
unsigned nscalar_paraview() const
Number of scalars/fields output by this element. Broken virtual. Needs to be implemented for each new...
virtual void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Add the elemental contribution to the jacobian matrix, mass matrix and the residuals vector...
void get_Z2_compound_flux_indices(Vector< unsigned > &flux_index)
Fill in which flux components are associated with the fluid measure and which are associated with the...
void scalar_value_paraview(std::ofstream &file_out, const unsigned &i, const unsigned &nplot) const
Write values of the i-th scalar field at the plot points. Broken virtual. Needs to be implemented for...
static double Default_Physical_Constant_Value
The static default value of the Rayleigh number.
double interpolated_u_adv_diff(const Vector< double > &s) const
Return FE representation of function value u(s) at local coordinate s.
Refineable version of QAdvectionDiffusionElement. Inherit from the standard QAdvectionDiffusionElemen...
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Add the element's contribution to its residuals vector, jacobian matrix and mass matrix.
unsigned ncompound_fluxes()
The number of compound fluxes is two (one for the fluid and one for the temperature) ...
const double & pe() const
Peclet number.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Calculate the element's contribution to the residual vector. Recall that fill_in_* functions MUST NOT...
virtual double interpolated_p_nst(const Vector< double > &s) const
Return FE interpolated pressure at local coordinate s.
void fill_in_off_diagonal_jacobian_blocks_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Helper function to get the off-diagonal blocks of the Jacobian matrix by finite differences.
unsigned nnode() const
Return the number of nodes.
virtual void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Plot the error when compared against a given exact solution . Also calculates the norm of the error a...
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Compute the element's residual Vector and the jacobian matrix using full finite differences, the default implementation.
void output_fct(std::ostream &outfile, const unsigned &Nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
Output function for a time-dependent exact solution: Broken default.
static double Default_fd_jacobian_step
Double used for the default finite difference step in elemental jacobian calculations.
unsigned u_index_adv_diff() const
Overload the index at which the temperature variable is stored. We choose to store is after the fluid...
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Add the elemental contribution to the jacobian matrix. and the residuals vector. Note that this funct...
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Get the Z2 flux by concatenating the fluxes from the fluid and the advection diffusion elements...
std::string to_string(T object, unsigned float_precision=8)
Conversion function that should work for anything with operator<< defined (at least all basic types)...
const Vector< double > & g() const
Vector of gravitational components.
unsigned ncont_interpolated_values() const
The total number of continously interpolated values is DIM+1 (DIM fluid velocities and one temperatur...
double * Ra_pt
Pointer to a private data member, the Rayleigh number.
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...