axisym_navier_stokes_elements.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 // Header file for Navier Stokes elements
27 
28 #ifndef OOMPH_AXISYMMETRIC_NAVIER_STOKES_ELEMENTS_HEADER
29 #define OOMPH_AXISYMMETRIC_NAVIER_STOKES_ELEMENTS_HEADER
30 
31 // Config header generated by autoconfig
32 #ifdef HAVE_CONFIG_H
33 #include <oomph-lib-config.h>
34 #endif
35 
36 // OOMPH-LIB headers
37 #include "../generic/Qelements.h"
38 #include "../generic/fsi.h"
39 #include "../generic/projection.h"
40 
41 namespace oomph
42 {
43  //======================================================================
111  //======================================================================
113  : public virtual FiniteElement,
115  {
116  private:
120 
124 
128 
131 
132  protected:
133  // Physical constants
134 
138 
142 
143  // Pointers to global physical constants
144 
146  double* Re_pt;
147 
149  double* ReSt_pt;
150 
153  double* ReInvFr_pt;
154 
157  double* ReInvRo_pt;
158 
161 
163  void (*Body_force_fct_pt)(const double& time,
164  const Vector<double>& x,
165  Vector<double>& result);
166 
168  double (*Source_fct_pt)(const double& time, const Vector<double>& x);
169 
174 
178  virtual int p_local_eqn(const unsigned& n) const = 0;
179 
184  Shape& psi,
185  DShape& dpsidx,
186  Shape& test,
187  DShape& dtestdx) const = 0;
188 
193  const unsigned& ipt,
194  Shape& psi,
195  DShape& dpsidx,
196  Shape& test,
197  DShape& dtestdx) const = 0;
198 
203  const unsigned& ipt,
204  Shape& psi,
205  DShape& dpsidx,
206  RankFourTensor<double>& d_dpsidx_dX,
207  Shape& test,
208  DShape& dtestdx,
209  RankFourTensor<double>& d_dtestdx_dX,
210  DenseMatrix<double>& djacobian_dX) const = 0;
211 
213  virtual void pshape_axi_nst(const Vector<double>& s, Shape& psi) const = 0;
214 
217  virtual void pshape_axi_nst(const Vector<double>& s,
218  Shape& psi,
219  Shape& test) const = 0;
220 
222  virtual void get_body_force_axi_nst(const double& time,
223  const unsigned& ipt,
224  const Vector<double>& s,
225  const Vector<double>& x,
226  Vector<double>& result)
227  {
228  // If the function pointer is zero return zero
229  if (Body_force_fct_pt == 0)
230  {
231  // Loop over dimensions and set body forces to zero
232  for (unsigned i = 0; i < 3; i++)
233  {
234  result[i] = 0.0;
235  }
236  }
237  // Otherwise call the function
238  else
239  {
240  (*Body_force_fct_pt)(time, x, result);
241  }
242  }
243 
247  inline virtual void get_body_force_gradient_axi_nst(
248  const double& time,
249  const unsigned& ipt,
250  const Vector<double>& s,
251  const Vector<double>& x,
252  DenseMatrix<double>& d_body_force_dx)
253  {
254  // hierher: Implement function pointer version
255  /* //If no gradient function has been set, FD it */
256  /* if(Body_force_fct_gradient_pt==0) */
257  {
258  // Reference value
259  Vector<double> body_force(3, 0.0);
260  get_body_force_axi_nst(time, ipt, s, x, body_force);
261 
262  // FD it
263  const double eps_fd = GeneralisedElement::Default_fd_jacobian_step;
264  Vector<double> body_force_pls(3, 0.0);
265  Vector<double> x_pls(x);
266  for (unsigned i = 0; i < 2; i++)
267  {
268  x_pls[i] += eps_fd;
269  get_body_force_axi_nst(time, ipt, s, x_pls, body_force_pls);
270  for (unsigned j = 0; j < 3; j++)
271  {
272  d_body_force_dx(j, i) =
273  (body_force_pls[j] - body_force[j]) / eps_fd;
274  }
275  x_pls[i] = x[i];
276  }
277  }
278  /* else */
279  /* { */
280  /* // Get gradient */
281  /* (*Source_fct_gradient_pt)(time,x,gradient); */
282  /* } */
283  }
284 
286  double get_source_fct(const double& time,
287  const unsigned& ipt,
288  const Vector<double>& x)
289  {
290  // If the function pointer is zero return zero
291  if (Source_fct_pt == 0)
292  {
293  return 0;
294  }
295 
296  // Otherwise call the function
297  else
298  {
299  return (*Source_fct_pt)(time, x);
300  }
301  }
302 
305  inline virtual void get_source_fct_gradient(const double& time,
306  const unsigned& ipt,
307  const Vector<double>& x,
308  Vector<double>& gradient)
309  {
310  // hierher: Implement function pointer version
311  /* //If no gradient function has been set, FD it */
312  /* if(Source_fct_gradient_pt==0) */
313  {
314  // Reference value
315  const double source = get_source_fct(time, ipt, x);
316 
317  // FD it
318  const double eps_fd = GeneralisedElement::Default_fd_jacobian_step;
319  double source_pls = 0.0;
320  Vector<double> x_pls(x);
321  for (unsigned i = 0; i < 2; i++)
322  {
323  x_pls[i] += eps_fd;
324  source_pls = get_source_fct(time, ipt, x_pls);
325  gradient[i] = (source_pls - source) / eps_fd;
326  x_pls[i] = x[i];
327  }
328  }
329  /* else */
330  /* { */
331  /* // Get gradient */
332  /* (*Source_fct_gradient_pt)(time,x,gradient); */
333  /* } */
334  }
335 
339  virtual void get_viscosity_ratio_axisym_nst(const unsigned& ipt,
340  const Vector<double>& s,
341  const Vector<double>& x,
342  double& visc_ratio)
343  {
344  visc_ratio = *Viscosity_Ratio_pt;
345  }
346 
351  Vector<double>& residuals,
352  DenseMatrix<double>& jacobian,
353  DenseMatrix<double>& mass_matrix,
354  unsigned flag);
355 
360  double* const& parameter_pt,
361  Vector<double>& dres_dparam,
362  DenseMatrix<double>& djac_dparam,
363  DenseMatrix<double>& dmass_matrix_dparam,
364  unsigned flag);
365 
369  Vector<double> const& Y,
370  DenseMatrix<double> const& C,
372 
373  public:
377  {
378  // Set all the Physical parameter pointers to the default value zero
384  // Set the Physical ratios to the default value of 1
387  }
388 
390  // N.B. This needs to be public so that the intel compiler gets things
391  // correct somehow the access function messes things up when going to
392  // refineable navier--stokes
394 
395  // Access functions for the physical constants
396 
398  const double& re() const
399  {
400  return *Re_pt;
401  }
402 
404  const double& re_st() const
405  {
406  return *ReSt_pt;
407  }
408 
410  double*& re_pt()
411  {
412  return Re_pt;
413  }
414 
416  double*& re_st_pt()
417  {
418  return ReSt_pt;
419  }
420 
422  const double& re_invfr() const
423  {
424  return *ReInvFr_pt;
425  }
426 
428  double*& re_invfr_pt()
429  {
430  return ReInvFr_pt;
431  }
432 
434  const double& re_invro() const
435  {
436  return *ReInvRo_pt;
437  }
438 
440  double*& re_invro_pt()
441  {
442  return ReInvRo_pt;
443  }
444 
446  const Vector<double>& g() const
447  {
448  return *G_pt;
449  }
450 
453  {
454  return G_pt;
455  }
456 
459  const double& density_ratio() const
460  {
461  return *Density_Ratio_pt;
462  }
463 
465  double*& density_ratio_pt()
466  {
467  return Density_Ratio_pt;
468  }
469 
472  const double& viscosity_ratio() const
473  {
474  return *Viscosity_Ratio_pt;
475  }
476 
479  {
480  return Viscosity_Ratio_pt;
481  }
482 
484  void (*&axi_nst_body_force_fct_pt())(const double& time,
485  const Vector<double>& x,
486  Vector<double>& f)
487  {
488  return Body_force_fct_pt;
489  }
490 
492  double (*&source_fct_pt())(const double& time, const Vector<double>& x)
493  {
494  return Source_fct_pt;
495  }
496 
498  virtual unsigned npres_axi_nst() const = 0;
499 
506  virtual inline unsigned u_index_axi_nst(const unsigned& i) const
507  {
508  return i;
509  }
510 
516  inline unsigned u_index_nst(const unsigned& i) const
517  {
518  return this->u_index_axi_nst(i);
519  }
520 
523  inline unsigned n_u_nst() const
524  {
525  return 3;
526  }
527 
528 
531  double du_dt_axi_nst(const unsigned& n, const unsigned& i) const
532  {
533  // Get the data's timestepper
535 
536  // Initialise dudt
537  double dudt = 0.0;
538  // Loop over the timesteps, if there is a non Steady timestepper
539  if (!time_stepper_pt->is_steady())
540  {
541  // Get the index at which the velocity is stored
542  const unsigned u_nodal_index = u_index_axi_nst(i);
543 
544  // Number of timsteps (past & present)
545  const unsigned n_time = time_stepper_pt->ntstorage();
546 
547  // Add the contributions to the time derivative
548  for (unsigned t = 0; t < n_time; t++)
549  {
550  dudt +=
551  time_stepper_pt->weight(1, t) * nodal_value(t, n, u_nodal_index);
552  }
553  }
554 
555  return dudt;
556  }
557 
560  void disable_ALE()
561  {
562  ALE_is_disabled = true;
563  }
564 
569  void enable_ALE()
570  {
571  ALE_is_disabled = false;
572  }
573 
576  virtual double p_axi_nst(const unsigned& n_p) const = 0;
577 
579  virtual int p_nodal_index_axi_nst() const
580  {
582  }
583 
585  double pressure_integral() const;
586 
588  double dissipation() const;
589 
591  double dissipation(const Vector<double>& s) const;
592 
594  double kin_energy() const;
595 
597  void strain_rate(const Vector<double>& s,
599 
602  void traction(const Vector<double>& s,
603  const Vector<double>& N,
604  Vector<double>& traction) const;
605 
613  Vector<double>& press_mass_diag,
614  Vector<double>& veloc_mass_diag,
615  const unsigned& which_one = 0);
616 
619  unsigned nscalar_paraview() const
620  {
621  return 4;
622  }
623 
626  void scalar_value_paraview(std::ofstream& file_out,
627  const unsigned& i,
628  const unsigned& nplot) const
629  {
630  // Vector of local coordinates
631  Vector<double> s(2);
632 
633  // Loop over plot points
634  unsigned num_plot_points = nplot_points_paraview(nplot);
635  for (unsigned iplot = 0; iplot < num_plot_points; iplot++)
636  {
637  // Get local coordinates of plot point
638  get_s_plot(iplot, nplot, s);
639 
640  // Velocities
641  if (i < 3)
642  {
643  file_out << interpolated_u_axi_nst(s, i) << std::endl;
644  }
645  // Pressure
646  else if (i == 3)
647  {
648  file_out << interpolated_p_axi_nst(s) << std::endl;
649  }
650  // Never get here
651  else
652  {
653  std::stringstream error_stream;
654  error_stream
655  << "Axisymmetric Navier-Stokes Elements only store 4 fields "
656  << std::endl;
657  throw OomphLibError(error_stream.str(),
660  }
661  }
662  }
663 
667  std::string scalar_name_paraview(const unsigned& i) const
668  {
669  // Veloc
670  if (i < 3)
671  {
672  return "Velocity " + StringConversion::to_string(i);
673  }
674  // Pressure field
675  else if (i == 3)
676  {
677  return "Pressure";
678  }
679  // Never get here
680  else
681  {
682  std::stringstream error_stream;
683  error_stream
684  << "Axisymmetric Navier-Stokes Elements only store 4 fields "
685  << std::endl;
686  throw OomphLibError(
687  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
688  return " ";
689  }
690  }
691 
695  {
696  // Output the components of the position
697  for (unsigned i = 0; i < 2; i++)
698  {
699  data.push_back(interpolated_x(s, i));
700  }
701 
702  // Output the components of the FE representation of u at s
703  for (unsigned i = 0; i < 3; i++)
704  {
705  data.push_back(interpolated_u_axi_nst(s, i));
706  }
707 
708  // Output FE representation of p at s
709  data.push_back(interpolated_p_axi_nst(s));
710  }
711 
712 
715  void output(std::ostream& outfile)
716  {
717  unsigned nplot = 5;
718  output(outfile, nplot);
719  }
720 
723  void output(std::ostream& outfile, const unsigned& nplot);
724 
725 
728  void output(FILE* file_pt)
729  {
730  unsigned nplot = 5;
731  output(file_pt, nplot);
732  }
733 
736  void output(FILE* file_pt, const unsigned& nplot);
737 
741  void output_veloc(std::ostream& outfile,
742  const unsigned& nplot,
743  const unsigned& t);
744 
748  void output_fct(std::ostream& outfile,
749  const unsigned& nplot,
751 
755  void output_fct(std::ostream& outfile,
756  const unsigned& nplot,
757  const double& time,
759 
764  void compute_error(std::ostream& outfile,
766  const double& time,
767  double& error,
768  double& norm);
769 
774  void compute_error(std::ostream& outfile,
776  double& error,
777  double& norm);
778 
781  {
782  // Call the generic residuals function with flag set to 0
783  // and using a dummy matrix argument
785  residuals,
788  0);
789  }
790 
794  DenseMatrix<double>& jacobian)
795  {
796  // Call the generic routine with the flag set to 1
798  residuals, jacobian, GeneralisedElement::Dummy_matrix, 1);
799  }
800 
804  Vector<double>& residuals,
805  DenseMatrix<double>& jacobian,
806  DenseMatrix<double>& mass_matrix)
807  {
808  // Call the generic routine with the flag set to 2
810  residuals, jacobian, mass_matrix, 2);
811  }
812 
818  RankThreeTensor<double>& dresidual_dnodal_coordinates);
819 
822  double* const& parameter_pt, Vector<double>& dres_dparam)
823  {
824  // Call the generic residuals function with flag set to 0
825  // and using a dummy matrix argument
827  parameter_pt,
828  dres_dparam,
831  0);
832  }
833 
837  double* const& parameter_pt,
838  Vector<double>& dres_dparam,
839  DenseMatrix<double>& djac_dparam)
840  {
841  // Call the generic routine with the flag set to 1
843  parameter_pt,
844  dres_dparam,
845  djac_dparam,
847  1);
848  }
849 
853  double* const& parameter_pt,
854  Vector<double>& dres_dparam,
855  DenseMatrix<double>& djac_dparam,
856  DenseMatrix<double>& dmass_matrix_dparam)
857  {
858  // Call the generic routine with the flag set to 2
860  parameter_pt, dres_dparam, djac_dparam, dmass_matrix_dparam, 2);
861  }
862 
863 
866  Vector<double>& veloc) const
867  {
868  // Find number of nodes
869  unsigned n_node = nnode();
870  // Local shape function
871  Shape psi(n_node);
872  // Find values of shape function
873  shape(s, psi);
874 
875  for (unsigned i = 0; i < 3; i++)
876  {
877  // Index at which the nodal value is stored
878  unsigned u_nodal_index = u_index_axi_nst(i);
879  // Initialise value of u
880  veloc[i] = 0.0;
881  // Loop over the local nodes and sum
882  for (unsigned l = 0; l < n_node; l++)
883  {
884  veloc[i] += nodal_value(l, u_nodal_index) * psi[l];
885  }
886  }
887  }
888 
891  const unsigned& i) const
892  {
893  // Find number of nodes
894  unsigned n_node = nnode();
895  // Local shape function
896  Shape psi(n_node);
897  // Find values of shape function
898  shape(s, psi);
899 
900  // Get the index at which the velocity is stored
901  unsigned u_nodal_index = u_index_axi_nst(i);
902 
903  // Initialise value of u
904  double interpolated_u = 0.0;
905  // Loop over the local nodes and sum
906  for (unsigned l = 0; l < n_node; l++)
907  {
908  interpolated_u += nodal_value(l, u_nodal_index) * psi[l];
909  }
910 
911  return (interpolated_u);
912  }
913 
914 
916  // at time level t (t=0: present, t>0: history)
917  double interpolated_u_axi_nst(const unsigned& t,
918  const Vector<double>& s,
919  const unsigned& i) const
920  {
921  // Find number of nodes
922  unsigned n_node = nnode();
923  // Local shape function
924  Shape psi(n_node);
925  // Find values of shape function
926  shape(s, psi);
927 
928  // Get the index at which the velocity is stored
929  unsigned u_nodal_index = u_index_axi_nst(i);
930 
931  // Initialise value of u
932  double interpolated_u = 0.0;
933  // Loop over the local nodes and sum
934  for (unsigned l = 0; l < n_node; l++)
935  {
936  interpolated_u += nodal_value(t, l, u_nodal_index) * psi[l];
937  }
938 
939  return (interpolated_u);
940  }
941 
942 
949  const Vector<double>& s,
950  const unsigned& i,
951  Vector<double>& du_ddata,
952  Vector<unsigned>& global_eqn_number)
953  {
954  // Find number of nodes
955  unsigned n_node = nnode();
956  // Local shape function
957  Shape psi(n_node);
958  // Find values of shape function
959  shape(s, psi);
960 
961  // Find the index at which the velocity component is stored
962  const unsigned u_nodal_index = u_index_axi_nst(i);
963 
964  // Find the number of dofs associated with interpolated u
965  unsigned n_u_dof = 0;
966  for (unsigned l = 0; l < n_node; l++)
967  {
968  int global_eqn = this->node_pt(l)->eqn_number(u_nodal_index);
969  // If it's positive add to the count
970  if (global_eqn >= 0)
971  {
972  ++n_u_dof;
973  }
974  }
975 
976  // Now resize the storage schemes
977  du_ddata.resize(n_u_dof, 0.0);
978  global_eqn_number.resize(n_u_dof, 0);
979 
980  // Loop over th nodes again and set the derivatives
981  unsigned count = 0;
982  // Loop over the local nodes and sum
983  for (unsigned l = 0; l < n_node; l++)
984  {
985  // Get the global equation number
986  int global_eqn = this->node_pt(l)->eqn_number(u_nodal_index);
987  if (global_eqn >= 0)
988  {
989  // Set the global equation number
990  global_eqn_number[count] = global_eqn;
991  // Set the derivative with respect to the unknown
992  du_ddata[count] = psi[l];
993  // Increase the counter
994  ++count;
995  }
996  }
997  }
998 
999 
1002  {
1003  // Find number of nodes
1004  unsigned n_pres = npres_axi_nst();
1005  // Local shape function
1006  Shape psi(n_pres);
1007  // Find values of shape function
1008  pshape_axi_nst(s, psi);
1009 
1010  // Initialise value of p
1011  double interpolated_p = 0.0;
1012  // Loop over the local nodes and sum
1013  for (unsigned l = 0; l < n_pres; l++)
1014  {
1015  interpolated_p += p_axi_nst(l) * psi[l];
1016  }
1017 
1018  return (interpolated_p);
1019  }
1020 
1024  const unsigned& i,
1025  const unsigned& j) const
1026  {
1027  // Determine number of nodes
1028  const unsigned n_node = nnode();
1029 
1030  // Allocate storage for local shape function and its derivatives
1031  // with respect to space
1032  Shape psif(n_node);
1033  DShape dpsifds(n_node, 2);
1034 
1035  // Find values of shape function (ignore jacobian)
1036  (void)this->dshape_local(s, psif, dpsifds);
1037 
1038  // Get the index at which the velocity is stored
1039  const unsigned u_nodal_index = u_index_axi_nst(i);
1040 
1041  // Initialise value of duds
1042  double interpolated_duds = 0.0;
1043 
1044  // Loop over the local nodes and sum
1045  for (unsigned l = 0; l < n_node; l++)
1046  {
1047  interpolated_duds += nodal_value(l, u_nodal_index) * dpsifds(l, j);
1048  }
1049 
1050  return (interpolated_duds);
1051  }
1052 
1056  const unsigned& i,
1057  const unsigned& j) const
1058  {
1059  // Determine number of nodes
1060  const unsigned n_node = nnode();
1061 
1062  // Allocate storage for local shape function and its derivatives
1063  // with respect to space
1064  Shape psif(n_node);
1065  DShape dpsifdx(n_node, 2);
1066 
1067  // Find values of shape function (ignore jacobian)
1068  (void)this->dshape_eulerian(s, psif, dpsifdx);
1069 
1070  // Get the index at which the velocity is stored
1071  const unsigned u_nodal_index = u_index_axi_nst(i);
1072 
1073  // Initialise value of dudx
1074  double interpolated_dudx = 0.0;
1075 
1076  // Loop over the local nodes and sum
1077  for (unsigned l = 0; l < n_node; l++)
1078  {
1079  interpolated_dudx += nodal_value(l, u_nodal_index) * dpsifdx(l, j);
1080  }
1081 
1082  return (interpolated_dudx);
1083  }
1084 
1088  const unsigned& i) const
1089  {
1090  // Determine number of nodes
1091  const unsigned n_node = nnode();
1092 
1093  // Allocate storage for local shape function
1094  Shape psif(n_node);
1095 
1096  // Find values of shape function
1097  shape(s, psif);
1098 
1099  // Initialise value of dudt
1100  double interpolated_dudt = 0.0;
1101 
1102  // Loop over the local nodes and sum
1103  for (unsigned l = 0; l < n_node; l++)
1104  {
1105  interpolated_dudt += du_dt_axi_nst(l, i) * psif[l];
1106  }
1107 
1108  return (interpolated_dudt);
1109  }
1110 
1115  const unsigned& p,
1116  const unsigned& q,
1117  const unsigned& i,
1118  const unsigned& k) const
1119  {
1120  // Determine number of nodes
1121  const unsigned n_node = nnode();
1122 
1123  // Allocate storage for local shape function and its derivatives
1124  // with respect to space
1125  Shape psif(n_node);
1126  DShape dpsifds(n_node, 2);
1127 
1128  // Find values of shape function (ignore jacobian)
1129  (void)this->dshape_local(s, psif, dpsifds);
1130 
1131  // Allocate memory for the jacobian and the inverse of the jacobian
1132  DenseMatrix<double> jacobian(2), inverse_jacobian(2);
1133 
1134  // Allocate memory for the derivative of the jacobian w.r.t. nodal coords
1135  DenseMatrix<double> djacobian_dX(2, n_node);
1136 
1137  // Allocate memory for the derivative w.r.t. nodal coords of the
1138  // spatial derivatives of the shape functions
1139  RankFourTensor<double> d_dpsifdx_dX(2, n_node, 3, 2);
1140 
1141  // Now calculate the inverse jacobian
1142  const double det =
1143  local_to_eulerian_mapping(dpsifds, jacobian, inverse_jacobian);
1144 
1145  // Calculate the derivative of the jacobian w.r.t. nodal coordinates
1146  // Note: must call this before "transform_derivatives(...)" since this
1147  // function requires dpsids rather than dpsidx
1148  dJ_eulerian_dnodal_coordinates(jacobian, dpsifds, djacobian_dX);
1149 
1150  // Calculate the derivative of dpsidx w.r.t. nodal coordinates
1151  // Note: this function also requires dpsids rather than dpsidx
1153  det, jacobian, djacobian_dX, inverse_jacobian, dpsifds, d_dpsifdx_dX);
1154 
1155  // Get the index at which the velocity is stored
1156  const unsigned u_nodal_index = u_index_axi_nst(i);
1157 
1158  // Initialise value of dudx
1159  double interpolated_d_dudx_dX = 0.0;
1160 
1161  // Loop over the local nodes and sum
1162  for (unsigned l = 0; l < n_node; l++)
1163  {
1164  interpolated_d_dudx_dX +=
1165  nodal_value(l, u_nodal_index) * d_dpsifdx_dX(p, q, l, k);
1166  }
1167 
1168  return (interpolated_d_dudx_dX);
1169  }
1170 
1172  double compute_physical_size() const
1173  {
1174  // Initialise result
1175  double result = 0.0;
1176 
1177  // Figure out the global (Eulerian) spatial dimension of the
1178  // element by checking the Eulerian dimension of the nodes
1179  const unsigned n_dim_eulerian = nodal_dimension();
1180 
1181  // Allocate Vector of global Eulerian coordinates
1182  Vector<double> x(n_dim_eulerian);
1183 
1184  // Set the value of n_intpt
1185  const unsigned n_intpt = integral_pt()->nweight();
1186 
1187  // Vector of local coordinates
1188  const unsigned n_dim = dim();
1189  Vector<double> s(n_dim);
1190 
1191  // Loop over the integration points
1192  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
1193  {
1194  // Assign the values of s
1195  for (unsigned i = 0; i < n_dim; i++)
1196  {
1197  s[i] = integral_pt()->knot(ipt, i);
1198  }
1199 
1200  // Assign the values of the global Eulerian coordinates
1201  for (unsigned i = 0; i < n_dim_eulerian; i++)
1202  {
1203  x[i] = interpolated_x(s, i);
1204  }
1205 
1206  // Get the integral weight
1207  const double w = integral_pt()->weight(ipt);
1208 
1209  // Get Jacobian of mapping
1210  const double J = J_eulerian(s);
1211 
1212  // The integrand at the current integration point is r
1213  result += x[0] * w * J;
1214  }
1215 
1216  // Multiply by 2pi (integrating in azimuthal direction)
1217  return (2.0 * MathematicalConstants::Pi * result);
1218  }
1219  };
1220 
1224 
1225 
1226  //==========================================================================
1230  //==========================================================================
1232  : public virtual QElement<2, 3>,
1233  public virtual AxisymmetricNavierStokesEquations
1234  {
1235  private:
1237  static const unsigned Initial_Nvalue[];
1238 
1239  protected:
1243 
1247  inline double dshape_and_dtest_eulerian_axi_nst(const Vector<double>& s,
1248  Shape& psi,
1249  DShape& dpsidx,
1250  Shape& test,
1251  DShape& dtestdx) const;
1252 
1257  const unsigned& ipt,
1258  Shape& psi,
1259  DShape& dpsidx,
1260  Shape& test,
1261  DShape& dtestdx) const;
1262 
1267  const unsigned& ipt,
1268  Shape& psi,
1269  DShape& dpsidx,
1270  RankFourTensor<double>& d_dpsidx_dX,
1271  Shape& test,
1272  DShape& dtestdx,
1273  RankFourTensor<double>& d_dtestdx_dX,
1274  DenseMatrix<double>& djacobian_dX) const;
1275 
1276 
1278  inline void pshape_axi_nst(const Vector<double>& s, Shape& psi) const;
1279 
1281  inline void pshape_axi_nst(const Vector<double>& s,
1282  Shape& psi,
1283  Shape& test) const;
1284 
1285 
1286  public:
1290  {
1291  // Allocate and add one Internal data object that stores the three
1292  // pressure values
1294  }
1295 
1297  virtual unsigned required_nvalue(const unsigned& n) const;
1298 
1302  double p_axi_nst(const unsigned& i) const
1303  {
1305  }
1306 
1308  unsigned npres_axi_nst() const
1309  {
1310  return 3;
1311  }
1312 
1314  void fix_pressure(const unsigned& p_dof, const double& pvalue)
1315  {
1316  this->internal_data_pt(P_axi_nst_internal_index)->pin(p_dof);
1318  }
1319 
1321  void get_traction(const Vector<double>& s,
1322  const Vector<double>& N,
1323  Vector<double>& traction) const;
1324 
1327  inline int p_local_eqn(const unsigned& n) const
1328  {
1330  }
1331 
1333  void output(std::ostream& outfile)
1334  {
1336  }
1337 
1339  void output(std::ostream& outfile, const unsigned& n_plot)
1340  {
1342  }
1343 
1344 
1346  void output(FILE* file_pt)
1347  {
1349  }
1350 
1352  void output(FILE* file_pt, const unsigned& n_plot)
1353  {
1355  }
1356 
1359  unsigned ndof_types() const
1360  {
1361  return 4;
1362  }
1363 
1371  std::list<std::pair<unsigned long, unsigned>>& dof_lookup_list) const;
1372  };
1373 
1374  // Inline functions
1375 
1376  //=======================================================================
1380  //=======================================================================
1383  Shape& psi,
1384  DShape& dpsidx,
1385  Shape& test,
1386  DShape& dtestdx) const
1387  {
1388  // Call the geometrical shape functions and derivatives
1389  double J = this->dshape_eulerian(s, psi, dpsidx);
1390  // Loop over the test functions and derivatives and set them equal to the
1391  // shape functions
1392  for (unsigned i = 0; i < 9; i++)
1393  {
1394  test[i] = psi[i];
1395  dtestdx(i, 0) = dpsidx(i, 0);
1396  dtestdx(i, 1) = dpsidx(i, 1);
1397  }
1398  // Return the jacobian
1399  return J;
1400  }
1401 
1402  //=======================================================================
1406  //=======================================================================
1408  dshape_and_dtest_eulerian_at_knot_axi_nst(const unsigned& ipt,
1409  Shape& psi,
1410  DShape& dpsidx,
1411  Shape& test,
1412  DShape& dtestdx) const
1413  {
1414  // Call the geometrical shape functions and derivatives
1415  double J = this->dshape_eulerian_at_knot(ipt, psi, dpsidx);
1416  // Loop over the test functions and derivatives and set them equal to the
1417  // shape functions
1418  for (unsigned i = 0; i < 9; i++)
1419  {
1420  test[i] = psi[i];
1421  dtestdx(i, 0) = dpsidx(i, 0);
1422  dtestdx(i, 1) = dpsidx(i, 1);
1423  }
1424  // Return the jacobian
1425  return J;
1426  }
1427 
1428  //=======================================================================
1435  //=======================================================================
1438  const unsigned& ipt,
1439  Shape& psi,
1440  DShape& dpsidx,
1441  RankFourTensor<double>& d_dpsidx_dX,
1442  Shape& test,
1443  DShape& dtestdx,
1444  RankFourTensor<double>& d_dtestdx_dX,
1445  DenseMatrix<double>& djacobian_dX) const
1446  {
1447  // Call the geometrical shape functions and derivatives
1448  const double J = this->dshape_eulerian_at_knot(
1449  ipt, psi, dpsidx, djacobian_dX, d_dpsidx_dX);
1450 
1451  // Loop over the test functions and derivatives and set them equal to the
1452  // shape functions
1453  for (unsigned i = 0; i < 9; i++)
1454  {
1455  test[i] = psi[i];
1456 
1457  for (unsigned k = 0; k < 2; k++)
1458  {
1459  dtestdx(i, k) = dpsidx(i, k);
1460 
1461  for (unsigned p = 0; p < 2; p++)
1462  {
1463  for (unsigned q = 0; q < 9; q++)
1464  {
1465  d_dtestdx_dX(p, q, i, k) = d_dpsidx_dX(p, q, i, k);
1466  }
1467  }
1468  }
1469  }
1470 
1471  // Return the jacobian
1472  return J;
1473  }
1474 
1475  //=======================================================================
1477  //=======================================================================
1479  const Vector<double>& s, Shape& psi) const
1480  {
1481  psi[0] = 1.0;
1482  psi[1] = s[0];
1483  psi[2] = s[1];
1484  }
1485 
1488  const Vector<double>& s, Shape& psi, Shape& test) const
1489  {
1490  // Call the pressure shape functions
1491  pshape_axi_nst(s, psi);
1492  // Loop over the test functions and set them equal to the shape functions
1493  for (unsigned i = 0; i < 3; i++) test[i] = psi[i];
1494  }
1495 
1496 
1497  //=======================================================================
1499  //=======================================================================
1500  template<>
1502  : public virtual QElement<1, 3>
1503  {
1504  public:
1505  FaceGeometry() : QElement<1, 3>() {}
1506  };
1507 
1508  //=======================================================================
1511  //=======================================================================
1512  template<>
1514  : public virtual PointElement
1515  {
1516  public:
1518  };
1519 
1520 
1523 
1524  //=======================================================================
1528  //=======================================================================
1530  : public virtual QElement<2, 3>,
1531  public virtual AxisymmetricNavierStokesEquations
1532  {
1533  private:
1535  static const unsigned Initial_Nvalue[];
1536 
1537  protected:
1540  static const unsigned Pconv[];
1541 
1545  inline double dshape_and_dtest_eulerian_axi_nst(const Vector<double>& s,
1546  Shape& psi,
1547  DShape& dpsidx,
1548  Shape& test,
1549  DShape& dtestdx) const;
1550 
1555  const unsigned& ipt,
1556  Shape& psi,
1557  DShape& dpsidx,
1558  Shape& test,
1559  DShape& dtestdx) const;
1560 
1565  const unsigned& ipt,
1566  Shape& psi,
1567  DShape& dpsidx,
1568  RankFourTensor<double>& d_dpsidx_dX,
1569  Shape& test,
1570  DShape& dtestdx,
1571  RankFourTensor<double>& d_dtestdx_dX,
1572  DenseMatrix<double>& djacobian_dX) const;
1573 
1575  inline void pshape_axi_nst(const Vector<double>& s, Shape& psi) const;
1576 
1578  inline void pshape_axi_nst(const Vector<double>& s,
1579  Shape& psi,
1580  Shape& test) const;
1581 
1582  public:
1586  {
1587  }
1588 
1591  inline virtual unsigned required_nvalue(const unsigned& n) const
1592  {
1593  return Initial_Nvalue[n];
1594  }
1595 
1597  virtual int p_nodal_index_axi_nst() const
1598  {
1599  return 3;
1600  }
1601 
1604  double p_axi_nst(const unsigned& n_p) const
1605  {
1606  return nodal_value(Pconv[n_p], p_nodal_index_axi_nst());
1607  }
1608 
1610  unsigned npres_axi_nst() const
1611  {
1612  return 4;
1613  }
1614 
1616  void fix_pressure(const unsigned& n_p, const double& pvalue)
1617  {
1618  this->node_pt(Pconv[n_p])->pin(p_nodal_index_axi_nst());
1619  this->node_pt(Pconv[n_p])->set_value(p_nodal_index_axi_nst(), pvalue);
1620  }
1621 
1623  void get_traction(const Vector<double>& s,
1624  const Vector<double>& N,
1625  Vector<double>& traction) const;
1626 
1629  inline int p_local_eqn(const unsigned& n) const
1630  {
1632  }
1633 
1635  void output(std::ostream& outfile)
1636  {
1638  }
1639 
1641  void output(std::ostream& outfile, const unsigned& n_plot)
1642  {
1644  }
1645 
1647  void output(FILE* file_pt)
1648  {
1650  }
1651 
1653  void output(FILE* file_pt, const unsigned& n_plot)
1654  {
1656  }
1657 
1661  unsigned ndof_types() const
1662  {
1663  return 4;
1664  }
1665 
1673  std::list<std::pair<unsigned long, unsigned>>& dof_lookup_list) const;
1674  };
1675 
1676  // Inline functions
1677 
1678  //==========================================================================
1682  //==========================================================================
1685  Shape& psi,
1686  DShape& dpsidx,
1687  Shape& test,
1688  DShape& dtestdx) const
1689  {
1690  // Call the geometrical shape functions and derivatives
1691  double J = this->dshape_eulerian(s, psi, dpsidx);
1692  // Loop over the test functions and derivatives and set them equal to the
1693  // shape functions
1694  for (unsigned i = 0; i < 9; i++)
1695  {
1696  test[i] = psi[i];
1697  dtestdx(i, 0) = dpsidx(i, 0);
1698  dtestdx(i, 1) = dpsidx(i, 1);
1699  }
1700  // Return the jacobian
1701  return J;
1702  }
1703 
1704  //==========================================================================
1708  //==========================================================================
1710  dshape_and_dtest_eulerian_at_knot_axi_nst(const unsigned& ipt,
1711  Shape& psi,
1712  DShape& dpsidx,
1713  Shape& test,
1714  DShape& dtestdx) const
1715  {
1716  // Call the geometrical shape functions and derivatives
1717  double J = this->dshape_eulerian_at_knot(ipt, psi, dpsidx);
1718  // Loop over the test functions and derivatives and set them equal to the
1719  // shape functions
1720  for (unsigned i = 0; i < 9; i++)
1721  {
1722  test[i] = psi[i];
1723  dtestdx(i, 0) = dpsidx(i, 0);
1724  dtestdx(i, 1) = dpsidx(i, 1);
1725  }
1726  // Return the jacobian
1727  return J;
1728  }
1729 
1730  //==========================================================================
1737  //==========================================================================
1740  const unsigned& ipt,
1741  Shape& psi,
1742  DShape& dpsidx,
1743  RankFourTensor<double>& d_dpsidx_dX,
1744  Shape& test,
1745  DShape& dtestdx,
1746  RankFourTensor<double>& d_dtestdx_dX,
1747  DenseMatrix<double>& djacobian_dX) const
1748  {
1749  // Call the geometrical shape functions and derivatives
1750  const double J = this->dshape_eulerian_at_knot(
1751  ipt, psi, dpsidx, djacobian_dX, d_dpsidx_dX);
1752 
1753  // Loop over the test functions and derivatives and set them equal to the
1754  // shape functions
1755  for (unsigned i = 0; i < 9; i++)
1756  {
1757  test[i] = psi[i];
1758 
1759  for (unsigned k = 0; k < 2; k++)
1760  {
1761  dtestdx(i, k) = dpsidx(i, k);
1762 
1763  for (unsigned p = 0; p < 2; p++)
1764  {
1765  for (unsigned q = 0; q < 9; q++)
1766  {
1767  d_dtestdx_dX(p, q, i, k) = d_dpsidx_dX(p, q, i, k);
1768  }
1769  }
1770  }
1771  }
1772 
1773  // Return the jacobian
1774  return J;
1775  }
1776 
1777  //==========================================================================
1779  //==========================================================================
1781  const Vector<double>& s, Shape& psi) const
1782  {
1783  // Local storage
1784  double psi1[2], psi2[2];
1785  // Call the OneDimensional Shape functions
1786  OneDimLagrange::shape<2>(s[0], psi1);
1787  OneDimLagrange::shape<2>(s[1], psi2);
1788 
1789  // Now let's loop over the nodal points in the element
1790  // s1 is the "x" coordinate, s2 the "y"
1791  for (unsigned i = 0; i < 2; i++)
1792  {
1793  for (unsigned j = 0; j < 2; j++)
1794  {
1795  /*Multiply the two 1D functions together to get the 2D function*/
1796  psi[2 * i + j] = psi2[i] * psi1[j];
1797  }
1798  }
1799  }
1800 
1801  //==========================================================================
1803  //==========================================================================
1805  const Vector<double>& s, Shape& psi, Shape& test) const
1806  {
1807  // Call the pressure shape functions
1808  pshape_axi_nst(s, psi);
1809  // Loop over the test functions and set them equal to the shape functions
1810  for (unsigned i = 0; i < 4; i++) test[i] = psi[i];
1811  }
1812 
1813  //=======================================================================
1815  //=======================================================================
1816  template<>
1818  : public virtual QElement<1, 3>
1819  {
1820  public:
1821  FaceGeometry() : QElement<1, 3>() {}
1822  };
1823 
1824  //=======================================================================
1827  //=======================================================================
1828  template<>
1830  : public virtual PointElement
1831  {
1832  public:
1834  };
1835 
1836 
1837  //==========================================================
1839  //==========================================================
1840  template<class TAYLOR_HOOD_ELEMENT>
1842  : public virtual ProjectableElement<TAYLOR_HOOD_ELEMENT>
1843  {
1844  public:
1852  {
1853  // Create the vector
1854  Vector<std::pair<Data*, unsigned>> data_values;
1855 
1856  // Velocities dofs
1857  if (fld < 3)
1858  {
1859  // Loop over all nodes
1860  unsigned nnod = this->nnode();
1861  for (unsigned j = 0; j < nnod; j++)
1862  {
1863  // Add the data value associated with the velocity components
1864  data_values.push_back(std::make_pair(this->node_pt(j), fld));
1865  }
1866  }
1867  // Pressure
1868  else
1869  {
1870  // Loop over all vertex nodes
1871  unsigned Pconv_size = 3;
1872  for (unsigned j = 0; j < Pconv_size; j++)
1873  {
1874  // Add the data value associated with the pressure components
1875  unsigned vertex_index = this->Pconv[j];
1876  data_values.push_back(
1877  std::make_pair(this->node_pt(vertex_index), fld));
1878  }
1879  }
1880 
1881  // Return the vector
1882  return data_values;
1883  }
1884 
1888  {
1889  return 4;
1890  }
1891 
1895  unsigned nhistory_values_for_projection(const unsigned& fld)
1896  {
1897  if (fld == 3)
1898  {
1899  // pressure doesn't have history values
1900  return 1;
1901  }
1902  else
1903  {
1904  return this->node_pt(0)->ntstorage();
1905  }
1906  }
1907 
1910  {
1911  return this->node_pt(0)->position_time_stepper_pt()->ntstorage();
1912  }
1913 
1916  double jacobian_and_shape_of_field(const unsigned& fld,
1917  const Vector<double>& s,
1918  Shape& psi)
1919  {
1920  unsigned n_dim = this->dim();
1921  unsigned n_node = this->nnode();
1922 
1923  if (fld == 3)
1924  {
1925  // We are dealing with the pressure
1926  this->pshape_axi_nst(s, psi);
1927 
1928  Shape psif(n_node), testf(n_node);
1929  DShape dpsifdx(n_node, n_dim), dtestfdx(n_node, n_dim);
1930 
1931  // Domain Shape
1932  double J = this->dshape_and_dtest_eulerian_axi_nst(
1933  s, psif, dpsifdx, testf, dtestfdx);
1934  return J;
1935  }
1936  else
1937  {
1938  Shape testf(n_node);
1939  DShape dpsifdx(n_node, n_dim), dtestfdx(n_node, n_dim);
1940 
1941  // Domain Shape
1942  double J = this->dshape_and_dtest_eulerian_axi_nst(
1943  s, psi, dpsifdx, testf, dtestfdx);
1944  return J;
1945  }
1946  }
1947 
1948 
1951  double get_field(const unsigned& t,
1952  const unsigned& fld,
1953  const Vector<double>& s)
1954  {
1955  unsigned n_node = this->nnode();
1956 
1957  // If fld=3, we deal with the pressure
1958  if (fld == 3)
1959  {
1960  return this->interpolated_p_axi_nst(s);
1961  }
1962  // Velocity
1963  else
1964  {
1965  // Find the index at which the variable is stored
1966  unsigned u_nodal_index = this->u_index_axi_nst(fld);
1967 
1968  // Local shape function
1969  Shape psi(n_node);
1970 
1971  // Find values of shape function
1972  this->shape(s, psi);
1973 
1974  // Initialise value of u
1975  double interpolated_u = 0.0;
1976 
1977  // Sum over the local nodes at that time
1978  for (unsigned l = 0; l < n_node; l++)
1979  {
1980  interpolated_u += this->nodal_value(t, l, u_nodal_index) * psi[l];
1981  }
1982  return interpolated_u;
1983  }
1984  }
1985 
1986 
1988  unsigned nvalue_of_field(const unsigned& fld)
1989  {
1990  if (fld == 3)
1991  {
1992  return this->npres_axi_nst();
1993  }
1994  else
1995  {
1996  return this->nnode();
1997  }
1998  }
1999 
2000 
2002  int local_equation(const unsigned& fld, const unsigned& j)
2003  {
2004  if (fld == 3)
2005  {
2006  return this->p_local_eqn(j);
2007  }
2008  else
2009  {
2010  const unsigned u_nodal_index = this->u_index_axi_nst(fld);
2011  return this->nodal_local_eqn(j, u_nodal_index);
2012  }
2013  }
2014  };
2015 
2016 
2017  //=======================================================================
2020  //=======================================================================
2021  template<class ELEMENT>
2023  : public virtual FaceGeometry<ELEMENT>
2024  {
2025  public:
2026  FaceGeometry() : FaceGeometry<ELEMENT>() {}
2027  };
2028 
2029 
2030  //=======================================================================
2033  //=======================================================================
2034  template<class ELEMENT>
2037  : public virtual FaceGeometry<FaceGeometry<ELEMENT>>
2038  {
2039  public:
2041  };
2042 
2043 
2044  //==========================================================
2046  //==========================================================
2047  template<class CROUZEIX_RAVIART_ELEMENT>
2049  : public virtual ProjectableElement<CROUZEIX_RAVIART_ELEMENT>
2050  {
2051  public:
2059  {
2060  // Create the vector
2061  Vector<std::pair<Data*, unsigned>> data_values;
2062 
2063  // Velocities dofs
2064  if (fld < 3)
2065  {
2066  // Loop over all nodes
2067  const unsigned n_node = this->nnode();
2068  for (unsigned n = 0; n < n_node; n++)
2069  {
2070  // Add the data value associated with the velocity components
2071  data_values.push_back(std::make_pair(this->node_pt(n), fld));
2072  }
2073  }
2074  // Pressure
2075  else
2076  {
2077  // Need to push back the internal data
2078  const unsigned n_press = this->npres_axi_nst();
2079  // Loop over all pressure values
2080  for (unsigned j = 0; j < n_press; j++)
2081  {
2082  data_values.push_back(std::make_pair(
2083  this->internal_data_pt(this->P_axi_nst_internal_index), j));
2084  }
2085  }
2086 
2087  // Return the vector
2088  return data_values;
2089  }
2090 
2094  {
2095  return 4;
2096  }
2097 
2101  unsigned nhistory_values_for_projection(const unsigned& fld)
2102  {
2103  if (fld == 3)
2104  {
2105  // pressure doesn't have history values
2106  return 1;
2107  }
2108  else
2109  {
2110  return this->node_pt(0)->ntstorage();
2111  }
2112  }
2113 
2116  {
2117  return this->node_pt(0)->position_time_stepper_pt()->ntstorage();
2118  }
2119 
2122  double jacobian_and_shape_of_field(const unsigned& fld,
2123  const Vector<double>& s,
2124  Shape& psi)
2125  {
2126  unsigned n_dim = this->dim();
2127  unsigned n_node = this->nnode();
2128 
2129  if (fld == 3)
2130  {
2131  // We are dealing with the pressure
2132  this->pshape_axi_nst(s, psi);
2133 
2134  Shape psif(n_node), testf(n_node);
2135  DShape dpsifdx(n_node, n_dim), dtestfdx(n_node, n_dim);
2136 
2137  // Domain Shape
2138  double J = this->dshape_and_dtest_eulerian_axi_nst(
2139  s, psif, dpsifdx, testf, dtestfdx);
2140  return J;
2141  }
2142  else
2143  {
2144  Shape testf(n_node);
2145  DShape dpsifdx(n_node, n_dim), dtestfdx(n_node, n_dim);
2146 
2147  // Domain Shape
2148  double J = this->dshape_and_dtest_eulerian_axi_nst(
2149  s, psi, dpsifdx, testf, dtestfdx);
2150  return J;
2151  }
2152  }
2153 
2154 
2157  double get_field(const unsigned& t,
2158  const unsigned& fld,
2159  const Vector<double>& s)
2160  {
2161  // unsigned n_dim =this->dim();
2162  // unsigned n_node=this->nnode();
2163 
2164  // If fld=n_dim, we deal with the pressure
2165  if (fld == 3)
2166  {
2167  return this->interpolated_p_axi_nst(s);
2168  }
2169  // Velocity
2170  else
2171  {
2172  return this->interpolated_u_axi_nst(t, s, fld);
2173  }
2174  }
2175 
2176 
2178  unsigned nvalue_of_field(const unsigned& fld)
2179  {
2180  if (fld == 3)
2181  {
2182  return this->npres_axi_nst();
2183  }
2184  else
2185  {
2186  return this->nnode();
2187  }
2188  }
2189 
2190 
2192  int local_equation(const unsigned& fld, const unsigned& j)
2193  {
2194  if (fld == 3)
2195  {
2196  return this->p_local_eqn(j);
2197  }
2198  else
2199  {
2200  const unsigned u_nodal_index = this->u_index_axi_nst(fld);
2201  return this->nodal_local_eqn(j, u_nodal_index);
2202  }
2203  }
2204  };
2205 
2206  //=======================================================================
2208  //=======================================================================
2210  : public virtual AxisymmetricQTaylorHoodElement,
2211  public virtual FSIFluidElement
2212  {
2213  public:
2216 
2225  std::set<std::pair<Data*, unsigned>>& paired_load_data)
2226  {
2227  // We're in 3D!
2228  unsigned DIM = 3;
2229 
2230  // Find the index at which the velocity is stored
2231  unsigned u_index[DIM];
2232  for (unsigned i = 0; i < DIM; i++)
2233  {
2234  u_index[i] = this->u_index_nst(i);
2235  }
2236 
2237  // Loop over the nodes
2238  unsigned n_node = this->nnode();
2239  for (unsigned n = 0; n < n_node; n++)
2240  {
2241  // Loop over the velocity components and add pointer to their data
2242  // and indices to the vectors
2243  for (unsigned i = 0; i < DIM; i++)
2244  {
2245  paired_load_data.insert(std::make_pair(this->node_pt(n), u_index[i]));
2246  }
2247  }
2248 
2249  // Identify the pressure data
2250  this->identify_pressure_data(paired_load_data);
2251  };
2252 
2253 
2262  std::set<std::pair<Data*, unsigned>>& paired_pressure_data)
2263  {
2264  // Find the index at which the pressure is stored
2265  unsigned p_index = static_cast<unsigned>(this->p_nodal_index_axi_nst());
2266 
2267  // Loop over the pressure data
2268  unsigned n_pres = npres_axi_nst();
2269  for (unsigned l = 0; l < n_pres; l++)
2270  {
2271  // The DIMth entry in each nodal data is the pressure, which
2272  // affects the traction
2273  paired_pressure_data.insert(
2274  std::make_pair(this->node_pt(Pconv[l]), p_index));
2275  }
2276  }
2277 
2278 
2283  const Vector<double>& N,
2285  {
2286  get_traction(s, N, load);
2287  }
2288  };
2289 
2290 
2291  //=======================================================================
2293  //=======================================================================
2294  template<>
2296  : public virtual QElement<1, 3>
2297  {
2298  public:
2299  FaceGeometry() : QElement<1, 3>() {}
2300  };
2301 
2302  //=======================================================================
2305  //=======================================================================
2306  template<>
2308  : public virtual PointElement
2309  {
2310  public:
2312  };
2313 
2314 
2315  //=======================================================================
2318  //=======================================================================
2319  template<class ELEMENT>
2321  : public virtual FaceGeometry<ELEMENT>
2322  {
2323  public:
2324  FaceGeometry() : FaceGeometry<ELEMENT>() {}
2325  };
2326 
2327 
2328  //=======================================================================
2331  //=======================================================================
2332  template<class ELEMENT>
2335  : public virtual FaceGeometry<FaceGeometry<ELEMENT>>
2336  {
2337  public:
2339  };
2340 
2341 
2342 } // namespace oomph
2343 
2344 #endif
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
JacobiRotation< float > J
Definition: Jacobi_makeJacobi.cpp:3
int data[]
Definition: Map_placement_new.cpp:1
RowVector3d w
Definition: Matrix_resize_int.cpp:3
void load(Archive &ar, ParticleHandler &handl)
Definition: Particles.h:21
float * p
Definition: Tutorial_Map_using.cpp:9
Definition: axisym_navier_stokes_elements.h:115
double dissipation() const
Return integral of dissipation over element.
Definition: axisym_navier_stokes_elements.cc:594
void point_output_data(const Vector< double > &s, Vector< double > &data)
Definition: axisym_navier_stokes_elements.h:694
static Vector< double > Default_Gravity_vector
Static default value for the gravity vector.
Definition: axisym_navier_stokes_elements.h:130
double pressure_integral() const
Integral of pressure over element.
Definition: axisym_navier_stokes_elements.cc:869
void traction(const Vector< double > &s, const Vector< double > &N, Vector< double > &traction) const
Definition: axisym_navier_stokes_elements.cc:649
unsigned nscalar_paraview() const
Definition: axisym_navier_stokes_elements.h:619
unsigned u_index_nst(const unsigned &i) const
Definition: axisym_navier_stokes_elements.h:516
double(* Source_fct_pt)(const double &time, const Vector< double > &x)
Pointer to volumetric source function.
Definition: axisym_navier_stokes_elements.h:168
virtual void pshape_axi_nst(const Vector< double > &s, Shape &psi, Shape &test) const =0
virtual void fill_in_generic_dresidual_contribution_axi_nst(double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam, unsigned flag)
Definition: axisym_navier_stokes_elements.cc:2510
Vector< double > * G_pt
Pointer to global gravity Vector.
Definition: axisym_navier_stokes_elements.h:160
double interpolated_duds_axi_nst(const Vector< double > &s, const unsigned &i, const unsigned &j) const
Definition: axisym_navier_stokes_elements.h:1023
double interpolated_dudx_axi_nst(const Vector< double > &s, const unsigned &i, const unsigned &j) const
Definition: axisym_navier_stokes_elements.h:1055
const double & density_ratio() const
Definition: axisym_navier_stokes_elements.h:459
void fill_in_contribution_to_hessian_vector_products(Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
Definition: axisym_navier_stokes_elements.cc:3239
void scalar_value_paraview(std::ofstream &file_out, const unsigned &i, const unsigned &nplot) const
Definition: axisym_navier_stokes_elements.h:626
virtual double dshape_and_dtest_eulerian_at_knot_axi_nst(const unsigned &ipt, Shape &psi, DShape &dpsidx, RankFourTensor< double > &d_dpsidx_dX, Shape &test, DShape &dtestdx, RankFourTensor< double > &d_dtestdx_dX, DenseMatrix< double > &djacobian_dX) const =0
double * ReInvFr_pt
Definition: axisym_navier_stokes_elements.h:153
const double & re_invro() const
Global Reynolds number multiplied by inverse Rossby number.
Definition: axisym_navier_stokes_elements.h:434
double compute_physical_size() const
Compute the volume of the element.
Definition: axisym_navier_stokes_elements.h:1172
void output_veloc(std::ostream &outfile, const unsigned &nplot, const unsigned &t)
Definition: axisym_navier_stokes_elements.cc:422
virtual double p_axi_nst(const unsigned &n_p) const =0
double interpolated_u_axi_nst(const Vector< double > &s, const unsigned &i) const
Return FE interpolated velocity u[i] at local coordinate s.
Definition: axisym_navier_stokes_elements.h:890
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Compute the element's residual Vector.
Definition: axisym_navier_stokes_elements.h:780
double *& re_invro_pt()
Pointer to global inverse Froude number.
Definition: axisym_navier_stokes_elements.h:440
std::string scalar_name_paraview(const unsigned &i) const
Definition: axisym_navier_stokes_elements.h:667
void output_fct(std::ostream &outfile, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Definition: axisym_navier_stokes_elements.cc:310
virtual int p_nodal_index_axi_nst() const
Which nodal value represents the pressure?
Definition: axisym_navier_stokes_elements.h:579
double interpolated_u_axi_nst(const unsigned &t, const Vector< double > &s, const unsigned &i) const
Return FE interpolated velocity u[i] at local coordinate s.
Definition: axisym_navier_stokes_elements.h:917
const double & viscosity_ratio() const
Definition: axisym_navier_stokes_elements.h:472
const Vector< double > & g() const
Vector of gravitational components.
Definition: axisym_navier_stokes_elements.h:446
const double & re() const
Reynolds number.
Definition: axisym_navier_stokes_elements.h:398
double *& density_ratio_pt()
Pointer to Density ratio.
Definition: axisym_navier_stokes_elements.h:465
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: axisym_navier_stokes_elements.h:793
void output(FILE *file_pt)
Definition: axisym_navier_stokes_elements.h:728
double * Re_pt
Pointer to global Reynolds number.
Definition: axisym_navier_stokes_elements.h:146
virtual void pshape_axi_nst(const Vector< double > &s, Shape &psi) const =0
Compute the pressure shape functions at local coordinate s.
AxisymmetricNavierStokesEquations()
Constructor: NULL the body force and source function.
Definition: axisym_navier_stokes_elements.h:375
double *& re_pt()
Pointer to Reynolds number.
Definition: axisym_navier_stokes_elements.h:410
virtual void get_viscosity_ratio_axisym_nst(const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, double &visc_ratio)
Definition: axisym_navier_stokes_elements.h:339
double interpolated_d_dudx_dX_axi_nst(const Vector< double > &s, const unsigned &p, const unsigned &q, const unsigned &i, const unsigned &k) const
Definition: axisym_navier_stokes_elements.h:1114
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
double *& re_st_pt()
Pointer to product of Reynolds and Strouhal number (=Womersley number)
Definition: axisym_navier_stokes_elements.h:416
double * ReSt_pt
Pointer to global Reynolds number x Strouhal number (=Womersley)
Definition: axisym_navier_stokes_elements.h:149
void disable_ALE()
Definition: axisym_navier_stokes_elements.h:560
virtual double dshape_and_dtest_eulerian_at_knot_axi_nst(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
void(*&)(const double &time, const Vector< double > &x, Vector< double > &f) axi_nst_body_force_fct_pt()
Access function for the body-force pointer.
Definition: axisym_navier_stokes_elements.h:484
double get_source_fct(const double &time, const unsigned &ipt, const Vector< double > &x)
Calculate the source fct at given time and Eulerian position.
Definition: axisym_navier_stokes_elements.h:286
double * Density_Ratio_pt
Definition: axisym_navier_stokes_elements.h:141
static int Pressure_not_stored_at_node
Definition: axisym_navier_stokes_elements.h:119
double du_dt_axi_nst(const unsigned &n, const unsigned &i) const
Definition: axisym_navier_stokes_elements.h:531
static double Default_Physical_Ratio_Value
Definition: axisym_navier_stokes_elements.h:127
double kin_energy() const
Get integral of kinetic energy over element.
Definition: axisym_navier_stokes_elements.cc:821
void compute_error(std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
Definition: axisym_navier_stokes_elements.cc:155
double *& re_invfr_pt()
Pointer to global inverse Froude number.
Definition: axisym_navier_stokes_elements.h:428
void(* Body_force_fct_pt)(const double &time, const Vector< double > &x, Vector< double > &result)
Pointer to body force function.
Definition: axisym_navier_stokes_elements.h:163
virtual unsigned npres_axi_nst() const =0
Function to return number of pressure degrees of freedom.
double *& viscosity_ratio_pt()
Pointer to Viscosity Ratio.
Definition: axisym_navier_stokes_elements.h:478
virtual double dshape_and_dtest_eulerian_axi_nst(const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
static double Default_Physical_Constant_Value
Navier–Stokes equations static data.
Definition: axisym_navier_stokes_elements.h:123
double interpolated_dudt_axi_nst(const Vector< double > &s, const unsigned &i) const
Definition: axisym_navier_stokes_elements.h:1087
double(*&)(const double &time, const Vector< double > &x) source_fct_pt()
Access function for the source-function pointer.
Definition: axisym_navier_stokes_elements.h:492
bool ALE_is_disabled
Definition: axisym_navier_stokes_elements.h:173
virtual void fill_in_generic_residual_contribution_axi_nst(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix, unsigned flag)
Definition: axisym_navier_stokes_elements.cc:914
virtual void get_source_fct_gradient(const double &time, const unsigned &ipt, const Vector< double > &x, Vector< double > &gradient)
Definition: axisym_navier_stokes_elements.h:305
unsigned n_u_nst() const
Definition: axisym_navier_stokes_elements.h:523
void fill_in_contribution_to_dresiduals_dparameter(double *const &parameter_pt, Vector< double > &dres_dparam)
Compute the element's residual Vector.
Definition: axisym_navier_stokes_elements.h:821
void fill_in_contribution_to_djacobian_and_dmass_matrix_dparameter(double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam, DenseMatrix< double > &dmass_matrix_dparam)
Definition: axisym_navier_stokes_elements.h:852
const double & re_st() const
Product of Reynolds and Strouhal number (=Womersley number)
Definition: axisym_navier_stokes_elements.h:404
const double & re_invfr() const
Global inverse Froude number.
Definition: axisym_navier_stokes_elements.h:422
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
virtual void get_body_force_gradient_axi_nst(const double &time, const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, DenseMatrix< double > &d_body_force_dx)
Definition: axisym_navier_stokes_elements.h:247
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Definition: axisym_navier_stokes_elements.h:803
double * ReInvRo_pt
Definition: axisym_navier_stokes_elements.h:157
void get_pressure_and_velocity_mass_matrix_diagonal(Vector< double > &press_mass_diag, Vector< double > &veloc_mass_diag, const unsigned &which_one=0)
Definition: axisym_navier_stokes_elements.cc:63
virtual void dinterpolated_u_axi_nst_ddata(const Vector< double > &s, const unsigned &i, Vector< double > &du_ddata, Vector< unsigned > &global_eqn_number)
Definition: axisym_navier_stokes_elements.h:948
void enable_ALE()
Definition: axisym_navier_stokes_elements.h:569
void strain_rate(const Vector< double > &s, DenseMatrix< double > &strain_rate) const
Strain-rate tensor: where (in that order)
Definition: axisym_navier_stokes_elements.cc:725
virtual int p_local_eqn(const unsigned &n) const =0
void fill_in_contribution_to_djacobian_dparameter(double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
Definition: axisym_navier_stokes_elements.h:836
virtual void get_body_force_axi_nst(const double &time, const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &result)
Calculate the body force fct at a given time and Eulerian position.
Definition: axisym_navier_stokes_elements.h:222
double * Viscosity_Ratio_pt
Definition: axisym_navier_stokes_elements.h:137
virtual void get_dresidual_dnodal_coordinates(RankThreeTensor< double > &dresidual_dnodal_coordinates)
Definition: axisym_navier_stokes_elements.cc:1567
Vector< double > *& g_pt()
Pointer to Vector of gravitational components.
Definition: axisym_navier_stokes_elements.h:452
virtual unsigned u_index_axi_nst(const unsigned &i) const
Definition: axisym_navier_stokes_elements.h:506
void output(std::ostream &outfile)
Definition: axisym_navier_stokes_elements.h:715
static Vector< double > Gamma
Vector to decide whether the stress-divergence form is used or not.
Definition: axisym_navier_stokes_elements.h:393
Definition: axisym_navier_stokes_elements.h:1234
void get_dof_numbers_for_unknowns(std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
Definition: axisym_navier_stokes_elements.cc:3639
void output(FILE *file_pt, const unsigned &n_plot)
Redirect output to NavierStokesEquations output.
Definition: axisym_navier_stokes_elements.h:1352
void get_traction(const Vector< double > &s, const Vector< double > &N, Vector< double > &traction) const
Compute traction at local coordinate s for outer unit normal N.
Definition: axisym_navier_stokes_elements.cc:3720
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
void fix_pressure(const unsigned &p_dof, const double &pvalue)
Function to fix the internal pressure dof idof_internal.
Definition: axisym_navier_stokes_elements.h:1314
void pshape_axi_nst(const Vector< double > &s, Shape &psi) const
Pressure shape functions at local coordinate s.
Definition: axisym_navier_stokes_elements.h:1478
unsigned ndof_types() const
Definition: axisym_navier_stokes_elements.h:1359
void output(FILE *file_pt)
Redirect output to NavierStokesEquations output.
Definition: axisym_navier_stokes_elements.h:1346
unsigned P_axi_nst_internal_index
Definition: axisym_navier_stokes_elements.h:1242
unsigned npres_axi_nst() const
Return number of pressure values.
Definition: axisym_navier_stokes_elements.h:1308
AxisymmetricQCrouzeixRaviartElement()
Constructor, there are three internal values (for the pressure)
Definition: axisym_navier_stokes_elements.h:1288
static const unsigned Initial_Nvalue[]
Static array of ints to hold required number of variables at nodes.
Definition: axisym_navier_stokes_elements.h:1237
double p_axi_nst(const unsigned &i) const
Definition: axisym_navier_stokes_elements.h:1302
double dshape_and_dtest_eulerian_axi_nst(const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Definition: axisym_navier_stokes_elements.h:1382
int p_local_eqn(const unsigned &n) const
Definition: axisym_navier_stokes_elements.h:1327
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
void output(std::ostream &outfile)
Redirect output to NavierStokesEquations output.
Definition: axisym_navier_stokes_elements.h:1333
void output(std::ostream &outfile, const unsigned &n_plot)
Redirect output to NavierStokesEquations output.
Definition: axisym_navier_stokes_elements.h:1339
Definition: axisym_navier_stokes_elements.h:1532
void fix_pressure(const unsigned &n_p, const double &pvalue)
Fix the pressure at local pressure node n_p.
Definition: axisym_navier_stokes_elements.h:1616
virtual int p_nodal_index_axi_nst() const
Which nodal value represents the pressure?
Definition: axisym_navier_stokes_elements.h:1597
static const unsigned Pconv[]
Definition: axisym_navier_stokes_elements.h:1540
double dshape_and_dtest_eulerian_axi_nst(const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Definition: axisym_navier_stokes_elements.h:1684
void output(FILE *file_pt, const unsigned &n_plot)
Redirect output to NavierStokesEquations output.
Definition: axisym_navier_stokes_elements.h:1653
int p_local_eqn(const unsigned &n) const
Definition: axisym_navier_stokes_elements.h:1629
unsigned npres_axi_nst() const
Return number of pressure values.
Definition: axisym_navier_stokes_elements.h:1610
void get_dof_numbers_for_unknowns(std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
Definition: axisym_navier_stokes_elements.cc:3741
void output(std::ostream &outfile, const unsigned &n_plot)
Redirect output to NavierStokesEquations output.
Definition: axisym_navier_stokes_elements.h:1641
virtual unsigned required_nvalue(const unsigned &n) const
Definition: axisym_navier_stokes_elements.h:1591
void output(FILE *file_pt)
Redirect output to NavierStokesEquations output.
Definition: axisym_navier_stokes_elements.h:1647
unsigned ndof_types() const
Definition: axisym_navier_stokes_elements.h:1661
void output(std::ostream &outfile)
Redirect output to NavierStokesEquations output.
Definition: axisym_navier_stokes_elements.h:1635
void pshape_axi_nst(const Vector< double > &s, Shape &psi) const
Pressure shape functions at local coordinate s.
Definition: axisym_navier_stokes_elements.h:1780
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:1710
void get_traction(const Vector< double > &s, const Vector< double > &N, Vector< double > &traction) const
Compute traction at local coordinate s for outer unit normal N.
Definition: axisym_navier_stokes_elements.cc:3794
AxisymmetricQTaylorHoodElement()
Constructor, no internal data points.
Definition: axisym_navier_stokes_elements.h:1584
static const unsigned Initial_Nvalue[]
Static array of ints to hold number of variables at node.
Definition: axisym_navier_stokes_elements.h:1535
double p_axi_nst(const unsigned &n_p) const
Definition: axisym_navier_stokes_elements.h:1604
Definition: shape.h:278
Definition: nodes.h:86
long & eqn_number(const unsigned &i)
Return the equation number of the i-th stored variable.
Definition: nodes.h:367
void pin(const unsigned &i)
Pin the i-th stored variable.
Definition: nodes.h:385
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
Definition: nodes.h:238
void set_value(const unsigned &i, const double &value_)
Definition: nodes.h:271
double value(const unsigned &i) const
Definition: nodes.h:293
unsigned ntstorage() const
Definition: nodes.cc:879
Axisymmetric FSI Element.
Definition: axisym_navier_stokes_elements.h:2212
FSIAxisymmetricQTaylorHoodElement()
Constructor.
Definition: axisym_navier_stokes_elements.h:2215
void identify_load_data(std::set< std::pair< Data *, unsigned >> &paired_load_data)
Definition: axisym_navier_stokes_elements.h:2224
void get_load(const Vector< double > &s, const Vector< double > &N, Vector< double > &load)
Definition: axisym_navier_stokes_elements.h:2282
void identify_pressure_data(std::set< std::pair< Data *, unsigned >> &paired_pressure_data)
Definition: axisym_navier_stokes_elements.h:2261
Definition: fsi.h:63
FaceGeometry()
Definition: axisym_navier_stokes_elements.h:1505
FaceGeometry()
Definition: axisym_navier_stokes_elements.h:1821
FaceGeometry()
Definition: axisym_navier_stokes_elements.h:2299
FaceGeometry()
Definition: axisym_navier_stokes_elements.h:1517
FaceGeometry()
Definition: axisym_navier_stokes_elements.h:1833
FaceGeometry()
Definition: axisym_navier_stokes_elements.h:2311
FaceGeometry()
Definition: axisym_navier_stokes_elements.h:2324
FaceGeometry()
Definition: axisym_navier_stokes_elements.h:2026
Definition: elements.h:4998
Definition: elements.h:1313
virtual unsigned nplot_points_paraview(const unsigned &nplot) const
Definition: elements.h:2862
virtual void d_dshape_eulerian_dnodal_coordinates(const double &det_jacobian, const DenseMatrix< double > &jacobian, const DenseMatrix< double > &djacobian_dX, const DenseMatrix< double > &inverse_jacobian, const DShape &dpsids, RankFourTensor< double > &d_dpsidx_dX) const
Definition: elements.cc:2749
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 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
virtual void dJ_eulerian_dnodal_coordinates(const DenseMatrix< double > &jacobian, const DShape &dpsids, DenseMatrix< double > &djacobian_dX) const
Definition: elements.cc:2669
virtual void shape(const Vector< double > &s, Shape &psi) const =0
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Definition: elements.h:1432
unsigned dim() const
Definition: elements.h:2611
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
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
virtual void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &shifted_to_interior=false) const
Definition: elements.h:3148
virtual double local_to_eulerian_mapping(const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Definition: elements.h:1508
virtual double dshape_eulerian_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsidx) const
Definition: elements.cc:3325
virtual void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Definition: elements.h:1981
unsigned nodal_dimension() const
Return the required Eulerian dimension of the nodes in this element.
Definition: elements.h:2484
void(* UnsteadyExactSolutionFctPt)(const double &, const Vector< double > &, Vector< double > &)
Definition: elements.h:1765
double dshape_eulerian(const Vector< double > &s, Shape &psi, DShape &dpsidx) const
Definition: elements.cc:3298
virtual double J_eulerian(const Vector< double > &s) const
Definition: elements.cc:4103
static double Default_fd_jacobian_step
Definition: elements.h:1198
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
Definition: elements.h:622
int internal_local_eqn(const unsigned &i, const unsigned &j) const
Definition: elements.h:267
static DenseMatrix< double > Dummy_matrix
Definition: elements.h:227
unsigned add_internal_data(Data *const &data_pt, const bool &fd=true)
Definition: elements.cc:62
TimeStepper *& time_stepper_pt()
Definition: geom_objects.h:192
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
Definition: matrices.h:74
TimeStepper *& position_time_stepper_pt()
Return a pointer to the position timestepper.
Definition: nodes.h:1022
Definition: oomph_definitions.h:222
Definition: elements.h:3439
Crouzeix Raviart upgraded to become projectable.
Definition: axisym_navier_stokes_elements.h:2050
unsigned nvalue_of_field(const unsigned &fld)
Return number of values in field fld.
Definition: axisym_navier_stokes_elements.h:2178
double get_field(const unsigned &t, const unsigned &fld, const Vector< double > &s)
Definition: axisym_navier_stokes_elements.h:2157
unsigned nhistory_values_for_coordinate_projection()
Number of positional history values (includes current value!)
Definition: axisym_navier_stokes_elements.h:2115
Vector< std::pair< Data *, unsigned > > data_values_of_field(const unsigned &fld)
Definition: axisym_navier_stokes_elements.h:2058
unsigned nhistory_values_for_projection(const unsigned &fld)
Definition: axisym_navier_stokes_elements.h:2101
unsigned nfields_for_projection()
Definition: axisym_navier_stokes_elements.h:2093
double jacobian_and_shape_of_field(const unsigned &fld, const Vector< double > &s, Shape &psi)
Definition: axisym_navier_stokes_elements.h:2122
int local_equation(const unsigned &fld, const unsigned &j)
Return local equation number of value j in field fld.
Definition: axisym_navier_stokes_elements.h:2192
Axisymmetric Taylor Hood upgraded to become projectable.
Definition: axisym_navier_stokes_elements.h:1843
double jacobian_and_shape_of_field(const unsigned &fld, const Vector< double > &s, Shape &psi)
Definition: axisym_navier_stokes_elements.h:1916
unsigned nvalue_of_field(const unsigned &fld)
Return number of values in field fld.
Definition: axisym_navier_stokes_elements.h:1988
int local_equation(const unsigned &fld, const unsigned &j)
Return local equation number of value j in field fld.
Definition: axisym_navier_stokes_elements.h:2002
unsigned nfields_for_projection()
Definition: axisym_navier_stokes_elements.h:1887
double get_field(const unsigned &t, const unsigned &fld, const Vector< double > &s)
Definition: axisym_navier_stokes_elements.h:1951
unsigned nhistory_values_for_coordinate_projection()
Number of positional history values (includes current value!)
Definition: axisym_navier_stokes_elements.h:1909
Vector< std::pair< Data *, unsigned > > data_values_of_field(const unsigned &fld)
Definition: axisym_navier_stokes_elements.h:1851
unsigned nhistory_values_for_projection(const unsigned &fld)
Definition: axisym_navier_stokes_elements.h:1895
Definition: projection.h:183
Definition: Qelements.h:459
A Rank 4 Tensor class.
Definition: matrices.h:1701
A Rank 3 Tensor class.
Definition: matrices.h:1370
Definition: shape.h:76
Definition: timesteppers.h:231
unsigned ntstorage() const
Definition: timesteppers.h:601
virtual double weight(const unsigned &i, const unsigned &j) const
Access function for j-th weight for the i-th derivative.
Definition: timesteppers.h:594
bool is_steady() const
Definition: timesteppers.h:389
@ N
Definition: constructor.cpp:22
static int f(const TensorMap< Tensor< int, 3 > > &tensor)
Definition: cxx11_tensor_map.cpp:237
RealScalar s
Definition: level1_cplx_impl.h:130
char char char int int * k
Definition: level2_impl.h:374
#define DIM
Definition: linearised_navier_stokes_elements.h:44
EIGEN_DEVICE_FUNC const Scalar & q
Definition: SpecialFunctionsImpl.h:2019
void body_force(const double &time, const Vector< double > &x, Vector< double > &result)
Definition: axisym_linear_elasticity/cylinder/cylinder.cc:96
void source(const Vector< double > &x, Vector< double > &f)
Source function.
Definition: unstructured_two_d_circle.cc:46
int error
Definition: calibrate.py:297
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
const double Pi
50 digits from maple
Definition: oomph_utilities.h:157
void shape< 2 >(const double &s, double *Psi)
1D shape functions specialised to linear order (2 Nodes)
Definition: shape.h:608
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
Definition: indexed_view.cpp:20
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
void product(const MatrixType &m)
Definition: product.h:42
void set(Container &c, Position position, const Value &value)
Definition: stdlist_overload.cpp:36
const char Y
Definition: test/EulerAngles.cpp:32
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2