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// Version 1.0; svn revision $LastChangedRevision: 1097 $
7 //LIC//
8 //LIC// $LastChangedDate: 2015-12-17 11:53:17 +0000 (Thu, 17 Dec 2015) $
9 //LIC//
10 //LIC// Copyright (C) 2006-2016 Matthias Heil and Andrew Hazel
11 //LIC//
12 //LIC// This library is free software; you can redistribute it and/or
13 //LIC// modify it under the terms of the GNU Lesser General Public
14 //LIC// License as published by the Free Software Foundation; either
15 //LIC// version 2.1 of the License, or (at your option) any later version.
16 //LIC//
17 //LIC// This library is distributed in the hope that it will be useful,
18 //LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
19 //LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 //LIC// Lesser General Public License for more details.
21 //LIC//
22 //LIC// You should have received a copy of the GNU Lesser General Public
23 //LIC// License along with this library; if not, write to the Free Software
24 //LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 //LIC// 02110-1301 USA.
26 //LIC//
27 //LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
28 //LIC//
29 //LIC//====================================================================
30 //Header functions for classes that define Hermite elements
31 
32 //Include guards to prevent multiple inclusions of the header
33 #ifndef OOMPH_HERMITE_ELEMENT_HEADER
34 #define OOMPH_HERMITE_ELEMENT_HEADER
35 
36 // Config header generated by autoconfig
37 #ifdef HAVE_CONFIG_H
38  #include <oomph-lib-config.h>
39 #endif
40 
41 #ifdef OOMPH_HAS_MPI
42 #include "mpi.h"
43 #endif
44 
45 //oomph-lib headers
46 #include "Vector.h"
47 #include "shape.h"
48 #include "integral.h"
49 #include "elements.h"
50 #include "Qelements.h"
51 
52 
53 namespace oomph
54 {
55 
56 //========================================================================
57 /// Empty base class for QHermiteElements (created so that
58 /// we can use dynamic_cast<>() to figure out if a an element
59 /// is a QHermiteElement).
60 //========================================================================
62 {
63 
64  public:
65 
66  /// Empty default constructor
68 
69  /// Broken copy constructor
71  {
72  BrokenCopy::broken_copy("QHermiteElementBase");
73  }
74 
75  /// Broken assignment operator
77  {
78  BrokenCopy::broken_assign("QHermiteElementBase");
79  }
80 };
81 
82 
83 //////////////////////////////////////////////////////////////////////
84 //////////////////////////////////////////////////////////////////////
85 //////////////////////////////////////////////////////////////////////
86 
87 
88 //=======================================================================
89 /// General QHermiteElement class. Local coordinates are not assumed
90 /// to be aligned with the global coordinates so the Jacobian
91 /// of the mapping between local and global coordinates is
92 /// a full matrix. For cases where the coordinates are aligned,
93 /// you should use the derived class, DiagQHermiteElement, which
94 /// uses a simplified mapping that makes the evaluation of
95 /// derivatives of the shape functions much cheaper.
96 //=======================================================================
97 template<unsigned DIM>
98 class QHermiteElement : public virtual QHermiteElementBase
99 {
100  private:
101 
102  /// \short Default integration rule: Gaussian integration of same 'order'
103  /// as the element
104  // This is sort of optimal, because it means that the integration is exact
105  // for the shape functions. Can overwrite this in specific element definition.
106  //static Gauss_Rescaled<DIM,3> Default_integration_scheme;
108 
109 public:
110 
111  /// Constructor
113  {
114  //Calculate the number of nodes
115  unsigned n_node =
116  static_cast<unsigned>(pow(2.0,static_cast<int>(DIM)));
117  //Set the number of nodes
118  this->set_n_node(n_node);
119  //Set the elemental and nodal dimensions
120  this->set_dimension(DIM);
121  //Set the number of interpolated position types (always n_node)
122  this->set_nnodal_position_type(n_node);
123  //Assign pointer to default integration scheme
125  }
126 
127 
128  /// Broken copy constructor
130  {
131  BrokenCopy::broken_copy("QHermiteElement");
132  }
133 
134  /// Broken assignment operator
136  {
137  BrokenCopy::broken_assign("QHermiteElement");
138  }
139 
140 
141  ///Check whether the local coordinate are valid or not
143  {
144  unsigned ncoord = dim();
145  for(unsigned i=0;i<ncoord;i++)
146  {
147  // We're outside
148  if((s[i] - s_max() > 0.0) ||
149  (s_min() - s[i] > 0.0))
150  {
151  return false;
152  }
153  }
154  return true;
155  }
156 
157  /// \short Check whether the local coordinate are valid or not, allowing for
158  /// rounding tolerance. Nodal coordinate is adjusted to move the
159  /// point back into the element if it's outside the element
160  /// to within that tolerance
162  const double & rounding_tolerance)
163  {
164  unsigned ncoord = dim();
165  for(unsigned i=0;i<ncoord;i++)
166  {
167  // We're outside
168  if((s[i] - s_max() > rounding_tolerance) ||
169  (s_min() - s[i] > rounding_tolerance))
170  {
171  return false;
172  }
173  else
174  {
175  // Adjust to move it onto the boundary
176  if (s[i] > s_max() ) s[i] = s_max();
177  if (s[i] < s_min() ) s[i] = s_min();
178  }
179  }
180  return true;
181  }
182 
183  /// Function to calculate the geometric shape functions at local coordinate s
184  void shape(const Vector<double> &s, Shape &psi) const;
185 
186  /// \short Function to compute the geometric shape functions and
187  /// derivatives w.r.t. local coordinates at local coordinate s
188  void dshape_local(const Vector<double> &s, Shape &psi, DShape &dpsids)
189  const;
190 
191  /// \short Function to compute the geometric shape functions and
192  /// also first and second derivatives wrt local coordinates at
193  /// local coordinate s.
194  /// Numbering:
195  /// \b 1D:
196  /// d2psids(i,0) = \f$ d^2 \psi_j / d s^2 \f$
197  /// \b 2D:
198  /// d2psids(i,0) = \f$ \partial^2 \psi_j / \partial s_0^2 \f$
199  /// d2psids(i,1) = \f$ \partial^2 \psi_j / \partial s_1^2 \f$
200  /// d2psids(i,2) = \f$ \partial^2 \psi_j / \partial s_0 \partial s_1 \f$
201  /// \b 3D:
202  /// d2psids(i,0) = \f$ \partial^2 \psi_j / \partial s_0^2 \f$
203  /// d2psids(i,1) = \f$ \partial^2 \psi_j / \partial s_1^2 \f$
204  /// d2psids(i,2) = \f$ \partial^2 \psi_j / \partial s_2^2 \f$
205  /// d2psids(i,3) = \f$ \partial^2 \psi_j / \partial s_0 \partial s_1 \f$
206  /// d2psids(i,4) = \f$ \partial^2 \psi_j / \partial s_0 \partial s_2 \f$
207  /// d2psids(i,5) = \f$ \partial^2 \psi_j / \partial s_1 \partial s_2 \f$
208  void d2shape_local(const Vector<double> &s, Shape &psi, DShape &dpsids,
209  DShape &d2psids) const;
210 
211 
212  /// \short Overload the template-free interface for the calculation of
213  /// the inverse jacobian. The element dimension must be passed to
214  /// the function
216  DenseMatrix<double> &inverse_jacobian) const
217  {return invert_jacobian<DIM>(jacobian,inverse_jacobian);}
218 
219  /// \short Overload the template-free interface for the calculation of
220  /// transformation of second derivatives. The element dimension should be
221  /// passed as a template paremeter, for "optimum" efficiency.
223  &jacobian,
224  const DenseMatrix<double>
225  &inverse_jacobian,
226  const DenseMatrix<double>
227  &jacobian2,
228  DShape &dbasis,
229  DShape &d2basis) const
230  {
231  transform_second_derivatives_template<DIM>(jacobian,inverse_jacobian,
232  jacobian2,dbasis,d2basis);
233  }
234 
235  /// Min. value of local coordinate
236  double s_min() const {return -1.0;}
237 
238  /// Max. value of local coordinate
239  double s_max() const {return 1.0;}
240 
241 
242  /// Get local coordinates of node j in the element; vector sets its own size
243  void local_coordinate_of_node(const unsigned& j, Vector<double>& s) const
244  {
245  s.resize(DIM);
246  Vector<unsigned> j_sub(DIM);
247  unsigned j_copy = j;
248  unsigned NNODE_1D=2;
249  const double S_min = this->s_min();
250  const double S_range = this->s_max() - S_min;
251  for(unsigned i=0;i<DIM;i++)
252  {
253  j_sub[i] = j_copy%NNODE_1D;
254  j_copy = (j_copy - j_sub[i])/NNODE_1D;
255  s[i]= S_min + double(j_sub[i])/(double)(NNODE_1D-1)*S_range;
256  }
257  }
258 
259  /// Get local fraction of node j in the element; vector sets its own size
260  void local_fraction_of_node(const unsigned& j, Vector<double>& s_fraction)
261  {
262  s_fraction.resize(DIM);
263  Vector<unsigned> j_sub(DIM);
264  unsigned j_copy = j;
265  unsigned NNODE_1D=2;
266  for(unsigned i=0;i<DIM;i++)
267  {
268  j_sub[i] = j_copy%NNODE_1D;
269  j_copy = (j_copy - j_sub[i])/NNODE_1D;
270  s_fraction[i]= j_sub[i];
271  }
272  }
273 
274  /// \short Get the local fraction of any node in the n-th position
275  /// in a one dimensional expansion along the i-th local coordinate
276  double local_one_d_fraction_of_node(const unsigned &n1d,
277  const unsigned &i)
278  {
279  //The spacing is just the node number because there are only two
280  //nodes
281  return n1d;
282  }
283 
284  /// Return number of nodes along each element edge
285  unsigned nnode_1d() const {return 2;}
286 
287  /// Output
288  void output(std::ostream &outfile);
289 
290  /// Output at n_plot points
291  void output(std::ostream &outfile, const unsigned &n_plot);
292 
293  /// C-style output
294  void output(FILE* file_pt);
295 
296  /// C_style output at n_plot points
297  void output(FILE* file_pt, const unsigned &n_plot);
298 
299  /// \short Get cector of local coordinates of plot point i (when plotting
300  /// nplot points in each "coordinate direction).
301  void get_s_plot(const unsigned& i, const unsigned& nplot,
302  Vector<double>& s) const;
303 
304  /// \short Return string for tecplot zone header (when plotting
305  /// nplot points in each "coordinate direction)
306  std::string tecplot_zone_string(const unsigned& nplot) const;
307 
308  /// Return total number of plot points (when plotting
309  /// nplot points in each "coordinate direction)
310  unsigned nplot_points(const unsigned& nplot) const;
311 
312  /// \short Build the lower-dimensional FaceElement of the type
313  /// QHermiteElement<DIM-1>. The face index takes a value that
314  /// correponds to the possible faces:
315  ///
316  /// In 1D:
317  /// -1 (Left) s[0] = -1.0
318  /// +1 (Right) s[0] = 1.0
319  ///
320  /// In 2D:
321  /// -1 (West) s[0] = -1.0
322  /// +1 (East) s[0] = 1.0
323  /// -2 (South) s[1] = -1.0
324  /// +2 (North) s[1] = 1.0
325  ///
326  /// In 3D:
327  /// -1 (Left) s[0] = -1.0
328  /// +1 (Right) s[0] = 1.0
329  /// -2 (Down) s[1] = -1.0
330  /// +2 (Up) s[1] = 1.0
331  /// -3 (Back) s[2] = -1.0
332  /// +3 (Front) s[2] = 1.0
333  void build_face_element(const int &face_index,
334  FaceElement* face_element_pt);
335 
336 };
337 
338 //Inline functions:
339 //=======================================================================
340 /// Get cector of local coordinates of plot point i (when plotting nplot
341 /// points in each coordinate direction).
342 //=======================================================================
343 template<>
344 inline void QHermiteElement<1>::get_s_plot(const unsigned& i,
345  const unsigned& nplot,
346  Vector<double>& s) const
347  {
348  if (nplot>1)
349  {
350  s[0]=-1.0+2.0*double(i)/double(nplot-1);
351  }
352  else
353  {
354  s[0]=0.0;
355  }
356  }
357 
358 //=======================================================================
359 /// Return string for tecplot zone header (when plotting nplot points in
360 /// each coordinate direction)
361 //=======================================================================
362 template<>
364 tecplot_zone_string(const unsigned& nplot) const
365  {
366  std::ostringstream header;
367  header << "ZONE I=" << nplot << "\n";
368  return header.str();
369  }
370 
371 //========================================================================
372 /// Return total number of plot points (when plotting nplot points in each
373 /// coordinate direction)
374 //========================================================================
375 template<>
376 inline unsigned QHermiteElement<1>::nplot_points(const unsigned& nplot) const
377 {return nplot;}
378 
379 
380 //=======================================================================
381 /// Get cector of local coordinates of plot point i (when plotting nplot
382 /// points in each "coordinate direction).
383 //=======================================================================
384 template<>
385 inline void QHermiteElement<2>::get_s_plot(const unsigned& i,
386  const unsigned& nplot,
387  Vector<double>& s) const
388  {
389  if (nplot>1)
390  {
391  unsigned i0=i%nplot;
392  unsigned i1=(i-i0)/nplot;
393 
394  s[0]=-1.0+2.0*double(i0)/double(nplot-1);
395  s[1]=-1.0+2.0*double(i1)/double(nplot-1);
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 {return nplot*nplot;}
424 
425 //=====================================================================
426 ///These elements are exactly the same as QHermiteElements, but they
427 ///employ the simplifying assumption that the local and global
428 ///coordinates are aligned. This makes the evaluation of the
429 ///derivatives of the shape functions much cheaper.
430 //=====================================================================
431 template<unsigned DIM>
432 class DiagQHermiteElement : public virtual QHermiteElement<DIM>
433 {
434  protected:
435 
436  /// \short Overload the template-free interface for the calculation of
437  /// the inverse jacobian. Pass the dimension of the element to the
438  /// invert_jacobian function.
440  DenseMatrix<double> &inverse_jacobian) const
441  {return FiniteElement::invert_jacobian<DIM>(jacobian,inverse_jacobian);}
442 
443  /// \short Overload the local to eulerian mapping so that it uses diagonal
444  /// terms only.
445  double local_to_eulerian_mapping(const DShape &dpsids,
446  DenseMatrix<double> &jacobian,
447  DenseMatrix<double> &inverse_jacobian) const
448  {
449  return this->local_to_eulerian_mapping_diagonal(dpsids,jacobian,
450  inverse_jacobian);
451  }
452 
453  /// \short Overload the template-free interface for the transformation
454  /// of derivatives, so that the diagonal version is used.
456  &inverse_jacobian, DShape &dbasis) const
457  {
459  transform_derivatives_diagonal(inverse_jacobian,dbasis);
460  }
461 
462  /// \short Overload the template-free interface for the calculation of
463  /// transformation of second derivatives.
465  &jacobian,
466  const DenseMatrix<double>
467  &inverse_jacobian,
468  const DenseMatrix<double>
469  &jacobian2,
470  DShape &dbasis,
471  DShape &d2basis) const
472  {
473  FiniteElement::transform_second_derivatives_diagonal<DIM>(
474  jacobian,inverse_jacobian,jacobian2,dbasis,d2basis);
475  }
476 
477 
478  public:
479 
480  /// Constructor
482 
483  /// Broken copy constructor
485  {
486  BrokenCopy::broken_copy("DiagQHermiteElement");
487  }
488 
489  /// Broken assignment operator
491  {
492  BrokenCopy::broken_assign("DiagQHermiteElement");
493  }
494 
495 };
496 
497 ///////////////////////////////////////////////////////////////////////
498 ///////////////////////////////////////////////////////////////////////
499 
500 
501 //=======================================================================
502 /// SolidQHermiteElement elements are Hermite elements whose Jacobian
503 /// matrices include derivatives w.r.t. the Eulerian positions
504 /// of their nodes. They are the basis for elasticity elements.
505 /// No assumptions are made about alignment of local and global
506 /// coordinates.
507 //=======================================================================
508 template <unsigned DIM>
509 class SolidQHermiteElement : public virtual QHermiteElement<DIM>,
510  public virtual SolidFiniteElement
511 {
512  public:
513 
514  /// Constructor
516  {
517  //Get the number of nodes (alloactaed in the QHermiteElement<DIM> class)
518  unsigned n_node = nnode();
519  //Set the lagrangian dimension
520  this->set_lagrangian_dimension(DIM);
521  //Set the number of interpolated lagrangian types (always n_node)
522  this->set_nnodal_lagrangian_type(n_node);
523  }
524 
525  /// Broken copy constructor
527  {
528  BrokenCopy::broken_copy("SolidQHermiteElement");
529  }
530 
531  /// Broken assignment operator
533  {
534  BrokenCopy::broken_assign("SolidQHermiteElement");
535  }
536 
537  /// Overload the output function
538  void output(std::ostream &outfile);
539 
540  /// Output at n_plot points
541  void output(std::ostream &outfile, const unsigned &n_plot);
542 
543  /// C-style output
544  void output(FILE* file_pt);
545 
546  /// C_style output at n_plot points
547  void output(FILE* file_pt, const unsigned &n_plot);
548 
549  /// \short Build the lower-dimensional FaceElement of the type
550  /// SolidQHermiteElement<DIM-1>. The face index takes a value that
551  /// correponds to the possible faces:
552  ///
553  /// In 1D:
554  /// -1 (Left) s[0] = -1.0
555  /// +1 (Right) s[0] = 1.0
556  ///
557  /// In 2D:
558  /// -1 (West) s[0] = -1.0
559  /// +1 (East) s[0] = 1.0
560  /// -2 (South) s[1] = -1.0
561  /// +2 (North) s[1] = 1.0
562  ///
563  /// In 3D:
564  /// -1 (Left) s[0] = -1.0
565  /// +1 (Right) s[0] = 1.0
566  /// -2 (Down) s[1] = -1.0
567  /// +2 (Up) s[1] = 1.0
568  /// -3 (Back) s[2] = -1.0
569  /// +3 (Front) s[2] = 1.0
570  void build_face_element(const int &face_index,
571  FaceElement* face_element_pt);
572 
573 
574 };
575 
576 //============================================================================
577 /// SolidQHermiteElements in which we assume the local and global
578 /// coordinates to be aligned so that the Jacobian of the mapping
579 /// betwteen local and global coordinates is diagonal. This makes
580 /// the evaluation of the derivatives of the shape functions
581 /// much cheaper.
582 //============================================================================
583 template <unsigned DIM>
585  public virtual DiagQHermiteElement<DIM>,
586  public virtual SolidQHermiteElement<DIM>
587 {
588  public:
589 
590  /// Constructor
592  SolidQHermiteElement<DIM>() {}
593 
594  /// Broken copy constructor
596  {
597  BrokenCopy::broken_copy("SolidDiagQHermiteElement");
598  }
599 
600  /// Broken assignment operator
602  {
603  BrokenCopy::broken_assign("SolidDiagQHermiteElement");
604  }
605 
606  /// \short Overload the local to lagrangian mapping so that it uses diagonal
607  /// terms only.
608  double local_to_lagrangian_mapping(const DShape &dpsids,
609  DenseMatrix<double> &jacobian,
610  DenseMatrix<double> &inverse_jacobian) const
611  {
612  return this->local_to_lagrangian_mapping_diagonal(dpsids,jacobian,
613  inverse_jacobian);
614  }
615 
616 };
617 
618 }
619 
620 #endif
621 
622 
623 
624 
625 
626 
627 
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 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 broken_copy(const std::string &class_name)
Issue error message and terminate execution.
bool local_coord_is_valid(const Vector< double > &s)
Check whether the local coordinate are valid or not.
void operator=(const SolidQHermiteElement &)
Broken assignment operator.
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.
cstr elem_len * i
Definition: cfortran.h:607
virtual void set_integration_scheme(Integral *const &integral_pt)
Set the spatial integration scheme.
Definition: elements.cc:3148
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:6327
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 operator=(const QHermiteElement &)
Broken assignment operator.
double s_min() const
Min. value of local coordinate.
void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s) const
Get cector of local coordinates of plot point i (when plotting nplot points in each "coordinate direc...
QHermiteElement(const QHermiteElement &dummy)
Broken copy constructor.
QHermiteElementBase()
Empty default constructor.
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:1358
unsigned nnode_1d() const
Return number of nodes along each element edge.
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:1341
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:2534
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 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.
QHermiteElement()
Constructor.
void operator=(const QHermiteElementBase &)
Broken assignment operator.
SolidDiagQHermiteElement(const SolidDiagQHermiteElement &dummy)
Broken copy constructor.
DiagQHermiteElement()
Constructor.
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.
SolidQHermiteElement(const SolidQHermiteElement &dummy)
Broken copy constructor.
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...
void output(std::ostream &outfile)
Overload the output function.
bool local_coord_is_valid(Vector< double > &s, const double &rounding_tolerance)
Check whether the local coordinate are valid or not, allowing for rounding tolerance. Nodal coordinate is adjusted to move the point back into the element if it's outside the element to within that tolerance.
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:2804
static char t char * s
Definition: cfortran.h:572
void set_nnodal_position_type(const unsigned &nposition_type)
Set the number of types required to interpolate the coordinate.
Definition: elements.h:1352
double s_max() const
Max. value of local coordinate.
DiagQHermiteElement(const DiagQHermiteElement &dummy)
Broken copy constructor.
void operator=(const SolidDiagQHermiteElement &)
Broken assignment operator.
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...
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...
void set_nnodal_lagrangian_type(const unsigned &nlagrangian_type)
Set the number of types required to interpolate the Lagrangian coordinates.
Definition: elements.h:3818
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...
std::string tecplot_zone_string(const unsigned &nplot) const
Return string for tecplot zone header (when plotting nplot points in each "coordinate direction) ...
void operator=(const DiagQHermiteElement &)
Broken assignment operator.
void broken_assign(const std::string &class_name)
Issue error message and terminate execution.
unsigned nplot_points(const unsigned &nplot) const
void shape(const Vector< double > &s, Shape &psi) const
Function to calculate the geometric shape functions at local coordinate s.
unsigned dim() const
Return the spatial dimension of the element, i.e. the number of local coordinates required to paramet...
Definition: elements.h:2470
static Gauss< DIM, 3 > Default_integration_scheme
Default integration rule: Gaussian integration of same 'order' as the element.
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2134
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...
SolidFiniteElement class.
Definition: elements.h:3320
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:3327
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 ...
void output(std::ostream &outfile)
Output.
QHermiteElementBase(const QHermiteElementBase &)
Broken copy constructor.
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...