b_convection_sphere/axisym_buoyant_navier_stokes.h
Go to the documentation of this file.
1 //LIC// ====================================================================
2 //LIC// This file forms part of oomph-lib, the object-oriented,
3 //LIC// multi-physics finite-element library, available
4 //LIC// at http://www.oomph-lib.org.
5 //LIC//
6 //LIC// Copyright (C) 2006-2022 Matthias Heil and Andrew Hazel
7 //LIC//
8 //LIC// This library is free software; you can redistribute it and/or
9 //LIC// modify it under the terms of the GNU Lesser General Public
10 //LIC// License as published by the Free Software Foundation; either
11 //LIC// version 2.1 of the License, or (at your option) any later version.
12 //LIC//
13 //LIC// This library is distributed in the hope that it will be useful,
14 //LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
15 //LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 //LIC// Lesser General Public License for more details.
17 //LIC//
18 //LIC// You should have received a copy of the GNU Lesser General Public
19 //LIC// License along with this library; if not, write to the Free Software
20 //LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 //LIC// 02110-1301 USA.
22 //LIC//
23 //LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
24 //LIC//
25 //LIC//====================================================================
26 //Driver for a multi-physics problem that couples the Navier--Stokes
27 //equations to the advection diffusion equations,
28 //giving Boussinesq convection
29 
30 //Oomph-lib headers, we require the generic, advection-diffusion
31 //and navier-stokes elements.
33 #include "axisym_navier_stokes.h"
34 
35 // The mesh is our standard rectangular quadmesh
37 
38 namespace oomph
39 {
40 
41 //============start_element_class============================================
60 //==========================================================================
61 class RefineableBuoyantQAxisymCrouzeixRaviartElement :
62 public virtual RefineableQAxisymAdvectionDiffusionElement<3>,
63 public virtual RefineableAxisymmetricQCrouzeixRaviartElement
64 {
65 
66 private:
67 
69  double* Ra_pt;
70 
72  static double Default_Physical_Constant_Value;
73 
74 public:
81  {
83  }
84 
88  inline unsigned required_nvalue(const unsigned &n) const
91 
93  const double &ra() const {return *Ra_pt;}
94 
96  double* &ra_pt() {return Ra_pt;}
97 
98 
100  void disable_ALE()
101  {
102  //Disable ALE in both sets of equations
105  }
106 
108  void enable_ALE()
109  {
110  //Enable ALE in both sets of equations
113  }
114 
118  unsigned nscalar_paraview() const
119  {
120  throw OomphLibError(
121  "This function hasn't been implemented for this element",
124 
125  // Dummy unsigned
126  return 0;
127  }
128 
132  void scalar_value_paraview(std::ofstream& file_out,
133  const unsigned& i,
134  const unsigned& nplot) const
135  {
136  throw OomphLibError(
137  "This function hasn't been implemented for this element",
140  }
141 
142 
146  std::string scalar_name_paraview(const unsigned& i) const
147  {
148  return "V"+StringConversion::to_string(i);
149  }
150 
151 
153  void output(std::ostream &outfile)
154  {FiniteElement::output(outfile);}
155 
158  void output(std::ostream &outfile, const unsigned &nplot)
159  {
160  //vector of local coordinates
161  Vector<double> s(2);
162 
163  // Tecplot header info
164  outfile << this->tecplot_zone_string(nplot);
165 
166  // Loop over plot points
167  unsigned num_plot_points=this->nplot_points(nplot);
168  for (unsigned iplot=0;iplot<num_plot_points;iplot++)
169  {
170  // Get local coordinates of plot point
171  this->get_s_plot(iplot,nplot,s);
172 
173  // Output the position of the plot point
174  for(unsigned i=0;i<2;i++)
175  {outfile << this->interpolated_x(s,i) << " ";}
176 
177  // Output the fluid velocities at the plot point
178  for(unsigned i=0;i<3;i++)
179  {outfile << this->interpolated_u_axi_nst(s,i) << " ";}
180 
181  // Output the fluid pressure at the plot point
182  outfile << this->interpolated_p_axi_nst(s) << " ";
183 
184  // Output the temperature at the plot point
185  outfile << this->interpolated_u_axi_adv_diff(s) << " " << std::endl;
186  }
187  outfile << std::endl;
188 
189  // Write tecplot footer (e.g. FE connectivity lists)
190  this->write_tecplot_zone_footer(outfile,nplot);
191 
192  }
193 
195  void output(FILE* file_pt)
196  {FiniteElement::output(file_pt);}
197 
199  void output(FILE* file_pt, const unsigned &n_plot)
200  {FiniteElement::output(file_pt,n_plot);}
201 
203  void output_fct(std::ostream &outfile, const unsigned &Nplot,
205  exact_soln_pt)
206  {FiniteElement::output_fct(outfile,Nplot,exact_soln_pt);}
207 
208 
211  void output_fct(std::ostream &outfile, const unsigned &Nplot,
212  const double& time,
214  exact_soln_pt)
215  {
217  output_fct(outfile,Nplot,time,exact_soln_pt);
218  }
219 
222  unsigned u_index_axi_adv_diff() const {return 3;}
223 
226  unsigned nvertex_node() const
227  {return QElement<2,3>::nvertex_node();}
228 
231  Node* vertex_node_pt(const unsigned& j) const
233 
236  unsigned ncont_interpolated_values() const
237  {return 4;}
238 
243  {
244  //Storage for the fluid velocities
245  Vector<double> nst_values;
246 
247  //Get the fluid velocities from the fluid element
249  get_interpolated_values(s,nst_values);
250 
251  //Storage for the temperature
252  Vector<double> advection_values;
253 
254  //Get the temperature from the advection-diffusion element
256  get_interpolated_values(s,advection_values);
257 
258  //Add the fluid velocities to the values vector
259  for(unsigned i=0;i<3;i++) {values.push_back(nst_values[i]);}
260 
261  //Add the concentration to the end
262  values.push_back(advection_values[0]);
263  }
264 
265 
266 
271  void get_interpolated_values(const unsigned& t, const Vector<double>&s,
272  Vector<double>& values)
273  {
274  //Storage for the fluid velocities
275  Vector<double> nst_values;
276 
277  //Get the fluid velocities from the fluid element
279  get_interpolated_values(t,s,nst_values);
280 
281  //Storage for the temperature
282  Vector<double> advection_values;
283 
284  //Get the temperature from the advection-diffusion element
286  get_interpolated_values(s,advection_values);
287 
288  //Add the fluid velocities to the values vector
289  for(unsigned i=0;i<3;i++) {values.push_back(nst_values[i]);}
290 
291  //Add the concentration to the end
292  values.push_back(advection_values[0]);
293 
294  } // end of get_interpolated_values
295 
296 
297 
301  {
304  }
305 
306 
307 
310  void rebuild_from_sons(Mesh* &mesh_pt)
311  {
314  }
315 
316 
319  {return x[0];}
320 
321 
322 
327  {
330 
331  //Cast the pointer to the father element to the specific
332  //element type
333  RefineableBuoyantQAxisymCrouzeixRaviartElement* cast_father_element_pt
335  this->father_element_pt());
336 
337  //Set the pointer to the Rayleigh number to be the same as that in
338  //the father
339  this->Ra_pt = cast_father_element_pt->ra_pt();
340  } //end of further build
341 
342 
343 
345  unsigned nrecovery_order()
347 
350  unsigned num_Z2_flux_terms()
351  {
354  }
355 
356 
360  {
361  //Find the number of fluid fluxes
362  unsigned n_fluid_flux =
364 
365  //Fill in the first flux entries as the velocity entries
367 
368  //Find the number of temperature fluxes
369  unsigned n_temp_flux =
371  Vector<double> temp_flux(n_temp_flux);
372 
373  //Get the temperature flux
375 
376  //Add the temperature flux to the end of the flux vector
377  for(unsigned i=0;i<n_temp_flux;i++)
378  {
379  flux[n_fluid_flux+i] = temp_flux[i];
380  }
381 
382  } //end of get_Z2_flux
383 
386  unsigned ncompound_fluxes() {return 2;}
387 
391  {
392  //Find the number of fluid fluxes
393  unsigned n_fluid_flux =
395  //Find the number of temperature fluxes
396  unsigned n_temp_flux =
398 
399  //The fluid fluxes are first
400  //The values of the flux_index vector are zero on entry, so we
401  //could omit this line
402  for(unsigned i=0;i<n_fluid_flux;i++) {flux_index[i] = 0;}
403 
404  //Set the temperature fluxes (the last set of fluxes
405  for(unsigned i=0;i<n_temp_flux;i++) {flux_index[n_fluid_flux + i] = 1;}
406 
407  } //end of get_Z2_compound_flux_indices
408 
409 
415  void compute_error(std::ostream &outfile,
417  const double& time,
418  double& error, double& norm)
419  {FiniteElement::compute_error(outfile,exact_soln_pt,
420  time,error,norm);}
421 
427  void compute_error(std::ostream &outfile,
429  double& error, double& norm)
431  compute_error(outfile,exact_soln_pt,error,norm);}
432 
436 void get_wind_axi_adv_diff(const unsigned& ipt,
437  const Vector<double> &s, const Vector<double>& x,
438  Vector<double>& wind) const
439  {
440  //The wind function is simply the velocity at the points
441  this->interpolated_u_axi_nst(s,wind);
442  }
443 
444 
450  void get_body_force_axi_nst(const double& time, const unsigned& ipt,
451  const Vector<double> &s, const Vector<double> &x,
452  Vector<double> &result)
453  {
454  // Get the temperature
455  const double interpolated_t = this->interpolated_u_axi_adv_diff(s);
456 
457  // Get vector that indicates the direction of gravity from
458  // the Navier-Stokes equations
460 
461  // Temperature-dependent body force:
462  for (unsigned i=0;i<3;i++)
463  {
464  result[i] = -gravity[i]*interpolated_t*ra();
465  }
466  }
467 
470  {
471  //Call the residuals of the Navier-Stokes equations
474 
475  //Call the residuals of the advection-diffusion equations
478  }
479 
480 
484  DenseMatrix<double> &jacobian)
485  {
486 #ifdef USE_FD_JACOBIAN_FOR_REFINEABLE_BUOYANT_Q_ELEMENT
488 #else
489  //Calculate the Navier-Stokes contributions (diagonal block and residuals)
491  fill_in_contribution_to_jacobian(residuals,jacobian);
492 
493  //Calculate the advection-diffusion contributions
494  //(diagonal block and residuals)
496  fill_in_contribution_to_jacobian(residuals,jacobian);
497 
498  //We now fill in the off-diagonal (interaction) blocks analytically
499  this->fill_in_off_diagonal_jacobian_blocks_analytic(residuals,jacobian);
500 #endif
501  } //End of jacobian calculation
502 
506  Vector<double> &residuals, DenseMatrix<double> &jacobian,
507  DenseMatrix<double> &mass_matrix)
508  {
509  //Call the (broken) version in the base class
511  residuals,jacobian,mass_matrix);
512  }
513 
517  Vector<double> &residuals, DenseMatrix<double> &jacobian)
518  {
519  //Perform another loop over the integration loops using the information
520  //from the original elements' residual assembly loops to determine
521  //the conributions to the jacobian
522 
523  // Local storage for pointers to hang_info objects
524  HangInfo *hang_info_pt=0, *hang_info2_pt=0;
525 
526  //Local storage for the index in the nodes at which the
527  //Navier-Stokes velocities are stored (we know that this should be 0,1,2)
528  unsigned u_nodal_axi_nst[3];
529  for(unsigned i=0;i<3;i++) {u_nodal_axi_nst[i] = this->u_index_axi_nst(i);}
530 
531  //Local storage for the index at which the temperature is stored
532  const unsigned u_nodal_axi_adv_diff = this->u_index_axi_adv_diff();
533 
534  //Find out how many nodes there are
535  const unsigned n_node = this->nnode();
536 
537  //Set up memory for the shape and test functions and their derivatives
538  Shape psif(n_node), testf(n_node);
539  DShape dpsifdx(n_node,2), dtestfdx(n_node,2);
540 
541  //Number of integration points
542  const unsigned n_intpt = this->integral_pt()->nweight();
543 
544  //Get Physical Variables from Element
545  double Ra = this->ra();
546  double Pe = this->pe();
547  Vector<double> gravity = this->g();
548 
549  //Integers to store the local equations and unknowns
550  int local_eqn=0, local_unknown=0;
551 
552  //Loop over the integration points
553  for(unsigned ipt=0;ipt<n_intpt;ipt++)
554  {
555  //Get the integral weight
556  double w = this->integral_pt()->weight(ipt);
557 
558  //Call the derivatives of the shape and test functions
559  double J =
560  this->dshape_and_dtest_eulerian_at_knot_axi_nst(ipt,psif,dpsifdx,
561  testf,dtestfdx);
562 
563  //Premultiply the weights and the Jacobian
564  double W = w*J;
565 
566  //Work out the radius
567  double r = 0.0;
568 
569  //Calculate local values of temperature derivatives
570  //Allocate
571  Vector<double> interpolated_du_axi_adv_diff_dx(2,0.0);
572 
573  // Loop over nodes
574  for(unsigned l=0;l<n_node;l++)
575  {
576  //Get the nodal value
577  double u_value = this->nodal_value(l,u_nodal_axi_adv_diff);
578  //Loop over the derivative directions
579  for(unsigned j=0;j<2;j++)
580  {
581  interpolated_du_axi_adv_diff_dx[j] += u_value*dpsifdx(l,j);
582  }
583 
584  //Calculate the position
585  r += this->nodal_position(l,0)*psif(l);
586  }
587 
588  //Assemble the Jacobian terms
589  //---------------------------
590 
591  //Loop over the test functions/eqns
592  for(unsigned l=0;l<n_node;l++)
593  {
594  //Local variables to store the number of master nodes and
595  //the weight associated with the shape function if the node is hanging
596  unsigned n_master=1;
597  double hang_weight=1.0;
598 
599  //Local bool (is the node hanging)
600  bool is_node_hanging = this->node_pt(l)->is_hanging();
601 
602  //If the node is hanging, get the number of master nodes
603  if(is_node_hanging)
604  {
605  hang_info_pt = this->node_pt(l)->hanging_pt();
606  n_master = hang_info_pt->nmaster();
607  }
608  //Otherwise there is just one master node, the node itself
609  else
610  {
611  n_master = 1;
612  }
613 
614  //Loop over the master nodes
615  for(unsigned m=0;m<n_master;m++)
616  {
617  //If the node is hanging get weight from master node
618  if(is_node_hanging)
619  {
620  //Get the hang weight from the master node
621  hang_weight = hang_info_pt->master_weight(m);
622  }
623  else
624  {
625  // Node contributes with full weight
626  hang_weight = 1.0;
627  }
628 
629 
630  //Assemble derivatives of Navier Stokes momentum w.r.t. temperature
631  //-----------------------------------------------------------------
632 
633  // Loop over velocity components for equations
634  for(unsigned i=0;i<3;i++)
635  {
636 
637  //Get the equation number
638  if(is_node_hanging)
639  {
640  //Get the equation number from the master node
641  local_eqn = this->local_hang_eqn(hang_info_pt->master_node_pt(m),
642  u_nodal_axi_nst[i]);
643  }
644  else
645  {
646  // Local equation number
647  local_eqn = this->nodal_local_eqn(l,u_nodal_axi_nst[i]);
648  }
649 
650  if(local_eqn >= 0)
651  {
652  //Local variables to store the number of master nodes
653  //and the weights associated with each hanging node
654  unsigned n_master2=1;
655  double hang_weight2=1.0;
656 
657  //Loop over the nodes for the unknowns
658  for(unsigned l2=0;l2<n_node;l2++)
659  {
660  //Local bool (is the node hanging)
661  bool is_node2_hanging = this->node_pt(l2)->is_hanging();
662 
663  //If the node is hanging, get the number of master nodes
664  if(is_node2_hanging)
665  {
666  hang_info2_pt = this->node_pt(l2)->hanging_pt();
667  n_master2 = hang_info2_pt->nmaster();
668  }
669  //Otherwise there is one master node, the node itself
670  else
671  {
672  n_master2 = 1;
673  }
674 
675  //Loop over the master nodes
676  for(unsigned m2=0;m2<n_master2;m2++)
677  {
678  if(is_node2_hanging)
679  {
680  //Read out the local unknown from the master node
681  local_unknown =
682  this->local_hang_eqn(hang_info2_pt->master_node_pt(m2),
683  u_nodal_axi_adv_diff);
684  //Read out the hanging weight from the master node
685  hang_weight2 = hang_info2_pt->master_weight(m2);
686  }
687  else
688  {
689  //The local unknown number comes from the node
690  local_unknown = this->nodal_local_eqn(l2,
691  u_nodal_axi_adv_diff);
692  //The hang weight is one
693  hang_weight2 = 1.0;
694  }
695 
696  if(local_unknown >= 0)
697  {
698  //Add contribution to jacobian matrix
699  jacobian(local_eqn,local_unknown)
700  += -gravity[i]*psif(l2)*Ra*testf(l)*
701  r*W*hang_weight*hang_weight2;
702  }
703  }
704  }
705  }
706  }
707 
708 
709  //Assemble derivative of adv diff eqn w.r.t. fluid veloc
710  //------------------------------------------------------
711  {
712  //Get the equation number
713  if(is_node_hanging)
714  {
715  //Get the equation number from the master node
716  local_eqn = this->local_hang_eqn(hang_info_pt->master_node_pt(m),
717  u_nodal_axi_adv_diff);
718  }
719  else
720  {
721  // Local equation number
722  local_eqn = this->nodal_local_eqn(l,u_nodal_axi_adv_diff);
723  }
724 
725  //If it's not pinned
726  if(local_eqn >= 0)
727  {
728  //Local variables to store the number of master nodes
729  //and the weights associated with each hanging node
730  unsigned n_master2=1;
731  double hang_weight2=1.0;
732 
733  //Loop over the nodes for the unknowns
734  for(unsigned l2=0;l2<n_node;l2++)
735  {
736  //Local bool (is the node hanging)
737  bool is_node2_hanging = this->node_pt(l2)->is_hanging();
738 
739  //If the node is hanging, get the number of master nodes
740  if(is_node2_hanging)
741  {
742  hang_info2_pt = this->node_pt(l2)->hanging_pt();
743  n_master2 = hang_info2_pt->nmaster();
744  }
745  //Otherwise there is one master node, the node itself
746  else
747  {
748  n_master2 = 1;
749  }
750 
751  //Loop over the master nodes
752  for(unsigned m2=0;m2<n_master2;m2++)
753  {
754  //If the node is hanging
755  if(is_node2_hanging)
756  {
757  //Read out the hanging weight from the master node
758  hang_weight2 = hang_info2_pt->master_weight(m2);
759  }
760  //If the node is not hanging
761  else
762  {
763  //The hang weight is one
764  hang_weight2 = 1.0;
765  }
766 
767  //Loop over the velocity degrees of freedom
768  for(unsigned i2=0;i2<2;i2++)
769  {
770  //If the node is hanging
771  if(is_node2_hanging)
772  {
773  //Read out the local unknown from the master node
774  local_unknown =
775  this->local_hang_eqn(hang_info2_pt->master_node_pt(m2),
776  u_nodal_axi_nst[i2]);
777  }
778  else
779  {
780  //The local unknown number comes from the node
781  local_unknown=this->nodal_local_eqn(l2,
782  u_nodal_axi_nst[i2]);
783  }
784 
785  //If it's not pinned
786  if(local_unknown >= 0)
787  {
788  //Add the contribution to the jacobian matrix
789  jacobian(local_eqn,local_unknown)
790  -= Pe*psif(l2)*interpolated_du_axi_adv_diff_dx[i2]*testf(l)
791  *r*W*hang_weight*hang_weight2;
792  }
793  }
794  }
795  }
796  }
797  }
798 
799  }
800  }
801  }
802  } //End of function
803 
804 
805 };
806 
807 
808 //===================================================================
810 //===================================================================
813 
814 //====================================================================
815 //Specify the FaceGeometry
816 //===================================================================
817 template<>
818 class FaceGeometry<RefineableBuoyantQAxisymCrouzeixRaviartElement>:
819 public virtual QElement<1,3>
820 {
821 
822  public:
823 
826  FaceGeometry() : QElement<1,3>() {}
827 
828 };
829 
830 
831 
832 }
833 
834 
835 
836 
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
JacobiRotation< float > J
Definition: Jacobi_makeJacobi.cpp:3
RowVector3d w
Definition: Matrix_resize_int.cpp:3
MatrixType m2(n_dims)
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Add the element's contribution to its residual vector (wrapper)
Definition: axisym_advection_diffusion_elements.h:413
void disable_ALE()
Definition: axisym_advection_diffusion_elements.h:133
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: axisym_advection_diffusion_elements.h:427
const double & pe() const
Peclet number.
Definition: axisym_advection_diffusion_elements.h:299
double interpolated_u_axi_adv_diff(const Vector< double > &s) const
Return FE representation of function value u(s) at local coordinate s.
Definition: axisym_advection_diffusion_elements.h:437
void enable_ALE()
Definition: axisym_advection_diffusion_elements.h:143
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Compute the element's residual Vector.
Definition: axisym_navier_stokes_elements.h:780
const Vector< double > & g() const
Vector of gravitational components.
Definition: axisym_navier_stokes_elements.h:446
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: axisym_navier_stokes_elements.h:793
void interpolated_u_axi_nst(const Vector< double > &s, Vector< double > &veloc) const
Compute vector of FE interpolated velocity u at local coordinate s.
Definition: axisym_navier_stokes_elements.h:865
void disable_ALE()
Definition: axisym_navier_stokes_elements.h:560
double interpolated_p_axi_nst(const Vector< double > &s) const
Return FE interpolated pressure at local coordinate s.
Definition: axisym_navier_stokes_elements.h:1001
void enable_ALE()
Definition: axisym_navier_stokes_elements.h:569
virtual unsigned u_index_axi_nst(const unsigned &i) const
Definition: axisym_navier_stokes_elements.h:506
virtual unsigned required_nvalue(const unsigned &n) const
Number of values (pinned or dofs) required at local node n.
Definition: axisym_navier_stokes_elements.cc:3711
double dshape_and_dtest_eulerian_at_knot_axi_nst(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Definition: axisym_navier_stokes_elements.h:1408
Definition: shape.h:278
FaceGeometry()
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:826
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: elements.h:1735
virtual void output_fct(std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output an exact solution over the element.
Definition: elements.h:3104
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 void output(std::ostream &outfile)
Definition: elements.h:3050
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
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
virtual void compute_error(FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Calculate the norm of the error and that of the exact solution.
Definition: elements.h:3198
void(* SteadyExactSolutionFctPt)(const Vector< double > &, Vector< double > &)
Definition: elements.h:1759
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
Definition: elements.h:1963
double nodal_position(const unsigned &n, const unsigned &i) const
Definition: elements.h:2317
virtual void write_tecplot_zone_footer(std::ostream &outfile, const unsigned &nplot) const
Definition: elements.h:3174
void(* UnsteadyExactSolutionFctPt)(const double &, const Vector< double > &, Vector< double > &)
Definition: elements.h:1765
virtual void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Definition: elements.cc:1322
Definition: nodes.h:742
double const & master_weight(const unsigned &i) const
Return weight for dofs on i-th master node.
Definition: nodes.h:808
Node *const & master_node_pt(const unsigned &i) const
Return a pointer to the i-th master node.
Definition: nodes.h:791
unsigned nmaster() const
Return the number of master nodes.
Definition: nodes.h:785
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.
Definition: mesh.h:67
Definition: nodes.h:906
HangInfo *const & hanging_pt() const
Definition: nodes.h:1228
bool is_hanging() const
Test whether the node is geometrically hanging.
Definition: nodes.h:1285
Definition: oomph_definitions.h:222
unsigned nplot_points(const unsigned &nplot) const
Definition: Qelements.h:1107
void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &use_equally_spaced_interior_sample_points=false) const
Definition: Qelements.h:1067
std::string tecplot_zone_string(const unsigned &nplot) const
Definition: Qelements.h:1098
Definition: Qelements.h:459
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Definition: refineable_axisym_advection_diffusion_elements.h:90
void get_interpolated_values(const Vector< double > &s, Vector< double > &values)
Definition: refineable_axisym_advection_diffusion_elements.h:100
unsigned num_Z2_flux_terms()
Broken assignment operator.
Definition: refineable_axisym_advection_diffusion_elements.h:83
void further_build()
Further build: Copy source function pointer from father element.
Definition: refineable_axisym_advection_diffusion_elements.h:187
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
Definition: refineable_axisym_navier_stokes_elements.h:75
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Definition: refineable_axisym_navier_stokes_elements.h:83
Definition: refineable_axisym_navier_stokes_elements.h:765
void further_setup_hanging_nodes()
Definition: refineable_axisym_navier_stokes_elements.h:978
void get_interpolated_values(const Vector< double > &s, Vector< double > &values)
Definition: refineable_axisym_navier_stokes_elements.h:918
void rebuild_from_sons(Mesh *&mesh_pt)
Rebuild from sons: Reconstruct pressure from the (merged) sons.
Definition: refineable_axisym_navier_stokes_elements.h:795
unsigned nrecovery_order()
Definition: refineable_axisym_navier_stokes_elements.h:897
void further_build()
Definition: refineable_axisym_navier_stokes_elements.h:984
Definition: axisym_heat_sphere/axisym_buoyant_navier_stokes.h:64
void output(FILE *file_pt)
C-style output function: Broken default.
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:195
unsigned u_index_axi_adv_diff() const
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:222
void compute_error(std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:415
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:359
void further_build()
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:326
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Fill in the constituent elements' contribution to the residual vector.
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:469
unsigned ncompound_fluxes()
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:386
void disable_ALE()
Final override for disable ALE.
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:100
void get_interpolated_values(const unsigned &t, const Vector< double > &s, Vector< double > &values)
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:271
unsigned ncont_interpolated_values() const
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:236
void get_Z2_compound_flux_indices(Vector< unsigned > &flux_index)
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:390
void output(std::ostream &outfile, const unsigned &nplot)
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:158
unsigned nscalar_paraview() const
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:118
void fill_in_off_diagonal_jacobian_blocks_analytic(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: axisym_heat_sphere/axisym_buoyant_navier_stokes.h:517
void rebuild_from_sons(Mesh *&mesh_pt)
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:310
const double & ra() const
Access function for the Rayleigh number (const version)
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:93
unsigned nvertex_node() const
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:226
std::string scalar_name_paraview(const unsigned &i) const
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:146
void get_wind_axi_adv_diff(const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &wind) const
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:436
void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:427
void enable_ALE()
Final override for enable ALE.
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:108
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:505
void scalar_value_paraview(std::ofstream &file_out, const unsigned &i, const unsigned &nplot) const
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:132
unsigned nrecovery_order()
The recovery order is that of the NavierStokes elements.
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:345
RefineableBuoyantQAxisymCrouzeixRaviartElement()
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:78
void further_setup_hanging_nodes()
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:300
static double Default_Physical_Constant_Value
The static default value of the Rayleigh number.
Definition: axisym_heat_sphere/axisym_buoyant_navier_stokes.h:72
void output(std::ostream &outfile)
Overload the standard output function with the broken default.
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:153
double *& ra_pt()
Access function for the pointer to the Rayleigh number.
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:96
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:483
void get_interpolated_values(const Vector< double > &s, Vector< double > &values)
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:242
double * Ra_pt
Pointer to a new physical variable, the Rayleigh number.
Definition: axisym_heat_sphere/axisym_buoyant_navier_stokes.h:69
void output(FILE *file_pt, const unsigned &n_plot)
C-style output function: Broken default.
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:199
void output_fct(std::ostream &outfile, const unsigned &Nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:211
double geometric_jacobian(const Vector< double > &x)
Fill in the geometric Jacobian, which in this case is r.
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:318
Node * vertex_node_pt(const unsigned &j) const
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:231
unsigned required_nvalue(const unsigned &n) const
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:88
unsigned num_Z2_flux_terms()
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:350
void output_fct(std::ostream &outfile, const unsigned &Nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output function for an exact solution: Broken default.
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:203
void get_body_force_axi_nst(const double &time, const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &result)
Definition: b_convection_sphere/axisym_buoyant_navier_stokes.h:450
virtual RefineableElement * father_element_pt() const
Return a pointer to the father element.
Definition: refineable_elements.h:539
int local_hang_eqn(Node *const &node_pt, const unsigned &i)
Definition: refineable_elements.h:278
Definition: refineable_axisym_advection_diffusion_elements.h:365
void rebuild_from_sons(Mesh *&mesh_pt)
Rebuild from sons: empty.
Definition: refineable_axisym_advection_diffusion_elements.h:406
void further_setup_hanging_nodes()
Definition: refineable_axisym_advection_diffusion_elements.h:417
Definition: shape.h:76
RealScalar s
Definition: level1_cplx_impl.h:130
int * m
Definition: level2_cplx_impl.h:294
double Pe
Peclet number.
Definition: axisym_heat_sphere.cc:59
double Ra
Rayleigh number.
Definition: axisym_heat_sphere.cc:62
void gravity(const double &t, const Vector< double > &xi, Vector< double > &b)
Definition: ConstraintElementsUnitTest.cpp:20
void flux(const double &time, const Vector< double > &x, double &flux)
Get flux applied along boundary x=0.
Definition: pretend_melt.cc:59
r
Definition: UniformPSDSelfTest.py:20
int error
Definition: calibrate.py:297
Definition: MortaringCantileverCompareToNonMortaring.cpp:176
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
@ W
Definition: quadtree.h:63
std::string to_string(T object, unsigned float_precision=8)
Definition: oomph_utilities.h:189
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
list x
Definition: plotDoE.py:28
t
Definition: plotPSD.py:36
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2