oomph::TElementShape< 3, 2 > Class Reference

Return local coordinates of node j. More...

#include <Telements.h>

Public Member Functions

void local_coordinate_of_node (const unsigned &j, Vector< double > &s) const
 
void shape (const Vector< double > &s, Shape &psi) const
 Shape function for specific TElement<3,2> More...
 
void dshape_local (const Vector< double > &s, Shape &psi, DShape &dpsids) const
 Derivatives of shape functions for specific TElement<3,2> More...
 
void d2shape_local (const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
 

Detailed Description

Return local coordinates of node j.

//////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////

Member Function Documentation

◆ d2shape_local()

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

Second derivatives of shape functions for specific TElement<3,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_2^2 \) d2psids(i,3) = \( \partial^2 \psi_j / \partial s_0 \partial s_1 \) d2psids(i,4) = \( \partial^2 \psi_j / \partial s_0 \partial s_2 \) d2psids(i,5) = \( \partial^2 \psi_j / \partial s_1 \partial s_2 \)

2027  {
2028  // ALH: Don't know why object qualifier is needed
2029  this->dshape_local(s, psi, dpsids);
2030 
2031  for (unsigned i = 0; i < 4; i++)
2032  {
2033  d2psids(i, 0) = 0.0;
2034  d2psids(i, 1) = 0.0;
2035  d2psids(i, 2) = 0.0;
2036  d2psids(i, 3) = 0.0;
2037  d2psids(i, 4) = 0.0;
2038  d2psids(i, 5) = 0.0;
2039  }
2040  }
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<3,2>
Definition: Telements.h:1990

References i, and s.

◆ dshape_local()

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

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

1991  {
1992  // ALH: Don't know why object qualifier is needed
1993  this->shape(s, psi);
1994 
1995  // Derivatives
1996  dpsids(0, 0) = 1.0;
1997  dpsids(0, 1) = 0.0;
1998  dpsids(0, 2) = 0.0;
1999 
2000  dpsids(1, 0) = 0.0;
2001  dpsids(1, 1) = 1.0;
2002  dpsids(1, 2) = 0.0;
2003 
2004  dpsids(2, 0) = 0.0;
2005  dpsids(2, 1) = 0.0;
2006  dpsids(2, 2) = 1.0;
2007 
2008  dpsids(3, 0) = -1.0;
2009  dpsids(3, 1) = -1.0;
2010  dpsids(3, 2) = -1.0;
2011  }
void shape(const Vector< double > &s, Shape &psi) const
Shape function for specific TElement<3,2>
Definition: Telements.h:1978

References oomph::OneDimLagrange::shape().

◆ local_coordinate_of_node()

void oomph::TElementShape< 3, 2 >::local_coordinate_of_node ( const unsigned j,
Vector< double > &  s 
) const
inline
1933  {
1934  s.resize(3);
1935 
1936  switch (j)
1937  {
1938  case 0:
1939  s[0] = 1.0;
1940  s[1] = 0.0;
1941  s[2] = 0.0;
1942  break;
1943 
1944  case 1:
1945  s[0] = 0.0;
1946  s[1] = 1.0;
1947  s[2] = 0.0;
1948  break;
1949 
1950  case 2:
1951  s[0] = 0.0;
1952  s[1] = 0.0;
1953  s[2] = 1.0;
1954  break;
1955 
1956  case 3:
1957  s[0] = 0.0;
1958  s[1] = 0.0;
1959  s[2] = 0.0;
1960  break;
1961 
1962  default:
1963  std::ostringstream error_message;
1964  error_message
1965  << "Element only has four nodes; called with node number " << j
1966  << std::endl;
1967 
1968  throw OomphLibError(error_message.str(),
1971  }
1972  }
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< 3, 2 >::shape ( const Vector< double > &  s,
Shape psi 
) const
inline

Shape function for specific TElement<3,2>

1979  {
1980  psi[0] = s[0];
1981  psi[1] = s[1];
1982  psi[2] = s[2];
1983  psi[3] = 1.0 - s[0] - s[1] - s[2];
1984  }

References s.


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