generalised_newtonian_Taxisym_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 triangular/tetrahedaral GeneralisedNewtonianAxisymmetric
27 // Navier Stokes elements
28 
29 #ifndef OOMPH_GENERALISED_NEWTONIAN_TAXISYM_NAVIER_STOKES_ELEMENTS_HEADER
30 #define OOMPH_GENERALISED_NEWTONIAN_TAXISYM_NAVIER_STOKES_ELEMENTS_HEADER
31 
32 // Config header generated by autoconfig
33 #ifdef HAVE_CONFIG_H
34 #include <oomph-lib-config.h>
35 #endif
36 
37 
38 // OOMPH-LIB headers
39 //#include "generic.h"
41 
42 #include "../generic/Telements.h"
43 #include "../generic/error_estimator.h"
44 
45 namespace oomph
46 {
49  // NOTE: TRI/TET CROZIER RAVIARTS REQUIRE BUBBLE FUNCTIONS! THEY'RE NOT
50  // STRAIGHTFORWARD GENERALISATIONS OF THE Q-EQUIVALENTS (WHICH ARE
51  // LBB UNSTABLE!)
54 
55 
56  //==========================================================================
58  // Navier--Stokes elements with quadratic
62  //==========================================================================
64  : public virtual TBubbleEnrichedElement<2, 3>,
66  public virtual ElementWithZ2ErrorEstimator
67  {
68  protected:
72 
73 
78  Shape& psi,
79  DShape& dpsidx,
80  Shape& test,
81  DShape& dtestdx) const;
82 
87  const unsigned& ipt,
88  Shape& psi,
89  DShape& dpsidx,
90  Shape& test,
91  DShape& dtestdx) const;
92 
97  const unsigned& ipt,
98  Shape& psi,
99  DShape& dpsidx,
100  RankFourTensor<double>& d_dpsidx_dX,
101  Shape& test,
102  DShape& dtestdx,
103  RankFourTensor<double>& d_dtestdx_dX,
104  DenseMatrix<double>& djacobian_dX) const;
105 
110  Shape& ppsi,
111  DShape& dppsidx,
112  Shape& ptest,
113  DShape& dptestdx) const;
114 
115  public:
117  inline void pshape_axi_nst(const Vector<double>& s, Shape& psi) const;
118 
120  inline void pshape_axi_nst(const Vector<double>& s,
121  Shape& psi,
122  Shape& test) const;
123 
126 
128  inline int p_local_eqn(const unsigned& n) const
129  {
130  return this->internal_local_eqn(P_axi_nst_internal_index, n);
131  }
132 
133  public:
136  : TBubbleEnrichedElement<2, 3>(),
138  {
139  // Allocate and a single internal datum with 3 entries for the
140  // pressure
142  }
143 
147  delete;
148 
150  void operator=(
152 
153 
155  inline virtual unsigned required_nvalue(const unsigned& n) const
156  {
157  return 3;
158  }
159 
160 
164  double p_axi_nst(const unsigned& i) const
165  {
166  return this->internal_data_pt(P_axi_nst_internal_index)->value(i);
167  }
168 
170  unsigned npres_axi_nst() const
171  {
172  return 3;
173  }
174 
176  void fix_pressure(const unsigned& p_dof, const double& p_value)
177  {
178  this->internal_data_pt(P_axi_nst_internal_index)->pin(p_dof);
179  this->internal_data_pt(P_axi_nst_internal_index)
180  ->set_value(p_dof, p_value);
181  }
182 
187  void identify_load_data(
188  std::set<std::pair<Data*, unsigned>>& paired_load_data);
189 
199  std::set<std::pair<Data*, unsigned>>& paired_pressure_data);
200 
202  void output(std::ostream& outfile)
203  {
205  }
206 
208  void output(std::ostream& outfile, const unsigned& nplot)
209  {
211  nplot);
212  }
213 
215  void output(FILE* file_pt)
216  {
218  }
219 
221  void output(FILE* file_pt, const unsigned& n_plot)
222  {
224  n_plot);
225  }
226 
227 
230  unsigned nrecovery_order()
231  {
232  return 2;
233  }
234 
236  unsigned nvertex_node() const
237  {
238  return 3;
239  }
240 
242  Node* vertex_node_pt(const unsigned& j) const
243  {
244  return node_pt(j);
245  }
246 
248  unsigned num_Z2_flux_terms()
249  {
250  // 3 diagonal strain rates, 3 off diagonal
251  return 6;
252  }
253 
257  {
258 #ifdef PARANOID
259  unsigned num_entries = 6;
260  if (flux.size() < num_entries)
261  {
262  std::ostringstream error_message;
263  error_message << "The flux vector has the wrong number of entries, "
264  << flux.size() << ", whereas it should be at least "
265  << num_entries << std::endl;
266  throw OomphLibError(error_message.str(),
269  }
270 #endif
271 
272  // Get strain rate matrix
273  DenseMatrix<double> strainrate(3);
274  this->strain_rate(s, strainrate);
275 
276  // Pack into flux Vector
277  unsigned icount = 0;
278 
279  // Start with diagonal terms
280  for (unsigned i = 0; i < 3; i++)
281  {
282  flux[icount] = strainrate(i, i);
283  icount++;
284  }
285 
286  // Off diagonals row by row
287  for (unsigned i = 0; i < 3; i++)
288  {
289  for (unsigned j = i + 1; j < 3; j++)
290  {
291  flux[icount] = strainrate(i, j);
292  icount++;
293  }
294  }
295  }
296 
297 
300  unsigned ndof_types() const
301  {
302  return 4;
303  }
304 
312  std::list<std::pair<unsigned long, unsigned>>& dof_lookup_list) const
313  {
314  // number of nodes
315  unsigned n_node = this->nnode();
316 
317  // number of pressure values
318  unsigned n_press = this->npres_axi_nst();
319 
320  // temporary pair (used to store dof lookup prior to being added to list)
321  std::pair<unsigned, unsigned> dof_lookup;
322 
323  // pressure dof number
324  unsigned pressure_dof_number = 3;
325 
326  // loop over the pressure values
327  for (unsigned n = 0; n < n_press; n++)
328  {
329  // determine local eqn number
330  int local_eqn_number = this->p_local_eqn(n);
331 
332  // ignore pinned values - far away degrees of freedom resulting
333  // from hanging nodes can be ignored since these are be dealt
334  // with by the element containing their master nodes
335  if (local_eqn_number >= 0)
336  {
337  // store dof lookup in temporary pair: First entry in pair
338  // is global equation number; second entry is dof type
339  dof_lookup.first = this->eqn_number(local_eqn_number);
340  dof_lookup.second = pressure_dof_number;
341 
342  // add to list
343  dof_lookup_list.push_front(dof_lookup);
344  }
345  }
346 
347  // loop over the nodes
348  for (unsigned n = 0; n < n_node; n++)
349  {
350  // find the number of values at this node
351  unsigned nv = this->node_pt(n)->nvalue();
352 
353  // loop over these values
354  for (unsigned v = 0; v < nv; v++)
355  {
356  // determine local eqn number
357  int local_eqn_number = this->nodal_local_eqn(n, v);
358 
359  // ignore pinned values
360  if (local_eqn_number >= 0)
361  {
362  // store dof lookup in temporary pair: First entry in pair
363  // is global equation number; second entry is dof type
364  dof_lookup.first = this->eqn_number(local_eqn_number);
365  dof_lookup.second = v;
366 
367  // add to list
368  dof_lookup_list.push_front(dof_lookup);
369  }
370  }
371  }
372  }
373  };
374 
375  // Inline functions
376 
377  //=======================================================================
381  //=======================================================================
384  Shape& psi,
385  DShape& dpsidx,
386  Shape& test,
387  DShape& dtestdx) const
388  {
389  // Call the geometrical shape functions and derivatives
390  double J = this->dshape_eulerian(s, psi, dpsidx);
391  // The test functions are equal to the shape functions
392  test = psi;
393  dtestdx = dpsidx;
394  // Return the jacobian
395  return J;
396  }
397 
398 
399  //=======================================================================
403  //=======================================================================
406  Shape& psi,
407  DShape& dpsidx,
408  Shape& test,
409  DShape& dtestdx) const
410  {
411  // Call the geometrical shape functions and derivatives
412  double J = this->dshape_eulerian_at_knot(ipt, psi, dpsidx);
413  // The test functions are the shape functions
414  test = psi;
415  dtestdx = dpsidx;
416  // Return the jacobian
417  return J;
418  }
419 
420 
421  //=======================================================================
428  //=======================================================================
431  const unsigned& ipt,
432  Shape& psi,
433  DShape& dpsidx,
434  RankFourTensor<double>& d_dpsidx_dX,
435  Shape& test,
436  DShape& dtestdx,
437  RankFourTensor<double>& d_dtestdx_dX,
438  DenseMatrix<double>& djacobian_dX) const
439  {
440  // Call the geometrical shape functions and derivatives
441  const double J = this->dshape_eulerian_at_knot(
442  ipt, psi, dpsidx, djacobian_dX, d_dpsidx_dX);
443 
444  // Set the test functions equal to the shape functions
445  test = psi;
446  dtestdx = dpsidx;
447  d_dtestdx_dX = d_dpsidx_dX;
448 
449  // Return the jacobian
450  return J;
451  }
452 
453 
454  //=======================================================================
456  //=======================================================================
458  pshape_axi_nst(const Vector<double>& s, Shape& psi) const
459  {
460  psi[0] = 1.0;
461  psi[1] = s[0];
462  psi[2] = s[1];
463  }
464 
465  //=======================================================================
467  //=======================================================================
469  pshape_axi_nst(const Vector<double>& s, Shape& psi, Shape& test) const
470  {
471  // Call the pressure shape functions
472  this->pshape_axi_nst(s, psi);
473  // The test functions are the shape functions
474  test = psi;
475  }
476 
477  //==========================================================================
481  //==========================================================================
484  Shape& ppsi,
485  DShape& dppsidx,
486  Shape& ptest,
487  DShape& dptestdx) const
488  {
489  // Initalise with shape fcts and derivs. w.r.t. to local coordinates
490  ppsi[0] = 1.0;
491  ppsi[1] = s[0];
492  ppsi[2] = s[1];
493 
494  dppsidx(0, 0) = 0.0;
495  dppsidx(1, 0) = 1.0;
496  dppsidx(2, 0) = 0.0;
497 
498  dppsidx(0, 1) = 0.0;
499  dppsidx(1, 1) = 0.0;
500  dppsidx(2, 1) = 1.0;
501 
502 
503  // Get the values of the shape functions and their local derivatives
504  Shape psi(7);
505  DShape dpsi(7, 2);
506  dshape_local(s, psi, dpsi);
507 
508  // Allocate memory for the inverse 2x2 jacobian
509  DenseMatrix<double> inverse_jacobian(2);
510 
511  // Now calculate the inverse jacobian
512  const double det = local_to_eulerian_mapping(dpsi, inverse_jacobian);
513 
514  // Now set the values of the derivatives to be derivs w.r.t. to the
515  // Eulerian coordinates
516  transform_derivatives(inverse_jacobian, dppsidx);
517 
518  // The test functions are equal to the shape functions
519  ptest = ppsi;
520  dptestdx = dppsidx;
521 
522  // Return the determinant of the jacobian
523  return det;
524  }
525 
526 
527  //=======================================================================
529  //=======================================================================
530  template<>
532  : public virtual TElement<1, 3>
533  {
534  public:
535  FaceGeometry() : TElement<1, 3>() {}
536  };
537 
538 
539  //=======================================================================
541  //=======================================================================
542  template<>
545  : public virtual PointElement
546  {
547  public:
549  };
550 
551 
555 
556 
557  //=======================================================================
561  //=======================================================================
563  : public virtual TElement<2, 3>,
565  public virtual ElementWithZ2ErrorEstimator
566 
567  {
568  private:
570  static const unsigned Initial_Nvalue[];
571 
572  protected:
575  static const unsigned Pconv[];
576 
581  Shape& psi,
582  DShape& dpsidx,
583  Shape& test,
584  DShape& dtestdx) const;
585 
590  const unsigned& ipt,
591  Shape& psi,
592  DShape& dpsidx,
593  Shape& test,
594  DShape& dtestdx) const;
595 
600  const unsigned& ipt,
601  Shape& psi,
602  DShape& dpsidx,
603  RankFourTensor<double>& d_dpsidx_dX,
604  Shape& test,
605  DShape& dtestdx,
606  RankFourTensor<double>& d_dtestdx_dX,
607  DenseMatrix<double>& djacobian_dX) const;
608 
613  Shape& ppsi,
614  DShape& dppsidx,
615  Shape& ptest,
616  DShape& dptestdx) const;
617 
620 
623 
626 
627 
628  public:
631  : TElement<2, 3>(),
633  {
634  }
635 
636 
640 
643  delete;
644 
647  inline virtual unsigned required_nvalue(const unsigned& n) const
648  {
649  return Initial_Nvalue[n];
650  }
651 
653  // bool pressure_dof_is_hanging(const unsigned& p_dof)
654  // {return this->node_pt(Pconv[p_dof])->is_hanging(DIM);}
655 
656 
658  inline void pshape_axi_nst(const Vector<double>& s, Shape& psi) const;
659 
661  inline void pshape_axi_nst(const Vector<double>& s,
662  Shape& psi,
663  Shape& test) const;
664 
666  unsigned p_index_axi_nst()
667  {
668  return 3;
669  }
670 
672  // Node* pressure_node_pt(const unsigned &n_p)
673  //{return this->Node_pt[Pconv[n_p]];}
674 
676  inline int p_local_eqn(const unsigned& n) const
677  {
678  return this->nodal_local_eqn(Pconv[n], 3);
679  }
680 
683  double p_axi_nst(const unsigned& n_p) const
684  {
685  return this->nodal_value(Pconv[n_p], 3);
686  }
687 
690  {
691  return static_cast<int>(3);
692  }
693 
695  unsigned npres_axi_nst() const
696  {
697  return 3;
698  }
699 
701  void fix_pressure(const unsigned& p_dof, const double& p_value)
702  {
703  this->node_pt(Pconv[p_dof])->pin(3);
704  this->node_pt(Pconv[p_dof])->set_value(3, p_value);
705  }
706 
714  void identify_load_data(
715  std::set<std::pair<Data*, unsigned>>& paired_load_data);
716 
726  std::set<std::pair<Data*, unsigned>>& paired_pressure_data);
727 
729  void output(std::ostream& outfile)
730  {
732  }
733 
735  void output(std::ostream& outfile, const unsigned& nplot)
736  {
738  nplot);
739  }
740 
742  void output(FILE* file_pt)
743  {
745  }
746 
748  void output(FILE* file_pt, const unsigned& n_plot)
749  {
751  n_plot);
752  }
753 
756  unsigned nrecovery_order()
757  {
758  return 2;
759  }
760 
762  unsigned nvertex_node() const
763  {
764  return 3;
765  }
766 
768  Node* vertex_node_pt(const unsigned& j) const
769  {
770  return node_pt(j);
771  }
772 
773 
775  unsigned num_Z2_flux_terms()
776  {
777  // 3 diagonal strain rates, 3 off diagonal rates
778  return 6;
779  }
780 
784  {
785 #ifdef PARANOID
786  unsigned num_entries = 6;
787  if (flux.size() < num_entries)
788  {
789  std::ostringstream error_message;
790  error_message << "The flux vector has the wrong number of entries, "
791  << flux.size() << ", whereas it should be at least "
792  << num_entries << std::endl;
793  throw OomphLibError(error_message.str(),
796  }
797 #endif
798 
799  // Get strain rate matrix
800  DenseMatrix<double> strainrate(3);
801  this->strain_rate(s, strainrate);
802 
803  // Pack into flux Vector
804  unsigned icount = 0;
805 
806  // Start with diagonal terms
807  for (unsigned i = 0; i < 3; i++)
808  {
809  flux[icount] = strainrate(i, i);
810  icount++;
811  }
812 
813  // Off diagonals row by row
814  for (unsigned i = 0; i < 3; i++)
815  {
816  for (unsigned j = i + 1; j < 3; j++)
817  {
818  flux[icount] = strainrate(i, j);
819  icount++;
820  }
821  }
822  }
823 
826  unsigned ndof_types() const
827  {
828  return 4;
829  }
830 
838  std::list<std::pair<unsigned long, unsigned>>& dof_lookup_list) const
839  {
840  // number of nodes
841  unsigned n_node = this->nnode();
842 
843  // temporary pair (used to store dof lookup prior to being added to list)
844  std::pair<unsigned, unsigned> dof_lookup;
845 
846  // loop over the nodes
847  for (unsigned n = 0; n < n_node; n++)
848  {
849  // find the number of Navier Stokes values at this node
850  unsigned nv = this->required_nvalue(n);
851 
852  // loop over these values
853  for (unsigned v = 0; v < nv; v++)
854  {
855  // determine local eqn number
856  int local_eqn_number = this->nodal_local_eqn(n, v);
857 
858  // ignore pinned values - far away degrees of freedom resulting
859  // from hanging nodes can be ignored since these are be dealt
860  // with by the element containing their master nodes
861  if (local_eqn_number >= 0)
862  {
863  // store dof lookup in temporary pair: Global equation number
864  // is the first entry in pair
865  dof_lookup.first = this->eqn_number(local_eqn_number);
866 
867  // set dof numbers: Dof number is the second entry in pair
868  dof_lookup.second = v;
869 
870  // add to list
871  dof_lookup_list.push_front(dof_lookup);
872  }
873  }
874  }
875  }
876  };
877 
878 
879  // Inline functions
880 
881  //==========================================================================
885  //==========================================================================
888  Shape& psi,
889  DShape& dpsidx,
890  Shape& test,
891  DShape& dtestdx) const
892  {
893  // Call the geometrical shape functions and derivatives
894  double J = this->dshape_eulerian(s, psi, dpsidx);
895  // Test functions are the shape functions
896  test = psi;
897  dtestdx = dpsidx;
898  // Return the jacobian
899  return J;
900  }
901 
902 
903  //==========================================================================
907  //==========================================================================
910  Shape& psi,
911  DShape& dpsidx,
912  Shape& test,
913  DShape& dtestdx) const
914  {
915  // Call the geometrical shape functions and derivatives
916  double J = this->dshape_eulerian_at_knot(ipt, psi, dpsidx);
917  // Test functions are the shape functions
918  test = psi;
919  dtestdx = dpsidx;
920  // Return the jacobian
921  return J;
922  }
923 
924  //==========================================================================
931  //==========================================================================
934  const unsigned& ipt,
935  Shape& psi,
936  DShape& dpsidx,
937  RankFourTensor<double>& d_dpsidx_dX,
938  Shape& test,
939  DShape& dtestdx,
940  RankFourTensor<double>& d_dtestdx_dX,
941  DenseMatrix<double>& djacobian_dX) const
942  {
943  // Call the geometrical shape functions and derivatives
944  const double J = this->dshape_eulerian_at_knot(
945  ipt, psi, dpsidx, djacobian_dX, d_dpsidx_dX);
946 
947  // Set the test functions equal to the shape functions
948  test = psi;
949  dtestdx = dpsidx;
950  d_dtestdx_dX = d_dpsidx_dX;
951 
952  // Return the jacobian
953  return J;
954  }
955 
956  //==========================================================================
959  //==========================================================================
962  Shape& ppsi,
963  DShape& dppsidx,
964  Shape& ptest,
965  DShape& dptestdx) const
966  {
967  ppsi[0] = s[0];
968  ppsi[1] = s[1];
969  ppsi[2] = 1.0 - s[0] - s[1];
970 
971  dppsidx(0, 0) = 1.0;
972  dppsidx(0, 1) = 0.0;
973 
974  dppsidx(1, 0) = 0.0;
975  dppsidx(1, 1) = 1.0;
976 
977  dppsidx(2, 0) = -1.0;
978  dppsidx(2, 1) = -1.0;
979 
980  // Allocate memory for the inverse 2x2 jacobian
981  DenseMatrix<double> inverse_jacobian(2);
982 
983 
984  // Get the values of the shape functions and their local derivatives
985  Shape psi(6);
986  DShape dpsi(6, 2);
987  dshape_local(s, psi, dpsi);
988 
989  // Now calculate the inverse jacobian
990  const double det = local_to_eulerian_mapping(dpsi, inverse_jacobian);
991 
992  // Now set the values of the derivatives to be derivs w.r.t. to the
993  // Eulerian coordinates
994  transform_derivatives(inverse_jacobian, dppsidx);
995 
996  // Test functions are shape functions
997  ptest = ppsi;
998  dptestdx = dppsidx;
999 
1000  // Return the determinant of the jacobian
1001  return det;
1002  }
1003 
1004 
1005  //==========================================================================
1007  //==========================================================================
1009  pshape_axi_nst(const Vector<double>& s, Shape& psi) const
1010  {
1011  psi[0] = s[0];
1012  psi[1] = s[1];
1013  psi[2] = 1.0 - s[0] - s[1];
1014  }
1015 
1016  //==========================================================================
1018  //==========================================================================
1020  pshape_axi_nst(const Vector<double>& s, Shape& psi, Shape& test) const
1021  {
1022  // Call the pressure shape functions
1023  this->pshape_axi_nst(s, psi);
1024  // Test functions are shape functions
1025  test = psi;
1026  }
1027 
1028 
1029  //=======================================================================
1031  //=======================================================================
1032  template<>
1034  : public virtual TElement<1, 3>
1035  {
1036  public:
1038  FaceGeometry() : TElement<1, 3>() {}
1039  };
1040 
1041 
1042  //=======================================================================
1044  // GeneralisedNewtonianAxisymmetric TaylorHood elements
1045  //=======================================================================
1046  template<>
1049  : public virtual PointElement
1050  {
1051  public:
1053  };
1054 
1055 
1056 } // namespace oomph
1057 
1058 #endif
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
JacobiRotation< float > J
Definition: Jacobi_makeJacobi.cpp:3
Definition: shape.h:278
Definition: nodes.h:86
void pin(const unsigned &i)
Pin the i-th stored variable.
Definition: nodes.h:385
void set_value(const unsigned &i, const double &value_)
Definition: nodes.h:271
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
Definition: nodes.h:483
double value(const unsigned &i) const
Definition: nodes.h:293
Definition: error_estimator.h:79
FaceGeometry()
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:548
FaceGeometry()
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:1052
FaceGeometry()
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:535
FaceGeometry()
Constructor: Call constructor of base.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:1038
Definition: elements.h:4998
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
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Definition: elements.h:1432
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
virtual double local_to_eulerian_mapping(const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Definition: elements.h:1508
virtual void transform_derivatives(const DenseMatrix< double > &inverse_jacobian, DShape &dbasis) const
Definition: elements.cc:2833
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
double dshape_eulerian(const Vector< double > &s, Shape &psi, DShape &dpsidx) const
Definition: elements.cc:3298
unsigned long eqn_number(const unsigned &ieqn_local) const
Definition: elements.h:704
int local_eqn_number(const unsigned long &ieqn_global) const
Definition: elements.h:726
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
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
void output(std::ostream &outfile)
Definition: generalised_newtonian_axisym_navier_stokes_elements.h:789
void strain_rate(const Vector< double > &s, DenseMatrix< double > &strain_rate) const
Definition: generalised_newtonian_axisym_navier_stokes_elements.cc:749
GeneralisedNewtonianAxisymmetricTCrouzeix_Raviart elements are.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:67
void output(FILE *file_pt, const unsigned &n_plot)
Redirect output to NavierStokesEquations output.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:221
int p_local_eqn(const unsigned &n) const
Return the local equation numbers for the pressure values.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:128
void pshape_axi_nst(const Vector< double > &s, Shape &psi) const
Pressure shape functions at local coordinate s.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:458
void unpin_all_internal_pressure_dofs()
Unpin all internal pressure dofs.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.cc:42
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:248
unsigned nrecovery_order()
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:230
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:242
void identify_load_data(std::set< std::pair< Data *, unsigned >> &paired_load_data)
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.cc:64
double dshape_and_dtest_eulerian_axi_nst(const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:383
void identify_pressure_data(std::set< std::pair< Data *, unsigned >> &paired_pressure_data)
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.cc:100
void output(std::ostream &outfile, const unsigned &nplot)
Redirect output to NavierStokesEquations output.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:208
double dshape_and_dtest_eulerian_at_knot_axi_nst(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:405
virtual unsigned required_nvalue(const unsigned &n) const
Number of values (pinned or dofs) required at local node n.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:155
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:256
unsigned ndof_types() const
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:300
GeneralisedNewtonianAxisymmetricTCrouzeixRaviartElement(const GeneralisedNewtonianAxisymmetricTCrouzeixRaviartElement &dummy)=delete
Broken copy constructor.
void output(FILE *file_pt)
Redirect output to NavierStokesEquations output.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:215
unsigned nvertex_node() const
Number of vertex nodes in the element.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:236
void operator=(const GeneralisedNewtonianAxisymmetricTCrouzeixRaviartElement &)=delete
Broken assignment operator.
unsigned P_axi_nst_internal_index
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:71
void output(std::ostream &outfile)
Redirect output to NavierStokesEquations output.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:202
double p_axi_nst(const unsigned &i) const
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:164
GeneralisedNewtonianAxisymmetricTCrouzeixRaviartElement()
Constructor, there are 3 internal values (for the pressure)
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:135
unsigned npres_axi_nst() const
Return number of pressure values.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:170
double dpshape_and_dptest_eulerian_axi_nst(const Vector< double > &s, Shape &ppsi, DShape &dppsidx, Shape &ptest, DShape &dptestdx) const
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:483
void get_dof_numbers_for_unknowns(std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:311
void fix_pressure(const unsigned &p_dof, const double &p_value)
Pin p_dof-th pressure dof and set it to value specified by p_value.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:176
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:567
unsigned nvertex_node() const
Number of vertex nodes in the element.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:762
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:768
static const unsigned Initial_Nvalue[]
Static array of ints to hold number of variables at node.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:570
void output(std::ostream &outfile)
Redirect output to NavierStokesEquations output.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:729
virtual unsigned required_nvalue(const unsigned &n) const
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:647
GeneralisedNewtonianAxisymmetricTTaylorHoodElement(const GeneralisedNewtonianAxisymmetricTTaylorHoodElement &dummy)=delete
Broken copy constructor.
void identify_pressure_data(std::set< std::pair< Data *, unsigned >> &paired_pressure_data)
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.cc:228
void output(FILE *file_pt, const unsigned &n_plot)
Redirect output to NavierStokesEquations output.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:748
int p_nodal_index_axi_nst() const
Set the value at which the pressure is stored in the nodes.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:689
void pshape_axi_nst(const Vector< double > &s, Shape &psi) const
Test whether the pressure dof p_dof hanging or not?
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:1009
void unpin_proper_nodal_pressure_dofs()
Unpin the proper nodal pressure dofs.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.cc:175
double p_axi_nst(const unsigned &n_p) const
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:683
void fix_pressure(const unsigned &p_dof, const double &p_value)
Pin p_dof-th pressure dof and set it to value specified by p_value.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:701
unsigned p_index_axi_nst()
Which nodal value represents the pressure?
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:666
double dshape_and_dtest_eulerian_axi_nst(const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:887
void unpin_all_nodal_pressure_dofs()
Unpin all pressure dofs.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.cc:138
void operator=(const GeneralisedNewtonianAxisymmetricTTaylorHoodElement &)=delete
Broken assignment operator.
void get_dof_numbers_for_unknowns(std::list< std::pair< unsigned long, unsigned >> &dof_lookup_list) const
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:837
void output(std::ostream &outfile, const unsigned &nplot)
Redirect output to NavierStokesEquations output.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:735
unsigned ndof_types() const
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:826
double dshape_and_dtest_eulerian_at_knot_axi_nst(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:909
static const unsigned Pconv[]
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:575
virtual double dpshape_and_dptest_eulerian_axi_nst(const Vector< double > &s, Shape &ppsi, DShape &dppsidx, Shape &ptest, DShape &dptestdx) const
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:961
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:775
void pin_all_nodal_pressure_dofs()
Pin all nodal pressure dofs.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.cc:158
int p_local_eqn(const unsigned &n) const
Pointer to n_p-th pressure node.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:676
unsigned npres_axi_nst() const
Return number of pressure values.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:695
unsigned nrecovery_order()
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:756
GeneralisedNewtonianAxisymmetricTTaylorHoodElement()
Constructor, no internal data points.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:630
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:783
void identify_load_data(std::set< std::pair< Data *, unsigned >> &paired_load_data)
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.cc:199
void output(FILE *file_pt)
Redirect output to NavierStokesEquations output.
Definition: generalised_newtonian_Taxisym_navier_stokes_elements.h:742
Definition: nodes.h:906
Definition: oomph_definitions.h:222
Definition: elements.h:3439
A Rank 4 Tensor class.
Definition: matrices.h:1701
Definition: shape.h:76
Definition: Telements.h:3570
Definition: Telements.h:1208
RealScalar s
Definition: level1_cplx_impl.h:130
void flux(const double &time, const Vector< double > &x, double &flux)
Get flux applied along boundary x=0.
Definition: pretend_melt.cc:59
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
Definition: indexed_view.cpp:20
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
void set(Container &c, Position position, const Value &value)
Definition: stdlist_overload.cpp:36
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2