hermite_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-2024 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 functions for classes that define Hermite elements
27 
28 // Include guards to prevent multiple inclusions of the header
29 #ifndef OOMPH_HERMITE_ELEMENT_HEADER
30 #define OOMPH_HERMITE_ELEMENT_HEADER
31 
32 // Config header generated by autoconfig
33 #ifdef HAVE_CONFIG_H
34 #include <oomph-lib-config.h>
35 #endif
36 
37 #ifdef OOMPH_HAS_MPI
38 #include "mpi.h"
39 #endif
40 
41 // oomph-lib headers
42 #include "Vector.h"
43 #include "shape.h"
44 #include "integral.h"
45 #include "elements.h"
46 #include "Qelements.h"
47 
48 
49 namespace oomph
50 {
51  //========================================================================
52  /// Empty base class for QHermiteElements (created so that
53  /// we can use dynamic_cast<>() to figure out if a an element
54  /// is a QHermiteElement).
55  //========================================================================
57  {
58  public:
59  /// Empty default constructor
61 
62  /// Broken copy constructor
64 
65  /// Broken assignment operator
66  void operator=(const QHermiteElementBase&) = delete;
67  };
68 
69 
70  /// ///////////////////////////////////////////////////////////////////
71  /// ///////////////////////////////////////////////////////////////////
72  /// ///////////////////////////////////////////////////////////////////
73 
74 
75  //=======================================================================
76  /// General QHermiteElement class. Local coordinates are not assumed
77  /// to be aligned with the global coordinates so the Jacobian
78  /// of the mapping between local and global coordinates is
79  /// a full matrix. For cases where the coordinates are aligned,
80  /// you should use the derived class, DiagQHermiteElement, which
81  /// uses a simplified mapping that makes the evaluation of
82  /// derivatives of the shape functions much cheaper.
83  //=======================================================================
84  template<unsigned DIM>
85  class QHermiteElement : public virtual QHermiteElementBase
86  {
87  private:
88  /// Default integration rule: Gaussian integration of same 'order'
89  /// as the element
90  // This is sort of optimal, because it means that the integration is exact
91  // for the shape functions. Can overwrite this in specific element
92  // definition.
93  // static Gauss_Rescaled<DIM,3> Default_integration_scheme;
95 
96  public:
97  /// Constructor
99  {
100  // Calculate the number of nodes
101  unsigned n_node = static_cast<unsigned>(pow(2.0, static_cast<int>(DIM)));
102  // Set the number of nodes
103  this->set_n_node(n_node);
104  // Set the elemental and nodal dimensions
105  this->set_dimension(DIM);
106  // Set the number of interpolated position types (always n_node)
107  this->set_nnodal_position_type(n_node);
108  // Assign pointer to default integration scheme
109  this->set_integration_scheme(&Default_integration_scheme);
110  }
111 
112 
113  /// Broken copy constructor
114  QHermiteElement(const QHermiteElement& dummy) = delete;
115 
116  /// Broken assignment operator
117  void operator=(const QHermiteElement&) = delete;
118 
119  /// Check whether the local coordinate are valid or not
121  {
122  unsigned ncoord = dim();
123  for (unsigned i = 0; i < ncoord; i++)
124  {
125  // We're outside
126  if ((s[i] - s_max() > 0.0) || (s_min() - s[i] > 0.0))
127  {
128  return false;
129  }
130  }
131  return true;
132  }
133 
134  /// Adjust local coordinates so that they're located inside
135  /// the element
137  {
138  unsigned ncoord = dim();
139  for (unsigned i = 0; i < ncoord; i++)
140  {
141  // Adjust to move it onto the boundary
142  if (s[i] > s_max()) s[i] = s_max();
143  if (s[i] < s_min()) s[i] = s_min();
144  }
145  }
146 
147  /// Function to calculate the geometric shape functions at local coordinate
148  /// s
149  void shape(const Vector<double>& s, Shape& psi) const;
150 
151  /// Function to compute the geometric shape functions and
152  /// derivatives w.r.t. local coordinates at local coordinate s
154  Shape& psi,
155  DShape& dpsids) const;
156 
157  /// Function to compute the geometric shape functions and
158  /// also first and second derivatives wrt local coordinates at
159  /// local coordinate s.
160  /// Numbering:
161  /// \b 1D:
162  /// d2psids(i,0) = \f$ d^2 \psi_j / d s^2 \f$
163  /// \b 2D:
164  /// d2psids(i,0) = \f$ \partial^2 \psi_j / \partial s_0^2 \f$
165  /// d2psids(i,1) = \f$ \partial^2 \psi_j / \partial s_1^2 \f$
166  /// d2psids(i,2) = \f$ \partial^2 \psi_j / \partial s_0 \partial s_1 \f$
167  /// \b 3D:
168  /// d2psids(i,0) = \f$ \partial^2 \psi_j / \partial s_0^2 \f$
169  /// d2psids(i,1) = \f$ \partial^2 \psi_j / \partial s_1^2 \f$
170  /// d2psids(i,2) = \f$ \partial^2 \psi_j / \partial s_2^2 \f$
171  /// d2psids(i,3) = \f$ \partial^2 \psi_j / \partial s_0 \partial s_1 \f$
172  /// d2psids(i,4) = \f$ \partial^2 \psi_j / \partial s_0 \partial s_2 \f$
173  /// d2psids(i,5) = \f$ \partial^2 \psi_j / \partial s_1 \partial s_2 \f$
175  Shape& psi,
176  DShape& dpsids,
177  DShape& d2psids) const;
178 
179 
180  /// Overload the template-free interface for the calculation of
181  /// the inverse jacobian. The element dimension must be passed to
182  /// the function
184  DenseMatrix<double>& inverse_jacobian) const
185  {
186  return invert_jacobian<DIM>(jacobian, inverse_jacobian);
187  }
188 
189  /// Overload the template-free interface for the calculation of
190  /// transformation of second derivatives. The element dimension should be
191  /// passed as a template paremeter, for "optimum" efficiency.
193  const DenseMatrix<double>& jacobian,
194  const DenseMatrix<double>& inverse_jacobian,
195  const DenseMatrix<double>& jacobian2,
196  DShape& dbasis,
197  DShape& d2basis) const
198  {
199  transform_second_derivatives_template<DIM>(
200  jacobian, inverse_jacobian, jacobian2, dbasis, d2basis);
201  }
202 
203  /// Min. value of local coordinate
204  double s_min() const
205  {
206  return -1.0;
207  }
208 
209  /// Max. value of local coordinate
210  double s_max() const
211  {
212  return 1.0;
213  }
214 
215 
216  /// Get local coordinates of node j in the element; vector sets its own size
217  void local_coordinate_of_node(const unsigned& j, Vector<double>& s) const
218  {
219  s.resize(DIM);
220  Vector<unsigned> j_sub(DIM);
221  unsigned j_copy = j;
222  unsigned NNODE_1D = 2;
223  const double S_min = this->s_min();
224  const double S_range = this->s_max() - S_min;
225  for (unsigned i = 0; i < DIM; i++)
226  {
227  j_sub[i] = j_copy % NNODE_1D;
228  j_copy = (j_copy - j_sub[i]) / NNODE_1D;
229  s[i] = S_min + double(j_sub[i]) / (double)(NNODE_1D - 1) * S_range;
230  }
231  }
232 
233  /// Get local fraction of node j in the element; vector sets its own size
234  void local_fraction_of_node(const unsigned& j, Vector<double>& s_fraction)
235  {
236  s_fraction.resize(DIM);
237  Vector<unsigned> j_sub(DIM);
238  unsigned j_copy = j;
239  unsigned NNODE_1D = 2;
240  for (unsigned i = 0; i < DIM; i++)
241  {
242  j_sub[i] = j_copy % NNODE_1D;
243  j_copy = (j_copy - j_sub[i]) / NNODE_1D;
244  s_fraction[i] = j_sub[i];
245  }
246  }
247 
248  /// Get the local fraction of any node in the n-th position
249  /// in a one dimensional expansion along the i-th local coordinate
250  double local_one_d_fraction_of_node(const unsigned& n1d, const unsigned& i)
251  {
252  // The spacing is just the node number because there are only two
253  // nodes
254  return n1d;
255  }
256 
257  /// Return number of nodes along each element edge
258  unsigned nnode_1d() const
259  {
260  return 2;
261  }
262 
263  /// Output
264  void output(std::ostream& outfile);
265 
266  /// Output at n_plot points
267  void output(std::ostream& outfile, const unsigned& n_plot);
268 
269  /// C-style output
270  void output(FILE* file_pt);
271 
272  /// C_style output at n_plot points
273  void output(FILE* file_pt, const unsigned& n_plot);
274 
275  /// Get cector of local coordinates of plot point i (when plotting
276  /// nplot points in each "coordinate direction).
278  const unsigned& i,
279  const unsigned& nplot,
280  Vector<double>& s,
281  const bool& use_equally_spaced_interior_sample_points = false) const;
282 
283  /// Return string for tecplot zone header (when plotting
284  /// nplot points in each "coordinate direction)
285  std::string tecplot_zone_string(const unsigned& nplot) const;
286 
287  /// Return total number of plot points (when plotting
288  /// nplot points in each "coordinate direction)
289  unsigned nplot_points(const unsigned& nplot) const;
290 
291  /// Build the lower-dimensional FaceElement of the type
292  /// QHermiteElement<DIM-1>. The face index takes a value that
293  /// correponds to the possible faces:
294  ///
295  /// In 1D:
296  /// -1 (Left) s[0] = -1.0
297  /// +1 (Right) s[0] = 1.0
298  ///
299  /// In 2D:
300  /// -1 (West) s[0] = -1.0
301  /// +1 (East) s[0] = 1.0
302  /// -2 (South) s[1] = -1.0
303  /// +2 (North) s[1] = 1.0
304  ///
305  /// In 3D:
306  /// -1 (Left) s[0] = -1.0
307  /// +1 (Right) s[0] = 1.0
308  /// -2 (Down) s[1] = -1.0
309  /// +2 (Up) s[1] = 1.0
310  /// -3 (Back) s[2] = -1.0
311  /// +3 (Front) s[2] = 1.0
312  void build_face_element(const int& face_index,
313  FaceElement* face_element_pt);
314  };
315 
316  // Inline functions:
317  //=======================================================================
318  /// Get cector of local coordinates of plot point i (when plotting nplot
319  /// points in each coordinate direction).
320  //=======================================================================
321  template<>
323  const unsigned& i,
324  const unsigned& nplot,
325  Vector<double>& s,
326  const bool& use_equally_spaced_interior_sample_points) const
327  {
328  if (nplot > 1)
329  {
330  s[0] = -1.0 + 2.0 * double(i) / double(nplot - 1);
331  if (use_equally_spaced_interior_sample_points)
332  {
333  double range = 2.0;
334  double dx_new = range / double(nplot);
335  double range_new = double(nplot - 1) * dx_new;
336  s[0] = -1.0 + 0.5 * dx_new + range_new * (1.0 + s[0]) / range;
337  }
338  }
339  else
340  {
341  s[0] = 0.0;
342  }
343  }
344 
345  //=======================================================================
346  /// Return string for tecplot zone header (when plotting nplot points in
347  /// each coordinate direction)
348  //=======================================================================
349  template<>
351  const unsigned& nplot) const
352  {
353  std::ostringstream header;
354  header << "ZONE I=" << nplot << "\n";
355  return header.str();
356  }
357 
358  //========================================================================
359  /// Return total number of plot points (when plotting nplot points in each
360  /// coordinate direction)
361  //========================================================================
362  template<>
363  inline unsigned QHermiteElement<1>::nplot_points(const unsigned& nplot) const
364  {
365  return nplot;
366  }
367 
368 
369  //=======================================================================
370  /// Get cector of local coordinates of plot point i (when plotting nplot
371  /// points in each "coordinate direction).
372  //=======================================================================
373  template<>
375  const unsigned& i,
376  const unsigned& nplot,
377  Vector<double>& s,
378  const bool& use_equally_spaced_interior_sample_points) const
379  {
380  if (nplot > 1)
381  {
382  unsigned i0 = i % nplot;
383  unsigned i1 = (i - i0) / nplot;
384 
385  s[0] = -1.0 + 2.0 * double(i0) / double(nplot - 1);
386  s[1] = -1.0 + 2.0 * double(i1) / double(nplot - 1);
387 
388  if (use_equally_spaced_interior_sample_points)
389  {
390  double range = 2.0;
391  double dx_new = range / double(nplot);
392  double range_new = double(nplot - 1) * dx_new;
393  s[0] = -1.0 + 0.5 * dx_new + range_new * (1.0 + s[0]) / range;
394  s[1] = -1.0 + 0.5 * dx_new + range_new * (1.0 + s[1]) / range;
395  }
396  }
397  else
398  {
399  s[0] = 0.0;
400  s[1] = 0.0;
401  }
402  }
403 
404  //=======================================================================
405  /// Return string for tecplot zone header (when plotting nplot points in
406  /// each coordinate direction)
407  //=======================================================================
408  template<>
410  const unsigned& nplot) const
411  {
412  std::ostringstream header;
413  header << "ZONE I=" << nplot << ", J=" << nplot << "\n";
414  return header.str();
415  }
416 
417  //=======================================================================
418  /// Return total number of plot points (when plotting
419  /// nplot points in each coordinate direction)
420  //=======================================================================
421  template<>
422  inline unsigned QHermiteElement<2>::nplot_points(const unsigned& nplot) const
423  {
424  return nplot * nplot;
425  }
426 
427  //=====================================================================
428  /// These elements are exactly the same as QHermiteElements, but they
429  /// employ the simplifying assumption that the local and global
430  /// coordinates are aligned. This makes the evaluation of the
431  /// derivatives of the shape functions much cheaper.
432  //=====================================================================
433  template<unsigned DIM>
434  class DiagQHermiteElement : public virtual QHermiteElement<DIM>
435  {
436  protected:
437  /// Overload the template-free interface for the calculation of
438  /// the inverse jacobian. Pass the dimension of the element to the
439  /// invert_jacobian function.
441  DenseMatrix<double>& inverse_jacobian) const
442  {
443  return FiniteElement::invert_jacobian<DIM>(jacobian, inverse_jacobian);
444  }
445 
446  /// Overload the local to eulerian mapping so that it uses diagonal
447  /// terms only.
449  const DShape& dpsids,
450  DenseMatrix<double>& jacobian,
451  DenseMatrix<double>& inverse_jacobian) const
452  {
454  dpsids, jacobian, inverse_jacobian);
455  }
456 
457  /// Overload the template-free interface for the transformation
458  /// of derivatives, so that the diagonal version is used.
459  void transform_derivatives(const DenseMatrix<double>& inverse_jacobian,
460  DShape& dbasis) const
461  {
462  FiniteElement::transform_derivatives_diagonal(inverse_jacobian, dbasis);
463  }
464 
465  /// Overload the template-free interface for the calculation of
466  /// transformation of second derivatives.
468  const DenseMatrix<double>& jacobian,
469  const DenseMatrix<double>& inverse_jacobian,
470  const DenseMatrix<double>& jacobian2,
471  DShape& dbasis,
472  DShape& d2basis) const
473  {
474  FiniteElement::transform_second_derivatives_diagonal<DIM>(
475  jacobian, inverse_jacobian, jacobian2, dbasis, d2basis);
476  }
477 
478 
479  public:
480  /// Constructor
482 
483  /// Broken copy constructor
484  DiagQHermiteElement(const DiagQHermiteElement& dummy) = delete;
485 
486  /// Broken assignment operator
487  void operator=(const DiagQHermiteElement&) = delete;
488  };
489 
490  /// ////////////////////////////////////////////////////////////////////
491  /// ////////////////////////////////////////////////////////////////////
492 
493 
494  //=======================================================================
495  /// SolidQHermiteElement elements are Hermite elements whose Jacobian
496  /// matrices include derivatives w.r.t. the Eulerian positions
497  /// of their nodes. They are the basis for elasticity elements.
498  /// No assumptions are made about alignment of local and global
499  /// coordinates.
500  //=======================================================================
501  template<unsigned DIM>
502  class SolidQHermiteElement : public virtual QHermiteElement<DIM>,
503  public virtual SolidFiniteElement
504  {
505  public:
506  /// Constructor
508  {
509  // Get the number of nodes (alloactaed in the QHermiteElement<DIM> class)
510  unsigned n_node = nnode();
511  // Set the lagrangian dimension
512  this->set_lagrangian_dimension(DIM);
513  // Set the number of interpolated lagrangian types (always n_node)
514  this->set_nnodal_lagrangian_type(n_node);
515  }
516 
517  /// Broken copy constructor
519 
520  /// Broken assignment operator
521  void operator=(const SolidQHermiteElement&) = delete;
522 
523  /// Overload the output function
524  void output(std::ostream& outfile);
525 
526  /// Output at n_plot points
527  void output(std::ostream& outfile, const unsigned& n_plot);
528 
529  /// C-style output
530  void output(FILE* file_pt);
531 
532  /// C_style output at n_plot points
533  void output(FILE* file_pt, const unsigned& n_plot);
534 
535  /// Build the lower-dimensional FaceElement of the type
536  /// SolidQHermiteElement<DIM-1>. The face index takes a value that
537  /// correponds to the possible faces:
538  ///
539  /// In 1D:
540  /// -1 (Left) s[0] = -1.0
541  /// +1 (Right) s[0] = 1.0
542  ///
543  /// In 2D:
544  /// -1 (West) s[0] = -1.0
545  /// +1 (East) s[0] = 1.0
546  /// -2 (South) s[1] = -1.0
547  /// +2 (North) s[1] = 1.0
548  ///
549  /// In 3D:
550  /// -1 (Left) s[0] = -1.0
551  /// +1 (Right) s[0] = 1.0
552  /// -2 (Down) s[1] = -1.0
553  /// +2 (Up) s[1] = 1.0
554  /// -3 (Back) s[2] = -1.0
555  /// +3 (Front) s[2] = 1.0
556  void build_face_element(const int& face_index,
557  FaceElement* face_element_pt);
558  };
559 
560  //============================================================================
561  /// SolidQHermiteElements in which we assume the local and global
562  /// coordinates to be aligned so that the Jacobian of the mapping
563  /// betwteen local and global coordinates is diagonal. This makes
564  /// the evaluation of the derivatives of the shape functions
565  /// much cheaper.
566  //============================================================================
567  template<unsigned DIM>
568  class SolidDiagQHermiteElement : public virtual DiagQHermiteElement<DIM>,
569  public virtual SolidQHermiteElement<DIM>
570  {
571  public:
572  /// Constructor
575  {
576  }
577 
578  /// Broken copy constructor
580 
581  /// Broken assignment operator
582  void operator=(const SolidDiagQHermiteElement&) = delete;
583 
584  /// Overload the local to lagrangian mapping so that it uses diagonal
585  /// terms only.
587  const DShape& dpsids,
588  DenseMatrix<double>& jacobian,
589  DenseMatrix<double>& inverse_jacobian) const
590  {
592  dpsids, jacobian, inverse_jacobian);
593  }
594  };
595 
596 } // namespace oomph
597 
598 #endif
static char t char * s
Definition: cfortran.h:568
cstr elem_len * i
Definition: cfortran.h:603
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
Definition: shape.h:278
These elements are exactly the same as QHermiteElements, but they employ the simplifying assumption t...
double invert_jacobian_mapping(const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Overload the template-free interface for the calculation of the inverse jacobian. Pass the dimension ...
double local_to_eulerian_mapping(const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Overload the local to eulerian mapping so that it uses diagonal terms only.
void operator=(const DiagQHermiteElement &)=delete
Broken assignment operator.
void transform_second_derivatives(const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
Overload the template-free interface for the calculation of transformation of second derivatives.
DiagQHermiteElement(const DiagQHermiteElement &dummy)=delete
Broken copy constructor.
void transform_derivatives(const DenseMatrix< double > &inverse_jacobian, DShape &dbasis) const
Overload the template-free interface for the transformation of derivatives, so that the diagonal vers...
FaceElements are elements that coincide with the faces of higher-dimensional "bulk" elements....
Definition: elements.h:4342
void set_nnodal_position_type(const unsigned &nposition_type)
Set the number of types required to interpolate the coordinate.
Definition: elements.h:1400
virtual double local_to_eulerian_mapping_diagonal(const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Calculate the mapping from local to Eulerian coordinates given the derivatives of the shape functions...
Definition: elements.cc:2618
void set_dimension(const unsigned &dim)
Set the dimension of the element and initially set the dimension of the nodes to be the same as the d...
Definition: elements.h:1384
unsigned dim() const
Return the spatial dimension of the element, i.e. the number of local coordinates required to paramet...
Definition: elements.h:2615
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2214
void set_n_node(const unsigned &n)
Set the number of nodes in the element to n, by resizing the storage for pointers to the Node objects...
Definition: elements.h:1408
virtual void set_integration_scheme(Integral *const &integral_pt)
Set the spatial integration scheme.
Definition: elements.cc:3240
void transform_derivatives_diagonal(const DenseMatrix< double > &inverse_jacobian, DShape &dbasis) const
Convert derivative w.r.t local coordinates to derivatives w.r.t the coordinates used to assemble the ...
Definition: elements.cc:2907
/////////////////////////////////////////////////////////////////// /////////////////////////////////...
Definition: Qelements.h:64
Empty base class for QHermiteElements (created so that we can use dynamic_cast<>() to figure out if a...
QHermiteElementBase()
Empty default constructor.
void operator=(const QHermiteElementBase &)=delete
Broken assignment operator.
QHermiteElementBase(const QHermiteElementBase &)=delete
Broken copy constructor.
/////////////////////////////////////////////////////////////////// /////////////////////////////////...
double local_one_d_fraction_of_node(const unsigned &n1d, const unsigned &i)
Get the local fraction of any node in the n-th position in a one dimensional expansion along the i-th...
void shape(const Vector< double > &s, Shape &psi) const
Function to calculate the geometric shape functions at local coordinate s.
void transform_second_derivatives(const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
Overload the template-free interface for the calculation of transformation of second derivatives....
void output(FILE *file_pt, const unsigned &n_plot)
C_style output at n_plot points.
double invert_jacobian_mapping(const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Overload the template-free interface for the calculation of the inverse jacobian. The element dimensi...
QHermiteElement()
Constructor.
std::string tecplot_zone_string(const unsigned &nplot) const
Return string for tecplot zone header (when plotting nplot points in each "coordinate direction)
bool local_coord_is_valid(const Vector< double > &s)
Check whether the local coordinate are valid or not.
void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &use_equally_spaced_interior_sample_points=false) const
Get cector of local coordinates of plot point i (when plotting nplot points in each "coordinate direc...
void move_local_coord_back_into_element(Vector< double > &s) const
Adjust local coordinates so that they're located inside the element.
unsigned nnode_1d() const
Return number of nodes along each element edge.
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Get local coordinates of node j in the element; vector sets its own size.
unsigned nplot_points(const unsigned &nplot) const
Return total number of plot points (when plotting nplot points in each "coordinate direction)
void operator=(const QHermiteElement &)=delete
Broken assignment operator.
static Gauss< DIM, 3 > Default_integration_scheme
Default integration rule: Gaussian integration of same 'order' as the element.
void local_fraction_of_node(const unsigned &j, Vector< double > &s_fraction)
Get local fraction of node j in the element; vector sets its own size.
void build_face_element(const int &face_index, FaceElement *face_element_pt)
Build the lower-dimensional FaceElement of the type QHermiteElement<DIM-1>. The face index takes a va...
void output(std::ostream &outfile, const unsigned &n_plot)
Output at n_plot points.
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Function to compute the geometric shape functions and derivatives w.r.t. local coordinates at local c...
double s_min() const
Min. value of local coordinate.
double s_max() const
Max. value of local coordinate.
void output(FILE *file_pt)
C-style output.
void output(std::ostream &outfile)
Output.
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
Function to compute the geometric shape functions and also first and second derivatives wrt local coo...
QHermiteElement(const QHermiteElement &dummy)=delete
Broken copy constructor.
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
Definition: shape.h:76
SolidQHermiteElements in which we assume the local and global coordinates to be aligned so that the J...
void operator=(const SolidDiagQHermiteElement &)=delete
Broken assignment operator.
double local_to_lagrangian_mapping(const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Overload the local to lagrangian mapping so that it uses diagonal terms only.
SolidDiagQHermiteElement(const SolidDiagQHermiteElement &dummy)=delete
Broken copy constructor.
////////////////////////////////////////////////////////////////////// //////////////////////////////...
Definition: elements.h:3565
void set_nnodal_lagrangian_type(const unsigned &nlagrangian_type)
Set the number of types required to interpolate the Lagrangian coordinates.
Definition: elements.h:4074
virtual double local_to_lagrangian_mapping_diagonal(const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Calculate the mapping from local to Lagrangian coordinates given the derivatives of the shape functio...
Definition: elements.cc:6673
void set_lagrangian_dimension(const unsigned &lagrangian_dimension)
Set the lagrangian dimension of the element — the number of lagrangian coordinates stored at the node...
Definition: elements.h:3569
////////////////////////////////////////////////////////////////////
void output(FILE *file_pt, const unsigned &n_plot)
C_style output at n_plot points.
SolidQHermiteElement(const SolidQHermiteElement &dummy)=delete
Broken copy constructor.
void build_face_element(const int &face_index, FaceElement *face_element_pt)
Build the lower-dimensional FaceElement of the type SolidQHermiteElement<DIM-1>. The face index takes...
void output(std::ostream &outfile)
Overload the output function.
void operator=(const SolidQHermiteElement &)=delete
Broken assignment operator.
void output(std::ostream &outfile, const unsigned &n_plot)
Output at n_plot points.
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...