oomph::TElementShape< 1, 3 > 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,3> More...
 
void dshape_local (const Vector< double > &s, Shape &psi, DShape &dpsids) const
 Derivatives of shape functions for specific TElement<1,3> More...
 
void d2shape_local (const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
 

Member Function Documentation

◆ d2shape_local()

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

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

378  {
379  // ALH: Don't know why object qualifier is needed
380  this->dshape_local(s, psi, dpsids);
381 
382  d2psids(0, 0) = 4.0;
383  d2psids(1, 0) = -8.0;
384  d2psids(2, 0) = 4.0;
385  }
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Derivatives of shape functions for specific TElement<1,3>
Definition: Telements.h:359

References s.

◆ dshape_local()

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

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

360  {
361  // ALH: Don't know why object qualifier is needed
362  this->shape(s, psi);
363 
364  dpsids(0, 0) = 4.0 * s[0] - 3.0;
365  dpsids(1, 0) = 4.0 - 8.0 * s[0];
366  dpsids(2, 0) = 4.0 * s[0] - 1.0;
367  }
void shape(const Vector< double > &s, Shape &psi) const
Shape function for specific TElement<1,3>
Definition: Telements.h:348
RealScalar s
Definition: level1_cplx_impl.h:130

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

◆ local_coordinate_of_node()

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

Return local coordinates of node j.

316  {
317  s.resize(1);
318  switch (j)
319  {
320  case 0:
321  s[0] = 0.0;
322  break;
323 
324  case 1:
325  s[0] = 0.5;
326  break;
327 
328  case 2:
329  s[0] = 1.0;
330  break;
331 
332  default:
333  std::ostringstream error_message;
334  error_message
335  << "Element only has three nodes; called with node number " << j
336  << std::endl;
337 
338  throw OomphLibError(error_message.str(),
341  }
342  }
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
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, 3 >::shape ( const Vector< double > &  s,
Shape psi 
) const
inline

Shape function for specific TElement<1,3>

349  {
350  psi[0] = 2.0 * (s[0] - 1.0) * (s[0] - 0.5);
351  psi[1] = 4.0 * (1.0 - s[0]) * s[0];
352  psi[2] = 2.0 * (s[0] - 0.5) * s[0];
353  }

References s.


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