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

Member Function Documentation

◆ d2shape_local()

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

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

556  {
557  this->dshape_local(s, psi, dpsids);
558 
559  for (unsigned i = 0; i < 3; i++)
560  {
561  d2psids(i, 0) = 0.0;
562  d2psids(i, 1) = 0.0;
563  d2psids(i, 2) = 0.0;
564  }
565  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Derivatives of shape functions for specific TElement<2,2>
Definition: Telements.h:532

References i, and s.

◆ dshape_local()

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

Derivatives of shape functions for specific TElement<2,2>

533  {
534  this->shape(s, psi);
535 
536  // Derivatives
537  dpsids(0, 0) = 1.0;
538  dpsids(0, 1) = 0.0;
539  dpsids(1, 0) = 0.0;
540  dpsids(1, 1) = 1.0;
541  dpsids(2, 0) = -1.0;
542  dpsids(2, 1) = -1.0;
543  }
void shape(const Vector< double > &s, Shape &psi) const
Shape function for specific TElement<2,2>
Definition: Telements.h:521

References oomph::OneDimLagrange::shape().

◆ local_coordinate_of_node()

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

Return local coordinates of node j.

485  {
486  s.resize(2);
487 
488  switch (j)
489  {
490  case 0:
491  s[0] = 1.0;
492  s[1] = 0.0;
493  break;
494 
495  case 1:
496  s[0] = 0.0;
497  s[1] = 1.0;
498  break;
499 
500  case 2:
501  s[0] = 0.0;
502  s[1] = 0.0;
503  break;
504 
505  default:
506  std::ostringstream error_message;
507  error_message
508  << "Element only has three nodes; called with node number " << j
509  << std::endl;
510 
511  throw OomphLibError(error_message.str(),
514  }
515  }
RealScalar s
Definition: level1_cplx_impl.h:130
#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< 2, 2 >::shape ( const Vector< double > &  s,
Shape psi 
) const
inline

Shape function for specific TElement<2,2>

522  {
523  psi[0] = s[0];
524  psi[1] = s[1];
525  psi[2] = 1.0 - s[0] - s[1];
526  }

References s.


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