discontinuous_galerkin_space_time_unsteady_heat_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 SpaceTimeUnsteadyHeat elements
27 #ifndef OOMPH_DISCONTINUOUS_GALERKIN_SPACE_TIME_UNSTEADY_HEAT_ELEMENTS_HEADER
28 #define OOMPH_DISCONTINUOUS_GALERKIN_SPACE_TIME_UNSTEADY_HEAT_ELEMENTS_HEADER
29 
30 // Config header generated by autoconfig
31 #ifdef HAVE_CONFIG_H
32 #include <oomph-lib-config.h>
33 #endif
34 
35 // Oomph-lib headers
36 #include "generic/Qelements.h"
37 #include "generic/shape.h"
38 #include "generic/projection.h"
39 
43 
44 namespace oomph
45 {
46  //============================================================================
49  //============================================================================
50  class SpaceTimeUnsteadyHeatEquationsBase : public virtual FiniteElement
51  {
52  public:
55  typedef void (*SpaceTimeUnsteadyHeatSourceFctPt)(const double& time,
56  const Vector<double>& x,
57  double& u);
58 
61  };
62 
63  //============================================================================
72  //============================================================================
73  template<unsigned SPATIAL_DIM>
75  : public virtual SpaceTimeUnsteadyHeatEquationsBase
76  {
77  public:
81  typedef void (*SpaceTimeUnsteadyHeatSourceFctPt)(const double& time,
82  const Vector<double>& x,
83  double& u);
84 
85 
91  {
92  // Set Alpha parameter to default (one for natural scaling)
94 
95  // Set Beta parameter to default (one for natural scaling)
97  } // End of SpaceTimeUnsteadyHeatEquations
98 
99 
102  const SpaceTimeUnsteadyHeatEquations& dummy) = delete;
103 
106  void disable_ALE()
107  {
108  // Set the flag to true
109  ALE_is_disabled = true;
110  } // End of disable_ALE
111 
112 
117  void enable_ALE()
118  {
119  // Set the flag to false
120  ALE_is_disabled = false;
121  } // End of enable_ALE
122 
123 
125  void compute_norm(double& norm);
126 
127 
129  void output(std::ostream& outfile)
130  {
131  // Number of plot points
132  unsigned nplot = 5;
133 
134  // Output the solution
135  output(outfile, nplot);
136  } // End of output
137 
138 
141  void output(std::ostream& outfile, const unsigned& nplot);
142 
143 
145  void output(FILE* file_pt)
146  {
147  // Number of plot points
148  unsigned nplot = 5;
149 
150  // Output the solution
151  output(file_pt, nplot);
152  } // End of output
153 
154 
157  void output(FILE* file_pt, const unsigned& nplot);
158 
159 
162  void output_fct(std::ostream& outfile,
163  const unsigned& nplot,
165 
166 
169  virtual void output_fct(
170  std::ostream& outfile,
171  const unsigned& nplot,
172  const double& time,
174 
175 
177  void compute_error(std::ostream& outfile,
179  double& error,
180  double& norm);
181 
182 
184  void compute_error(std::ostream& outfile,
186  const double& time,
187  double& error,
188  double& norm);
189 
190 
193  void output_element_paraview(std::ofstream& outfile, const unsigned& nplot);
194 
195 
198  unsigned nscalar_paraview() const
199  {
200  // Only one field to output
201  return 1;
202  } // End of nscalar_paraview
203 
204 
207  void scalar_value_paraview(std::ofstream& file_out,
208  const unsigned& i,
209  const unsigned& nplot) const
210  {
211 #ifdef PARANOID
212  if (i != 0)
213  {
214  std::stringstream error_stream;
215  error_stream << "Space-time unsteady heat elements only store a single "
216  << "field so i must be 0 rather than " << i << std::endl;
217  throw OomphLibError(
218  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
219  }
220 #endif
221 
222  // Get the number of plot points
223  unsigned local_loop = this->nplot_points_paraview(nplot);
224 
225  // Loop over the plot points
226  for (unsigned j = 0; j < local_loop; j++)
227  {
228  // Storage for the local coordinates
229  Vector<double> s(SPATIAL_DIM + 1);
230 
231  // Get the local coordinate of the required plot point
232  this->get_s_plot(j, nplot, s);
233 
234  // Output the interpolated solution value
235  file_out << this->interpolated_u_ust_heat(s) << std::endl;
236  }
237  } // End of scalar_value_paraview
238 
239 
243  std::ofstream& file_out,
244  const unsigned& i,
245  const unsigned& nplot,
246  FiniteElement::SteadyExactSolutionFctPt exact_soln_pt) const
247  {
248 #ifdef PARANOID
249  if (i != 0)
250  {
251  std::stringstream error_stream;
252  error_stream << "Space-time unsteady heat elements only store a single "
253  << "field so i must be 0 rather than " << i << std::endl;
254  throw OomphLibError(
255  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
256  }
257 #endif
258 
259  // Get the number of plot points
260  unsigned local_loop = this->nplot_points_paraview(nplot);
261 
262  // Loop over the plot points
263  for (unsigned j = 0; j < local_loop; j++)
264  {
265  // Storage for the local coordinates
266  Vector<double> s(SPATIAL_DIM + 1);
267 
268  // Storage for the global coordinates
269  Vector<double> spatial_coordinates(SPATIAL_DIM);
270 
271  // Get the local coordinate of the required plot point
272  this->get_s_plot(j, nplot, s);
273 
274  // Loop over the spatial coordinates
275  for (unsigned i = 0; i < SPATIAL_DIM; i++)
276  {
277  // Assign the i-th spatial coordinate
278  spatial_coordinates[i] = interpolated_x(s, i);
279  }
280 
281  // Exact solution vector (here it's simply a scalar)
282  Vector<double> exact_soln(1, 0.0);
283 
284  // Get the exact solution at this point
285  (*exact_soln_pt)(spatial_coordinates, exact_soln);
286 
287  // Output the interpolated solution value
288  file_out << exact_soln[0] << std::endl;
289  } // for (unsigned j=0;j<local_loop;j++)
290  } // End of scalar_value_fct_paraview
291 
292 
296  std::ofstream& file_out,
297  const unsigned& i,
298  const unsigned& nplot,
299  const double& time,
300  FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt) const
301  {
302 #ifdef PARANOID
303  if (i != 0)
304  {
305  std::stringstream error_stream;
306  error_stream << "Space-time unsteady heat elements only store a single "
307  << "field so i must be 0 rather than " << i << std::endl;
308  throw OomphLibError(
309  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
310  }
311 #endif
312 
313  // Get the number of plot points
314  unsigned local_loop = this->nplot_points_paraview(nplot);
315 
316  // Loop over the plot points
317  for (unsigned j = 0; j < local_loop; j++)
318  {
319  // Storage for the local coordinates
320  Vector<double> s(SPATIAL_DIM + 1);
321 
322  // Storage for the time value
323  double interpolated_t = 0.0;
324 
325  // Storage for the global coordinates
326  Vector<double> spatial_coordinates(SPATIAL_DIM);
327 
328  // Get the local coordinate of the required plot point
329  this->get_s_plot(j, nplot, s);
330 
331  // Loop over the spatial coordinates
332  for (unsigned i = 0; i < SPATIAL_DIM; i++)
333  {
334  // Assign the i-th spatial coordinate
335  spatial_coordinates[i] = interpolated_x(s, i);
336  }
337 
338  // Get the time value
339  interpolated_t = interpolated_x(s, SPATIAL_DIM);
340 
341  // Exact solution vector (here it's simply a scalar)
342  Vector<double> exact_soln(1, 0.0);
343 
344  // Get the exact solution at this point
345  (*exact_soln_pt)(interpolated_t, spatial_coordinates, exact_soln);
346 
347  // Output the interpolated solution value
348  file_out << exact_soln[0] << std::endl;
349  } // for (unsigned j=0;j<local_loop;j++)
350  } // End of scalar_value_fct_paraview
351 
352 
355  std::string scalar_name_paraview(const unsigned& i) const
356  {
357  // If we're outputting the solution
358  if (i == 0)
359  {
360  // There's only one field to output
361  return "U";
362  }
363  // Never get here
364  else
365  {
366  std::stringstream error_stream;
367  error_stream << "These unsteady heat elements only store 1 field, \n"
368  << "but i is currently " << i << std::endl;
369  throw OomphLibError(
370  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
371 
372  // Dummy return
373  return " ";
374  }
375  } // End of scalar_name_paraview
376 
377 
380  {
381  // Return the source function pointer
382  return Source_fct_pt;
383  } // End of source_fct_pt
384 
385 
388  {
389  // Return the source function pointer
390  return Source_fct_pt;
391  }
392 
393 
396  virtual inline void get_source_ust_heat(const double& t,
397  const unsigned& ipt,
398  const Vector<double>& x,
399  double& source) const
400  {
401  // If no source function has been set, return zero
402  if (Source_fct_pt == 0)
403  {
404  // Set the source term value to zero
405  source = 0.0;
406  }
407  // Otherwise return the appropriate value
408  else
409  {
410  // Get source strength
411  (*Source_fct_pt)(t, x, source);
412  }
413  } // End of get_source_ust_heat
414 
415 
417  const double& alpha() const
418  {
419  // Return the value of Alpha
420  return *Alpha_pt;
421  } // End of alpha
422 
423 
425  double*& alpha_pt()
426  {
427  // Return the pointer to Alpha
428  return Alpha_pt;
429  } // End of alpha_pt
430 
431 
433  const double& beta() const
434  {
435  // Return the pointer to Beta
436  return *Beta_pt;
437  } // End of beta
438 
439 
441  double*& beta_pt()
442  {
443  // Return the pointer to Beta
444  return Beta_pt;
445  } // End of beta_pt
446 
447 
450  {
451  // Find out how many nodes there are in the element
452  unsigned n_node = nnode();
453 
454  // Find the index at which the variable is stored
455  unsigned u_nodal_index = u_index_ust_heat();
456 
457  // Set up memory for the shape and test functions
458  Shape psi(n_node);
459 
460  // Set up memory for the derivatives of the shape and test functions
461  DShape dpsidx(n_node, SPATIAL_DIM + 1);
462 
463  // Call the derivatives of the shape and test functions
464  dshape_eulerian(s, psi, dpsidx);
465 
466  // Loop over the entries of the flux vector
467  for (unsigned j = 0; j < SPATIAL_DIM; j++)
468  {
469  // Initialise j-th flux entry to zero
470  flux[j] = 0.0;
471  }
472 
473  // Loop over nodes
474  for (unsigned l = 0; l < n_node; l++)
475  {
476  // Loop over derivative directions
477  for (unsigned j = 0; j < SPATIAL_DIM; j++)
478  {
479  // Update the flux value
480  flux[j] += nodal_value(l, u_nodal_index) * dpsidx(l, j);
481  }
482  } // for (unsigned l=0;l<n_node;l++)
483  } // End of get_flux
484 
485 
488  {
489  // Call the generic residuals function with flag set to 0
490  // using a dummy matrix argument
492  residuals, GeneralisedElement::Dummy_matrix, 0);
493  } // End of fill_in_contribution_to_residuals
494 
495 
498  DenseMatrix<double>& jacobian)
499  {
500  // Call the generic routine with the flag set to 1
501  fill_in_generic_residual_contribution_ust_heat(residuals, jacobian, 1);
502  } // End of fill_in_contribution_to_jacobian
503 
504 
506  inline double interpolated_u_ust_heat(const Vector<double>& s) const
507  {
508  // Find number of nodes
509  unsigned n_node = nnode();
510 
511  // Find the index at which the variable is stored
512  unsigned u_nodal_index = u_index_ust_heat();
513 
514  // Local shape function
515  Shape psi(n_node);
516 
517  // Find values of the shape functions at local coordinate s
518  shape(s, psi);
519 
520  // Initialise value of u
521  double interpolated_u = 0.0;
522 
523  // Loop over the local nodes and sum
524  for (unsigned l = 0; l < n_node; l++)
525  {
526  // Update the interpolated u value
527  interpolated_u += nodal_value(l, u_nodal_index) * psi[l];
528  }
529 
530  // Return the interpolated u value
531  return interpolated_u;
532  } // End of interpolated_u_ust_heat
533 
534 
542  virtual inline unsigned u_index_ust_heat() const
543  {
544  // Return the default value
545  return 0;
546  } // End of u_index_ust_heat
547 
548 
553  inline double interpolated_u_ust_heat(const unsigned& t,
554  const Vector<double>& s) const
555  {
556  // Find number of nodes
557  unsigned n_node = nnode();
558 
559  // Find the index at which the variable is stored
560  unsigned u_nodal_index = u_index_ust_heat();
561 
562  // Local shape function
563  Shape psi(n_node);
564 
565  // Find values of shape function
566  shape(s, psi);
567 
568  // Initialise value of u
569  double interpolated_u = 0.0;
570 
571  // Loop over the local nodes and sum
572  for (unsigned l = 0; l < n_node; l++)
573  {
574  // Update the interpolated u value
575  interpolated_u += nodal_value(t, l, u_nodal_index) * psi[l];
576  }
577 
578  // Return the interpolated u value
579  return interpolated_u;
580  } // End of interpolated_u_ust_heat
581 
582 
585  double du_dt_ust_heat(const unsigned& n) const
586  {
587  // Storage for the local coordinates
588  Vector<double> s(SPATIAL_DIM + 1, 0.0);
589 
590  // Get the local coordinate at the n-th node
592 
593  // Return the interpolated du/dt value
595  } // End of du_dt_ust_heat
596 
597 
600  inline double interpolated_du_dt_ust_heat(const Vector<double>& s) const
601  {
602  // Find number of nodes
603  unsigned n_node = nnode();
604 
605  // Find the index at which the variable is stored
606  unsigned u_nodal_index = u_index_ust_heat();
607 
608  // Local shape function
609  Shape psi(n_node);
610 
611  // Allocate space for the derivatives of the shape functions
612  DShape dpsidx(n_node, SPATIAL_DIM + 1);
613 
614  // Compute the geometric shape functions and also first derivatives
615  // w.r.t. global coordinates at local coordinate s
616  dshape_eulerian(s, psi, dpsidx);
617 
618  // Initialise value of du/dt
619  double interpolated_dudt = 0.0;
620 
621  // Loop over the local nodes and sum
622  for (unsigned l = 0; l < n_node; l++)
623  {
624  // Update the interpolated du/dt value
625  interpolated_dudt +=
626  nodal_value(l, u_nodal_index) * dpsidx(l, SPATIAL_DIM);
627  }
628 
629  // Return the interpolated du/dt value
630  return interpolated_dudt;
631  } // End of interpolated_du_dt_ust_heat
632 
633 
635  unsigned self_test();
636 
640  const Vector<double>& s,
641  Shape& psi,
642  DShape& dpsidx,
643  Shape& test,
644  DShape& dtestdx) const = 0;
645 
646 
650  const unsigned& ipt,
651  Shape& psi,
652  DShape& dpsidx,
653  Shape& test,
654  DShape& dtestdx) const = 0;
655 
656 
657  protected:
661  Vector<double>& residuals,
662  DenseMatrix<double>& jacobian,
663  const unsigned& flag);
664 
667 
671  bool ALE_is_disabled;
672 
674  double* Alpha_pt;
675 
677  double* Beta_pt;
678 
679  private:
682  static double Default_alpha_parameter;
683 
686  static double Default_beta_parameter;
687  };
688 
689 
693 
694 
695  //=========================================================================
699  //=========================================================================
700  template<unsigned SPATIAL_DIM, unsigned NNODE_1D>
702  : public virtual QElement<SPATIAL_DIM + 1, NNODE_1D>,
703  public virtual SpaceTimeUnsteadyHeatEquations<SPATIAL_DIM>
704  {
705  public:
709  : QElement<SPATIAL_DIM + 1, NNODE_1D>(),
710  SpaceTimeUnsteadyHeatEquations<SPATIAL_DIM>()
711  {
712  }
713 
717  delete;
718 
720  inline unsigned required_nvalue(const unsigned& n) const
721  {
722  // Return the appropriate value
723  return Initial_Nvalue;
724  } // End of required_nvalue
725 
726 
729  void output(std::ostream& outfile)
730  {
731  // Call the function in the base class
733  } // End of output
734 
735 
738  void output(std::ostream& outfile, const unsigned& n_plot)
739  {
740  // Call the function in the base class
742  } // End of output
743 
744 
747  void output(FILE* file_pt)
748  {
749  // Call the function in the base class
751  } // End of output
752 
753 
756  void output(FILE* file_pt, const unsigned& n_plot)
757  {
758  // Call the function in the base class
760  } // End of output
761 
762 
765  void output_fct(std::ostream& outfile,
766  const unsigned& n_plot,
768  {
769  // Call the function in the base class
771  outfile, n_plot, exact_soln_pt);
772  } // End of output_fct
773 
774 
778  void output_fct(std::ostream& outfile,
779  const unsigned& n_plot,
780  const double& time,
782  {
783  // Call the function in the base class
785  outfile, n_plot, time, exact_soln_pt);
786  } // End of output_fct
787 
790  Shape& psi,
791  DShape& dpsidx,
792  Shape& test,
793  DShape& dtestdx) const;
794 
795 
799  const unsigned& ipt,
800  Shape& psi,
801  DShape& dpsidx,
802  Shape& test,
803  DShape& dtestdx) const;
804 
805  protected:
806  private:
809  static const unsigned Initial_Nvalue;
810  };
811 
812 
813  //======================================================================
818  //======================================================================
819  template<unsigned SPATIAL_DIM, unsigned NNODE_1D>
822  Shape& psi,
823  DShape& dpsidx,
824  Shape& test,
825  DShape& dtestdx) const
826  {
827  //--------------------------
828  // Call the basis functions:
829  //--------------------------
830  // Find the element dimension
831  const unsigned el_dim = this->dim();
832 
833  // Get the values of the shape functions and their local derivatives,
834  // temporarily stored in dpsi
835  this->dshape_local(s, psi, dpsidx);
836 
837  // Allocate memory for the inverse jacobian
838  DenseMatrix<double> inverse_jacobian(el_dim);
839 
840  // Now calculate the inverse jacobian
841  const double det =
842  this->local_to_eulerian_mapping(dpsidx, inverse_jacobian);
843 
844  // Now set the values of the derivatives to be dpsidx
845  this->transform_derivatives(inverse_jacobian, dpsidx);
846 
847  //-------------------------
848  // Call the test functions:
849  //-------------------------
850  // Make sure we're using 3D space-time elements
851  if (el_dim != 3)
852  {
853  // Create an output stream
854  std::ostringstream error_message_stream;
855 
856  // Create an error message
857  error_message_stream << "Need 3D space-time elements for this to work!"
858  << std::endl;
859 
860  // Throw the error message
861  throw OomphLibError(error_message_stream.str(),
864  }
865 
866  //--------start_of_dshape_local--------------------------------------
867  // Local storage
868  double test_values[3][NNODE_1D];
869  double dtest_values[3][NNODE_1D];
870 
871  // Index of the total shape function
872  unsigned index = 0;
873 
874  // Call the 1D shape functions and derivatives
875  OneDimLagrange::shape<NNODE_1D>(s[0], test_values[0]);
876  OneDimLagrange::shape<NNODE_1D>(s[1], test_values[1]);
877  OneDimLagrange::dshape<NNODE_1D>(s[0], dtest_values[0]);
878  OneDimLagrange::dshape<NNODE_1D>(s[1], dtest_values[1]);
879 
880  // Set the time discretisation
881  OneDimDiscontinuousGalerkin::shape<NNODE_1D>(s[2], test_values[2]);
882  OneDimDiscontinuousGalerkin::dshape<NNODE_1D>(s[2], dtest_values[2]);
883 
884  // Loop over the nodes in the third local coordinate direction
885  for (unsigned k = 0; k < NNODE_1D; k++)
886  {
887  // Loop over the nodes in the second local coordinate direction
888  for (unsigned j = 0; j < NNODE_1D; j++)
889  {
890  // Loop over the nodes in the first local coordinate direction
891  for (unsigned i = 0; i < NNODE_1D; i++)
892  {
893  // Calculate dtest/ds_0
894  dtestdx(index, 0) =
895  dtest_values[0][i] * test_values[1][j] * test_values[2][k];
896 
897  // Calculate dtest/ds_1
898  dtestdx(index, 1) =
899  test_values[0][i] * dtest_values[1][j] * test_values[2][k];
900 
901  // Calculate dtest/ds_2
902  dtestdx(index, 2) =
903  test_values[0][i] * test_values[1][j] * dtest_values[2][k];
904 
905  // Calculate the index-th entry of test
906  test[index] =
907  test_values[0][i] * test_values[1][j] * test_values[2][k];
908 
909  // Increment the index
910  index++;
911  }
912  } // for (unsigned j=0;j<NNODE_1D;j++)
913  } // for (unsigned k=0;k<NNODE_1D;k++)
914  //--------end_of_dshape_local----------------------------------------
915 
916  // Transform derivatives from dtest/ds to dtest/dx
917  this->transform_derivatives(inverse_jacobian, dtestdx);
918 
919  // Return the determinant value
920  return det;
921  } // End of dshape_and_dtest_eulerian_ust_heat
922 
923 
924  //======================================================================
929  //======================================================================
930  template<unsigned SPATIAL_DIM, unsigned NNODE_1D>
933  Shape& psi,
934  DShape& dpsidx,
935  Shape& test,
936  DShape& dtestdx) const
937  {
938  // Find the element dimension
939  const unsigned el_dim = SPATIAL_DIM + 1;
940 
941  // Storage for the local coordinates of the integration point
942  Vector<double> s(el_dim, 0.0);
943 
944  // Set the local coordinate
945  for (unsigned i = 0; i < el_dim; i++)
946  {
947  // Calculate the i-th local coordinate at the ipt-th knot point
948  s[i] = this->integral_pt()->knot(ipt, i);
949  }
950 
951  // Return the Jacobian of the geometrical shape functions and derivatives
952  return dshape_and_dtest_eulerian_ust_heat(s, psi, dpsidx, test, dtestdx);
953  } // End of dshape_and_dtest_eulerian_at_knot_ust_heat
954 
955 
959 
960 
961  //=======================================================================
966  //=======================================================================
967  template<unsigned SPATIAL_DIM, unsigned NNODE_1D>
968  class FaceGeometry<QUnsteadyHeatSpaceTimeElement<SPATIAL_DIM, NNODE_1D>>
969  : public virtual QElement<SPATIAL_DIM, NNODE_1D>
970  {
971  public:
974  FaceGeometry() : QElement<SPATIAL_DIM, NNODE_1D>() {}
975  };
976 
977 
981 
982 
983  //=======================================================================
986  //=======================================================================
987  template<unsigned NNODE_1D>
988  class FaceGeometry<QUnsteadyHeatSpaceTimeElement<1, NNODE_1D>>
989  : public virtual PointElement
990  {
991  public:
995  };
996 
997 
1001 
1002 
1003  //==========================================================
1005  //==========================================================
1006  template<class UNSTEADY_HEAT_ELEMENT>
1007  class ProjectableUnsteadyHeatSpaceTimeElement
1008  : public virtual ProjectableElement<UNSTEADY_HEAT_ELEMENT>
1009  {
1010  public:
1014 
1015 
1020  {
1021 #ifdef PARANOID
1022  // If we're not dealing with the first field
1023  if (fld != 0)
1024  {
1025  // Create a stringstream object to create an error message
1026  std::stringstream error_stream;
1027 
1028  // Create the error string
1029  error_stream << "SpaceTimeUnsteadyHeat elements only store a single "
1030  << "field so fld must be 0 rather than " << fld
1031  << std::endl;
1032 
1033  // Throw an error
1034  throw OomphLibError(
1035  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1036  }
1037 #endif
1038 
1039  // The number of nodes in this element
1040  unsigned nnod = this->nnode();
1041 
1042  // Storage for the pairs
1043  Vector<std::pair<Data*, unsigned>> data_values(nnod);
1044 
1045  // Loop over all nodes
1046  for (unsigned j = 0; j < nnod; j++)
1047  {
1048  // Add the data value and associated field: The node itself
1049  data_values[j] = std::make_pair(this->node_pt(j), fld);
1050  }
1051 
1052  // Return the vector
1053  return data_values;
1054  } // End of data_values_of_field
1055 
1056 
1059  {
1060  // Return the appropriate value
1061  return 1;
1062  } // End of nfields_for_projection
1063 
1064 
1067  unsigned nhistory_values_for_projection(const unsigned& fld)
1068  {
1069 #ifdef PARANOID
1070  // If we're not dealing with the first field
1071  if (fld != 0)
1072  {
1073  // Create a stringstream object to create an error message
1074  std::stringstream error_stream;
1075 
1076  // Create the error string
1077  error_stream << "SpaceTimeUnsteadyHeat elements only store a single "
1078  << "field so fld must be 0 rather than " << fld
1079  << std::endl;
1080 
1081  // Throw an error
1082  throw OomphLibError(
1083  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1084  }
1085 #endif
1086 
1087  // Return the number of stored values
1088  return this->node_pt(0)->ntstorage();
1089  } // End of nhistory_values_for_projection
1090 
1091 
1095  {
1096  // Return the number of history values stored by the position timestepper
1097  return this->node_pt(0)->position_time_stepper_pt()->ntstorage();
1098  } // End of nhistory_values_for_coordinate_projection
1099 
1100 
1103  double jacobian_and_shape_of_field(const unsigned& fld,
1104  const Vector<double>& s,
1105  Shape& psi)
1106  {
1107 #ifdef PARANOID
1108  // If we're not dealing with the first field
1109  if (fld != 0)
1110  {
1111  // Create a stringstream object to create an error message
1112  std::stringstream error_stream;
1113 
1114  // Create the error string
1115  error_stream << "SpaceTimeUnsteadyHeat elements only store a single "
1116  << "field so fld must be 0 rather than " << fld
1117  << std::endl;
1118 
1119  // Throw an error
1120  throw OomphLibError(
1121  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1122  }
1123 #endif
1124 
1125  // Get the number of dimensions in the element
1126  unsigned n_dim = this->dim();
1127 
1128  // Get the number of nodes in the element
1129  unsigned n_node = this->nnode();
1130 
1131  // Allocate space for the test functions
1132  Shape test(n_node);
1133 
1134  // Allocate space for the derivatives of the shape functions
1135  DShape dpsidx(n_node, n_dim);
1136 
1137  // Allocate space for the derivatives of the test functions
1138  DShape dtestdx(n_node, n_dim);
1139 
1140  // Calculate the shape functions and their derivatives at the local
1141  // coordinate s (and the same for the test functions). On top of this
1142  // calculate the determinant of the Jacobian
1143  double J =
1144  this->dshape_and_dtest_eulerian_ust_heat(s, psi, dpsidx, test, dtestdx);
1145 
1146  // Return the determinant of the Jacobian
1147  return J;
1148  } // End of jacobian_and_shape_of_field
1149 
1150 
1153  double get_field(const unsigned& t,
1154  const unsigned& fld,
1155  const Vector<double>& s)
1156  {
1157 #ifdef PARANOID
1158  // If we're not dealing with the first field
1159  if (fld != 0)
1160  {
1161  // Create a stringstream object to create an error message
1162  std::stringstream error_stream;
1163 
1164  // Create the error string
1165  error_stream << "SpaceTimeUnsteadyHeat elements only store a single "
1166  << "field so fld must be 0 rather than " << fld
1167  << std::endl;
1168 
1169  // Throw an error
1170  throw OomphLibError(
1171  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1172  }
1173 #endif
1174 
1175  // Find the index at which the variable is stored
1176  unsigned u_nodal_index = this->u_index_ust_heat();
1177 
1178  // Get the number of nodes in the element
1179  unsigned n_node = this->nnode();
1180 
1181  // Local shape function
1182  Shape psi(n_node);
1183 
1184  // Find values of shape function
1185  this->shape(s, psi);
1186 
1187  // Initialise value of u
1188  double interpolated_u = 0.0;
1189 
1190  // Loop over the local nodes
1191  for (unsigned l = 0; l < n_node; l++)
1192  {
1193  // Update the interpolated solution value
1194  interpolated_u += this->nodal_value(t, l, u_nodal_index) * psi[l];
1195  }
1196 
1197  // Return the interpolated solution value
1198  return interpolated_u;
1199  } // End of get_field
1200 
1201 
1203  unsigned nvalue_of_field(const unsigned& fld)
1204  {
1205 #ifdef PARANOID
1206  // If we're not dealing with the first field
1207  if (fld != 0)
1208  {
1209  // Create a stringstream object to create an error message
1210  std::stringstream error_stream;
1211 
1212  // Create the error string
1213  error_stream << "SpaceTimeUnsteadyHeat elements only store a single "
1214  << "field so fld must be 0 rather than " << fld
1215  << std::endl;
1216 
1217  // Throw an error
1218  throw OomphLibError(
1219  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1220  }
1221 #endif
1222 
1223  // Return the number of nodes in the element
1224  return this->nnode();
1225  } // End of nvalue_of_field
1226 
1227 
1229  int local_equation(const unsigned& fld, const unsigned& j)
1230  {
1231 #ifdef PARANOID
1232  // If we're not dealing with the first field
1233  if (fld != 0)
1234  {
1235  // Create a stringstream object to create an error message
1236  std::stringstream error_stream;
1237 
1238  // Create the error string
1239  error_stream << "SpaceTimeUnsteadyHeat elements only store a single "
1240  << "field so fld must be 0 rather than " << fld
1241  << std::endl;
1242 
1243  // Throw an error
1244  throw OomphLibError(
1245  error_stream.str(), OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION);
1246  }
1247 #endif
1248 
1249  // Get the nodal index of the unknown
1250  const unsigned u_nodal_index = this->u_index_ust_heat();
1251 
1252  // Output the local equation number
1253  return this->nodal_local_eqn(j, u_nodal_index);
1254  } // End of local_equation
1255 
1256 
1259  void output(std::ostream& outfile, const unsigned& nplot)
1260  {
1261  // Get the dimension of the element
1262  unsigned el_dim = this->dim();
1263 
1264  // Vector of local coordinates
1265  Vector<double> s(el_dim, 0.0);
1266 
1267  // Tecplot header info
1268  outfile << this->tecplot_zone_string(nplot);
1269 
1270  // Get the number of plot points
1271  unsigned num_plot_points = this->nplot_points(nplot);
1272 
1273  // Loop over plot points
1274  for (unsigned iplot = 0; iplot < num_plot_points; iplot++)
1275  {
1276  // Get local coordinates of plot point
1277  this->get_s_plot(iplot, nplot, s);
1278 
1279  // Loop over the coordinate directions
1280  for (unsigned i = 0; i < el_dim; i++)
1281  {
1282  // Output the interpolated coordinates
1283  outfile << this->interpolated_x(s, i) << " ";
1284  }
1285 
1286  // Output the interpolated value of u(s)
1287  outfile << this->interpolated_u_ust_heat(s) << " ";
1288 
1289  // Output the interpolated value of du/dt(s)
1290  outfile << this->interpolated_du_dt_ust_heat(s) << " ";
1291 
1292  // History values of coordinates
1293  unsigned n_prev =
1295 
1296  // Loop over the previous timesteps
1297  for (unsigned t = 1; t < n_prev; t++)
1298  {
1299  // Loop over the coordinate directions
1300  for (unsigned i = 0; i < el_dim; i++)
1301  {
1302  // Output the coordinates
1303  outfile << this->interpolated_x(t, s, i) << " ";
1304  }
1305  } // for (unsigned t=1;t<n_prev;t++)
1306 
1307  // Number of history values of velocities
1308  n_prev = this->node_pt(0)->time_stepper_pt()->ntstorage();
1309 
1310  // Loop over the previous timesteps
1311  for (unsigned t = 1; t < n_prev; t++)
1312  {
1313  // Output the solution
1314  outfile << this->interpolated_u_ust_heat(t, s) << " ";
1315  }
1316 
1317  // Finish the line
1318  outfile << std::endl;
1319  } // for (unsigned iplot=0;iplot<num_plot_points;iplot++)
1320 
1321  // Write tecplot footer (e.g. FE connectivity lists)
1322  this->write_tecplot_zone_footer(outfile, nplot);
1323  } // End of output
1324  };
1325 
1326 
1327  //=======================================================================
1330  //=======================================================================
1331  template<class ELEMENT>
1332  class FaceGeometry<ProjectableUnsteadyHeatSpaceTimeElement<ELEMENT>>
1333  : public virtual FaceGeometry<ELEMENT>
1334  {
1335  public:
1336  FaceGeometry() : FaceGeometry<ELEMENT>() {}
1337  };
1338 
1339 
1340  //=======================================================================
1343  //=======================================================================
1344  template<class ELEMENT>
1345  class FaceGeometry<
1346  FaceGeometry<ProjectableUnsteadyHeatSpaceTimeElement<ELEMENT>>>
1347  : public virtual FaceGeometry<FaceGeometry<ELEMENT>>
1348  {
1349  public:
1351  };
1352 } // End of namespace oomph
1353 
1354 #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
Definition: shape.h:278
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
Definition: nodes.h:238
unsigned ntstorage() const
Definition: nodes.cc:879
FaceGeometry()
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:1350
FaceGeometry()
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:1336
FaceGeometry()
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:994
FaceGeometry()
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:974
Definition: elements.h:4998
virtual unsigned nplot_points_paraview(const unsigned &nplot) const
Definition: elements.h:2862
virtual void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Definition: elements.h:1842
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 std::string tecplot_zone_string(const unsigned &nplot) const
Definition: elements.h:3161
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
Definition: elements.cc:3962
virtual void shape(const Vector< double > &s, Shape &psi) const =0
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Definition: elements.h:1432
unsigned dim() const
Definition: elements.h:2611
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
void(* SteadyExactSolutionFctPt)(const Vector< double > &, Vector< double > &)
Definition: elements.h:1759
virtual void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &shifted_to_interior=false) const
Definition: elements.h:3148
virtual unsigned nplot_points(const unsigned &nplot) const
Definition: elements.h:3186
virtual void write_tecplot_zone_footer(std::ostream &outfile, const unsigned &nplot) const
Definition: elements.h:3174
void(* UnsteadyExactSolutionFctPt)(const double &, const Vector< double > &, Vector< double > &)
Definition: elements.h:1765
double dshape_eulerian(const Vector< double > &s, Shape &psi, DShape &dpsidx) const
Definition: elements.cc:3298
static DenseMatrix< double > Dummy_matrix
Definition: elements.h:227
TimeStepper *& position_time_stepper_pt()
Return a pointer to the position timestepper.
Definition: nodes.h:1022
Definition: oomph_definitions.h:222
Definition: elements.h:3439
int local_equation(const unsigned &fld, const unsigned &j)
Return local equation number of value j in field fld.
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:1229
double get_field(const unsigned &t, const unsigned &fld, const Vector< double > &s)
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:1153
unsigned nhistory_values_for_projection(const unsigned &fld)
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:1067
void output(std::ostream &outfile, const unsigned &nplot)
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:1259
unsigned nhistory_values_for_coordinate_projection()
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:1094
unsigned nvalue_of_field(const unsigned &fld)
Return number of values in field fld: One per node.
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:1203
unsigned nfields_for_projection()
Number of fields to be projected: Just one.
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:1058
ProjectableUnsteadyHeatSpaceTimeElement()
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:1013
double jacobian_and_shape_of_field(const unsigned &fld, const Vector< double > &s, Shape &psi)
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:1103
Vector< std::pair< Data *, unsigned > > data_values_of_field(const unsigned &fld)
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:1019
Definition: Qelements.h:459
Definition: space_time_unsteady_heat_elements.h:705
QUnsteadyHeatSpaceTimeElement(const QUnsteadyHeatSpaceTimeElement< SPATIAL_DIM, NNODE_1D > &dummy)=delete
Broken copy constructor.
double dshape_and_dtest_eulerian_at_knot_ust_heat(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
double dshape_and_dtest_eulerian_ust_heat(const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Shape/test functions & derivs. w.r.t. to global coords. Return Jacobian.
void output(FILE *file_pt, const unsigned &n_plot)
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:756
void output_fct(std::ostream &outfile, const unsigned &n_plot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:778
QUnsteadyHeatSpaceTimeElement()
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:708
void output(FILE *file_pt)
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:747
void output(std::ostream &outfile)
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:729
void output(std::ostream &outfile, const unsigned &n_plot)
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:738
void output_fct(std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:765
static const unsigned Initial_Nvalue
Definition: space_time_unsteady_heat_elements.h:810
unsigned required_nvalue(const unsigned &n) const
Required number of 'values' (pinned or dofs) at node n.
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:720
Definition: shape.h:76
Definition: space_time_unsteady_heat_elements.h:52
void(* SpaceTimeUnsteadyHeatSourceFctPt)(const double &time, const Vector< double > &x, double &u)
Definition: space_time_unsteady_heat_elements.h:56
virtual SpaceTimeUnsteadyHeatSourceFctPt & source_fct_pt()=0
Access function: Pointer to source function.
Definition: space_time_unsteady_heat_elements.h:77
void output_fct(std::ostream &outfile, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Get error and norm against exact solution.
virtual void fill_in_generic_residual_contribution_ust_heat(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
double *& beta_pt()
Pointer to Beta parameter (thermal conductivity)
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:441
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Compute element residual Vector (wrapper)
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:487
void scalar_value_paraview(std::ofstream &file_out, const unsigned &i, const unsigned &nplot) const
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:207
SpaceTimeUnsteadyHeatEquations(const SpaceTimeUnsteadyHeatEquations &dummy)=delete
Broken copy constructor.
void(* SpaceTimeUnsteadyHeatSourceFctPt)(const double &time, const Vector< double > &x, double &u)
Definition: space_time_unsteady_heat_elements.h:82
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Compute element residual Vector and element Jacobian matrix (wrapper)
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:497
void compute_error(std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
Get error and norm against exact solution.
void scalar_value_fct_paraview(std::ofstream &file_out, const unsigned &i, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt) const
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:242
double interpolated_u_ust_heat(const Vector< double > &s) const
Return FE representation of function value u(s) at local coordinate s.
Definition: space_time_unsteady_heat_elements.h:507
void output(FILE *file_pt)
C_style output with default number of plot points.
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:145
virtual void output_fct(std::ostream &outfile, const unsigned &nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
void output(std::ostream &outfile, const unsigned &nplot)
const double & alpha() const
Alpha parameter (thermal inertia)
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:417
double * Beta_pt
Pointer to Beta parameter (thermal conductivity)
Definition: space_time_unsteady_heat_elements.h:678
unsigned nscalar_paraview() const
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:198
SpaceTimeUnsteadyHeatSourceFctPt source_fct_pt() const
Access function: Pointer to source function. Const version.
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:387
void compute_norm(double &norm)
Compute norm of FE solution.
double * Alpha_pt
Pointer to Alpha parameter (thermal inertia)
Definition: space_time_unsteady_heat_elements.h:675
unsigned self_test()
Self-test: Return 0 for OK.
double *& alpha_pt()
Pointer to Alpha parameter (thermal inertia)
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:425
static double Default_beta_parameter
Default value for Beta parameter (thermal conductivity)
Definition: space_time_unsteady_heat_elements.h:687
std::string scalar_name_paraview(const unsigned &i) const
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:355
virtual double dshape_and_dtest_eulerian_at_knot_ust_heat(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
void output(std::ostream &outfile)
Output with default number of plot points.
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:129
double interpolated_du_dt_ust_heat(const Vector< double > &s) const
Definition: space_time_unsteady_heat_elements.h:601
const double & beta() const
Beta parameter (thermal conductivity)
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:433
void output(FILE *file_pt, const unsigned &nplot)
virtual void fill_in_generic_residual_contribution_ust_heat(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
Definition: space_time_unsteady_heat_elements.cc:65
virtual double dshape_and_dtest_eulerian_ust_heat(const Vector< double > &s, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
void disable_ALE()
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:106
void output_element_paraview(std::ofstream &outfile, const unsigned &nplot)
virtual unsigned u_index_ust_heat() const
Definition: space_time_unsteady_heat_elements.h:543
SpaceTimeUnsteadyHeatSourceFctPt Source_fct_pt
Pointer to source function:
Definition: space_time_unsteady_heat_elements.h:667
double interpolated_u_ust_heat(const unsigned &t, const Vector< double > &s) const
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:553
void scalar_value_fct_paraview(std::ofstream &file_out, const unsigned &i, const unsigned &nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt) const
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:295
bool ALE_is_disabled
Definition: space_time_unsteady_heat_elements.h:672
double du_dt_ust_heat(const unsigned &n) const
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:585
void get_flux(const Vector< double > &s, Vector< double > &flux) const
Get flux: flux[i]=du/dx_i.
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:449
SpaceTimeUnsteadyHeatEquations()
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:90
void enable_ALE()
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:117
SpaceTimeUnsteadyHeatSourceFctPt & source_fct_pt()
Access function: Pointer to source function.
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:379
static double Default_alpha_parameter
Default value for Alpha parameter (thermal inertia)
Definition: space_time_unsteady_heat_elements.h:683
virtual void get_source_ust_heat(const double &t, const unsigned &ipt, const Vector< double > &x, double &source) const
Definition: discontinuous_galerkin_space_time_unsteady_heat_elements.h:396
unsigned ntstorage() const
Definition: timesteppers.h:601
RealScalar s
Definition: level1_cplx_impl.h:130
char char char int int * k
Definition: level2_impl.h:374
squared absolute sa ArrayBase::abs2 DOXCOMMA MatrixBase::cwiseAbs2 sa Eigen::abs2 DOXCOMMA Eigen::pow DOXCOMMA ArrayBase::square nearest sa Eigen::floor DOXCOMMA Eigen::ceil DOXCOMMA ArrayBase::round nearest integer not less than the given sa Eigen::floor DOXCOMMA ArrayBase::ceil not a number test
Definition: GlobalFunctions.h:109
void flux(const double &time, const Vector< double > &x, double &flux)
Get flux applied along boundary x=0.
Definition: pretend_melt.cc:59
void exact_soln(const double &time, const Vector< double > &x, Vector< double > &soln)
Definition: unstructured_two_d_curved.cc:301
void source(const Vector< double > &x, Vector< double > &f)
Source function.
Definition: unstructured_two_d_circle.cc:46
int error
Definition: calibrate.py:297
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
list x
Definition: plotDoE.py:28
t
Definition: plotPSD.py:36
Definition: indexed_view.cpp:20
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
unsigned el_dim
dimension
Definition: overloaded_cartesian_element_body.h:30
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2