gen_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 Advection Diffusion elements
27 #ifndef OOMPH_GEN_AXISYM_ADV_DIFF_ELEMENTS_HEADER
28 #define OOMPH_GEN_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/oomph_utilities.h"
40 
41 namespace oomph
42 {
43  //=============================================================
44  // DOXYERROR: the maths below is wrong somehow but I have no idea what it's
45  // supposed to be doing!
55  //=============================================================
57  : public virtual FiniteElement
58  {
59  public:
62  typedef void (*GeneralisedAxisymAdvectionDiffusionSourceFctPt)(
63  const Vector<double>& x, double& f);
64 
67  typedef void (*GeneralisedAxisymAdvectionDiffusionWindFctPt)(
68  const Vector<double>& x, Vector<double>& wind);
69 
70 
72  typedef void (*GeneralisedAxisymAdvectionDiffusionDiffFctPt)(
73  const Vector<double>& x, DenseMatrix<double>& D);
74 
78  : Source_fct_pt(0),
79  Wind_fct_pt(0),
81  Diff_fct_pt(0),
82  ALE_is_disabled(false)
83  {
84  // Set Peclet number to default
86  // Set Peclet Strouhal number to default
88  }
89 
92  const GeneralisedAxisymAdvectionDiffusionEquations& dummy) = delete;
93 
95  // Commented out broken assignment operator because this can lead to a
96  // conflict warning when used in the virtual inheritence hierarchy.
97  // Essentially the compiler doesn't realise that two separate
98  // implementations of the broken function are the same and so, quite
99  // rightly, it shouts.
100  /*void operator=(const GeneralisedAxisymAdvectionDiffusionEquations&) =
101  * delete;*/
102 
110  virtual inline unsigned u_index_cons_axisym_adv_diff() const
111  {
112  return 0;
113  }
114 
117  double du_dt_cons_axisym_adv_diff(const unsigned& n) const
118  {
119  // Get the data's timestepper
120  TimeStepper* time_stepper_pt = this->node_pt(n)->time_stepper_pt();
121 
122  // Initialise dudt
123  double dudt = 0.0;
124  // Loop over the timesteps, if there is a non Steady timestepper
125  if (!time_stepper_pt->is_steady())
126  {
127  // Find the index at which the variable is stored
128  const unsigned u_nodal_index = u_index_cons_axisym_adv_diff();
129 
130  // Number of timsteps (past & present)
131  const unsigned n_time = time_stepper_pt->ntstorage();
132 
133  for (unsigned t = 0; t < n_time; t++)
134  {
135  dudt +=
136  time_stepper_pt->weight(1, t) * nodal_value(t, n, u_nodal_index);
137  }
138  }
139  return dudt;
140  }
141 
144  void disable_ALE()
145  {
146  ALE_is_disabled = true;
147  }
148 
149 
154  void enable_ALE()
155  {
156  ALE_is_disabled = false;
157  }
158 
159 
161  void output(std::ostream& outfile)
162  {
163  unsigned nplot = 5;
164  output(outfile, nplot);
165  }
166 
169  void output(std::ostream& outfile, const unsigned& nplot);
170 
172  void output(FILE* file_pt)
173  {
174  unsigned n_plot = 5;
175  output(file_pt, n_plot);
176  }
177 
180  void output(FILE* file_pt, const unsigned& n_plot);
181 
182 
184  void output_fct(std::ostream& outfile,
185  const unsigned& nplot,
187 
191  virtual void output_fct(
192  std::ostream& outfile,
193  const unsigned& nplot,
194  const double& time,
196  {
197  throw OomphLibError("There is no time-dependent output_fct() for "
198  "Advection Diffusion elements",
201  }
202 
203 
205  void compute_error(std::ostream& outfile,
207  double& error,
208  double& norm);
209 
210 
212  void compute_error(std::ostream& outfile,
214  const double& time,
215  double& error,
216  double& norm)
217  {
218  throw OomphLibError(
219  "No time-dependent compute_error() for Advection Diffusion elements",
222  }
223 
225  double integrate_u();
226 
227 
229  GeneralisedAxisymAdvectionDiffusionSourceFctPt& source_fct_pt()
230  {
231  return Source_fct_pt;
232  }
233 
234 
236  GeneralisedAxisymAdvectionDiffusionSourceFctPt source_fct_pt() const
237  {
238  return Source_fct_pt;
239  }
240 
241 
243  GeneralisedAxisymAdvectionDiffusionWindFctPt& wind_fct_pt()
244  {
245  return Wind_fct_pt;
246  }
247 
248 
250  GeneralisedAxisymAdvectionDiffusionWindFctPt wind_fct_pt() const
251  {
252  return Wind_fct_pt;
253  }
254 
255 
257  GeneralisedAxisymAdvectionDiffusionWindFctPt& conserved_wind_fct_pt()
258  {
259  return Conserved_wind_fct_pt;
260  }
261 
262 
266  GeneralisedAxisymAdvectionDiffusionWindFctPt conserved_wind_fct_pt() const
267  {
268  return Conserved_wind_fct_pt;
269  }
270 
272  GeneralisedAxisymAdvectionDiffusionDiffFctPt& diff_fct_pt()
273  {
274  return Diff_fct_pt;
275  }
276 
278  GeneralisedAxisymAdvectionDiffusionDiffFctPt diff_fct_pt() const
279  {
280  return Diff_fct_pt;
281  }
282 
284  const double& pe() const
285  {
286  return *Pe_pt;
287  }
288 
290  double*& pe_pt()
291  {
292  return Pe_pt;
293  }
294 
296  const double& pe_st() const
297  {
298  return *PeSt_pt;
299  }
300 
302  double*& pe_st_pt()
303  {
304  return PeSt_pt;
305  }
306 
311  inline virtual void get_source_cons_axisym_adv_diff(const unsigned& ipt,
312  const Vector<double>& x,
313  double& source) const
314  {
315  // If no source function has been set, return zero
316  if (Source_fct_pt == 0)
317  {
318  source = 0.0;
319  }
320  else
321  {
322  // Get source strength
323  (*Source_fct_pt)(x, source);
324  }
325  }
326 
332  inline virtual void get_wind_cons_axisym_adv_diff(
333  const unsigned& ipt,
334  const Vector<double>& s,
335  const Vector<double>& x,
336  Vector<double>& wind) const
337  {
338  // If no wind function has been set, return zero
339  // There are three components of the wind, but only two matter
340  if (Wind_fct_pt == 0)
341  {
342  for (unsigned i = 0; i < 3; i++)
343  {
344  wind[i] = 0.0;
345  }
346  }
347  else
348  {
349  // Get wind
350  (*Wind_fct_pt)(x, wind);
351  }
352  }
353 
354 
362  const unsigned& ipt,
363  const Vector<double>& s,
364  const Vector<double>& x,
365  Vector<double>& wind) const
366  {
367  // If no wind function has been set, return zero
368  if (Conserved_wind_fct_pt == 0)
369  {
370  for (unsigned i = 0; i < 3; i++)
371  {
372  wind[i] = 0.0;
373  }
374  }
375  else
376  {
377  // Get wind
378  (*Conserved_wind_fct_pt)(x, wind);
379  }
380  }
381 
382 
389  inline virtual void get_diff_cons_axisym_adv_diff(
390  const unsigned& ipt,
391  const Vector<double>& s,
392  const Vector<double>& x,
393  DenseMatrix<double>& D) const
394  {
395  // If no wind function has been set, return identity
396  // Again three components, but not all of them matter
397  // Those in the theta direction are ignored
398  if (Diff_fct_pt == 0)
399  {
400  for (unsigned i = 0; i < 3; i++)
401  {
402  for (unsigned j = 0; j < 3; j++)
403  {
404  if (i == j)
405  {
406  D(i, j) = 1.0;
407  }
408  else
409  {
410  D(i, j) = 0.0;
411  }
412  }
413  }
414  }
415  else
416  {
417  // Get diffusivity tensor
418  (*Diff_fct_pt)(x, D);
419  }
420  }
421 
422 
425  {
426  // Find out how many nodes there are in the element
427  const unsigned n_node = this->nnode();
428 
429  // Get the nodal index at which the unknown is stored
430  const unsigned u_nodal_index = this->u_index_cons_axisym_adv_diff();
431 
432  // Set up memory for the shape and test functions
433  Shape psi(n_node);
434  DShape dpsidx(n_node, 2);
435 
436  // Call the derivatives of the shape and test functions
437  dshape_eulerian(s, psi, dpsidx);
438 
439  // Initialise to zero
440  for (unsigned j = 0; j < 2; j++)
441  {
442  flux[j] = 0.0;
443  }
444 
445  // Loop over nodes
446  for (unsigned l = 0; l < n_node; l++)
447  {
448  const double u_value = this->nodal_value(l, u_nodal_index);
449  // Add in the derivative directions
450  flux[0] += u_value * dpsidx(l, 0);
451  flux[1] += u_value * dpsidx(l, 1);
452  }
453  }
454 
457  Vector<double>& total_flux) const
458  {
459  // Find out how many nodes there are in the element
460  const unsigned n_node = nnode();
461 
462  // Get the nodal index at which the unknown is stored
463  const unsigned u_nodal_index = u_index_cons_axisym_adv_diff();
464 
465  // Set up memory for the shape and test functions
466  Shape psi(n_node);
467  DShape dpsidx(n_node, 2);
468 
469  // Call the derivatives of the shape and test functions
470  dshape_eulerian(s, psi, dpsidx);
471 
472  // Storage for the Eulerian position
473  Vector<double> interpolated_x(2, 0.0);
474  // Storage for the concentration
475  double interpolated_u = 0.0;
476  // Storage for the derivatives of the concentration
477  Vector<double> interpolated_dudx(2, 0.0);
478 
479  // Loop over nodes
480  for (unsigned l = 0; l < n_node; l++)
481  {
482  // Get the value at the node
483  const double u_value = this->nodal_value(l, u_nodal_index);
484  interpolated_u += u_value * psi(l);
485  // Loop over directions
486  for (unsigned j = 0; j < 2; j++)
487  {
488  interpolated_x[j] += this->nodal_position(l, j) * psi(l);
489  interpolated_dudx[j] += u_value * dpsidx(l, j);
490  }
491  }
492 
493  // Dummy integration point
494  unsigned ipt = 0;
495 
496  // Get the conserved wind (non-divergence free)
497  Vector<double> conserved_wind(3);
499  ipt, s, interpolated_x, conserved_wind);
500 
501  // Get diffusivity tensor
502  DenseMatrix<double> D(3, 3);
503  get_diff_cons_axisym_adv_diff(ipt, s, interpolated_x, D);
504 
505  // Calculate the total flux made up of the diffusive flux
506  // and the conserved wind only bother with the
507  // first two components in each case becuase there can be no
508  // variation in the azimuthal direction
509  for (unsigned i = 0; i < 2; i++)
510  {
511  total_flux[i] = 0.0;
512  for (unsigned j = 0; j < 2; j++)
513  {
514  total_flux[i] += D(i, j) * interpolated_dudx[j];
515  }
516  total_flux[i] -= conserved_wind[i] * interpolated_u;
517  }
518  }
519 
520 
523  {
524  // Call the generic residuals function with flag set to 0 and using
525  // a dummy matrix
527  residuals,
530  0);
531  }
532 
533 
537  DenseMatrix<double>& jacobian)
538  {
539  // Call the generic routine with the flag set to 1
541  residuals, jacobian, GeneralisedElement::Dummy_matrix, 1);
542  }
543 
544 
548  Vector<double>& residuals,
549  DenseMatrix<double>& jacobian,
550  DenseMatrix<double>& mass_matrix)
551  {
552  // Call the generic routine with the flag set to 2
554  residuals, jacobian, mass_matrix, 2);
555  }
556 
557 
560  const Vector<double>& s) const
561  {
562  // Find number of nodes
563  unsigned n_node = nnode();
564 
565  // Get the nodal index at which the unknown is stored
566  unsigned u_nodal_index = u_index_cons_axisym_adv_diff();
567 
568  // Local shape function
569  Shape psi(n_node);
570 
571  // Find values of shape function
572  shape(s, psi);
573 
574  // Initialise value of u
575  double interpolated_u = 0.0;
576 
577  // Loop over the local nodes and sum
578  for (unsigned l = 0; l < n_node; l++)
579  {
580  interpolated_u += nodal_value(l, u_nodal_index) * psi[l];
581  }
582 
583  return (interpolated_u);
584  }
585 
586 
588  unsigned self_test();
589 
590  protected:
594  const Vector<double>& s,
595  Shape& psi,
596  DShape& dpsidx,
597  Shape& test,
598  DShape& dtestdx) const = 0;
599 
603  const unsigned& ipt,
604  Shape& psi,
605  DShape& dpsidx,
606  Shape& test,
607  DShape& dtestdx) const = 0;
608 
612  Vector<double>& residuals,
613  DenseMatrix<double>& jacobian,
614  DenseMatrix<double>& mass_matrix,
615  unsigned flag);
616 
618  double* Pe_pt;
619 
621  double* PeSt_pt;
622 
624  GeneralisedAxisymAdvectionDiffusionSourceFctPt Source_fct_pt;
625 
627  GeneralisedAxisymAdvectionDiffusionWindFctPt Wind_fct_pt;
628 
630  GeneralisedAxisymAdvectionDiffusionWindFctPt Conserved_wind_fct_pt;
631 
633  GeneralisedAxisymAdvectionDiffusionDiffFctPt Diff_fct_pt;
634 
639 
640  private:
642  static double Default_peclet_number;
643  };
644 
645 
649 
650 
651  //======================================================================
655  //======================================================================
656  template<unsigned NNODE_1D>
658  : public virtual QElement<2, NNODE_1D>,
660  {
661  private:
664  static const unsigned Initial_Nvalue;
665 
666  public:
671  {
672  }
673 
677  delete;
678 
680  /*void operator=(const
681  QGeneralisedAxisymAdvectionDiffusionElement<NNODE_1D>&) = delete;*/
682 
685  inline unsigned required_nvalue(const unsigned& n) const
686  {
687  return Initial_Nvalue;
688  }
689 
692  void output(std::ostream& outfile)
693  {
695  }
696 
699  void output(std::ostream& outfile, const unsigned& n_plot)
700  {
702  }
703 
704 
707  void output(FILE* file_pt)
708  {
710  }
711 
714  void output(FILE* file_pt, const unsigned& n_plot)
715  {
717  }
718 
721  void output_fct(std::ostream& outfile,
722  const unsigned& n_plot,
724  {
726  outfile, n_plot, exact_soln_pt);
727  }
728 
729 
733  void output_fct(std::ostream& outfile,
734  const unsigned& n_plot,
735  const double& time,
737  {
739  outfile, n_plot, time, exact_soln_pt);
740  }
741 
742 
743  protected:
747  const Vector<double>& s,
748  Shape& psi,
749  DShape& dpsidx,
750  Shape& test,
751  DShape& dtestdx) const;
752 
756  const unsigned& ipt,
757  Shape& psi,
758  DShape& dpsidx,
759  Shape& test,
760  DShape& dtestdx) const;
761  };
762 
763  // Inline functions:
764 
765 
766  //======================================================================
771  //======================================================================
772  template<unsigned NNODE_1D>
775  Shape& psi,
776  DShape& dpsidx,
777  Shape& test,
778  DShape& dtestdx) const
779  {
780  // Call the geometrical shape functions and derivatives
781  double J = this->dshape_eulerian(s, psi, dpsidx);
782 
783  // Loop over the test functions and derivatives and set them equal to the
784  // shape functions
785  for (unsigned i = 0; i < NNODE_1D; i++)
786  {
787  test[i] = psi[i];
788  for (unsigned j = 0; j < 2; j++)
789  {
790  dtestdx(i, j) = dpsidx(i, j);
791  }
792  }
793 
794  // Return the jacobian
795  return J;
796  }
797 
798 
799  //======================================================================
804  //======================================================================
805  template<unsigned NNODE_1D>
808  const unsigned& ipt,
809  Shape& psi,
810  DShape& dpsidx,
811  Shape& test,
812  DShape& dtestdx) const
813  {
814  // Call the geometrical shape functions and derivatives
815  double J = this->dshape_eulerian_at_knot(ipt, psi, dpsidx);
816 
817  // Set the test functions equal to the shape functions (pointer copy)
818  test = psi;
819  dtestdx = dpsidx;
820 
821  // Return the jacobian
822  return J;
823  }
824 
825 
829 
830 
831  //=======================================================================
836  //=======================================================================
837  template<unsigned NNODE_1D>
838  class FaceGeometry<QGeneralisedAxisymAdvectionDiffusionElement<NNODE_1D>>
839  : public virtual QElement<1, NNODE_1D>
840  {
841  public:
844  FaceGeometry() : QElement<1, NNODE_1D>() {}
845  };
846 
847 } // namespace oomph
848 
849 #endif
Matrix< Scalar, Dynamic, Dynamic > DenseMatrix
Definition: BenchSparseUtil.h:23
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
dominoes D
Definition: Domino.cpp:55
JacobiRotation< float > J
Definition: Jacobi_makeJacobi.cpp:3
FaceGeometry()
Definition: gen_axisym_advection_diffusion_elements.h:844
Definition: gen_axisym_advection_diffusion_elements.h:660
void output_fct(std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Definition: gen_axisym_advection_diffusion_elements.h:721
void output_fct(std::ostream &outfile, const unsigned &n_plot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
Definition: gen_axisym_advection_diffusion_elements.h:733
void output(std::ostream &outfile)
Definition: gen_axisym_advection_diffusion_elements.h:692
void output(FILE *file_pt)
Definition: gen_axisym_advection_diffusion_elements.h:707
static const unsigned Initial_Nvalue
Definition: gen_axisym_advection_diffusion_elements.h:664
double dshape_and_dtest_eulerian_at_knot_cons_axisym_adv_diff(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Definition: gen_axisym_advection_diffusion_elements.h:807
void output(FILE *file_pt, const unsigned &n_plot)
Definition: gen_axisym_advection_diffusion_elements.h:714
void output(std::ostream &outfile, const unsigned &n_plot)
Definition: gen_axisym_advection_diffusion_elements.h:699
unsigned required_nvalue(const unsigned &n) const
Broken assignment operator.
Definition: gen_axisym_advection_diffusion_elements.h:685
QGeneralisedAxisymAdvectionDiffusionElement()
Definition: gen_axisym_advection_diffusion_elements.h:669
QGeneralisedAxisymAdvectionDiffusionElement(const QGeneralisedAxisymAdvectionDiffusionElement< NNODE_1D > &dummy)=delete
Broken copy constructor.
double dshape_and_dtest_eulerian_cons_axisym_adv_diff(const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Definition: gen_axisym_advection_diffusion_elements.h:774
Definition: shape.h:278
void(* SteadyExactSolutionFctPt)(const Vector< double > &, Vector< double > &)
Definition: elements.h:1759
void(* UnsteadyExactSolutionFctPt)(const double &, const Vector< double > &, Vector< double > &)
Definition: elements.h:1765
static DenseMatrix< double > Dummy_matrix
Definition: elements.h:227
Definition: oomph_definitions.h:222
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
static int f(const TensorMap< Tensor< int, 3 > > &tensor)
Definition: cxx11_tensor_map.cpp:237
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
void source(const Vector< double > &x, Vector< double > &f)
Source function.
Definition: unstructured_two_d_circle.cc:46
int error
Definition: calibrate.py:297
void shape(const double &s, double *Psi)
Definition: shape.h:564
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
virtual unsigned u_index_cons_axisym_adv_diff() const
Definition: gen_axisym_advection_diffusion_elements.h:110
virtual void output_fct(std::ostream &outfile, const unsigned &nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
Definition: gen_axisym_advection_diffusion_elements.h:191
GeneralisedAxisymAdvectionDiffusionSourceFctPt Source_fct_pt
Pointer to source function:
Definition: gen_axisym_advection_diffusion_elements.h:624
GeneralisedAxisymAdvectionDiffusionWindFctPt & wind_fct_pt()
Access function: Pointer to wind function.
Definition: gen_axisym_advection_diffusion_elements.h:243
virtual double dshape_and_dtest_eulerian_at_knot_cons_axisym_adv_diff(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
GeneralisedAxisymAdvectionDiffusionDiffFctPt Diff_fct_pt
Pointer to diffusivity funciton.
Definition: gen_axisym_advection_diffusion_elements.h:633
GeneralisedAxisymAdvectionDiffusionWindFctPt Conserved_wind_fct_pt
Pointer to additional (conservative) wind function:
Definition: gen_axisym_advection_diffusion_elements.h:630
void output(std::ostream &outfile)
Output with default number of plot points.
Definition: gen_axisym_advection_diffusion_elements.h:161
double interpolated_u_cons_axisym_adv_diff(const Vector< double > &s) const
Return FE representation of function value u(s) at local coordinate s.
Definition: gen_axisym_advection_diffusion_elements.h:559
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Definition: gen_axisym_advection_diffusion_elements.h:547
virtual void get_diff_cons_axisym_adv_diff(const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, DenseMatrix< double > &D) const
Definition: gen_axisym_advection_diffusion_elements.h:389
void output(FILE *file_pt, const unsigned &n_plot)
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Add the element's contribution to its residual vector (wrapper)
Definition: gen_axisym_advection_diffusion_elements.h:522
double * PeSt_pt
Pointer to global Peclet number multiplied by Strouhal number.
Definition: gen_axisym_advection_diffusion_elements.h:621
GeneralisedAxisymAdvectionDiffusionWindFctPt & conserved_wind_fct_pt()
Access function: Pointer to additional (conservative) wind function.
Definition: gen_axisym_advection_diffusion_elements.h:257
unsigned self_test()
Self-test: Return 0 for OK.
void get_total_flux(const Vector< double > &s, Vector< double > &total_flux) const
Get flux: .
Definition: gen_axisym_advection_diffusion_elements.h:456
GeneralisedAxisymAdvectionDiffusionDiffFctPt & diff_fct_pt()
Access function: Pointer to diffusion function.
Definition: gen_axisym_advection_diffusion_elements.h:272
static double Default_peclet_number
Static default value for the Peclet number.
Definition: gen_axisym_advection_diffusion_elements.h:642
virtual void fill_in_generic_residual_contribution_cons_axisym_adv_diff(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix, unsigned flag)
const double & pe_st() const
Peclet number multiplied by Strouhal number.
Definition: gen_axisym_advection_diffusion_elements.h:296
double *& pe_st_pt()
Pointer to Peclet number multipled by Strouha number.
Definition: gen_axisym_advection_diffusion_elements.h:302
double integrate_u()
Integrate the concentration over the element.
virtual void get_conserved_wind_cons_axisym_adv_diff(const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &wind) const
Definition: gen_axisym_advection_diffusion_elements.h:361
GeneralisedAxisymAdvectionDiffusionWindFctPt Wind_fct_pt
Pointer to wind function:
Definition: gen_axisym_advection_diffusion_elements.h:627
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: gen_axisym_advection_diffusion_elements.h:536
virtual void get_source_cons_axisym_adv_diff(const unsigned &ipt, const Vector< double > &x, double &source) const
Definition: gen_axisym_advection_diffusion_elements.h:311
virtual void get_wind_cons_axisym_adv_diff(const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &wind) const
Definition: gen_axisym_advection_diffusion_elements.h:332
void disable_ALE()
Definition: gen_axisym_advection_diffusion_elements.h:144
void enable_ALE()
Definition: gen_axisym_advection_diffusion_elements.h:154
double du_dt_cons_axisym_adv_diff(const unsigned &n) const
Definition: gen_axisym_advection_diffusion_elements.h:117
GeneralisedAxisymAdvectionDiffusionSourceFctPt & source_fct_pt()
Access function: Pointer to source function.
Definition: gen_axisym_advection_diffusion_elements.h:229
double *& pe_pt()
Pointer to Peclet number.
Definition: gen_axisym_advection_diffusion_elements.h:290
bool ALE_is_disabled
Definition: gen_axisym_advection_diffusion_elements.h:638
double * Pe_pt
Pointer to global Peclet number.
Definition: gen_axisym_advection_diffusion_elements.h:618
void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Get error against and norm of exact solution.
void get_flux(const Vector< double > &s, Vector< double > &flux) const
Get flux: .
Definition: gen_axisym_advection_diffusion_elements.h:424
virtual double dshape_and_dtest_eulerian_cons_axisym_adv_diff(const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
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.
const double & pe() const
Peclet number.
Definition: gen_axisym_advection_diffusion_elements.h:284
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
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2