oomph::TElementShape< 1, 4 > Class Reference

#include <Telements.h>

Public Member Functions

void local_coordinate_of_node (const unsigned &j, Vector< double > &s) const
 Return local coordinates of node j. More...
 
void shape (const Vector< double > &s, Shape &psi) const
 Shape function for specific TElement<1,4> More...
 
void dshape_local (const Vector< double > &s, Shape &psi, DShape &dpsids) const
 Derivatives of shape functions for specific TElement<1,4> More...
 
void d2shape_local (const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
 

Member Function Documentation

◆ d2shape_local()

void oomph::TElementShape< 1, 4 >::d2shape_local ( const Vector< double > &  s,
Shape psi,
DShape dpsids,
DShape d2psids 
) const
inline

Second derivatives of shape functions for specific TElement<2,4>: d2psids(i,0) = \( \partial^2 \psi_j / \partial s_0^2 \)

462  {
463  throw OomphLibError(
465 
466  // ALH: Don't know why object qualifier is needed
467  this->dshape_local(s, psi, dpsids);
468 
469  d2psids(0, 0) = 0.0;
470  d2psids(1, 0) = 0.0;
471  d2psids(2, 0) = 0.0;
472  d2psids(3, 0) = 0.0;
473  }
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Derivatives of shape functions for specific TElement<1,4>
Definition: Telements.h:443
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86

References OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

◆ dshape_local()

void oomph::TElementShape< 1, 4 >::dshape_local ( const Vector< double > &  s,
Shape psi,
DShape dpsids 
) const
inline

Derivatives of shape functions for specific TElement<1,4>

444  {
445  // ALH: Don't know why object qualifier is needed
446  this->shape(s, psi);
447 
448  dpsids(0, 0) = -13.5 * s[0] * s[0] + 18.0 * s[0] - 5.5;
449  dpsids(1, 0) = 40.5 * s[0] * s[0] - 45.0 * s[0] + 9.0;
450  dpsids(2, 0) = -40.5 * s[0] * s[0] + 36.0 * s[0] - 4.5;
451  dpsids(3, 0) = 13.5 * s[0] * s[0] - 9.0 * s[0] + 1.0;
452  }
void shape(const Vector< double > &s, Shape &psi) const
Shape function for specific TElement<1,4>
Definition: Telements.h:432
RealScalar s
Definition: level1_cplx_impl.h:130

References s, and oomph::OneDimLagrange::shape().

◆ local_coordinate_of_node()

void oomph::TElementShape< 1, 4 >::local_coordinate_of_node ( const unsigned j,
Vector< double > &  s 
) const
inline

Return local coordinates of node j.

396  {
397  s.resize(1);
398  switch (j)
399  {
400  case 0:
401  s[0] = 0.0;
402  break;
403 
404  case 1:
405  s[0] = (1.0 / 3.0);
406  break;
407 
408  case 2:
409  s[0] = (2.0 / 3.0);
410  break;
411 
412  case 3:
413  s[0] = 1.0;
414  break;
415 
416  default:
417  std::ostringstream error_message;
418  error_message
419  << "Element only has four nodes; called with node number " << j
420  << std::endl;
421 
422  throw OomphLibError(error_message.str(),
425  }
426  }
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References j, OOMPH_CURRENT_FUNCTION, OOMPH_EXCEPTION_LOCATION, and s.

◆ shape()

void oomph::TElementShape< 1, 4 >::shape ( const Vector< double > &  s,
Shape psi 
) const
inline

Shape function for specific TElement<1,4>

433  {
434  psi[0] = 0.5 * (1.0 - s[0]) * (3.0 * s[0] - 2.0) * (3.0 * s[0] - 1.0);
435  psi[1] = -4.5 * s[0] * (1.0 - s[0]) * (3.0 * s[0] - 2.0);
436  psi[2] = 4.5 * s[0] * (1.0 - s[0]) * (3.0 * s[0] - 1.0);
437  psi[3] = 0.5 * s[0] * (3.0 * s[0] - 2.0) * (3.0 * s[0] - 1.0);
438  }

References s.


The documentation for this class was generated from the following file: