generalised_newtonian_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_GENERALISED_NEWTONIAN_AXISYMMETRIC_NAVIER_STOKES_ELEMENTS_HEADER
29 #define OOMPH_GENERALISED_NEWTONIAN_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.h"
38 
39 #include "../generic/Qelements.h"
40 #include "../generic/fsi.h"
41 #include "../generic/projection.h"
42 #include "../generic/generalised_newtonian_constitutive_models.h"
43 
44 namespace oomph
45 {
46  //======================================================================
115  //======================================================================
117  : public virtual FiniteElement,
119  {
120  private:
124 
128 
132 
135 
136  protected:
140 
141  // Physical constants
142 
146 
150 
151  // Pointers to global physical constants
152 
154  double* Re_pt;
155 
157  double* ReSt_pt;
158 
161  double* ReInvFr_pt;
162 
165  double* ReInvRo_pt;
166 
169 
171  void (*Body_force_fct_pt)(const double& time,
172  const Vector<double>& x,
173  Vector<double>& result);
174 
176  double (*Source_fct_pt)(const double& time, const Vector<double>& x);
177 
180 
181  // Boolean that indicates whether we use the extrapolated strain rate
182  // for calculation of viscosity or not
184 
189 
193  virtual int p_local_eqn(const unsigned& n) const = 0;
194 
199  Shape& psi,
200  DShape& dpsidx,
201  Shape& test,
202  DShape& dtestdx) const = 0;
203 
208  const unsigned& ipt,
209  Shape& psi,
210  DShape& dpsidx,
211  Shape& test,
212  DShape& dtestdx) const = 0;
213 
218  const unsigned& ipt,
219  Shape& psi,
220  DShape& dpsidx,
221  RankFourTensor<double>& d_dpsidx_dX,
222  Shape& test,
223  DShape& dtestdx,
224  RankFourTensor<double>& d_dtestdx_dX,
225  DenseMatrix<double>& djacobian_dX) const = 0;
226 
228  virtual void pshape_axi_nst(const Vector<double>& s, Shape& psi) const = 0;
229 
232  virtual void pshape_axi_nst(const Vector<double>& s,
233  Shape& psi,
234  Shape& test) const = 0;
235 
237  virtual void get_body_force_axi_nst(const double& time,
238  const unsigned& ipt,
239  const Vector<double>& s,
240  const Vector<double>& x,
241  Vector<double>& result)
242  {
243  // If the function pointer is zero return zero
244  if (Body_force_fct_pt == 0)
245  {
246  // Loop over dimensions and set body forces to zero
247  for (unsigned i = 0; i < 3; i++)
248  {
249  result[i] = 0.0;
250  }
251  }
252  // Otherwise call the function
253  else
254  {
255  (*Body_force_fct_pt)(time, x, result);
256  }
257  }
258 
262  inline virtual void get_body_force_gradient_axi_nst(
263  const double& time,
264  const unsigned& ipt,
265  const Vector<double>& s,
266  const Vector<double>& x,
267  DenseMatrix<double>& d_body_force_dx)
268  {
269  // hierher: Implement function pointer version
270  /* //If no gradient function has been set, FD it */
271  /* if(Body_force_fct_gradient_pt==0) */
272  {
273  // Reference value
274  Vector<double> body_force(3, 0.0);
275  get_body_force_axi_nst(time, ipt, s, x, body_force);
276 
277  // FD it
278  const double eps_fd = GeneralisedElement::Default_fd_jacobian_step;
279  Vector<double> body_force_pls(3, 0.0);
280  Vector<double> x_pls(x);
281  for (unsigned i = 0; i < 2; i++)
282  {
283  x_pls[i] += eps_fd;
284  get_body_force_axi_nst(time, ipt, s, x_pls, body_force_pls);
285  for (unsigned j = 0; j < 3; j++)
286  {
287  d_body_force_dx(j, i) =
288  (body_force_pls[j] - body_force[j]) / eps_fd;
289  }
290  x_pls[i] = x[i];
291  }
292  }
293  /* else */
294  /* { */
295  /* // Get gradient */
296  /* (*Source_fct_gradient_pt)(time,x,gradient); */
297  /* } */
298  }
299 
301  double get_source_fct(const double& time,
302  const unsigned& ipt,
303  const Vector<double>& x)
304  {
305  // If the function pointer is zero return zero
306  if (Source_fct_pt == 0)
307  {
308  return 0;
309  }
310 
311  // Otherwise call the function
312  else
313  {
314  return (*Source_fct_pt)(time, x);
315  }
316  }
317 
320  inline virtual void get_source_fct_gradient(const double& time,
321  const unsigned& ipt,
322  const Vector<double>& x,
323  Vector<double>& gradient)
324  {
325  // hierher: Implement function pointer version
326  /* //If no gradient function has been set, FD it */
327  /* if(Source_fct_gradient_pt==0) */
328  {
329  // Reference value
330  const double source = get_source_fct(time, ipt, x);
331 
332  // FD it
333  const double eps_fd = GeneralisedElement::Default_fd_jacobian_step;
334  double source_pls = 0.0;
335  Vector<double> x_pls(x);
336  for (unsigned i = 0; i < 2; i++)
337  {
338  x_pls[i] += eps_fd;
339  source_pls = get_source_fct(time, ipt, x_pls);
340  gradient[i] = (source_pls - source) / eps_fd;
341  x_pls[i] = x[i];
342  }
343  }
344  /* else */
345  /* { */
346  /* // Get gradient */
347  /* (*Source_fct_gradient_pt)(time,x,gradient); */
348  /* } */
349  }
350 
357  virtual void get_viscosity_ratio_axisym_nst(const unsigned& ipt,
358  const Vector<double>& s,
359  const Vector<double>& x,
360  double& visc_ratio)
361  {
362  visc_ratio = *Viscosity_Ratio_pt;
363  }
364 
369  Vector<double>& residuals,
370  DenseMatrix<double>& jacobian,
371  DenseMatrix<double>& mass_matrix,
372  unsigned flag);
373 
378  double* const& parameter_pt,
379  Vector<double>& dres_dparam,
380  DenseMatrix<double>& djac_dparam,
381  DenseMatrix<double>& dmass_matrix_dparam,
382  unsigned flag);
383 
387  Vector<double> const& Y,
388  DenseMatrix<double> const& C,
390 
391  public:
394  : Body_force_fct_pt(0),
395  Source_fct_pt(0),
398  ALE_is_disabled(false)
399  {
400  // Set all the Physical parameter pointers to the default value zero
406  // Set the Physical ratios to the default value of 1
409  }
410 
412  // N.B. This needs to be public so that the intel compiler gets things
413  // correct somehow the access function messes things up when going to
414  // refineable navier--stokes
416 
417  // Access functions for the physical constants
418 
420  const double& re() const
421  {
422  return *Re_pt;
423  }
424 
426  const double& re_st() const
427  {
428  return *ReSt_pt;
429  }
430 
432  double*& re_pt()
433  {
434  return Re_pt;
435  }
436 
438  double*& re_st_pt()
439  {
440  return ReSt_pt;
441  }
442 
444  const double& re_invfr() const
445  {
446  return *ReInvFr_pt;
447  }
448 
450  double*& re_invfr_pt()
451  {
452  return ReInvFr_pt;
453  }
454 
456  const double& re_invro() const
457  {
458  return *ReInvRo_pt;
459  }
460 
462  double*& re_invro_pt()
463  {
464  return ReInvRo_pt;
465  }
466 
468  const Vector<double>& g() const
469  {
470  return *G_pt;
471  }
472 
475  {
476  return G_pt;
477  }
478 
481  const double& density_ratio() const
482  {
483  return *Density_Ratio_pt;
484  }
485 
487  double*& density_ratio_pt()
488  {
489  return Density_Ratio_pt;
490  }
491 
494  const double& viscosity_ratio() const
495  {
496  return *Viscosity_Ratio_pt;
497  }
498 
501  {
502  return Viscosity_Ratio_pt;
503  }
504 
506  void (*&axi_nst_body_force_fct_pt())(const double& time,
507  const Vector<double>& x,
508  Vector<double>& f)
509  {
510  return Body_force_fct_pt;
511  }
512 
514  double (*&source_fct_pt())(const double& time, const Vector<double>& x)
515  {
516  return Source_fct_pt;
517  }
518 
521  {
522  return Constitutive_eqn_pt;
523  }
524 
527  {
529  }
530 
533  {
535  }
536 
538  virtual unsigned npres_axi_nst() const = 0;
539 
546  virtual inline unsigned u_index_axi_nst(const unsigned& i) const
547  {
548  return i;
549  }
550 
556  inline unsigned u_index_nst(const unsigned& i) const
557  {
558  return this->u_index_axi_nst(i);
559  }
560 
563  inline unsigned n_u_nst() const
564  {
565  return 3;
566  }
567 
570  double du_dt_axi_nst(const unsigned& n, const unsigned& i) const
571  {
572  // Get the data's timestepper
574 
575  // Initialise dudt
576  double dudt = 0.0;
577  // Loop over the timesteps, if there is a non Steady timestepper
578  if (!time_stepper_pt->is_steady())
579  {
580  // Get the index at which the velocity is stored
581  const unsigned u_nodal_index = u_index_axi_nst(i);
582 
583  // Number of timsteps (past & present)
584  const unsigned n_time = time_stepper_pt->ntstorage();
585 
586  // Add the contributions to the time derivative
587  for (unsigned t = 0; t < n_time; t++)
588  {
589  dudt +=
590  time_stepper_pt->weight(1, t) * nodal_value(t, n, u_nodal_index);
591  }
592  }
593 
594  return dudt;
595  }
596 
599  void disable_ALE()
600  {
601  ALE_is_disabled = true;
602  }
603 
608  void enable_ALE()
609  {
610  ALE_is_disabled = false;
611  }
612 
615  virtual double p_axi_nst(const unsigned& n_p) const = 0;
616 
618  virtual int p_nodal_index_axi_nst() const
619  {
621  }
622 
624  double pressure_integral() const;
625 
626 
629  void max_and_min_invariant_and_viscosity(double& min_invariant,
630  double& max_invariant,
631  double& min_viscosity,
632  double& max_viscosity) const;
633 
635  double dissipation() const;
636 
638  double dissipation(const Vector<double>& s) const;
639 
641  double kin_energy() const;
642 
645  void strain_rate(const Vector<double>& s,
647 
650  void strain_rate(const unsigned& t,
651  const Vector<double>& s,
653 
658  virtual void extrapolated_strain_rate(
660 
666  const unsigned& ipt, DenseMatrix<double>& strain_rate) const
667  {
668  // Set the Vector to hold local coordinates (two dimensions)
669  Vector<double> s(2);
670  for (unsigned i = 0; i < 2; i++) s[i] = integral_pt()->knot(ipt, i);
672  }
673 
676  void traction(const Vector<double>& s,
677  const Vector<double>& N,
678  Vector<double>& traction) const;
679 
687  Vector<double>& press_mass_diag,
688  Vector<double>& veloc_mass_diag,
689  const unsigned& which_one = 0);
690 
693  unsigned nscalar_paraview() const
694  {
695  return 4;
696  }
697 
700  void scalar_value_paraview(std::ofstream& file_out,
701  const unsigned& i,
702  const unsigned& nplot) const
703  {
704  // Vector of local coordinates
705  Vector<double> s(2);
706 
707  // Loop over plot points
708  unsigned num_plot_points = nplot_points_paraview(nplot);
709  for (unsigned iplot = 0; iplot < num_plot_points; iplot++)
710  {
711  // Get local coordinates of plot point
712  get_s_plot(iplot, nplot, s);
713 
714  // Velocities
715  if (i < 3)
716  {
717  file_out << interpolated_u_axi_nst(s, i) << std::endl;
718  }
719  // Pressure
720  else if (i == 3)
721  {
722  file_out << interpolated_p_axi_nst(s) << std::endl;
723  }
724  // Never get here
725  else
726  {
727  std::stringstream error_stream;
728  error_stream
729  << "Axisymmetric Navier-Stokes Elements only store 4 fields "
730  << std::endl;
731  throw OomphLibError(error_stream.str(),
734  }
735  }
736  }
737 
741  std::string scalar_name_paraview(const unsigned& i) const
742  {
743  // Veloc
744  if (i < 3)
745  {
746  return "Velocity " + StringConversion::to_string(i);
747  }
748  // Pressure field
749  else if (i == 3)
750  {
751  return "Pressure";
752  }
753  // Never get here
754  else
755  {
756  std::stringstream error_stream;
757  error_stream
758  << "Axisymmetric Navier-Stokes Elements only store 4 fields "
759  << std::endl;
760  throw OomphLibError(
761  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
762  return " ";
763  }
764  }
765 
769  {
770  // Output the components of the position
771  for (unsigned i = 0; i < 2; i++)
772  {
773  data.push_back(interpolated_x(s, i));
774  }
775 
776  // Output the components of the FE representation of u at s
777  for (unsigned i = 0; i < 3; i++)
778  {
779  data.push_back(interpolated_u_axi_nst(s, i));
780  }
781 
782  // Output FE representation of p at s
783  data.push_back(interpolated_p_axi_nst(s));
784  }
785 
786 
789  void output(std::ostream& outfile)
790  {
791  unsigned nplot = 5;
792  output(outfile, nplot);
793  }
794 
797  void output(std::ostream& outfile, const unsigned& nplot);
798 
799 
802  void output(FILE* file_pt)
803  {
804  unsigned nplot = 5;
805  output(file_pt, nplot);
806  }
807 
810  void output(FILE* file_pt, const unsigned& nplot);
811 
815  void output_veloc(std::ostream& outfile,
816  const unsigned& nplot,
817  const unsigned& t);
818 
822  void output_fct(std::ostream& outfile,
823  const unsigned& nplot,
825 
829  void output_fct(std::ostream& outfile,
830  const unsigned& nplot,
831  const double& time,
833 
838  void compute_error(std::ostream& outfile,
840  const double& time,
841  double& error,
842  double& norm);
843 
848  void compute_error(std::ostream& outfile,
850  double& error,
851  double& norm);
852 
855  {
856  // Call the generic residuals function with flag set to 0
857  // and using a dummy matrix argument
859  residuals,
862  0);
863  }
864 
868  DenseMatrix<double>& jacobian)
869  {
870  // Call the generic routine with the flag set to 1
871 
872  // obacht
873  // Specific element routine is commented out and instead the
874  // default FD version is used
876  residuals, jacobian, GeneralisedElement::Dummy_matrix, 1);
877  // FiniteElement::fill_in_contribution_to_jacobian(residuals,jacobian);
878  }
879 
883  Vector<double>& residuals,
884  DenseMatrix<double>& jacobian,
885  DenseMatrix<double>& mass_matrix)
886  {
887  // Call the generic routine with the flag set to 2
889  residuals, jacobian, mass_matrix, 2);
890  }
891 
897  RankThreeTensor<double>& dresidual_dnodal_coordinates);
898 
901  double* const& parameter_pt, Vector<double>& dres_dparam)
902  {
903  // Call the generic residuals function with flag set to 0
904  // and using a dummy matrix argument
906  parameter_pt,
907  dres_dparam,
910  0);
911  }
912 
916  double* const& parameter_pt,
917  Vector<double>& dres_dparam,
918  DenseMatrix<double>& djac_dparam)
919  {
920  // Call the generic routine with the flag set to 1
922  parameter_pt,
923  dres_dparam,
924  djac_dparam,
926  1);
927  }
928 
932  double* const& parameter_pt,
933  Vector<double>& dres_dparam,
934  DenseMatrix<double>& djac_dparam,
935  DenseMatrix<double>& dmass_matrix_dparam)
936  {
937  // Call the generic routine with the flag set to 2
939  parameter_pt, dres_dparam, djac_dparam, dmass_matrix_dparam, 2);
940  }
941 
942 
945  Vector<double>& veloc) const
946  {
947  // Find number of nodes
948  unsigned n_node = nnode();
949  // Local shape function
950  Shape psi(n_node);
951  // Find values of shape function
952  shape(s, psi);
953 
954  for (unsigned i = 0; i < 3; i++)
955  {
956  // Index at which the nodal value is stored
957  unsigned u_nodal_index = u_index_axi_nst(i);
958  // Initialise value of u
959  veloc[i] = 0.0;
960  // Loop over the local nodes and sum
961  for (unsigned l = 0; l < n_node; l++)
962  {
963  veloc[i] += nodal_value(l, u_nodal_index) * psi[l];
964  }
965  }
966  }
967 
970  const unsigned& i) const
971  {
972  // Find number of nodes
973  unsigned n_node = nnode();
974  // Local shape function
975  Shape psi(n_node);
976  // Find values of shape function
977  shape(s, psi);
978 
979  // Get the index at which the velocity is stored
980  unsigned u_nodal_index = u_index_axi_nst(i);
981 
982  // Initialise value of u
983  double interpolated_u = 0.0;
984  // Loop over the local nodes and sum
985  for (unsigned l = 0; l < n_node; l++)
986  {
987  interpolated_u += nodal_value(l, u_nodal_index) * psi[l];
988  }
989 
990  return (interpolated_u);
991  }
992 
993 
995  // at time level t (t=0: present, t>0: history)
996  double interpolated_u_axi_nst(const unsigned& t,
997  const Vector<double>& s,
998  const unsigned& i) const
999  {
1000  // Find number of nodes
1001  unsigned n_node = nnode();
1002  // Local shape function
1003  Shape psi(n_node);
1004  // Find values of shape function
1005  shape(s, psi);
1006 
1007  // Get the index at which the velocity is stored
1008  unsigned u_nodal_index = u_index_axi_nst(i);
1009 
1010  // Initialise value of u
1011  double interpolated_u = 0.0;
1012  // Loop over the local nodes and sum
1013  for (unsigned l = 0; l < n_node; l++)
1014  {
1015  interpolated_u += nodal_value(t, l, u_nodal_index) * psi[l];
1016  }
1017 
1018  return (interpolated_u);
1019  }
1020 
1021 
1028  const Vector<double>& s,
1029  const unsigned& i,
1030  Vector<double>& du_ddata,
1031  Vector<unsigned>& global_eqn_number)
1032  {
1033  // Find number of nodes
1034  unsigned n_node = nnode();
1035  // Local shape function
1036  Shape psi(n_node);
1037  // Find values of shape function
1038  shape(s, psi);
1039 
1040  // Find the index at which the velocity component is stored
1041  const unsigned u_nodal_index = u_index_axi_nst(i);
1042 
1043  // Find the number of dofs associated with interpolated u
1044  unsigned n_u_dof = 0;
1045  for (unsigned l = 0; l < n_node; l++)
1046  {
1047  int global_eqn = this->node_pt(l)->eqn_number(u_nodal_index);
1048  // If it's positive add to the count
1049  if (global_eqn >= 0)
1050  {
1051  ++n_u_dof;
1052  }
1053  }
1054 
1055  // Now resize the storage schemes
1056  du_ddata.resize(n_u_dof, 0.0);
1057  global_eqn_number.resize(n_u_dof, 0);
1058 
1059  // Loop over th nodes again and set the derivatives
1060  unsigned count = 0;
1061  // Loop over the local nodes and sum
1062  for (unsigned l = 0; l < n_node; l++)
1063  {
1064  // Get the global equation number
1065  int global_eqn = this->node_pt(l)->eqn_number(u_nodal_index);
1066  if (global_eqn >= 0)
1067  {
1068  // Set the global equation number
1069  global_eqn_number[count] = global_eqn;
1070  // Set the derivative with respect to the unknown
1071  du_ddata[count] = psi[l];
1072  // Increase the counter
1073  ++count;
1074  }
1075  }
1076  }
1077 
1078 
1081  {
1082  // Find number of nodes
1083  unsigned n_pres = npres_axi_nst();
1084  // Local shape function
1085  Shape psi(n_pres);
1086  // Find values of shape function
1087  pshape_axi_nst(s, psi);
1088 
1089  // Initialise value of p
1090  double interpolated_p = 0.0;
1091  // Loop over the local nodes and sum
1092  for (unsigned l = 0; l < n_pres; l++)
1093  {
1094  interpolated_p += p_axi_nst(l) * psi[l];
1095  }
1096 
1097  return (interpolated_p);
1098  }
1099 
1103  const unsigned& i,
1104  const unsigned& j) const
1105  {
1106  // Determine number of nodes
1107  const unsigned n_node = nnode();
1108 
1109  // Allocate storage for local shape function and its derivatives
1110  // with respect to space
1111  Shape psif(n_node);
1112  DShape dpsifds(n_node, 2);
1113 
1114  // Find values of shape function (ignore jacobian)
1115  (void)this->dshape_local(s, psif, dpsifds);
1116 
1117  // Get the index at which the velocity is stored
1118  const unsigned u_nodal_index = u_index_axi_nst(i);
1119 
1120  // Initialise value of duds
1121  double interpolated_duds = 0.0;
1122 
1123  // Loop over the local nodes and sum
1124  for (unsigned l = 0; l < n_node; l++)
1125  {
1126  interpolated_duds += nodal_value(l, u_nodal_index) * dpsifds(l, j);
1127  }
1128 
1129  return (interpolated_duds);
1130  }
1131 
1135  const unsigned& i,
1136  const unsigned& j) const
1137  {
1138  // Determine number of nodes
1139  const unsigned n_node = nnode();
1140 
1141  // Allocate storage for local shape function and its derivatives
1142  // with respect to space
1143  Shape psif(n_node);
1144  DShape dpsifdx(n_node, 2);
1145 
1146  // Find values of shape function (ignore jacobian)
1147  (void)this->dshape_eulerian(s, psif, dpsifdx);
1148 
1149  // Get the index at which the velocity is stored
1150  const unsigned u_nodal_index = u_index_axi_nst(i);
1151 
1152  // Initialise value of dudx
1153  double interpolated_dudx = 0.0;
1154 
1155  // Loop over the local nodes and sum
1156  for (unsigned l = 0; l < n_node; l++)
1157  {
1158  interpolated_dudx += nodal_value(l, u_nodal_index) * dpsifdx(l, j);
1159  }
1160 
1161  return (interpolated_dudx);
1162  }
1163 
1167  const unsigned& i) const
1168  {
1169  // Determine number of nodes
1170  const unsigned n_node = nnode();
1171 
1172  // Allocate storage for local shape function
1173  Shape psif(n_node);
1174 
1175  // Find values of shape function
1176  shape(s, psif);
1177 
1178  // Initialise value of dudt
1179  double interpolated_dudt = 0.0;
1180 
1181  // Loop over the local nodes and sum
1182  for (unsigned l = 0; l < n_node; l++)
1183  {
1184  interpolated_dudt += du_dt_axi_nst(l, i) * psif[l];
1185  }
1186 
1187  return (interpolated_dudt);
1188  }
1189 
1194  const unsigned& p,
1195  const unsigned& q,
1196  const unsigned& i,
1197  const unsigned& k) const
1198  {
1199  // Determine number of nodes
1200  const unsigned n_node = nnode();
1201 
1202  // Allocate storage for local shape function and its derivatives
1203  // with respect to space
1204  Shape psif(n_node);
1205  DShape dpsifds(n_node, 2);
1206 
1207  // Find values of shape function (ignore jacobian)
1208  (void)this->dshape_local(s, psif, dpsifds);
1209 
1210  // Allocate memory for the jacobian and the inverse of the jacobian
1211  DenseMatrix<double> jacobian(2), inverse_jacobian(2);
1212 
1213  // Allocate memory for the derivative of the jacobian w.r.t. nodal coords
1214  DenseMatrix<double> djacobian_dX(2, n_node);
1215 
1216  // Allocate memory for the derivative w.r.t. nodal coords of the
1217  // spatial derivatives of the shape functions
1218  RankFourTensor<double> d_dpsifdx_dX(2, n_node, 3, 2);
1219 
1220  // Now calculate the inverse jacobian
1221  const double det =
1222  local_to_eulerian_mapping(dpsifds, jacobian, inverse_jacobian);
1223 
1224  // Calculate the derivative of the jacobian w.r.t. nodal coordinates
1225  // Note: must call this before "transform_derivatives(...)" since this
1226  // function requires dpsids rather than dpsidx
1227  dJ_eulerian_dnodal_coordinates(jacobian, dpsifds, djacobian_dX);
1228 
1229  // Calculate the derivative of dpsidx w.r.t. nodal coordinates
1230  // Note: this function also requires dpsids rather than dpsidx
1232  det, jacobian, djacobian_dX, inverse_jacobian, dpsifds, d_dpsifdx_dX);
1233 
1234  // Get the index at which the velocity is stored
1235  const unsigned u_nodal_index = u_index_axi_nst(i);
1236 
1237  // Initialise value of dudx
1238  double interpolated_d_dudx_dX = 0.0;
1239 
1240  // Loop over the local nodes and sum
1241  for (unsigned l = 0; l < n_node; l++)
1242  {
1243  interpolated_d_dudx_dX +=
1244  nodal_value(l, u_nodal_index) * d_dpsifdx_dX(p, q, l, k);
1245  }
1246 
1247  return (interpolated_d_dudx_dX);
1248  }
1249 
1251  double compute_physical_size() const
1252  {
1253  // Initialise result
1254  double result = 0.0;
1255 
1256  // Figure out the global (Eulerian) spatial dimension of the
1257  // element by checking the Eulerian dimension of the nodes
1258  const unsigned n_dim_eulerian = nodal_dimension();
1259 
1260  // Allocate Vector of global Eulerian coordinates
1261  Vector<double> x(n_dim_eulerian);
1262 
1263  // Set the value of n_intpt
1264  const unsigned n_intpt = integral_pt()->nweight();
1265 
1266  // Vector of local coordinates
1267  const unsigned n_dim = dim();
1268  Vector<double> s(n_dim);
1269 
1270  // Loop over the integration points
1271  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
1272  {
1273  // Assign the values of s
1274  for (unsigned i = 0; i < n_dim; i++)
1275  {
1276  s[i] = integral_pt()->knot(ipt, i);
1277  }
1278 
1279  // Assign the values of the global Eulerian coordinates
1280  for (unsigned i = 0; i < n_dim_eulerian; i++)
1281  {
1282  x[i] = interpolated_x(s, i);
1283  }
1284 
1285  // Get the integral weight
1286  const double w = integral_pt()->weight(ipt);
1287 
1288  // Get Jacobian of mapping
1289  const double J = J_eulerian(s);
1290 
1291  // The integrand at the current integration point is r
1292  result += x[0] * w * J;
1293  }
1294 
1295  // Multiply by 2pi (integrating in azimuthal direction)
1296  return (2.0 * MathematicalConstants::Pi * result);
1297  }
1298  };
1299 
1303 
1304 
1305  //==========================================================================
1309  //==========================================================================
1311  : public virtual QElement<2, 3>,
1313  {
1314  private:
1316  static const unsigned Initial_Nvalue[];
1317 
1318  protected:
1322 
1326  inline double dshape_and_dtest_eulerian_axi_nst(const Vector<double>& s,
1327  Shape& psi,
1328  DShape& dpsidx,
1329  Shape& test,
1330  DShape& dtestdx) const;
1331 
1336  const unsigned& ipt,
1337  Shape& psi,
1338  DShape& dpsidx,
1339  Shape& test,
1340  DShape& dtestdx) const;
1341 
1346  const unsigned& ipt,
1347  Shape& psi,
1348  DShape& dpsidx,
1349  RankFourTensor<double>& d_dpsidx_dX,
1350  Shape& test,
1351  DShape& dtestdx,
1352  RankFourTensor<double>& d_dtestdx_dX,
1353  DenseMatrix<double>& djacobian_dX) const;
1354 
1355 
1357  inline void pshape_axi_nst(const Vector<double>& s, Shape& psi) const;
1358 
1360  inline void pshape_axi_nst(const Vector<double>& s,
1361  Shape& psi,
1362  Shape& test) const;
1363 
1364 
1365  public:
1368  : QElement<2, 3>(),
1370  {
1371  // Allocate and add one Internal data object that stores the three
1372  // pressure values
1374  }
1375 
1377  virtual unsigned required_nvalue(const unsigned& n) const;
1378 
1382  double p_axi_nst(const unsigned& i) const
1383  {
1385  }
1386 
1388  unsigned npres_axi_nst() const
1389  {
1390  return 3;
1391  }
1392 
1394  void fix_pressure(const unsigned& p_dof, const double& pvalue)
1395  {
1396  this->internal_data_pt(P_axi_nst_internal_index)->pin(p_dof);
1398  }
1399 
1401  void get_traction(const Vector<double>& s,
1402  const Vector<double>& N,
1403  Vector<double>& traction) const;
1404 
1407  inline int p_local_eqn(const unsigned& n) const
1408  {
1410  }
1411 
1413  void output(std::ostream& outfile)
1414  {
1416  }
1417 
1419  void output(std::ostream& outfile, const unsigned& n_plot)
1420  {
1422  n_plot);
1423  }
1424 
1425 
1427  void output(FILE* file_pt)
1428  {
1430  }
1431 
1433  void output(FILE* file_pt, const unsigned& n_plot)
1434  {
1436  n_plot);
1437  }
1438 
1441  unsigned ndof_types() const
1442  {
1443  return 4;
1444  }
1445 
1453  std::list<std::pair<unsigned long, unsigned>>& dof_lookup_list) const;
1454  };
1455 
1456  // Inline functions
1457 
1458  //=======================================================================
1462  //=======================================================================
1465  Shape& psi,
1466  DShape& dpsidx,
1467  Shape& test,
1468  DShape& dtestdx) const
1469  {
1470  // Call the geometrical shape functions and derivatives
1471  double J = this->dshape_eulerian(s, psi, dpsidx);
1472  // Loop over the test functions and derivatives and set them equal to the
1473  // shape functions
1474  for (unsigned i = 0; i < 9; i++)
1475  {
1476  test[i] = psi[i];
1477  dtestdx(i, 0) = dpsidx(i, 0);
1478  dtestdx(i, 1) = dpsidx(i, 1);
1479  }
1480  // Return the jacobian
1481  return J;
1482  }
1483 
1484  //=======================================================================
1488  //=======================================================================
1490  dshape_and_dtest_eulerian_at_knot_axi_nst(const unsigned& ipt,
1491  Shape& psi,
1492  DShape& dpsidx,
1493  Shape& test,
1494  DShape& dtestdx) const
1495  {
1496  // Call the geometrical shape functions and derivatives
1497  double J = this->dshape_eulerian_at_knot(ipt, psi, dpsidx);
1498  // Loop over the test functions and derivatives and set them equal to the
1499  // shape functions
1500  for (unsigned i = 0; i < 9; i++)
1501  {
1502  test[i] = psi[i];
1503  dtestdx(i, 0) = dpsidx(i, 0);
1504  dtestdx(i, 1) = dpsidx(i, 1);
1505  }
1506  // Return the jacobian
1507  return J;
1508  }
1509 
1510  //=======================================================================
1517  //=======================================================================
1520  const unsigned& ipt,
1521  Shape& psi,
1522  DShape& dpsidx,
1523  RankFourTensor<double>& d_dpsidx_dX,
1524  Shape& test,
1525  DShape& dtestdx,
1526  RankFourTensor<double>& d_dtestdx_dX,
1527  DenseMatrix<double>& djacobian_dX) const
1528  {
1529  // Call the geometrical shape functions and derivatives
1530  const double J = this->dshape_eulerian_at_knot(
1531  ipt, psi, dpsidx, djacobian_dX, d_dpsidx_dX);
1532 
1533  // Loop over the test functions and derivatives and set them equal to the
1534  // shape functions
1535  for (unsigned i = 0; i < 9; i++)
1536  {
1537  test[i] = psi[i];
1538 
1539  for (unsigned k = 0; k < 2; k++)
1540  {
1541  dtestdx(i, k) = dpsidx(i, k);
1542 
1543  for (unsigned p = 0; p < 2; p++)
1544  {
1545  for (unsigned q = 0; q < 9; q++)
1546  {
1547  d_dtestdx_dX(p, q, i, k) = d_dpsidx_dX(p, q, i, k);
1548  }
1549  }
1550  }
1551  }
1552 
1553  // Return the jacobian
1554  return J;
1555  }
1556 
1557  //=======================================================================
1559  //=======================================================================
1561  pshape_axi_nst(const Vector<double>& s, Shape& psi) const
1562  {
1563  psi[0] = 1.0;
1564  psi[1] = s[0];
1565  psi[2] = s[1];
1566  }
1567 
1570  pshape_axi_nst(const Vector<double>& s, Shape& psi, Shape& test) const
1571  {
1572  // Call the pressure shape functions
1573  pshape_axi_nst(s, psi);
1574  // Loop over the test functions and set them equal to the shape functions
1575  for (unsigned i = 0; i < 3; i++) test[i] = psi[i];
1576  }
1577 
1578 
1579  //=======================================================================
1582  //=======================================================================
1583  template<>
1585  : public virtual QElement<1, 3>
1586  {
1587  public:
1588  FaceGeometry() : QElement<1, 3>() {}
1589  };
1590 
1591  //=======================================================================
1594  //=======================================================================
1595  template<>
1598  : public virtual PointElement
1599  {
1600  public:
1602  };
1603 
1604 
1607 
1608  //=======================================================================
1612  //=======================================================================
1614  : public virtual QElement<2, 3>,
1616  {
1617  private:
1619  static const unsigned Initial_Nvalue[];
1620 
1621  protected:
1624  static const unsigned Pconv[];
1625 
1629  inline double dshape_and_dtest_eulerian_axi_nst(const Vector<double>& s,
1630  Shape& psi,
1631  DShape& dpsidx,
1632  Shape& test,
1633  DShape& dtestdx) const;
1634 
1639  const unsigned& ipt,
1640  Shape& psi,
1641  DShape& dpsidx,
1642  Shape& test,
1643  DShape& dtestdx) const;
1644 
1649  const unsigned& ipt,
1650  Shape& psi,
1651  DShape& dpsidx,
1652  RankFourTensor<double>& d_dpsidx_dX,
1653  Shape& test,
1654  DShape& dtestdx,
1655  RankFourTensor<double>& d_dtestdx_dX,
1656  DenseMatrix<double>& djacobian_dX) const;
1657 
1659  inline void pshape_axi_nst(const Vector<double>& s, Shape& psi) const;
1660 
1662  inline void pshape_axi_nst(const Vector<double>& s,
1663  Shape& psi,
1664  Shape& test) const;
1665 
1666  public:
1669  : QElement<2, 3>(),
1671  {
1672  }
1673 
1676  inline virtual unsigned required_nvalue(const unsigned& n) const
1677  {
1678  return Initial_Nvalue[n];
1679  }
1680 
1682  virtual int p_nodal_index_axi_nst() const
1683  {
1684  return 3;
1685  }
1686 
1689  double p_axi_nst(const unsigned& n_p) const
1690  {
1691  return nodal_value(Pconv[n_p], p_nodal_index_axi_nst());
1692  }
1693 
1695  unsigned npres_axi_nst() const
1696  {
1697  return 4;
1698  }
1699 
1701  void fix_pressure(const unsigned& n_p, const double& pvalue)
1702  {
1703  this->node_pt(Pconv[n_p])->pin(p_nodal_index_axi_nst());
1704  this->node_pt(Pconv[n_p])->set_value(p_nodal_index_axi_nst(), pvalue);
1705  }
1706 
1708  void get_traction(const Vector<double>& s,
1709  const Vector<double>& N,
1710  Vector<double>& traction) const;
1711 
1714  inline int p_local_eqn(const unsigned& n) const
1715  {
1717  }
1718 
1720  void output(std::ostream& outfile)
1721  {
1723  }
1724 
1726  void output(std::ostream& outfile, const unsigned& n_plot)
1727  {
1729  n_plot);
1730  }
1731 
1733  void output(FILE* file_pt)
1734  {
1736  }
1737 
1739  void output(FILE* file_pt, const unsigned& n_plot)
1740  {
1742  n_plot);
1743  }
1744 
1747  unsigned ndof_types() const
1748  {
1749  return 4;
1750  }
1751 
1759  std::list<std::pair<unsigned long, unsigned>>& dof_lookup_list) const;
1760  };
1761 
1762  // Inline functions
1763 
1764  //==========================================================================
1768  //==========================================================================
1771  Shape& psi,
1772  DShape& dpsidx,
1773  Shape& test,
1774  DShape& dtestdx) const
1775  {
1776  // Call the geometrical shape functions and derivatives
1777  double J = this->dshape_eulerian(s, psi, dpsidx);
1778  // Loop over the test functions and derivatives and set them equal to the
1779  // shape functions
1780  for (unsigned i = 0; i < 9; i++)
1781  {
1782  test[i] = psi[i];
1783  dtestdx(i, 0) = dpsidx(i, 0);
1784  dtestdx(i, 1) = dpsidx(i, 1);
1785  }
1786  // Return the jacobian
1787  return J;
1788  }
1789 
1790  //==========================================================================
1794  //==========================================================================
1796  dshape_and_dtest_eulerian_at_knot_axi_nst(const unsigned& ipt,
1797  Shape& psi,
1798  DShape& dpsidx,
1799  Shape& test,
1800  DShape& dtestdx) const
1801  {
1802  // Call the geometrical shape functions and derivatives
1803  double J = this->dshape_eulerian_at_knot(ipt, psi, dpsidx);
1804  // Loop over the test functions and derivatives and set them equal to the
1805  // shape functions
1806  for (unsigned i = 0; i < 9; i++)
1807  {
1808  test[i] = psi[i];
1809  dtestdx(i, 0) = dpsidx(i, 0);
1810  dtestdx(i, 1) = dpsidx(i, 1);
1811  }
1812  // Return the jacobian
1813  return J;
1814  }
1815 
1816  //==========================================================================
1823  //==========================================================================
1826  const unsigned& ipt,
1827  Shape& psi,
1828  DShape& dpsidx,
1829  RankFourTensor<double>& d_dpsidx_dX,
1830  Shape& test,
1831  DShape& dtestdx,
1832  RankFourTensor<double>& d_dtestdx_dX,
1833  DenseMatrix<double>& djacobian_dX) const
1834  {
1835  // Call the geometrical shape functions and derivatives
1836  const double J = this->dshape_eulerian_at_knot(
1837  ipt, psi, dpsidx, djacobian_dX, d_dpsidx_dX);
1838 
1839  // Loop over the test functions and derivatives and set them equal to the
1840  // shape functions
1841  for (unsigned i = 0; i < 9; i++)
1842  {
1843  test[i] = psi[i];
1844 
1845  for (unsigned k = 0; k < 2; k++)
1846  {
1847  dtestdx(i, k) = dpsidx(i, k);
1848 
1849  for (unsigned p = 0; p < 2; p++)
1850  {
1851  for (unsigned q = 0; q < 9; q++)
1852  {
1853  d_dtestdx_dX(p, q, i, k) = d_dpsidx_dX(p, q, i, k);
1854  }
1855  }
1856  }
1857  }
1858 
1859  // Return the jacobian
1860  return J;
1861  }
1862 
1863  //==========================================================================
1865  //==========================================================================
1867  pshape_axi_nst(const Vector<double>& s, Shape& psi) const
1868  {
1869  // Local storage
1870  double psi1[2], psi2[2];
1871  // Call the OneDimensional Shape functions
1872  OneDimLagrange::shape<2>(s[0], psi1);
1873  OneDimLagrange::shape<2>(s[1], psi2);
1874 
1875  // Now let's loop over the nodal points in the element
1876  // s1 is the "x" coordinate, s2 the "y"
1877  for (unsigned i = 0; i < 2; i++)
1878  {
1879  for (unsigned j = 0; j < 2; j++)
1880  {
1881  /*Multiply the two 1D functions together to get the 2D function*/
1882  psi[2 * i + j] = psi2[i] * psi1[j];
1883  }
1884  }
1885  }
1886 
1887  //==========================================================================
1889  //==========================================================================
1891  pshape_axi_nst(const Vector<double>& s, Shape& psi, Shape& test) const
1892  {
1893  // Call the pressure shape functions
1894  pshape_axi_nst(s, psi);
1895  // Loop over the test functions and set them equal to the shape functions
1896  for (unsigned i = 0; i < 4; i++) test[i] = psi[i];
1897  }
1898 
1899  //=======================================================================
1901  //=======================================================================
1902  template<>
1904  : public virtual QElement<1, 3>
1905  {
1906  public:
1907  FaceGeometry() : QElement<1, 3>() {}
1908  };
1909 
1910  //=======================================================================
1913  //=======================================================================
1914  template<>
1917  : public virtual PointElement
1918  {
1919  public:
1921  };
1922 
1923 
1924  //==========================================================
1927  //==========================================================
1928  template<class TAYLOR_HOOD_ELEMENT>
1930  : public virtual ProjectableElement<TAYLOR_HOOD_ELEMENT>
1931  {
1932  public:
1940  {
1941  // Create the vector
1942  Vector<std::pair<Data*, unsigned>> data_values;
1943 
1944  // Velocities dofs
1945  if (fld < 3)
1946  {
1947  // Loop over all nodes
1948  unsigned nnod = this->nnode();
1949  for (unsigned j = 0; j < nnod; j++)
1950  {
1951  // Add the data value associated with the velocity components
1952  data_values.push_back(std::make_pair(this->node_pt(j), fld));
1953  }
1954  }
1955  // Pressure
1956  else
1957  {
1958  // Loop over all vertex nodes
1959  unsigned Pconv_size = 3;
1960  for (unsigned j = 0; j < Pconv_size; j++)
1961  {
1962  // Add the data value associated with the pressure components
1963  unsigned vertex_index = this->Pconv[j];
1964  data_values.push_back(
1965  std::make_pair(this->node_pt(vertex_index), fld));
1966  }
1967  }
1968 
1969  // Return the vector
1970  return data_values;
1971  }
1972 
1976  {
1977  return 4;
1978  }
1979 
1983  unsigned nhistory_values_for_projection(const unsigned& fld)
1984  {
1985  if (fld == 3)
1986  {
1987  // pressure doesn't have history values
1988  return 1;
1989  }
1990  else
1991  {
1992  return this->node_pt(0)->ntstorage();
1993  }
1994  }
1995 
1998  {
1999  return this->node_pt(0)->position_time_stepper_pt()->ntstorage();
2000  }
2001 
2004  double jacobian_and_shape_of_field(const unsigned& fld,
2005  const Vector<double>& s,
2006  Shape& psi)
2007  {
2008  unsigned n_dim = this->dim();
2009  unsigned n_node = this->nnode();
2010 
2011  if (fld == 3)
2012  {
2013  // We are dealing with the pressure
2014  this->pshape_axi_nst(s, psi);
2015 
2016  Shape psif(n_node), testf(n_node);
2017  DShape dpsifdx(n_node, n_dim), dtestfdx(n_node, n_dim);
2018 
2019  // Domain Shape
2020  double J = this->dshape_and_dtest_eulerian_axi_nst(
2021  s, psif, dpsifdx, testf, dtestfdx);
2022  return J;
2023  }
2024  else
2025  {
2026  Shape testf(n_node);
2027  DShape dpsifdx(n_node, n_dim), dtestfdx(n_node, n_dim);
2028 
2029  // Domain Shape
2030  double J = this->dshape_and_dtest_eulerian_axi_nst(
2031  s, psi, dpsifdx, testf, dtestfdx);
2032  return J;
2033  }
2034  }
2035 
2036 
2039  double get_field(const unsigned& t,
2040  const unsigned& fld,
2041  const Vector<double>& s)
2042  {
2043  unsigned n_node = this->nnode();
2044 
2045  // If fld=3, we deal with the pressure
2046  if (fld == 3)
2047  {
2048  return this->interpolated_p_axi_nst(s);
2049  }
2050  // Velocity
2051  else
2052  {
2053  // Find the index at which the variable is stored
2054  unsigned u_nodal_index = this->u_index_axi_nst(fld);
2055 
2056  // Local shape function
2057  Shape psi(n_node);
2058 
2059  // Find values of shape function
2060  this->shape(s, psi);
2061 
2062  // Initialise value of u
2063  double interpolated_u = 0.0;
2064 
2065  // Sum over the local nodes at that time
2066  for (unsigned l = 0; l < n_node; l++)
2067  {
2068  interpolated_u += this->nodal_value(t, l, u_nodal_index) * psi[l];
2069  }
2070  return interpolated_u;
2071  }
2072  }
2073 
2074 
2076  unsigned nvalue_of_field(const unsigned& fld)
2077  {
2078  if (fld == 3)
2079  {
2080  return this->npres_axi_nst();
2081  }
2082  else
2083  {
2084  return this->nnode();
2085  }
2086  }
2087 
2088 
2090  int local_equation(const unsigned& fld, const unsigned& j)
2091  {
2092  if (fld == 3)
2093  {
2094  return this->p_local_eqn(j);
2095  }
2096  else
2097  {
2098  const unsigned u_nodal_index = this->u_index_axi_nst(fld);
2099  return this->nodal_local_eqn(j, u_nodal_index);
2100  }
2101  }
2102  };
2103 
2104 
2105  //=======================================================================
2108  //=======================================================================
2109  template<class ELEMENT>
2112  : public virtual FaceGeometry<ELEMENT>
2113  {
2114  public:
2115  FaceGeometry() : FaceGeometry<ELEMENT>() {}
2116  };
2117 
2118 
2119  //=======================================================================
2122  //=======================================================================
2123  template<class ELEMENT>
2126  : public virtual FaceGeometry<FaceGeometry<ELEMENT>>
2127  {
2128  public:
2130  };
2131 
2132 
2133  //==========================================================
2135  //==========================================================
2136  template<class CROUZEIX_RAVIART_ELEMENT>
2138  : public virtual ProjectableElement<CROUZEIX_RAVIART_ELEMENT>
2139  {
2140  public:
2148  {
2149  // Create the vector
2150  Vector<std::pair<Data*, unsigned>> data_values;
2151 
2152  // Velocities dofs
2153  if (fld < 3)
2154  {
2155  // Loop over all nodes
2156  const unsigned n_node = this->nnode();
2157  for (unsigned n = 0; n < n_node; n++)
2158  {
2159  // Add the data value associated with the velocity components
2160  data_values.push_back(std::make_pair(this->node_pt(n), fld));
2161  }
2162  }
2163  // Pressure
2164  else
2165  {
2166  // Need to push back the internal data
2167  const unsigned n_press = this->npres_axi_nst();
2168  // Loop over all pressure values
2169  for (unsigned j = 0; j < n_press; j++)
2170  {
2171  data_values.push_back(std::make_pair(
2172  this->internal_data_pt(this->P_axi_nst_internal_index), j));
2173  }
2174  }
2175 
2176  // Return the vector
2177  return data_values;
2178  }
2179 
2183  {
2184  return 4;
2185  }
2186 
2190  unsigned nhistory_values_for_projection(const unsigned& fld)
2191  {
2192  if (fld == 3)
2193  {
2194  // pressure doesn't have history values
2195  return 1;
2196  }
2197  else
2198  {
2199  return this->node_pt(0)->ntstorage();
2200  }
2201  }
2202 
2205  {
2206  return this->node_pt(0)->position_time_stepper_pt()->ntstorage();
2207  }
2208 
2211  double jacobian_and_shape_of_field(const unsigned& fld,
2212  const Vector<double>& s,
2213  Shape& psi)
2214  {
2215  unsigned n_dim = this->dim();
2216  unsigned n_node = this->nnode();
2217 
2218  if (fld == 3)
2219  {
2220  // We are dealing with the pressure
2221  this->pshape_axi_nst(s, psi);
2222 
2223  Shape psif(n_node), testf(n_node);
2224  DShape dpsifdx(n_node, n_dim), dtestfdx(n_node, n_dim);
2225 
2226  // Domain Shape
2227  double J = this->dshape_and_dtest_eulerian_axi_nst(
2228  s, psif, dpsifdx, testf, dtestfdx);
2229  return J;
2230  }
2231  else
2232  {
2233  Shape testf(n_node);
2234  DShape dpsifdx(n_node, n_dim), dtestfdx(n_node, n_dim);
2235 
2236  // Domain Shape
2237  double J = this->dshape_and_dtest_eulerian_axi_nst(
2238  s, psi, dpsifdx, testf, dtestfdx);
2239  return J;
2240  }
2241  }
2242 
2243 
2246  double get_field(const unsigned& t,
2247  const unsigned& fld,
2248  const Vector<double>& s)
2249  {
2250  // unsigned n_dim =this->dim();
2251  // unsigned n_node=this->nnode();
2252 
2253  // If fld=n_dim, we deal with the pressure
2254  if (fld == 3)
2255  {
2256  return this->interpolated_p_axi_nst(s);
2257  }
2258  // Velocity
2259  else
2260  {
2261  return this->interpolated_u_axi_nst(t, s, fld);
2262  }
2263  }
2264 
2265 
2267  unsigned nvalue_of_field(const unsigned& fld)
2268  {
2269  if (fld == 3)
2270  {
2271  return this->npres_axi_nst();
2272  }
2273  else
2274  {
2275  return this->nnode();
2276  }
2277  }
2278 
2279 
2281  int local_equation(const unsigned& fld, const unsigned& j)
2282  {
2283  if (fld == 3)
2284  {
2285  return this->p_local_eqn(j);
2286  }
2287  else
2288  {
2289  const unsigned u_nodal_index = this->u_index_axi_nst(fld);
2290  return this->nodal_local_eqn(j, u_nodal_index);
2291  }
2292  }
2293  };
2294 
2295 
2296  //=======================================================================
2299  //=======================================================================
2300  template<class ELEMENT>
2303  : public virtual FaceGeometry<ELEMENT>
2304  {
2305  public:
2306  FaceGeometry() : FaceGeometry<ELEMENT>() {}
2307  };
2308 
2309 
2310  //=======================================================================
2313  //=======================================================================
2314  template<class ELEMENT>
2317  : public virtual FaceGeometry<FaceGeometry<ELEMENT>>
2318  {
2319  public:
2321  };
2322 
2323 
2324 } // namespace oomph
2325 
2326 #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
float * p
Definition: Tutorial_Map_using.cpp:9
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
FaceGeometry()
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1601
FaceGeometry()
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1920
FaceGeometry()
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:2129
FaceGeometry()
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1588
FaceGeometry()
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1907
FaceGeometry()
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:2306
FaceGeometry()
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:2115
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
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:119
unsigned u_index_nst(const unsigned &i) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:556
virtual void get_source_fct_gradient(const double &time, const unsigned &ipt, const Vector< double > &x, Vector< double > &gradient)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:320
double *& re_st_pt()
Pointer to product of Reynolds and Strouhal number (=Womersley number)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:438
void fill_in_contribution_to_djacobian_dparameter(double *const &parameter_pt, Vector< double > &dres_dparam, DenseMatrix< double > &djac_dparam)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:915
void get_pressure_and_velocity_mass_matrix_diagonal(Vector< double > &press_mass_diag, Vector< double > &veloc_mass_diag, const unsigned &which_one=0)
Definition: generalised_newtonian_axisym_navier_stokes_elements.cc:71
static bool Pre_multiply_by_viscosity_ratio
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:139
virtual void extrapolated_strain_rate(const unsigned &ipt, DenseMatrix< double > &strain_rate) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:665
virtual void dinterpolated_u_axi_nst_ddata(const Vector< double > &s, const unsigned &i, Vector< double > &du_ddata, Vector< unsigned > &global_eqn_number)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1027
const double & re_invro() const
Global Reynolds number multiplied by inverse Rossby number.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:456
virtual unsigned u_index_axi_nst(const unsigned &i) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:546
virtual int p_local_eqn(const unsigned &n) const =0
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: generalised_newtonian_axisym_navier_stokes_elements.h:931
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: generalised_newtonian_axisym_navier_stokes_elements.cc:3369
double interpolated_u_axi_nst(const Vector< double > &s, const unsigned &i) const
Return FE interpolated velocity u[i] at local coordinate s.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:969
void fill_in_contribution_to_hessian_vector_products(Vector< double > const &Y, DenseMatrix< double > const &C, DenseMatrix< double > &product)
Definition: generalised_newtonian_axisym_navier_stokes_elements.cc:4098
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: generalised_newtonian_axisym_navier_stokes_elements.h:506
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: generalised_newtonian_axisym_navier_stokes_elements.h:1193
void output(std::ostream &outfile)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:789
double dissipation() const
Return integral of dissipation over element.
Definition: generalised_newtonian_axisym_navier_stokes_elements.cc:601
virtual void pshape_axi_nst(const Vector< double > &s, Shape &psi, Shape &test) const =0
void compute_error(std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
Definition: generalised_newtonian_axisym_navier_stokes_elements.cc:163
unsigned n_u_nst() const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:563
double * ReInvRo_pt
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:165
const double & viscosity_ratio() const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:494
void output(FILE *file_pt)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:802
double *& viscosity_ratio_pt()
Pointer to Viscosity Ratio.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:500
Vector< double > *& g_pt()
Pointer to Vector of gravitational components.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:474
double kin_energy() const
Get integral of kinetic energy over element.
Definition: generalised_newtonian_axisym_navier_stokes_elements.cc:1025
virtual void extrapolated_strain_rate(const Vector< double > &s, DenseMatrix< double > &strain_rate) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.cc:977
double pressure_integral() const
Integral of pressure over element.
Definition: generalised_newtonian_axisym_navier_stokes_elements.cc:1075
virtual void pshape_axi_nst(const Vector< double > &s, Shape &psi) const =0
Compute the pressure shape functions at local coordinate s.
const double & re_st() const
Product of Reynolds and Strouhal number (=Womersley number)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:426
static Vector< double > Gamma
Vector to decide whether the stress-divergence form is used or not.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:415
virtual unsigned npres_axi_nst() const =0
Function to return number of pressure degrees of freedom.
void enable_ALE()
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:608
void max_and_min_invariant_and_viscosity(double &min_invariant, double &max_invariant, double &min_viscosity, double &max_viscosity) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.cc:1119
void use_current_strainrate_to_compute_second_invariant()
Switch to fully implict evaluation of non-Newtonian const eqn.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:526
std::string scalar_name_paraview(const unsigned &i) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:741
const double & re_invfr() const
Global inverse Froude number.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:444
double compute_physical_size() const
Compute the volume of the element.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1251
bool Use_extrapolated_strainrate_to_compute_second_invariant
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:183
double *& density_ratio_pt()
Pointer to Density ratio.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:487
GeneralisedNewtonianConstitutiveEquation< 3 > * Constitutive_eqn_pt
Pointer to the generalised Newtonian constitutive equation.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:179
double * Viscosity_Ratio_pt
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:145
static Vector< double > Default_Gravity_vector
Static default value for the gravity vector.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:134
double * ReInvFr_pt
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:161
static int Pressure_not_stored_at_node
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:123
double(*&)(const double &time, const Vector< double > &x) source_fct_pt()
Access function for the source-function pointer.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:514
void output_veloc(std::ostream &outfile, const unsigned &nplot, const unsigned &t)
Definition: generalised_newtonian_axisym_navier_stokes_elements.cc:430
double * Re_pt
Pointer to global Reynolds number.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:154
GeneralisedNewtonianAxisymmetricNavierStokesEquations()
Constructor: NULL the body force and source function.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:393
const double & re() const
Reynolds number.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:420
virtual void get_dresidual_dnodal_coordinates(RankThreeTensor< double > &dresidual_dnodal_coordinates)
Definition: generalised_newtonian_axisym_navier_stokes_elements.cc:2421
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
void output_fct(std::ostream &outfile, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Definition: generalised_newtonian_axisym_navier_stokes_elements.cc:318
GeneralisedNewtonianConstitutiveEquation< 3 > *& constitutive_eqn_pt()
Access function for the constitutive equation pointer.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:520
void fill_in_contribution_to_dresiduals_dparameter(double *const &parameter_pt, Vector< double > &dres_dparam)
Compute the element's residual Vector.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:900
double du_dt_axi_nst(const unsigned &n, const unsigned &i) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:570
void point_output_data(const Vector< double > &s, Vector< double > &data)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:768
double * Density_Ratio_pt
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:149
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: generalised_newtonian_axisym_navier_stokes_elements.h:301
void traction(const Vector< double > &s, const Vector< double > &N, Vector< double > &traction) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.cc:657
virtual double dshape_and_dtest_eulerian_axi_nst(const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Compute the element's residual Vector.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:854
virtual void get_viscosity_ratio_axisym_nst(const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, double &visc_ratio)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:357
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:867
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: generalised_newtonian_axisym_navier_stokes_elements.h:237
void(* Body_force_fct_pt)(const double &time, const Vector< double > &x, Vector< double > &result)
Pointer to body force function.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:171
double *& re_invro_pt()
Pointer to global inverse Froude number.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:462
double interpolated_duds_axi_nst(const Vector< double > &s, const unsigned &i, const unsigned &j) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1102
double * ReSt_pt
Pointer to global Reynolds number x Strouhal number (=Womersley)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:157
virtual int p_nodal_index_axi_nst() const
Which nodal value represents the pressure?
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:618
unsigned nscalar_paraview() const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:693
double(* Source_fct_pt)(const double &time, const Vector< double > &x)
Pointer to volumetric source function.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:176
virtual double p_axi_nst(const unsigned &n_p) const =0
static double Default_Physical_Constant_Value
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:127
static double Default_Physical_Ratio_Value
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:131
double *& re_invfr_pt()
Pointer to global inverse Froude number.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:450
double interpolated_p_axi_nst(const Vector< double > &s) const
Return FE interpolated pressure at local coordinate s.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1080
const double & density_ratio() const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:481
double interpolated_dudx_axi_nst(const Vector< double > &s, const unsigned &i, const unsigned &j) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1134
double interpolated_dudt_axi_nst(const Vector< double > &s, const unsigned &i) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1166
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: generalised_newtonian_axisym_navier_stokes_elements.h:996
virtual void fill_in_generic_residual_contribution_axi_nst(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix, unsigned flag)
Definition: generalised_newtonian_axisym_navier_stokes_elements.cc:1167
void scalar_value_paraview(std::ofstream &file_out, const unsigned &i, const unsigned &nplot) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:700
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:882
void use_extrapolated_strainrate_to_compute_second_invariant()
Use extrapolation for non-Newtonian const eqn.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:532
Vector< double > * G_pt
Pointer to global gravity Vector.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:168
virtual double dshape_and_dtest_eulerian_at_knot_axi_nst(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
double *& re_pt()
Pointer to Reynolds number.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:432
const Vector< double > & g() const
Vector of gravitational components.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:468
bool ALE_is_disabled
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:188
void disable_ALE()
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:599
void strain_rate(const Vector< double > &s, DenseMatrix< double > &strain_rate) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.cc:749
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: generalised_newtonian_axisym_navier_stokes_elements.h:262
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: generalised_newtonian_axisym_navier_stokes_elements.h:944
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1313
void pshape_axi_nst(const Vector< double > &s, Shape &psi) const
Pressure shape functions at local coordinate s.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1561
double p_axi_nst(const unsigned &i) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1382
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: generalised_newtonian_axisym_navier_stokes_elements.cc:4581
double dshape_and_dtest_eulerian_at_knot_axi_nst(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1490
void get_dof_numbers_for_unknowns(std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.cc:4499
static const unsigned Initial_Nvalue[]
Static array of ints to hold required number of variables at nodes.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1316
double dshape_and_dtest_eulerian_axi_nst(const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1464
int p_local_eqn(const unsigned &n) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1407
void output(std::ostream &outfile, const unsigned &n_plot)
Redirect output to NavierStokesEquations output.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1419
virtual unsigned required_nvalue(const unsigned &n) const
Number of values (pinned or dofs) required at local node n.
Definition: generalised_newtonian_axisym_navier_stokes_elements.cc:4573
void output(FILE *file_pt)
Redirect output to NavierStokesEquations output.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1427
GeneralisedNewtonianAxisymmetricQCrouzeixRaviartElement()
Constructor, there are three internal values (for the pressure)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1367
void fix_pressure(const unsigned &p_dof, const double &pvalue)
Function to fix the internal pressure dof idof_internal.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1394
void output(std::ostream &outfile)
Redirect output to NavierStokesEquations output.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1413
void output(FILE *file_pt, const unsigned &n_plot)
Redirect output to NavierStokesEquations output.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1433
unsigned npres_axi_nst() const
Return number of pressure values.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1388
unsigned ndof_types() const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1441
unsigned P_axi_nst_internal_index
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1321
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1616
virtual unsigned required_nvalue(const unsigned &n) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1676
void output(FILE *file_pt, const unsigned &n_plot)
Redirect output to NavierStokesEquations output.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1739
GeneralisedNewtonianAxisymmetricQTaylorHoodElement()
Constructor, no internal data points.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1668
void output(std::ostream &outfile)
Redirect output to NavierStokesEquations output.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1720
static const unsigned Pconv[]
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1624
unsigned ndof_types() const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1747
virtual int p_nodal_index_axi_nst() const
Which nodal value represents the pressure?
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1682
unsigned npres_axi_nst() const
Return number of pressure values.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1695
void output(std::ostream &outfile, const unsigned &n_plot)
Redirect output to NavierStokesEquations output.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1726
void pshape_axi_nst(const Vector< double > &s, Shape &psi) const
Pressure shape functions at local coordinate s.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1867
int p_local_eqn(const unsigned &n) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1714
double dshape_and_dtest_eulerian_at_knot_axi_nst(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1796
static const unsigned Initial_Nvalue[]
Static array of ints to hold number of variables at node.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1619
void output(FILE *file_pt)
Redirect output to NavierStokesEquations output.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1733
double p_axi_nst(const unsigned &n_p) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1689
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: generalised_newtonian_axisym_navier_stokes_elements.cc:4659
void get_dof_numbers_for_unknowns(std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.cc:4604
double dshape_and_dtest_eulerian_axi_nst(const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1770
void fix_pressure(const unsigned &n_p, const double &pvalue)
Fix the pressure at local pressure node n_p.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1701
Crouzeix Raviart upgraded to become projectable.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:2139
unsigned nvalue_of_field(const unsigned &fld)
Return number of values in field fld.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:2267
double get_field(const unsigned &t, const unsigned &fld, const Vector< double > &s)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:2246
unsigned nhistory_values_for_coordinate_projection()
Number of positional history values (includes current value!)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:2204
unsigned nhistory_values_for_projection(const unsigned &fld)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:2190
int local_equation(const unsigned &fld, const unsigned &j)
Return local equation number of value j in field fld.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:2281
Vector< std::pair< Data *, unsigned > > data_values_of_field(const unsigned &fld)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:2147
double jacobian_and_shape_of_field(const unsigned &fld, const Vector< double > &s, Shape &psi)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:2211
unsigned nfields_for_projection()
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:2182
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1931
double jacobian_and_shape_of_field(const unsigned &fld, const Vector< double > &s, Shape &psi)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:2004
Vector< std::pair< Data *, unsigned > > data_values_of_field(const unsigned &fld)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1939
int local_equation(const unsigned &fld, const unsigned &j)
Return local equation number of value j in field fld.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:2090
unsigned nfields_for_projection()
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1975
unsigned nhistory_values_for_projection(const unsigned &fld)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1983
unsigned nhistory_values_for_coordinate_projection()
Number of positional history values (includes current value!)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:1997
unsigned nvalue_of_field(const unsigned &fld)
Return number of values in field fld.
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:2076
double get_field(const unsigned &t, const unsigned &fld, const Vector< double > &s)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:2039
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
Definition: generalised_newtonian_constitutive_models.h:72
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
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
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
const char Y
Definition: test/EulerAngles.cpp:32
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2