steady_axisym_advection_diffusion_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 Steady axisymmetric advection diffusion elements
27 #ifndef OOMPH_STEADY_AXISYM_ADV_DIFF_ELEMENTS_HEADER
28 #define OOMPH_STEADY_AXISYM_ADV_DIFF_ELEMENTS_HEADER
29 
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/nodes.h"
38 #include "../generic/Qelements.h"
39 #include "../generic/refineable_elements.h"
40 #include "../generic/oomph_utilities.h"
41 
42 namespace oomph
43 {
44  //=============================================================
50  //=============================================================
52  {
53  public:
57  const Vector<double>& x, double& f);
58 
59 
63  const Vector<double>& x, Vector<double>& wind);
64 
65 
69  {
70  // Set pointer to Peclet number to the default value zero
72  }
73 
76  const SteadyAxisymAdvectionDiffusionEquations& dummy) = delete;
77 
79  // Commented out broken assignment operator because this can lead to a
80  // conflict warning when used in the virtual inheritence hierarchy.
81  // Essentially the compiler doesn't realise that two separate
82  // implementations of the broken function are the same and so, quite
83  // rightly, it shouts.
84  /*void operator=(const SteadyAxisymAdvectionDiffusionEquations&) =
85  delete;*/
86 
94  virtual inline unsigned u_index_axisym_adv_diff() const
95  {
96  return 0;
97  }
98 
100  void output(std::ostream& outfile)
101  {
102  unsigned nplot = 5;
103  output(outfile, nplot);
104  }
105 
108  void output(std::ostream& outfile, const unsigned& nplot);
109 
110 
112  void output(FILE* file_pt)
113  {
114  unsigned n_plot = 5;
115  output(file_pt, n_plot);
116  }
117 
120  void output(FILE* file_pt, const unsigned& n_plot);
121 
122 
124  void output_fct(std::ostream& outfile,
125  const unsigned& nplot,
127 
129  void compute_error(std::ostream& outfile,
131  double& error,
132  double& norm);
133 
136  {
137  return Source_fct_pt;
138  }
139 
140 
143  {
144  return Source_fct_pt;
145  }
146 
147 
150  {
151  return Wind_fct_pt;
152  }
153 
154 
157  {
158  return Wind_fct_pt;
159  }
160 
161  // Access functions for the physical constants
162 
164  const double& pe() const
165  {
166  return *Pe_pt;
167  }
168 
170  double*& pe_pt()
171  {
172  return Pe_pt;
173  }
174 
179  inline virtual void get_source_axisym_adv_diff(const unsigned& ipt,
180  const Vector<double>& x,
181  double& source) const
182  {
183  // If no source function has been set, return zero
184  if (Source_fct_pt == 0)
185  {
186  source = 0.0;
187  }
188  else
189  {
190  // Get source strength
191  (*Source_fct_pt)(x, source);
192  }
193  }
194 
200  inline virtual void get_wind_axisym_adv_diff(const unsigned& ipt,
201  const Vector<double>& s,
202  const Vector<double>& x,
203  Vector<double>& wind) const
204  {
205  // If no wind function has been set, return zero
206  if (Wind_fct_pt == 0)
207  {
208  for (unsigned i = 0; i < 2; i++)
209  {
210  wind[i] = 0.0;
211  }
212  }
213  else
214  {
215  // Get wind
216  (*Wind_fct_pt)(x, wind);
217  }
218  }
219 
222  {
223  // Find out how many nodes there are in the element
224  unsigned n_node = nnode();
225 
226  // Get the nodal index at which the unknown is stored
227  unsigned u_nodal_index = u_index_axisym_adv_diff();
228 
229  // Set up memory for the shape and test functions
230  Shape psi(n_node);
231  DShape dpsidx(n_node, 2);
232 
233  // Call the derivatives of the shape and test functions
234  dshape_eulerian(s, psi, dpsidx);
235 
236  // Initialise to zero
237  for (unsigned j = 0; j < 2; j++)
238  {
239  flux[j] = 0.0;
240  }
241 
242  // Loop over nodes
243  for (unsigned l = 0; l < n_node; l++)
244  {
245  // Loop over derivative directions
246  for (unsigned j = 0; j < 2; j++)
247  {
248  flux[j] += nodal_value(l, u_nodal_index) * dpsidx(l, j);
249  }
250  }
251  }
252 
253 
256  {
257  // Call the generic residuals function with flag set to 0 and using
258  // a dummy matrix
260  residuals,
263  0);
264  }
265 
266 
270  DenseMatrix<double>& jacobian)
271  {
272  // Call the generic routine with the flag set to 1
274  residuals, jacobian, GeneralisedElement::Dummy_matrix, 1);
275  }
276 
277 
279  inline double interpolated_u_adv_diff(const Vector<double>& s) const
280  {
281  // Find number of nodes
282  unsigned n_node = nnode();
283 
284  // Get the nodal index at which the unknown is stored
285  unsigned u_nodal_index = u_index_axisym_adv_diff();
286 
287  // Local shape function
288  Shape psi(n_node);
289 
290  // Find values of shape function
291  shape(s, psi);
292 
293  // Initialise value of u
294  double interpolated_u = 0.0;
295 
296  // Loop over the local nodes and sum
297  for (unsigned l = 0; l < n_node; l++)
298  {
299  interpolated_u += nodal_value(l, u_nodal_index) * psi[l];
300  }
301 
302  return (interpolated_u);
303  }
304 
305 
312  const Vector<double>& s,
313  Vector<double>& du_ddata,
314  Vector<unsigned>& global_eqn_number)
315  {
316  // Find number of nodes
317  const unsigned n_node = nnode();
318 
319  // Get the nodal index at which the unknown is stored
320  const unsigned u_nodal_index = u_index_axisym_adv_diff();
321 
322  // Local shape function
323  Shape psi(n_node);
324 
325  // Find values of shape function
326  shape(s, psi);
327 
328  // Find the number of dofs associated with interpolated u
329  unsigned n_u_dof = 0;
330  for (unsigned l = 0; l < n_node; l++)
331  {
332  int global_eqn = this->node_pt(l)->eqn_number(u_nodal_index);
333  // If it's positive add to the count
334  if (global_eqn >= 0)
335  {
336  ++n_u_dof;
337  }
338  }
339 
340  // Now resize the storage schemes
341  du_ddata.resize(n_u_dof, 0.0);
342  global_eqn_number.resize(n_u_dof, 0);
343 
344  // Loop over the nodes again and set the derivatives
345  unsigned count = 0;
346  for (unsigned l = 0; l < n_node; l++)
347  {
348  // Get the global equation number
349  int global_eqn = this->node_pt(l)->eqn_number(u_nodal_index);
350  // If it's positive
351  if (global_eqn >= 0)
352  {
353  // Set the global equation number
354  global_eqn_number[count] = global_eqn;
355  // Set the derivative with respect to the unknown
356  du_ddata[count] = psi[l];
357  // Increase the counter
358  ++count;
359  }
360  }
361  }
362 
363 
365  unsigned self_test();
366 
367  protected:
371  const Vector<double>& s,
372  Shape& psi,
373  DShape& dpsidx,
374  Shape& test,
375  DShape& dtestdx) const = 0;
376 
380  const unsigned& ipt,
381  Shape& psi,
382  DShape& dpsidx,
383  Shape& test,
384  DShape& dtestdx) const = 0;
385 
389  Vector<double>& residuals,
390  DenseMatrix<double>& jacobian,
391  DenseMatrix<double>& mass_matrix,
392  unsigned flag);
393 
394  // Physical constants
395 
397  double* Pe_pt;
398 
401 
404 
405  private:
407  static double Default_peclet_number;
408 
409 
410  }; // End class SteadyAxisymAdvectionDiffusionEquations
411 
412 
416 
417 
418  //======================================================================
422  //======================================================================
423  template<unsigned NNODE_1D>
425  : public virtual QElement<2, NNODE_1D>,
427  {
428  private:
431  static const unsigned Initial_Nvalue;
432 
433  public:
438  {
439  }
440 
444 
446  /*void operator=(const QSteadyAxisymAdvectionDiffusionElement<NNODE_1D>&) =
447  delete;*/
448 
451  inline unsigned required_nvalue(const unsigned& n) const
452  {
453  return Initial_Nvalue;
454  }
455 
458  void output(std::ostream& outfile)
459  {
461  }
462 
465  void output(std::ostream& outfile, const unsigned& n_plot)
466  {
468  }
469 
470 
473  void output(FILE* file_pt)
474  {
476  }
477 
480  void output(FILE* file_pt, const unsigned& n_plot)
481  {
483  }
484 
487  void output_fct(std::ostream& outfile,
488  const unsigned& n_plot,
490  {
492  outfile, n_plot, exact_soln_pt);
493  }
494 
495 
496  protected:
500  Shape& psi,
501  DShape& dpsidx,
502  Shape& test,
503  DShape& dtestdx) const;
504 
508  const unsigned& ipt,
509  Shape& psi,
510  DShape& dpsidx,
511  Shape& test,
512  DShape& dtestdx) const;
513 
514  }; // End class QSteadyAxisymAdvectionDiffusionElement
515 
516  // Inline functions:
517 
518  //======================================================================
523  //======================================================================
524 
525  template<unsigned NNODE_1D>
527  NNODE_1D>::dshape_and_dtest_eulerian_adv_diff(const Vector<double>& s,
528  Shape& psi,
529  DShape& dpsidx,
530  Shape& test,
531  DShape& dtestdx) const
532  {
533  // Call the geometrical shape functions and derivatives
534  double J = this->dshape_eulerian(s, psi, dpsidx);
535 
536  // Loop over the test functions and derivatives and set them equal to the
537  // shape functions
538  for (unsigned i = 0; i < NNODE_1D; i++)
539  {
540  test[i] = psi[i];
541  for (unsigned j = 0; j < 2; j++)
542  {
543  dtestdx(i, j) = dpsidx(i, j);
544  }
545  }
546 
547  // Return the jacobian
548  return J;
549  }
550 
551 
552  //======================================================================
557  //======================================================================
558 
559  template<unsigned NNODE_1D>
561  NNODE_1D>::dshape_and_dtest_eulerian_at_knot_adv_diff(const unsigned& ipt,
562  Shape& psi,
563  DShape& dpsidx,
564  Shape& test,
565  DShape& dtestdx) const
566  {
567  // Call the geometrical shape functions and derivatives
568  double J = this->dshape_eulerian_at_knot(ipt, psi, dpsidx);
569 
570  // Set the test functions equal to the shape functions (pointer copy)
571  test = psi;
572  dtestdx = dpsidx;
573 
574  // Return the jacobian
575  return J;
576  }
577 
581 
582  template<unsigned NNODE_1D>
584  : public virtual QElement<1, NNODE_1D>
585  {
586  public:
589  FaceGeometry() : QElement<1, NNODE_1D>() {}
590  };
591 
592 
596 
597  //======================================================================
604  //======================================================================
605  template<class ELEMENT>
607  : public virtual FaceGeometry<ELEMENT>,
608  public virtual FaceElement
609  {
610  public:
614  const Vector<double>& x, double& beta);
615 
619  const Vector<double>& x, double& alpha);
620 
621 
625  const int& face_index);
626 
627 
630  {
631  throw OomphLibError("Don't call empty constructor for "
632  "SteadyAxisymAdvectionDiffusionFluxElement",
635  }
636 
639  const SteadyAxisymAdvectionDiffusionFluxElement& dummy) = delete;
640 
642  /*void operator=(const SteadyAxisymAdvectionDiffusionFluxElement&) =
643  delete;*/
644 
647  {
648  return Beta_fct_pt;
649  }
650 
653  {
654  return Alpha_fct_pt;
655  }
656 
657 
660  {
661  // Call the generic residuals function with flag set to 0
662  // using a dummy matrix
664  residuals, GeneralisedElement::Dummy_matrix, 0);
665  }
666 
667 
671  DenseMatrix<double>& jacobian)
672  {
673  // Call the generic routine with the flag set to 1
675  residuals, jacobian, 1);
676  }
677 
678 
684  double zeta_nodal(const unsigned& n,
685  const unsigned& k,
686  const unsigned& i) const
687  {
688  return FaceElement::zeta_nodal(n, k, i);
689  }
690 
691 
694  void output(std::ostream& outfile)
695  {
696  FiniteElement::output(outfile);
697  }
698 
701  void output(std::ostream& outfile, const unsigned& nplot)
702  {
703  FiniteElement::output(outfile, nplot);
704  }
705 
706 
707  protected:
711  inline double shape_and_test(const Vector<double>& s,
712  Shape& psi,
713  Shape& test) const
714  {
715  // Find number of nodes
716  unsigned n_node = nnode();
717 
718  // Get the shape functions
719  shape(s, psi);
720 
721  // Set the test functions to be the same as the shape functions
722  for (unsigned i = 0; i < n_node; i++)
723  {
724  test[i] = psi[i];
725  }
726 
727  // Return the value of the jacobian
728  return J_eulerian(s);
729  }
730 
731 
735  inline double shape_and_test_at_knot(const unsigned& ipt,
736  Shape& psi,
737  Shape& test) const
738  {
739  // Find number of nodes
740  unsigned n_node = nnode();
741 
742  // Get the shape functions
743  shape_at_knot(ipt, psi);
744 
745  // Set the test functions to be the same as the shape functions
746  for (unsigned i = 0; i < n_node; i++)
747  {
748  test[i] = psi[i];
749  }
750 
751  // Return the value of the jacobian
752  return J_eulerian_at_knot(ipt);
753  }
754 
757  void get_beta(const Vector<double>& x, double& beta)
758  {
759  // If the function pointer is zero return zero
760  if (Beta_fct_pt == 0)
761  {
762  beta = 0.0;
763  }
764  // Otherwise call the function
765  else
766  {
767  (*Beta_fct_pt)(x, beta);
768  }
769  }
770 
773  void get_alpha(const Vector<double>& x, double& alpha)
774  {
775  // If the function pointer is zero return zero
776  if (Alpha_fct_pt == 0)
777  {
778  alpha = 0.0;
779  }
780  // Otherwise call the function
781  else
782  {
783  (*Alpha_fct_pt)(x, alpha);
784  }
785  }
786 
787  private:
791  Vector<double>& residuals, DenseMatrix<double>& jacobian, unsigned flag);
792 
793 
796 
799 
802 
803 
804  }; // End class SteadyAxisymAdvectionDiffusionFluxElement
805 
806 
810 
811 
812  //===========================================================================
815  //===========================================================================
816  template<class ELEMENT>
819  const int& face_index)
820  : FaceGeometry<ELEMENT>(), FaceElement()
821 
822  {
823  // Let the bulk element build the FaceElement, i.e. setup the pointers
824  // to its nodes (by referring to the appropriate nodes in the bulk
825  // element), etc.
826  bulk_el_pt->build_face_element(face_index, this);
827 
828 
829 #ifdef PARANOID
830  {
831  // Check that the element is not a refineable 3d element
832  ELEMENT* elem_pt = dynamic_cast<ELEMENT*>(bulk_el_pt);
833  // If it's three-d
834  if (elem_pt->dim() == 3)
835  {
836  // Is it refineable
837  RefineableElement* ref_el_pt =
838  dynamic_cast<RefineableElement*>(elem_pt);
839  if (ref_el_pt != 0)
840  {
841  if (this->has_hanging_nodes())
842  {
843  throw OomphLibError("This flux element will not work correctly if "
844  "nodes are hanging\n",
847  }
848  }
849  }
850  }
851 #endif
852 
853  // Initialise the prescribed-beta function pointer to zero
854  Beta_fct_pt = 0;
855 
856  // Set up U_index_adv_diff. Initialise to zero, which probably won't change
857  // in most cases, oh well, the price we pay for generality
858  U_index_adv_diff = 0;
859 
860  // Cast to the appropriate AdvectionDiffusionEquation so that we can
861  // find the index at which the variable is stored
862  // We assume that the dimension of the full problem is the same
863  // as the dimension of the node, if this is not the case you will have
864  // to write custom elements, sorry
866  dynamic_cast<SteadyAxisymAdvectionDiffusionEquations*>(bulk_el_pt);
867 
868  // If the cast has failed die
869  if (eqn_pt == 0)
870  {
871  std::string error_string = "Bulk element must inherit from "
872  "SteadyAxisymAdvectionDiffusionEquations.";
873  error_string +=
874  "Nodes are two dimensional, but cannot cast the bulk element to\n";
875  error_string += "SteadyAxisymAdvectionDiffusionEquations<2>\n.";
876  error_string +=
877  "If you desire this functionality, you must implement it yourself\n";
878 
879  throw OomphLibError(
881  }
882  else
883  {
884  // Read the index from the (cast) bulk element.
886  }
887  }
888 
889 
890  //===========================================================================
894  //===========================================================================
895  template<class ELEMENT>
898  Vector<double>& residuals, DenseMatrix<double>& jacobian, unsigned flag)
899  {
900  // Find out how many nodes there are
901  const unsigned n_node = nnode();
902 
903  // Locally cache the index at which the variable is stored
904  const unsigned u_index_axisym_adv_diff = U_index_adv_diff;
905 
906  // Set up memory for the shape and test functions
907  Shape psif(n_node), testf(n_node);
908 
909  // Set the value of n_intpt
910  const unsigned n_intpt = integral_pt()->nweight();
911 
912  // Set the Vector to hold local coordinates
913  Vector<double> s(1);
914 
915  // Integers used to store the local equation number and local unknown
916  // indices for the residuals and jacobians
917  int local_eqn = 0, local_unknown = 0;
918 
919  // Loop over the integration points
920  //--------------------------------
921  for (unsigned ipt = 0; ipt < n_intpt; ipt++)
922  {
923  // Assign values of s
924  for (unsigned i = 0; i < 1; i++)
925  {
926  s[i] = integral_pt()->knot(ipt, i);
927  }
928 
929  // Get the integral weight
930  double w = integral_pt()->weight(ipt);
931 
932  // Find the shape and test functions and return the Jacobian
933  // of the mapping
934  double J = shape_and_test(s, psif, testf);
935 
936  // Premultiply the weights and the Jacobian
937  double W = w * J;
938 
939  // Calculate local values of the solution and its derivatives
940  // Allocate
941  double interpolated_u = 0.0;
942  Vector<double> interpolated_x(2, 0.0);
943 
944  // Calculate position
945  for (unsigned l = 0; l < n_node; l++)
946  {
947  // Get the value at the node
948  double u_value = raw_nodal_value(l, u_index_axisym_adv_diff);
949  interpolated_u += u_value * psif(l);
950  // Loop over coordinate direction
951  for (unsigned i = 0; i < 2; i++)
952  {
953  interpolated_x[i] += nodal_position(l, i) * psif(l);
954  }
955  }
956 
957  // Get the imposed beta (beta=flux when alpha=0.0)
958  double beta;
959  get_beta(interpolated_x, beta);
960 
961  // Get the imposed alpha
962  double alpha;
963  get_alpha(interpolated_x, alpha);
964 
965  // r is the first position component
966  double r = interpolated_x[0];
967 
968  // Now add to the appropriate equations
969 
970  // Loop over the test functions
971  for (unsigned l = 0; l < n_node; l++)
972  {
973  // Set the local equation number
974  local_eqn = nodal_local_eqn(l, u_index_axisym_adv_diff);
975  /*IF it's not a boundary condition*/
976  if (local_eqn >= 0)
977  {
978  // Add the prescribed beta terms
979  residuals[local_eqn] -=
980  r * (beta - alpha * interpolated_u) * testf(l) * W;
981 
982  // Calculate the Jacobian
983  //----------------------
984  if ((flag) && (alpha != 0.0))
985  {
986  // Loop over the velocity shape functions again
987  for (unsigned l2 = 0; l2 < n_node; l2++)
988  {
989  // Set the number of the unknown
990  local_unknown = nodal_local_eqn(l2, u_index_axisym_adv_diff);
991 
992  // If at a non-zero degree of freedom add in the entry
993  if (local_unknown >= 0)
994  {
995  jacobian(local_eqn, local_unknown) +=
996  r * alpha * psif[l2] * testf[l] * W;
997  }
998  }
999  }
1000  }
1001  } // end loop over test functions
1002 
1003  } // end loop over integration points
1004 
1005  } // end fill_in_generic_residual_contribution_adv_diff_flux
1006 
1007 
1008 } // namespace oomph
1009 
1010 #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
RowVector3d w
Definition: Matrix_resize_int.cpp:3
Definition: shape.h:278
long & eqn_number(const unsigned &i)
Return the equation number of the i-th stored variable.
Definition: nodes.h:367
Definition: elements.h:4338
int & face_index()
Definition: elements.h:4626
double zeta_nodal(const unsigned &n, const unsigned &k, const unsigned &i) const
Definition: elements.h:4497
double J_eulerian(const Vector< double > &s) const
Definition: elements.cc:5242
double J_eulerian_at_knot(const unsigned &ipt) const
Definition: elements.cc:5328
FaceGeometry()
Definition: steady_axisym_advection_diffusion_elements.h:589
Definition: elements.h:4998
Definition: elements.h:1313
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
double nodal_value(const unsigned &n, const unsigned &i) const
Definition: elements.h:2593
virtual void output(std::ostream &outfile)
Definition: elements.h:3050
virtual void build_face_element(const int &face_index, FaceElement *face_element_pt)
Definition: elements.cc:5132
virtual void shape(const Vector< double > &s, Shape &psi) const =0
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
void(* SteadyExactSolutionFctPt)(const Vector< double > &, Vector< double > &)
Definition: elements.h:1759
virtual void shape_at_knot(const unsigned &ipt, Shape &psi) const
Definition: elements.cc:3220
double dshape_eulerian(const Vector< double > &s, Shape &psi, DShape &dpsidx) const
Definition: elements.cc:3298
bool has_hanging_nodes() const
Definition: elements.h:2470
static DenseMatrix< double > Dummy_matrix
Definition: elements.h:227
Definition: oomph_definitions.h:222
Definition: Qelements.h:459
Definition: steady_axisym_advection_diffusion_elements.h:427
QSteadyAxisymAdvectionDiffusionElement(const QSteadyAxisymAdvectionDiffusionElement< NNODE_1D > &dummy)=delete
Broken copy constructor.
unsigned required_nvalue(const unsigned &n) const
Broken assignment operator.
Definition: steady_axisym_advection_diffusion_elements.h:451
void output(std::ostream &outfile, const unsigned &n_plot)
Definition: steady_axisym_advection_diffusion_elements.h:465
void output_fct(std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Definition: steady_axisym_advection_diffusion_elements.h:487
double dshape_and_dtest_eulerian_at_knot_adv_diff(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Definition: steady_axisym_advection_diffusion_elements.h:561
static const unsigned Initial_Nvalue
Definition: steady_axisym_advection_diffusion_elements.h:431
void output(FILE *file_pt)
Definition: steady_axisym_advection_diffusion_elements.h:473
void output(std::ostream &outfile)
Definition: steady_axisym_advection_diffusion_elements.h:458
void output(FILE *file_pt, const unsigned &n_plot)
Definition: steady_axisym_advection_diffusion_elements.h:480
QSteadyAxisymAdvectionDiffusionElement()
Definition: steady_axisym_advection_diffusion_elements.h:436
double dshape_and_dtest_eulerian_adv_diff(const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Definition: steady_axisym_advection_diffusion_elements.h:527
Definition: refineable_elements.h:97
Definition: shape.h:76
Definition: steady_axisym_advection_diffusion_elements.h:52
virtual double dshape_and_dtest_eulerian_adv_diff(const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
SteadyAxisymAdvectionDiffusionSourceFctPt source_fct_pt() const
Access function: Pointer to source function. Const version.
Definition: steady_axisym_advection_diffusion_elements.h:142
SteadyAxisymAdvectionDiffusionEquations(const SteadyAxisymAdvectionDiffusionEquations &dummy)=delete
Broken copy constructor.
virtual void dinterpolated_u_adv_diff_ddata(const Vector< double > &s, Vector< double > &du_ddata, Vector< unsigned > &global_eqn_number)
Definition: steady_axisym_advection_diffusion_elements.h:311
SteadyAxisymAdvectionDiffusionSourceFctPt Source_fct_pt
Pointer to source function:
Definition: steady_axisym_advection_diffusion_elements.h:400
virtual double dshape_and_dtest_eulerian_at_knot_adv_diff(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
void(* SteadyAxisymAdvectionDiffusionSourceFctPt)(const Vector< double > &x, double &f)
Definition: steady_axisym_advection_diffusion_elements.h:56
static double Default_peclet_number
Static default value for the Peclet number.
Definition: steady_axisym_advection_diffusion_elements.h:407
virtual void get_wind_axisym_adv_diff(const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &wind) const
Definition: steady_axisym_advection_diffusion_elements.h:200
SteadyAxisymAdvectionDiffusionSourceFctPt & source_fct_pt()
Access function: Pointer to source function.
Definition: steady_axisym_advection_diffusion_elements.h:135
void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Get error against and norm of exact solution.
Definition: steady_axisym_advection_diffusion_elements.cc:355
unsigned self_test()
Self-test: Return 0 for OK.
Definition: steady_axisym_advection_diffusion_elements.cc:188
const double & pe() const
Peclet number.
Definition: steady_axisym_advection_diffusion_elements.h:164
virtual void get_source_axisym_adv_diff(const unsigned &ipt, const Vector< double > &x, double &source) const
Definition: steady_axisym_advection_diffusion_elements.h:179
void output_fct(std::ostream &outfile, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output exact soln: r,z,u_exact at nplot^2 plot points.
Definition: steady_axisym_advection_diffusion_elements.cc:304
void get_flux(const Vector< double > &s, Vector< double > &flux) const
Get flux: .
Definition: steady_axisym_advection_diffusion_elements.h:221
SteadyAxisymAdvectionDiffusionWindFctPt & wind_fct_pt()
Access function: Pointer to wind function.
Definition: steady_axisym_advection_diffusion_elements.h:149
SteadyAxisymAdvectionDiffusionWindFctPt Wind_fct_pt
Pointer to wind function:
Definition: steady_axisym_advection_diffusion_elements.h:403
SteadyAxisymAdvectionDiffusionEquations()
Definition: steady_axisym_advection_diffusion_elements.h:68
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Add the element's contribution to its residual vector (wrapper)
Definition: steady_axisym_advection_diffusion_elements.h:255
double * Pe_pt
Pointer to global Peclet number.
Definition: steady_axisym_advection_diffusion_elements.h:397
void output(FILE *file_pt)
C_style output with default number of plot points.
Definition: steady_axisym_advection_diffusion_elements.h:112
SteadyAxisymAdvectionDiffusionWindFctPt wind_fct_pt() const
Access function: Pointer to wind function. Const version.
Definition: steady_axisym_advection_diffusion_elements.h:156
double interpolated_u_adv_diff(const Vector< double > &s) const
Return FE representation of function value u(s) at local coordinate s.
Definition: steady_axisym_advection_diffusion_elements.h:279
virtual void fill_in_generic_residual_contribution_adv_diff(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix, unsigned flag)
Definition: steady_axisym_advection_diffusion_elements.cc:46
virtual unsigned u_index_axisym_adv_diff() const
Broken assignment operator.
Definition: steady_axisym_advection_diffusion_elements.h:94
void output(std::ostream &outfile)
Output with default number of plot points.
Definition: steady_axisym_advection_diffusion_elements.h:100
double *& pe_pt()
Pointer to Peclet number.
Definition: steady_axisym_advection_diffusion_elements.h:170
void(* SteadyAxisymAdvectionDiffusionWindFctPt)(const Vector< double > &x, Vector< double > &wind)
Definition: steady_axisym_advection_diffusion_elements.h:62
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: steady_axisym_advection_diffusion_elements.h:269
Definition: steady_axisym_advection_diffusion_elements.h:609
SteadyAxisymAdvectionDiffusionPrescribedAlphaFctPt & alpha_fct_pt()
Access function for the prescribed-alpha function pointer.
Definition: steady_axisym_advection_diffusion_elements.h:652
void get_alpha(const Vector< double > &x, double &alpha)
Definition: steady_axisym_advection_diffusion_elements.h:773
double zeta_nodal(const unsigned &n, const unsigned &k, const unsigned &i) const
Definition: steady_axisym_advection_diffusion_elements.h:684
void get_beta(const Vector< double > &x, double &beta)
Definition: steady_axisym_advection_diffusion_elements.h:757
unsigned U_index_adv_diff
The index at which the unknown is stored at the nodes.
Definition: steady_axisym_advection_diffusion_elements.h:801
void(* SteadyAxisymAdvectionDiffusionPrescribedAlphaFctPt)(const Vector< double > &x, double &alpha)
Definition: steady_axisym_advection_diffusion_elements.h:618
double shape_and_test_at_knot(const unsigned &ipt, Shape &psi, Shape &test) const
Definition: steady_axisym_advection_diffusion_elements.h:735
double shape_and_test(const Vector< double > &s, Shape &psi, Shape &test) const
Definition: steady_axisym_advection_diffusion_elements.h:711
void output(std::ostream &outfile)
Definition: steady_axisym_advection_diffusion_elements.h:694
SteadyAxisymAdvectionDiffusionFluxElement(const SteadyAxisymAdvectionDiffusionFluxElement &dummy)=delete
Broken copy constructor.
SteadyAxisymAdvectionDiffusionFluxElement()
Broken empty constructor.
Definition: steady_axisym_advection_diffusion_elements.h:629
SteadyAxisymAdvectionDiffusionPrescribedBetaFctPt & beta_fct_pt()
Broken assignment operator.
Definition: steady_axisym_advection_diffusion_elements.h:646
SteadyAxisymAdvectionDiffusionPrescribedAlphaFctPt Alpha_fct_pt
Function pointer to the (global) prescribed-alpha function.
Definition: steady_axisym_advection_diffusion_elements.h:798
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Add the element's contribution to its residual vector.
Definition: steady_axisym_advection_diffusion_elements.h:659
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: steady_axisym_advection_diffusion_elements.h:670
void output(std::ostream &outfile, const unsigned &nplot)
Definition: steady_axisym_advection_diffusion_elements.h:701
void fill_in_generic_residual_contribution_adv_diff_flux(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
Definition: steady_axisym_advection_diffusion_elements.h:897
SteadyAxisymAdvectionDiffusionPrescribedBetaFctPt Beta_fct_pt
Function pointer to the (global) prescribed-beta function.
Definition: steady_axisym_advection_diffusion_elements.h:795
void(* SteadyAxisymAdvectionDiffusionPrescribedBetaFctPt)(const Vector< double > &x, double &beta)
Definition: steady_axisym_advection_diffusion_elements.h:613
static int f(const TensorMap< Tensor< int, 3 > > &tensor)
Definition: cxx11_tensor_map.cpp:237
RealScalar s
Definition: level1_cplx_impl.h:130
RealScalar alpha
Definition: level1_cplx_impl.h:151
Scalar beta
Definition: level2_cplx_impl.h:36
char char char int int * k
Definition: level2_impl.h:374
void flux(const double &time, const Vector< double > &x, double &flux)
Get flux applied along boundary x=0.
Definition: pretend_melt.cc:59
void source(const Vector< double > &x, Vector< double > &f)
Source function.
Definition: unstructured_two_d_circle.cc:46
r
Definition: UniformPSDSelfTest.py:20
int error
Definition: calibrate.py:297
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
@ W
Definition: quadtree.h:63
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
list x
Definition: plotDoE.py:28
Definition: indexed_view.cpp:20
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2