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$
7 //LIC//
8 //LIC// $LastChangedDate$
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
124  this->set_integration_scheme(&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 Adjust local coordinates so that they're located inside
158  /// the element
160  {
161  unsigned ncoord = dim();
162  for(unsigned i=0;i<ncoord;i++)
163  {
164  // Adjust to move it onto the boundary
165  if (s[i] > s_max() ) s[i] = s_max();
166  if (s[i] < s_min() ) s[i] = s_min();
167  }
168  }
169 
170  /// Function to calculate the geometric shape functions at local coordinate s
171  void shape(const Vector<double> &s, Shape &psi) const;
172 
173  /// \short Function to compute the geometric shape functions and
174  /// derivatives w.r.t. local coordinates at local coordinate s
175  void dshape_local(const Vector<double> &s, Shape &psi, DShape &dpsids)
176  const;
177 
178  /// \short Function to compute the geometric shape functions and
179  /// also first and second derivatives wrt local coordinates at
180  /// local coordinate s.
181  /// Numbering:
182  /// \b 1D:
183  /// d2psids(i,0) = \f$ d^2 \psi_j / d s^2 \f$
184  /// \b 2D:
185  /// d2psids(i,0) = \f$ \partial^2 \psi_j / \partial s_0^2 \f$
186  /// d2psids(i,1) = \f$ \partial^2 \psi_j / \partial s_1^2 \f$
187  /// d2psids(i,2) = \f$ \partial^2 \psi_j / \partial s_0 \partial s_1 \f$
188  /// \b 3D:
189  /// d2psids(i,0) = \f$ \partial^2 \psi_j / \partial s_0^2 \f$
190  /// d2psids(i,1) = \f$ \partial^2 \psi_j / \partial s_1^2 \f$
191  /// d2psids(i,2) = \f$ \partial^2 \psi_j / \partial s_2^2 \f$
192  /// d2psids(i,3) = \f$ \partial^2 \psi_j / \partial s_0 \partial s_1 \f$
193  /// d2psids(i,4) = \f$ \partial^2 \psi_j / \partial s_0 \partial s_2 \f$
194  /// d2psids(i,5) = \f$ \partial^2 \psi_j / \partial s_1 \partial s_2 \f$
195  void d2shape_local(const Vector<double> &s, Shape &psi, DShape &dpsids,
196  DShape &d2psids) const;
197 
198 
199  /// \short Overload the template-free interface for the calculation of
200  /// the inverse jacobian. The element dimension must be passed to
201  /// the function
203  DenseMatrix<double> &inverse_jacobian) const
204  {return invert_jacobian<DIM>(jacobian,inverse_jacobian);}
205 
206  /// \short Overload the template-free interface for the calculation of
207  /// transformation of second derivatives. The element dimension should be
208  /// passed as a template paremeter, for "optimum" efficiency.
210  &jacobian,
211  const DenseMatrix<double>
212  &inverse_jacobian,
213  const DenseMatrix<double>
214  &jacobian2,
215  DShape &dbasis,
216  DShape &d2basis) const
217  {
218  transform_second_derivatives_template<DIM>(jacobian,inverse_jacobian,
219  jacobian2,dbasis,d2basis);
220  }
221 
222  /// Min. value of local coordinate
223  double s_min() const {return -1.0;}
224 
225  /// Max. value of local coordinate
226  double s_max() const {return 1.0;}
227 
228 
229  /// Get local coordinates of node j in the element; vector sets its own size
230  void local_coordinate_of_node(const unsigned& j, Vector<double>& s) const
231  {
232  s.resize(DIM);
233  Vector<unsigned> j_sub(DIM);
234  unsigned j_copy = j;
235  unsigned NNODE_1D=2;
236  const double S_min = this->s_min();
237  const double S_range = this->s_max() - S_min;
238  for(unsigned i=0;i<DIM;i++)
239  {
240  j_sub[i] = j_copy%NNODE_1D;
241  j_copy = (j_copy - j_sub[i])/NNODE_1D;
242  s[i]= S_min + double(j_sub[i])/(double)(NNODE_1D-1)*S_range;
243  }
244  }
245 
246  /// Get local fraction of node j in the element; vector sets its own size
247  void local_fraction_of_node(const unsigned& j, Vector<double>& s_fraction)
248  {
249  s_fraction.resize(DIM);
250  Vector<unsigned> j_sub(DIM);
251  unsigned j_copy = j;
252  unsigned NNODE_1D=2;
253  for(unsigned i=0;i<DIM;i++)
254  {
255  j_sub[i] = j_copy%NNODE_1D;
256  j_copy = (j_copy - j_sub[i])/NNODE_1D;
257  s_fraction[i]= j_sub[i];
258  }
259  }
260 
261  /// \short Get the local fraction of any node in the n-th position
262  /// in a one dimensional expansion along the i-th local coordinate
263  double local_one_d_fraction_of_node(const unsigned &n1d,
264  const unsigned &i)
265  {
266  //The spacing is just the node number because there are only two
267  //nodes
268  return n1d;
269  }
270 
271  /// Return number of nodes along each element edge
272  unsigned nnode_1d() const {return 2;}
273 
274  /// Output
275  void output(std::ostream &outfile);
276 
277  /// Output at n_plot points
278  void output(std::ostream &outfile, const unsigned &n_plot);
279 
280  /// C-style output
281  void output(FILE* file_pt);
282 
283  /// C_style output at n_plot points
284  void output(FILE* file_pt, const unsigned &n_plot);
285 
286  /// \short Get cector of local coordinates of plot point i (when plotting
287  /// nplot points in each "coordinate direction).
288  void get_s_plot(const unsigned& i, const unsigned& nplot,
289  Vector<double>& s,
290  const bool& use_equally_spaced_interior_sample_points=false)
291  const;
292 
293  /// \short Return string for tecplot zone header (when plotting
294  /// nplot points in each "coordinate direction)
295  std::string tecplot_zone_string(const unsigned& nplot) const;
296 
297  /// Return total number of plot points (when plotting
298  /// nplot points in each "coordinate direction)
299  unsigned nplot_points(const unsigned& nplot) const;
300 
301  /// \short Build the lower-dimensional FaceElement of the type
302  /// QHermiteElement<DIM-1>. The face index takes a value that
303  /// correponds to the possible faces:
304  ///
305  /// In 1D:
306  /// -1 (Left) s[0] = -1.0
307  /// +1 (Right) s[0] = 1.0
308  ///
309  /// In 2D:
310  /// -1 (West) s[0] = -1.0
311  /// +1 (East) s[0] = 1.0
312  /// -2 (South) s[1] = -1.0
313  /// +2 (North) s[1] = 1.0
314  ///
315  /// In 3D:
316  /// -1 (Left) s[0] = -1.0
317  /// +1 (Right) s[0] = 1.0
318  /// -2 (Down) s[1] = -1.0
319  /// +2 (Up) s[1] = 1.0
320  /// -3 (Back) s[2] = -1.0
321  /// +3 (Front) s[2] = 1.0
322  void build_face_element(const int &face_index,
323  FaceElement* face_element_pt);
324 
325 };
326 
327 //Inline functions:
328 //=======================================================================
329 /// Get cector of local coordinates of plot point i (when plotting nplot
330 /// points in each coordinate direction).
331 //=======================================================================
332 template<>
334  const unsigned& i,
335  const unsigned& nplot,
336  Vector<double>& s,
337  const bool& use_equally_spaced_interior_sample_points) const
338  {
339  if (nplot>1)
340  {
341  s[0]=-1.0+2.0*double(i)/double(nplot-1);
342  if (use_equally_spaced_interior_sample_points)
343  {
344  double range=2.0;
345  double dx_new=range/double(nplot);
346  double range_new=double(nplot-1)*dx_new;
347  s[0]=-1.0+0.5*dx_new+range_new*(1.0+s[0])/range;
348  }
349  }
350  else
351  {
352  s[0]=0.0;
353  }
354  }
355 
356 //=======================================================================
357 /// Return string for tecplot zone header (when plotting nplot points in
358 /// each coordinate direction)
359 //=======================================================================
360 template<>
362 tecplot_zone_string(const unsigned& nplot) const
363  {
364  std::ostringstream header;
365  header << "ZONE I=" << nplot << "\n";
366  return header.str();
367  }
368 
369 //========================================================================
370 /// Return total number of plot points (when plotting nplot points in each
371 /// coordinate direction)
372 //========================================================================
373 template<>
374 inline unsigned QHermiteElement<1>::nplot_points(const unsigned& nplot) const
375 {return nplot;}
376 
377 
378 //=======================================================================
379 /// Get cector of local coordinates of plot point i (when plotting nplot
380 /// points in each "coordinate direction).
381 //=======================================================================
382 template<>
384  const unsigned& i,
385  const unsigned& nplot,
386  Vector<double>& s,
387  const bool& use_equally_spaced_interior_sample_points) 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  if (use_equally_spaced_interior_sample_points)
398  {
399  double range=2.0;
400  double dx_new=range/double(nplot);
401  double range_new=double(nplot-1)*dx_new;
402  s[0]=-1.0+0.5*dx_new+range_new*(1.0+s[0])/range;
403  s[1]=-1.0+0.5*dx_new+range_new*(1.0+s[1])/range;
404 
405  }
406 
407  }
408  else
409  {
410  s[0]=0.0;
411  s[1]=0.0;
412  }
413  }
414 
415 //=======================================================================
416 /// Return string for tecplot zone header (when plotting nplot points in
417 /// each coordinate direction)
418 //=======================================================================
419 template<>
421  const unsigned& nplot) const
422 {
423  std::ostringstream header;
424  header << "ZONE I=" << nplot << ", J=" << nplot << "\n";
425  return header.str();
426 }
427 
428 //=======================================================================
429 /// Return total number of plot points (when plotting
430 /// nplot points in each coordinate direction)
431 //=======================================================================
432 template<>
433 inline unsigned QHermiteElement<2>::nplot_points(const unsigned& nplot) const
434 {return nplot*nplot;}
435 
436 //=====================================================================
437 ///These elements are exactly the same as QHermiteElements, but they
438 ///employ the simplifying assumption that the local and global
439 ///coordinates are aligned. This makes the evaluation of the
440 ///derivatives of the shape functions much cheaper.
441 //=====================================================================
442 template<unsigned DIM>
443 class DiagQHermiteElement : public virtual QHermiteElement<DIM>
444 {
445  protected:
446 
447  /// \short Overload the template-free interface for the calculation of
448  /// the inverse jacobian. Pass the dimension of the element to the
449  /// invert_jacobian function.
451  DenseMatrix<double> &inverse_jacobian) const
452  {return FiniteElement::invert_jacobian<DIM>(jacobian,inverse_jacobian);}
453 
454  /// \short Overload the local to eulerian mapping so that it uses diagonal
455  /// terms only.
456  double local_to_eulerian_mapping(const DShape &dpsids,
457  DenseMatrix<double> &jacobian,
458  DenseMatrix<double> &inverse_jacobian) const
459  {
460  return this->local_to_eulerian_mapping_diagonal(dpsids,jacobian,
461  inverse_jacobian);
462  }
463 
464  /// \short Overload the template-free interface for the transformation
465  /// of derivatives, so that the diagonal version is used.
467  &inverse_jacobian, DShape &dbasis) const
468  {
470  transform_derivatives_diagonal(inverse_jacobian,dbasis);
471  }
472 
473  /// \short Overload the template-free interface for the calculation of
474  /// transformation of second derivatives.
476  &jacobian,
477  const DenseMatrix<double>
478  &inverse_jacobian,
479  const DenseMatrix<double>
480  &jacobian2,
481  DShape &dbasis,
482  DShape &d2basis) const
483  {
484  FiniteElement::transform_second_derivatives_diagonal<DIM>(
485  jacobian,inverse_jacobian,jacobian2,dbasis,d2basis);
486  }
487 
488 
489  public:
490 
491  /// Constructor
493 
494  /// Broken copy constructor
496  {
497  BrokenCopy::broken_copy("DiagQHermiteElement");
498  }
499 
500  /// Broken assignment operator
502  {
503  BrokenCopy::broken_assign("DiagQHermiteElement");
504  }
505 
506 };
507 
508 ///////////////////////////////////////////////////////////////////////
509 ///////////////////////////////////////////////////////////////////////
510 
511 
512 //=======================================================================
513 /// SolidQHermiteElement elements are Hermite elements whose Jacobian
514 /// matrices include derivatives w.r.t. the Eulerian positions
515 /// of their nodes. They are the basis for elasticity elements.
516 /// No assumptions are made about alignment of local and global
517 /// coordinates.
518 //=======================================================================
519 template <unsigned DIM>
520 class SolidQHermiteElement : public virtual QHermiteElement<DIM>,
521  public virtual SolidFiniteElement
522 {
523  public:
524 
525  /// Constructor
527  {
528  //Get the number of nodes (alloactaed in the QHermiteElement<DIM> class)
529  unsigned n_node = nnode();
530  //Set the lagrangian dimension
531  this->set_lagrangian_dimension(DIM);
532  //Set the number of interpolated lagrangian types (always n_node)
533  this->set_nnodal_lagrangian_type(n_node);
534  }
535 
536  /// Broken copy constructor
538  {
539  BrokenCopy::broken_copy("SolidQHermiteElement");
540  }
541 
542  /// Broken assignment operator
544  {
545  BrokenCopy::broken_assign("SolidQHermiteElement");
546  }
547 
548  /// Overload the output function
549  void output(std::ostream &outfile);
550 
551  /// Output at n_plot points
552  void output(std::ostream &outfile, const unsigned &n_plot);
553 
554  /// C-style output
555  void output(FILE* file_pt);
556 
557  /// C_style output at n_plot points
558  void output(FILE* file_pt, const unsigned &n_plot);
559 
560  /// \short Build the lower-dimensional FaceElement of the type
561  /// SolidQHermiteElement<DIM-1>. The face index takes a value that
562  /// correponds to the possible faces:
563  ///
564  /// In 1D:
565  /// -1 (Left) s[0] = -1.0
566  /// +1 (Right) s[0] = 1.0
567  ///
568  /// In 2D:
569  /// -1 (West) s[0] = -1.0
570  /// +1 (East) s[0] = 1.0
571  /// -2 (South) s[1] = -1.0
572  /// +2 (North) s[1] = 1.0
573  ///
574  /// In 3D:
575  /// -1 (Left) s[0] = -1.0
576  /// +1 (Right) s[0] = 1.0
577  /// -2 (Down) s[1] = -1.0
578  /// +2 (Up) s[1] = 1.0
579  /// -3 (Back) s[2] = -1.0
580  /// +3 (Front) s[2] = 1.0
581  void build_face_element(const int &face_index,
582  FaceElement* face_element_pt);
583 
584 
585 };
586 
587 //============================================================================
588 /// SolidQHermiteElements in which we assume the local and global
589 /// coordinates to be aligned so that the Jacobian of the mapping
590 /// betwteen local and global coordinates is diagonal. This makes
591 /// the evaluation of the derivatives of the shape functions
592 /// much cheaper.
593 //============================================================================
594 template <unsigned DIM>
596  public virtual DiagQHermiteElement<DIM>,
597  public virtual SolidQHermiteElement<DIM>
598 {
599  public:
600 
601  /// Constructor
603  SolidQHermiteElement<DIM>() {}
604 
605  /// Broken copy constructor
607  {
608  BrokenCopy::broken_copy("SolidDiagQHermiteElement");
609  }
610 
611  /// Broken assignment operator
613  {
614  BrokenCopy::broken_assign("SolidDiagQHermiteElement");
615  }
616 
617  /// \short Overload the local to lagrangian mapping so that it uses diagonal
618  /// terms only.
619  double local_to_lagrangian_mapping(const DShape &dpsids,
620  DenseMatrix<double> &jacobian,
621  DenseMatrix<double> &inverse_jacobian) const
622  {
623  return this->local_to_lagrangian_mapping_diagonal(dpsids,jacobian,
624  inverse_jacobian);
625  }
626 
627 };
628 
629 }
630 
631 #endif
632 
633 
634 
635 
636 
637 
638 
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.
virtual std::string tecplot_zone_string(const unsigned &nplot) const
Return string for tecplot zone header (when plotting nplot points in each "coordinate direction") ...
Definition: elements.h:2990
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...
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 ...
unsigned nplot_points(const unsigned &nplot) const
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
double s_min() const
Min. value of local coordinate.
bool local_coord_is_valid(const Vector< double > &s)
Check whether the local coordinate are valid or not.
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...
virtual 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 w...
Definition: elements.h:1955
virtual void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &shifted_to_interior=false) const
Get cector of local coordinates of plot point i (when plotting nplot points in each "coordinate direc...
Definition: elements.h:2978
virtual void output(std::ostream &outfile)
Output the element data — typically the values at the nodes in a format suitable for post-processing...
Definition: elements.h:2884
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...
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 operator=(const SolidQHermiteElement &)
Broken assignment operator.
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:3150
void operator=(const QHermiteElement &)
Broken assignment operator.
QHermiteElement(const QHermiteElement &dummy)
Broken copy constructor.
QHermiteElementBase()
Empty default constructor.
virtual unsigned nplot_points(const unsigned &nplot) const
Return total number of plot points (when plotting nplot points in each "coordinate direction") ...
Definition: elements.h:3017
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:1361
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:1344
virtual double s_min() const
Min value of local coordinate.
Definition: elements.h:2643
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.
QHermiteElement()
Constructor.
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.
void operator=(const QHermiteElementBase &)
Broken assignment operator.
SolidDiagQHermiteElement(const SolidDiagQHermiteElement &dummy)
Broken copy constructor.
DiagQHermiteElement()
Constructor.
void move_local_coord_back_into_element(Vector< double > &s) const
Adjust local coordinates so that they&#39;re located inside the element.
SolidQHermiteElement(const SolidQHermiteElement &dummy)
Broken copy constructor.
std::string tecplot_zone_string(const unsigned &nplot) const
Return string for tecplot zone header (when plotting nplot points in each "coordinate direction) ...
static char t char * s
Definition: cfortran.h:572
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 set_nnodal_position_type(const unsigned &nposition_type)
Set the number of types required to interpolate the coordinate.
Definition: elements.h:1355
virtual 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...
Definition: elements.h:1922
DiagQHermiteElement(const DiagQHermiteElement &dummy)
Broken copy constructor.
virtual double s_max() const
Max. value of local coordinate.
Definition: elements.h:2654
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 operator=(const SolidDiagQHermiteElement &)
Broken assignment operator.
unsigned dim() const
Return the spatial dimension of the element, i.e. the number of local coordinates required to paramet...
Definition: elements.h:2482
unsigned nnode_1d() const
Return number of nodes along each element edge.
void operator=(const DiagQHermiteElement &)
Broken assignment operator.
void broken_assign(const std::string &class_name)
Issue error message and terminate execution.
static Gauss< DIM, 3 > Default_integration_scheme
Default integration rule: Gaussian integration of same &#39;order&#39; as the element.
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn&#39;t been defined.
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:2806
virtual void build_face_element(const int &face_index, FaceElement *face_element_pt)
Function for building a lower dimensional FaceElement on the specified face of the FiniteElement...
Definition: elements.cc:5002
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2146
SolidFiniteElement class.
Definition: elements.h:3361
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:2536
virtual void shape(const Vector< double > &s, Shape &psi) const =0
Calculate the geometric shape functions at local coordinate s. This function must be overloaded for e...
QHermiteElementBase(const QHermiteElementBase &)
Broken copy constructor.
double s_max() const
Max. value of local coordinate.