spherical_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 in (axisymmetric) spherical coordinates
29 
30 //Oomph-lib headers,
31 //We require the spherical advection diffusion and spherical navier stokes
32 //elements
35 
36 namespace oomph
37 {
38 
39 //============start_element_class============================================
58 //==========================================================================
62 {
63 
64 private:
65 
67  double* Ra_pt;
68 
71 
72 public:
79  {
81  }
82 
86  inline unsigned required_nvalue(const unsigned &n) const
87  {return
90 
92  const double &ra() const {return *Ra_pt;}
93 
95  double* &ra_pt() {return Ra_pt;}
96 
97 
99  void disable_ALE()
100  {
101  //Disable ALE in both sets of equations
104  }
105 
107  void enable_ALE()
108  {
109  //Enable ALE in both sets of equations
112  }
113 
114 
116  void output(std::ostream &outfile)
117  {FiniteElement::output(outfile);}
118 
121  void output(std::ostream &outfile, const unsigned &nplot)
122  {
123  //vector of local coordinates
124  Vector<double> s(2);
125 
126  // Tecplot header info
127  outfile << this->tecplot_zone_string(nplot);
128 
129  // Loop over plot points
130  unsigned num_plot_points=this->nplot_points(nplot);
131  for (unsigned iplot=0;iplot<num_plot_points;iplot++)
132  {
133  // Get local coordinates of plot point
134  this->get_s_plot(iplot,nplot,s);
135 
136  //Get r and theta
137  double r = this->interpolated_x(s,0);
138  double theta = this->interpolated_x(s,1);
139 
140  // Output the position of the plot point
141  outfile << r*sin(theta) << " " << r*cos(theta) << " "
142  << r << " " << theta << " ";
143 
144 
145  // Output the fluid velocities at the plot point
146  for(unsigned i=0;i<3;i++)
147  {outfile << this->interpolated_u_spherical_nst(s,i) << " ";}
148 
149  // Output the fluid pressure at the plot point
150  outfile << this->interpolated_p_spherical_nst(s) << " ";
151 
152  // Output the temperature at the plot point
153  outfile << this->interpolated_u_spherical_adv_diff(s) << " " << std::endl;
154  }
155  outfile << std::endl;
156 
157  // Write tecplot footer (e.g. FE connectivity lists)
158  this->write_tecplot_zone_footer(outfile,nplot);
159 
160  }
161 
163  void output(FILE* file_pt)
164  {FiniteElement::output(file_pt);}
165 
167  void output(FILE* file_pt, const unsigned &n_plot)
168  {FiniteElement::output(file_pt,n_plot);}
169 
171  void output_fct(std::ostream &outfile, const unsigned &Nplot,
173  exact_soln_pt)
174  {FiniteElement::output_fct(outfile,Nplot,exact_soln_pt);}
175 
176 
179  void output_fct(std::ostream &outfile, const unsigned &Nplot,
180  const double& time,
182  exact_soln_pt)
183  {
185  output_fct(outfile,Nplot,time,exact_soln_pt);
186  }
187 
190  unsigned u_index_spherical_adv_diff() const {return 3;}
191 
194  unsigned nvertex_node() const
195  {return QElement<2,3>::nvertex_node();}
196 
199  Node* vertex_node_pt(const unsigned& j) const
201 
204  unsigned ncont_interpolated_values() const
205  {return 4;}
206 
211  {
212  //Storage for the fluid velocities
213  Vector<double> nst_values;
214 
215  //Get the fluid velocities from the fluid element
217  get_interpolated_values(s,nst_values);
218 
219  //Storage for the temperature
220  Vector<double> advection_values;
221 
222  //Get the temperature from the advection-diffusion element
224  get_interpolated_values(s,advection_values);
225 
226  //Add the fluid velocities to the values vector
227  for(unsigned i=0;i<3;i++) {values.push_back(nst_values[i]);}
228 
229  //Add the concentration to the end
230  values.push_back(advection_values[0]);
231  }
232 
233 
234 
239  void get_interpolated_values(const unsigned& t, const Vector<double>&s,
240  Vector<double>& values)
241  {
242  //Storage for the fluid velocities
243  Vector<double> nst_values;
244 
245  //Get the fluid velocities from the fluid element
247  get_interpolated_values(t,s,nst_values);
248 
249  //Storage for the temperature
250  Vector<double> advection_values;
251 
252  //Get the temperature from the advection-diffusion element
254  get_interpolated_values(s,advection_values);
255 
256  //Add the fluid velocities to the values vector
257  for(unsigned i=0;i<3;i++) {values.push_back(nst_values[i]);}
258 
259  //Add the concentration to the end
260  values.push_back(advection_values[0]);
261 
262  } // end of get_interpolated_values
263 
264 
265 
269  {
272  }
273 
274 
275 
278  void rebuild_from_sons(Mesh* &mesh_pt)
279  {
282  }
283 
284 
287  {return x[0]*x[0]*sin(x[1]);}
288 
289 
290 
295  {
298 
299  //Cast the pointer to the father element to the specific
300  //element type
303  this->father_element_pt());
304 
305  //Set the pointer to the Rayleigh number to be the same as that in
306  //the father
307  this->Ra_pt = cast_father_element_pt->ra_pt();
308  } //end of further build
309 
310 
311 
313  unsigned nrecovery_order()
315 
318  unsigned num_Z2_flux_terms()
319  {
322  }
323 
324 
328  {
329  //Find the number of fluid fluxes
330  unsigned n_fluid_flux =
332 
333  //Fill in the first flux entries as the velocity entries
335 
336  //Find the number of temperature fluxes
337  unsigned n_temp_flux =
339  Vector<double> temp_flux(n_temp_flux);
340 
341  //Get the temperature flux
343 
344  //Add the temperature flux to the end of the flux vector
345  for(unsigned i=0;i<n_temp_flux;i++)
346  {
347  flux[n_fluid_flux+i] = temp_flux[i];
348  }
349 
350  } //end of get_Z2_flux
351 
354  unsigned ncompound_fluxes() {return 2;}
355 
359  {
360  //Find the number of fluid fluxes
361  unsigned n_fluid_flux =
363  //Find the number of temperature fluxes
364  unsigned n_temp_flux =
366 
367  //The fluid fluxes are first
368  //The values of the flux_index vector are zero on entry, so we
369  //could omit this line
370  for(unsigned i=0;i<n_fluid_flux;i++) {flux_index[i] = 0;}
371 
372  //Set the temperature fluxes (the last set of fluxes
373  for(unsigned i=0;i<n_temp_flux;i++) {flux_index[n_fluid_flux + i] = 1;}
374 
375  } //end of get_Z2_compound_flux_indices
376 
377 
383  void compute_error(std::ostream &outfile,
385  const double& time,
386  double& error, double& norm)
387  {FiniteElement::compute_error(outfile,exact_soln_pt,
388  time,error,norm);}
389 
395  void compute_error(std::ostream &outfile,
397  double& error, double& norm)
399  compute_error(outfile,exact_soln_pt,error,norm);}
400 
404 void get_wind_spherical_adv_diff(const unsigned& ipt,
405  const Vector<double> &s, const Vector<double>& x,
406  Vector<double>& wind) const
407  {
408  //The wind function is simply the velocity at the points
409  this->interpolated_u_spherical_nst(s,wind);
410  }
411 
412 
418  void get_body_force_spherical_nst(const double& time, const unsigned& ipt,
419  const Vector<double> &s, const Vector<double> &x,
420  Vector<double> &result)
421  {
422  // Get the temperature
423  const double interpolated_t = this->interpolated_u_spherical_adv_diff(s);
424 
425  // Get vector that indicates the direction of gravity from
426  // the Navier-Stokes equations
428 
429  // This is for the eye problem
430  //gravity[0] = -cos(x[1]);
431  //gravity[1] = sin(x[1]);
432  //gravity[2] = 0.0;
433 
434  // Temperature-dependent body force:
435  for (unsigned i=0;i<3;i++)
436  {
437  result[i] = -gravity[i]*interpolated_t*ra()/(pow(x[0],5.0));
438  }
439  }
440 
443  {
444  //Call the residuals of the Navier-Stokes equations
447 
448  //Call the residuals of the advection-diffusion equations
451  }
452 
453 
457  DenseMatrix<double> &jacobian)
458  {
459 #ifdef USE_FD_JACOBIAN_FOR_REFINEABLE_BUOYANT_Q_ELEMENT
461 #else
462  //Calculate the Navier-Stokes contributions (diagonal block and residuals)
464  fill_in_contribution_to_jacobian(residuals,jacobian);
465 
466  //Calculate the advection-diffusion contributions
467  //(diagonal block and residuals)
469  fill_in_contribution_to_jacobian(residuals,jacobian);
470 
471  //We now fill in the off-diagonal (interaction) blocks analytically
472  this->fill_in_off_diagonal_jacobian_blocks_analytic(residuals,jacobian);
473 #endif
474  } //End of jacobian calculation
475 
479  Vector<double> &residuals, DenseMatrix<double> &jacobian,
480  DenseMatrix<double> &mass_matrix)
481  {
482  //Calculate the Navier-Stokes contributions (diagonal block and residuals)
485  mass_matrix);
486 
487  //Calculate the advection-diffusion contributions
488  //(diagonal block and residuals)
491  mass_matrix);
492 
493  //We now fill in the off-diagonal (interaction) blocks analytically
494  this->fill_in_off_diagonal_jacobian_blocks_analytic(residuals,jacobian);
495  }
496 
500  Vector<double> &residuals, DenseMatrix<double> &jacobian)
501  {
502  //Perform another loop over the integration loops using the information
503  //from the original elements' residual assembly loops to determine
504  //the conributions to the jacobian
505 
506  // Local storage for pointers to hang_info objects
507  HangInfo *hang_info_pt=0, *hang_info2_pt=0;
508 
509  //Local storage for the index in the nodes at which the
510  //Navier-Stokes velocities are stored (we know that this should be 0,1,2)
511  unsigned u_nodal_spherical_nst[3];
512  for(unsigned i=0;i<3;i++)
513  {u_nodal_spherical_nst[i] = this->u_index_spherical_nst(i);}
514 
515  //Local storage for the index at which the temperature is stored
516  const unsigned u_nodal_spherical_adv_diff =
518 
519  //Find out how many nodes there are
520  const unsigned n_node = this->nnode();
521 
522  //Set up memory for the shape and test functions and their derivatives
523  Shape psif(n_node), testf(n_node);
524  DShape dpsifdx(n_node,2), dtestfdx(n_node,2);
525 
526  //Number of integration points
527  const unsigned n_intpt = this->integral_pt()->nweight();
528 
529  //Get Physical Variables from Element
530  double Ra = this->ra();
531  double Pe = this->pe();
532  Vector<double> gravity = this->g();
533 
534  //Integers to store the local equations and unknowns
535  int local_eqn=0, local_unknown=0;
536 
537  //Loop over the integration points
538  for(unsigned ipt=0;ipt<n_intpt;ipt++)
539  {
540  //Get the integral weight
541  double w = this->integral_pt()->weight(ipt);
542 
543  //Call the derivatives of the shape and test functions
544  double J =
546  testf,dtestfdx);
547 
548  //Premultiply the weights and the Jacobian
549  double W = w*J;
550 
551  //Work out the radius
552  double r = 0.0;
553  //and the angle
554  double theta = 0.0;
555 
556  //Calculate local values of temperature derivatives
557  //Allocate
558  Vector<double> interpolated_du_spherical_adv_diff_dx(2,0.0);
559 
560  // Loop over nodes
561  for(unsigned l=0;l<n_node;l++)
562  {
563  //Get the nodal value
564  double u_value = this->nodal_value(l,u_nodal_spherical_adv_diff);
565  //Loop over the derivative directions
566  for(unsigned j=0;j<2;j++)
567  {
568  interpolated_du_spherical_adv_diff_dx[j] += u_value*dpsifdx(l,j);
569  }
570 
571  //Calculate the position
572  r += this->nodal_position(l,0)*psif(l);
573  theta += this->nodal_position(l,1)*psif(l);
574  }
575 
576  double r2 = r*r;
577  double sin_theta = sin(theta);
578 
579  //Overwrite gravity for the eye problem
580  //gravity[0] = -cos(theta);
581  //gravity[1] = sin(theta);
582  //gravity[2] = 0.0;
583 
584 
585  //Assemble the Jacobian terms
586  //---------------------------
587 
588  //Loop over the test functions/eqns
589  for(unsigned l=0;l<n_node;l++)
590  {
591  //Local variables to store the number of master nodes and
592  //the weight associated with the shape function if the node is hanging
593  unsigned n_master=1;
594  double hang_weight=1.0;
595 
596  //Local bool (is the node hanging)
597  bool is_node_hanging = this->node_pt(l)->is_hanging();
598 
599  //If the node is hanging, get the number of master nodes
600  if(is_node_hanging)
601  {
602  hang_info_pt = this->node_pt(l)->hanging_pt();
603  n_master = hang_info_pt->nmaster();
604  }
605  //Otherwise there is just one master node, the node itself
606  else
607  {
608  n_master = 1;
609  }
610 
611  //Loop over the master nodes
612  for(unsigned m=0;m<n_master;m++)
613  {
614  //If the node is hanging get weight from master node
615  if(is_node_hanging)
616  {
617  //Get the hang weight from the master node
618  hang_weight = hang_info_pt->master_weight(m);
619  }
620  else
621  {
622  // Node contributes with full weight
623  hang_weight = 1.0;
624  }
625 
626 
627  //Assemble derivatives of Navier Stokes momentum w.r.t. temperature
628  //-----------------------------------------------------------------
629 
630  // Loop over velocity components for equations
631  for(unsigned i=0;i<3;i++)
632  {
633 
634  //Get the equation number
635  if(is_node_hanging)
636  {
637  //Get the equation number from the master node
638  local_eqn = this->local_hang_eqn(hang_info_pt->master_node_pt(m),
639  u_nodal_spherical_nst[i]);
640  }
641  else
642  {
643  // Local equation number
644  local_eqn = this->nodal_local_eqn(l,u_nodal_spherical_nst[i]);
645  }
646 
647  if(local_eqn >= 0)
648  {
649  //Local variables to store the number of master nodes
650  //and the weights associated with each hanging node
651  unsigned n_master2=1;
652  double hang_weight2=1.0;
653 
654  //Loop over the nodes for the unknowns
655  for(unsigned l2=0;l2<n_node;l2++)
656  {
657  //Local bool (is the node hanging)
658  bool is_node2_hanging = this->node_pt(l2)->is_hanging();
659 
660  //If the node is hanging, get the number of master nodes
661  if(is_node2_hanging)
662  {
663  hang_info2_pt = this->node_pt(l2)->hanging_pt();
664  n_master2 = hang_info2_pt->nmaster();
665  }
666  //Otherwise there is one master node, the node itself
667  else
668  {
669  n_master2 = 1;
670  }
671 
672  //Loop over the master nodes
673  for(unsigned m2=0;m2<n_master2;m2++)
674  {
675  if(is_node2_hanging)
676  {
677  //Read out the local unknown from the master node
678  local_unknown =
679  this->local_hang_eqn(hang_info2_pt->master_node_pt(m2),
680  u_nodal_spherical_adv_diff);
681  //Read out the hanging weight from the master node
682  hang_weight2 = hang_info2_pt->master_weight(m2);
683  }
684  else
685  {
686  //The local unknown number comes from the node
687  local_unknown =
688  this->nodal_local_eqn(l2,
689  u_nodal_spherical_adv_diff);
690  //The hang weight is one
691  hang_weight2 = 1.0;
692  }
693 
694  if(local_unknown >= 0)
695  {
696  //Add contribution to jacobian matrix
697  jacobian(local_eqn,local_unknown)
698  += -gravity[i]*psif(l2)*Ra*testf(l)*
699  r2*sin_theta*W*hang_weight*hang_weight2/(pow(r,5.0));
700  }
701  }
702  }
703  }
704  }
705 
706 
707  //Assemble derivative of adv diff eqn w.r.t. fluid veloc
708  //------------------------------------------------------
709  {
710  //Get the equation number
711  if(is_node_hanging)
712  {
713  //Get the equation number from the master node
714  local_eqn = this->local_hang_eqn(hang_info_pt->master_node_pt(m),
715  u_nodal_spherical_adv_diff);
716  }
717  else
718  {
719  // Local equation number
720  local_eqn = this->nodal_local_eqn(l,u_nodal_spherical_adv_diff);
721  }
722 
723  //If it's not pinned
724  if(local_eqn >= 0)
725  {
726  //Local variables to store the number of master nodes
727  //and the weights associated with each hanging node
728  unsigned n_master2=1;
729  double hang_weight2=1.0;
730 
731  //Loop over the nodes for the unknowns
732  for(unsigned l2=0;l2<n_node;l2++)
733  {
734  //Local bool (is the node hanging)
735  bool is_node2_hanging = this->node_pt(l2)->is_hanging();
736 
737  //If the node is hanging, get the number of master nodes
738  if(is_node2_hanging)
739  {
740  hang_info2_pt = this->node_pt(l2)->hanging_pt();
741  n_master2 = hang_info2_pt->nmaster();
742  }
743  //Otherwise there is one master node, the node itself
744  else
745  {
746  n_master2 = 1;
747  }
748 
749  //Loop over the master nodes
750  for(unsigned m2=0;m2<n_master2;m2++)
751  {
752  //If the node is hanging
753  if(is_node2_hanging)
754  {
755  //Read out the hanging weight from the master node
756  hang_weight2 = hang_info2_pt->master_weight(m2);
757  }
758  //If the node is not hanging
759  else
760  {
761  //The hang weight is one
762  hang_weight2 = 1.0;
763  }
764 
765  //Loop over the velocity degrees of freedom
766  for(unsigned i2=0;i2<2;i2++)
767  {
768  //If the node is hanging
769  if(is_node2_hanging)
770  {
771  //Read out the local unknown from the master node
772  local_unknown =
773  this->local_hang_eqn(hang_info2_pt->master_node_pt(m2),
774  u_nodal_spherical_nst[i2]);
775  }
776  else
777  {
778  //The local unknown number comes from the node
779  local_unknown=
780  this->nodal_local_eqn(l2,
781  u_nodal_spherical_nst[i2]);
782  }
783 
784  //If it's not pinned
785  if(local_unknown >= 0)
786  {
787  //Radial case
788  if(i2==0)
789  {
790  //Add the contribution to the jacobian matrix
791  jacobian(local_eqn,local_unknown)
792  -= Pe*psif(l2)*
793  interpolated_du_spherical_adv_diff_dx[i2]*testf(l)
794  *r2*sin_theta*W*hang_weight*hang_weight2;
795  }
796  if(i2==1)
797  {
798  //Add the contribution to the jacobian matrix
799  jacobian(local_eqn,local_unknown)
800  -= Pe*psif(l2)*
801  interpolated_du_spherical_adv_diff_dx[i2]*testf(l)
802  *r*sin_theta*W*hang_weight*hang_weight2;
803  }
804 
805  }
806 
807  }
808  }
809  }
810  }
811  }
812 
813  }
814  }
815  }
816  } //End of function
817 
818 
819 };
820 
821 
822 //===================================================================
824 //===================================================================
827 
828 //====================================================================
829 //Specify the FaceGeometry
830 //===================================================================
831 template<>
833 public virtual QElement<1,3>
834 {
835 
836  public:
837 
840  FaceGeometry() : QElement<1,3>() {}
841 
842 };
843 
844 
845 
846 }
847 
848 
849 
850 
AnnoyingScalar cos(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:136
AnnoyingScalar sin(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:137
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)
Definition: shape.h:278
FaceGeometry()
Definition: spherical_buoyant_navier_stokes.h:840
Definition: elements.h:4998
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 enable_ALE()
Definition: elements.h:2430
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
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
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
unsigned required_nvalue(const unsigned &n) const
Number of values (pinned or dofs) required at local node n.
Definition: spherical_navier_stokes_elements.h:871
double dshape_and_dtest_eulerian_at_knot_spherical_nst(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Definition: spherical_navier_stokes_elements.h:1013
Definition: spherical_buoyant_navier_stokes.h:62
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: spherical_buoyant_navier_stokes.h:456
static double Default_Physical_Constant_Value
The static default value of the Rayleigh number.
Definition: spherical_buoyant_navier_stokes.h:70
unsigned ncont_interpolated_values() const
Definition: spherical_buoyant_navier_stokes.h:204
void further_setup_hanging_nodes()
Definition: spherical_buoyant_navier_stokes.h:268
unsigned required_nvalue(const unsigned &n) const
Definition: spherical_buoyant_navier_stokes.h:86
unsigned num_Z2_flux_terms()
Definition: spherical_buoyant_navier_stokes.h:318
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Definition: spherical_buoyant_navier_stokes.h:478
void output(FILE *file_pt, const unsigned &n_plot)
C-style output function: Broken default.
Definition: spherical_buoyant_navier_stokes.h:167
void rebuild_from_sons(Mesh *&mesh_pt)
Definition: spherical_buoyant_navier_stokes.h:278
Node * vertex_node_pt(const unsigned &j) const
Definition: spherical_buoyant_navier_stokes.h:199
void output(std::ostream &outfile)
Overload the standard output function with the broken default.
Definition: spherical_buoyant_navier_stokes.h:116
void get_interpolated_values(const Vector< double > &s, Vector< double > &values)
Definition: spherical_buoyant_navier_stokes.h:210
void output(std::ostream &outfile, const unsigned &nplot)
Definition: spherical_buoyant_navier_stokes.h:121
void get_body_force_spherical_nst(const double &time, const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &result)
Definition: spherical_buoyant_navier_stokes.h:418
void output(FILE *file_pt)
C-style output function: Broken default.
Definition: spherical_buoyant_navier_stokes.h:163
unsigned ncompound_fluxes()
Definition: spherical_buoyant_navier_stokes.h:354
void output_fct(std::ostream &outfile, const unsigned &Nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
Definition: spherical_buoyant_navier_stokes.h:179
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Fill in the constituent elements' contribution to the residual vector.
Definition: spherical_buoyant_navier_stokes.h:442
double *& ra_pt()
Access function for the pointer to the Rayleigh number.
Definition: spherical_buoyant_navier_stokes.h:95
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Definition: spherical_buoyant_navier_stokes.h:327
void get_Z2_compound_flux_indices(Vector< unsigned > &flux_index)
Definition: spherical_buoyant_navier_stokes.h:358
void further_build()
Definition: spherical_buoyant_navier_stokes.h:294
void disable_ALE()
Final override for disable ALE.
Definition: spherical_buoyant_navier_stokes.h:99
RefineableBuoyantQSphericalCrouzeixRaviartElement()
Definition: spherical_buoyant_navier_stokes.h:76
void fill_in_off_diagonal_jacobian_blocks_analytic(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: spherical_buoyant_navier_stokes.h:499
void output_fct(std::ostream &outfile, const unsigned &Nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output function for an exact solution: Broken default.
Definition: spherical_buoyant_navier_stokes.h:171
void enable_ALE()
Final override for enable ALE.
Definition: spherical_buoyant_navier_stokes.h:107
unsigned nrecovery_order()
The recovery order is that of the NavierStokes elements.
Definition: spherical_buoyant_navier_stokes.h:313
double * Ra_pt
Pointer to a new physical variable, the Rayleigh number.
Definition: spherical_buoyant_navier_stokes.h:67
void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Definition: spherical_buoyant_navier_stokes.h:395
void get_wind_spherical_adv_diff(const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &wind) const
Definition: spherical_buoyant_navier_stokes.h:404
const double & ra() const
Access function for the Rayleigh number (const version)
Definition: spherical_buoyant_navier_stokes.h:92
unsigned u_index_spherical_adv_diff() const
Definition: spherical_buoyant_navier_stokes.h:190
void get_interpolated_values(const unsigned &t, const Vector< double > &s, Vector< double > &values)
Definition: spherical_buoyant_navier_stokes.h:239
void compute_error(std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
Definition: spherical_buoyant_navier_stokes.h:383
double geometric_jacobian(const Vector< double > &x)
Fill in the geometric Jacobian, which in this case is r*r*sin(theta)
Definition: spherical_buoyant_navier_stokes.h:286
unsigned nvertex_node() const
Definition: spherical_buoyant_navier_stokes.h:194
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_spherical_advection_diffusion_elements.h:360
void further_setup_hanging_nodes()
Definition: refineable_spherical_advection_diffusion_elements.h:411
void rebuild_from_sons(Mesh *&mesh_pt)
Rebuild from sons: empty.
Definition: refineable_spherical_advection_diffusion_elements.h:400
Definition: refineable_spherical_navier_stokes_elements.h:568
unsigned nrecovery_order()
Definition: refineable_spherical_navier_stokes_elements.h:701
void further_setup_hanging_nodes()
Definition: refineable_spherical_navier_stokes_elements.h:778
void further_build()
Definition: refineable_spherical_navier_stokes_elements.h:784
void rebuild_from_sons(Mesh *&mesh_pt)
Rebuild from sons: Reconstruct pressure from the (merged) sons.
Definition: refineable_spherical_navier_stokes_elements.h:598
void get_interpolated_values(const Vector< double > &s, Vector< double > &values)
Definition: refineable_spherical_navier_stokes_elements.h:722
void further_build()
Further build: Copy source function pointer from father element.
Definition: refineable_spherical_advection_diffusion_elements.h:182
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
Definition: refineable_spherical_advection_diffusion_elements.h:78
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Definition: refineable_spherical_advection_diffusion_elements.h:85
void get_interpolated_values(const Vector< double > &s, Vector< double > &values)
Definition: refineable_spherical_advection_diffusion_elements.h:95
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
Definition: refineable_spherical_navier_stokes_elements.h:75
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Definition: refineable_spherical_navier_stokes_elements.h:83
Definition: shape.h:76
void disable_ALE()
Definition: spherical_advection_diffusion_elements.h:127
double interpolated_u_spherical_adv_diff(const Vector< double > &s) const
Return FE representation of function value u(s) at local coordinate s.
Definition: spherical_advection_diffusion_elements.h:334
const double & pe() const
Peclet number.
Definition: spherical_advection_diffusion_elements.h:194
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Add the element's contribution to its residual vector (wrapper)
Definition: spherical_advection_diffusion_elements.h:298
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Definition: spherical_advection_diffusion_elements.h:322
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: spherical_advection_diffusion_elements.h:312
virtual unsigned u_index_spherical_nst(const unsigned &i) const
Definition: spherical_navier_stokes_elements.h:387
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: spherical_navier_stokes_elements.h:681
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Compute the element's residual Vector.
Definition: spherical_navier_stokes_elements.h:668
void disable_ALE()
Definition: spherical_navier_stokes_elements.h:424
double interpolated_p_spherical_nst(const Vector< double > &s) const
Return FE interpolated pressure at local coordinate s.
Definition: spherical_navier_stokes_elements.h:780
const Vector< double > & g() const
Vector of gravitational components.
Definition: spherical_navier_stokes_elements.h:323
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Definition: spherical_navier_stokes_elements.h:691
void enable_ALE()
Definition: spherical_navier_stokes_elements.h:433
void interpolated_u_spherical_nst(const Vector< double > &s, Vector< double > &veloc) const
Compute vector of FE interpolated velocity u at local coordinate s.
Definition: spherical_navier_stokes_elements.h:702
RealScalar s
Definition: level1_cplx_impl.h:130
int * m
Definition: level2_cplx_impl.h:294
double theta
Definition: two_d_biharmonic.cc:236
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 pow(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:625
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
@ W
Definition: quadtree.h:63
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
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2