NeoPZ
Static Public Member Functions | List of all members
pzshape::TPZShapeLinear Class Reference

Implements the shape functions of a linear (1D) element. Shape. More...

#include <pzshapelinear.h>

Inheritance diagram for pzshape::TPZShapeLinear:
[legend]
Collaboration diagram for pzshape::TPZShapeLinear:
[legend]

Static Public Member Functions

static void Shape (TPZVec< REAL > &pt, TPZVec< int64_t > &id, TPZVec< int > &order, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
 Functions which computes the shapefunctions of a one-d element. More...
 
static void ShapeCorner (TPZVec< REAL > &pt, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
 
static void SideShape (int side, TPZVec< REAL > &pt, TPZVec< int64_t > &id, TPZVec< int > &order, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
 
static void ShapeOrder (TPZVec< int64_t > &id, TPZVec< int > &order, TPZGenMatrix< int > &shapeorders)
 returns the polynomial order in the natural ksi, eta of the side associated with each shapefunction More...
 
static void SideShapeOrder (int side, TPZVec< int64_t > &id, int order, TPZGenMatrix< int > &shapeorders)
 returns the polynomial order in the natural ksi, eta of the internal shapefunctions of a side More...
 
static void ShapeInternal (TPZVec< REAL > &x, int ord, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi, int transformation_index)
 Computes the values of the orthogonal shapefunctions before multiplying them by the corner shapefunctions. More...
 
static void ShapeInternal (TPZVec< REAL > &x, int ord, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
 Computes the values of the orthogonal shapefunctions before multiplying them by the corner shapefunctions. More...
 
static void ShapeGenerating (TPZVec< REAL > &pt, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
 Computes the generating shape functions for a quadrilateral element. More...
 
static void TransformPoint1d (int transid, REAL in, REAL &out)
 Computes the transformation applied to the variational parameter of the one-d element. More...
 
static void TransformDerivative1d (int transid, int num, TPZFMatrix< REAL > &in)
 Applies the transformation on the values of the derivatives of the shape functions of the internal shape functions. More...
 
static int GetTransformId1d (TPZVec< int64_t > &id)
 Computes the id of the transformation which will be applied on the parameter of the element
. More...
 
static int NConnectShapeF (int side, int order)
 Number of shapefunctions of the connect associated with the side, considering the order of interpolation of the element. More...
 
static int NShapeF (TPZVec< int > &order)
 Total number of shapefunctions, considering the order of interpolation of the element. More...
 
static void TransformPoint1d (int transid, double &val)
 
static TPZTransform< REAL > ParametricTransform (int transid)
 
static void ShapeInternal (int side, TPZVec< REAL > &x, int order, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
 
- Static Public Member Functions inherited from pztopology::TPZLine
static void Shape (TPZVec< REAL > &loc, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
 Compute the shape being used to construct the x mapping from local parametric coordinates. More...
 
template<class T >
static void TShape (const TPZVec< T > &loc, TPZFMatrix< T > &phi, TPZFMatrix< T > &dphi)
 Compute the shape being used to construct the x mapping from local parametric coordinates. More...
 
static void GetSideHDivPermutation (int transformationid, TPZVec< int > &permgather)
 Identifies the permutation of the nodes needed to make neighbouring elements compatible in terms of order of shape functions. More...
 
static constexpr REAL RefElVolume ()
 Volume of the master element (measure of the element) More...
 
static void ComputeDirections (int side, TPZFMatrix< REAL > &gradx, TPZFMatrix< REAL > &directions, TPZVec< int > &sidevectors)
 
static void GetSideHDivDirections (TPZVec< int > &sides, TPZVec< int > &dir, TPZVec< int > &bilinearounao)
 
static void GetSideHDivDirections (TPZVec< int > &sides, TPZVec< int > &dir, TPZVec< int > &bilinearounao, TPZVec< int > &sidevectors)
 
template<class TVar >
static void ComputeHDivDirections (TPZFMatrix< TVar > &gradx, TPZFMatrix< TVar > &directions)
 Compute the directions of the HDiv vectors. More...
 
static int NBilinearSides ()
 
template<class T >
static void BlendFactorForSide (const int &side, const TPZVec< T > &xi, T &blendFactor, TPZVec< T > &corrFactorDxi)
 
static int SideDimension (int side)
 Returns the dimension of the side. More...
 
static void LowerDimensionSides (int side, TPZStack< int > &smallsides)
 Get all sides with lower dimension on side. More...
 
static void LowerDimensionSides (int side, TPZStack< int > &smallsides, int DimTarget)
 Get all sides with lower dimension but equal to DimTarget on side. More...
 
static void HigherDimensionSides (int side, TPZStack< int > &high)
 Returns all sides whose closure contains side. More...
 
static int NSideNodes (int side)
 Returns the number of nodes (not connectivities) associated with a side. More...
 
static int SideNodeLocId (int side, int node)
 Returns the local node number of the node "node" along side "side". More...
 
static int NumSides ()
 Returns the number of connects for a set dimension. More...
 
static int NumSides (int dimension)
 Returns the number of connects for a set dimension. More...
 
static int NContainedSides (int side)
 Returns the number of nodes (not connectivities) associated with a side. More...
 
static int ContainedSideLocId (int side, int c)
 Returns the local connect number of the connect "c" along side "side". More...
 
static void CenterPoint (int side, TPZVec< REAL > &center)
 Returns the barycentric coordinates in the master element space of the original element. More...
 
static bool IsInParametricDomain (const TPZVec< REAL > &pt, REAL tol=pztopology::gTolerance)
 Verifies if the parametric point pt is in the element parametric domain. More...
 
static void RandomPoint (TPZVec< REAL > &pt)
 Generates a random point in the master domain. More...
 
template<class T >
static bool CheckProjectionForSingularity (const int &side, const TPZVec< T > &xiInterior)
 
template<class T >
static void MapToSide (int side, TPZVec< T > &InternalPar, TPZVec< T > &SidePar, TPZFMatrix< T > &JacToSide)
 
static void ParametricDomainNodeCoord (int node, TPZVec< REAL > &nodeCoord)
 
static MElementType Type ()
 Returns the type of the element as specified in file pzeltype.h. More...
 
static MElementType Type (int side)
 Returns the type of the element side as specified in file pzeltype.h. More...
 
static TPZTransform SideToSideTransform (int sidefrom, int sideto)
 Returns the transformation which takes a point from the side sidefrom to the side sideto. More...
 
static TPZTransform TransformSideToElement (int side)
 Returns the transformation which transform a point from the side to the interior of the element. More...
 
static TPZTransform TransformElementToSide (int side)
 Returns the transformation which transform a point from the interior of the element to the side. More...
 
static int GetTransformId (TPZVec< int64_t > &id)
 Method which identifies the transformation based on the IDs of the corner nodes. More...
 
static int GetTransformId (int side, TPZVec< int64_t > &id)
 Method which identifies the transformation of a side based on the IDs of the corner nodes. More...
 
static TPZIntPointsCreateSideIntegrationRule (int side, int order)
 Create an integration rule over side. More...
 
- Static Public Member Functions inherited from TPZSavable
static std::set< TPZRestoreClassBase * > & RestoreClassSet ()
 This static function guarantees that the gMap object is available when needed. More...
 
static std::map< int, TPZRestore_t > & ClassIdMap ()
 This static function guarantees that the gMap object is available when needed. More...
 
static std::pair< std::string, uint64_t > NeoPZVersion ()
 
static void Register (TPZRestoreClassBase *restore)
 
static void RegisterClassId (int classid, TPZRestore_t fun)
 
static TPZSavableCreateInstance (const int &classId)
 

Orthogonal polynomials family

static void(* fOrthogonal )(REAL x, int num, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
 Pointer to function which returns num orthogonal functions at the point x. More...
 
static REAL JacobiA
 Jacobi parameters orthogonal polynomials. More...
 
static REAL JacobiB
 
static void Chebyshev (REAL x, int num, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
 Chebyshev orthogonal polynomial, computes num orthogonal functions at the point x. More...
 
static void Expo (REAL x, int num, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
 Exponential polynomial, computes num orthogonal functions at the point x. More...
 
static void Legendre (REAL x, int num, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
 Legendre orthogonal polynomial, computes num orthogonal functions at the point x. More...
 
static void Jacobi (REAL x, int num, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
 Jacobi orthogonal polynomials. More...
 
static void Hermite (REAL x, int num, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi)
 Hermite orthogonal polynomials. More...
 
static void Legendre (REAL x, int num, TPZFMatrix< REAL > &phi, TPZFMatrix< REAL > &dphi, int nderiv)
 Legendre function computing several derivatives. More...
 

Additional Inherited Members

- Public Types inherited from pztopology::TPZLine
enum  {
  NCornerNodes, NSides, Dimension, NFaces,
  NPermutations
}
 Enumerate for topological characteristics. More...
 
typedef TPZInt1d IntruleType
 Typedef to numerical integration rule. More...
 
typedef TPZGraphEl1dd GraphElType
 Typedef to graphical element type. More...
 
- Public Member Functions inherited from pztopology::TPZLine
int ClassId () const override
 Define the class id associated with the class. More...
 
void Read (TPZStream &buf, void *context) override
 read objects from the stream More...
 
void Write (TPZStream &buf, int withclassid) const override
 Writes this object to the TPZStream buffer. Include the classid if withclassid = true. More...
 
 TPZLine ()
 Default constructor. More...
 
virtual ~TPZLine ()
 Default destructor. More...
 
- Public Member Functions inherited from TPZSavable
 TPZSavable ()
 
virtual ~TPZSavable ()
 
virtual std::list< std::map< std::string, uint64_t > > VersionHistory () const
 
virtual std::pair< std::string, uint64_t > Version () const
 
virtual bool Compare (TPZSavable *copy, bool override=false)
 Compares the object for identity with the object pointed to, eventually copy the object. More...
 
virtual bool Compare (TPZSavable *copy, bool override=false) const
 Compares the object for identity with the object pointed to, eventually copy the object. More...
 
- Public Member Functions inherited from TPZRegisterClassId
template<typename T >
 TPZRegisterClassId (int(T::*)() const)
 
 TPZRegisterClassId ()=default
 
- Static Protected Attributes inherited from pztopology::TPZLine
static int fPermutations [2][3]
 Valid permutations between nodes. More...
 

Detailed Description

Implements the shape functions of a linear (1D) element. Shape.

The linear shape functions form the basis of all other shape function computations
The range of the master element is -1,1
The orthogonal function which generates the linear shape functions can be modified by changing the function pointer fOrthogonal
all static tables and functions concerning one-d elements will be grouped in this class

Definition at line 33 of file pzshapelinear.h.

Member Function Documentation

◆ Chebyshev()

void pzshape::TPZShapeLinear::Chebyshev ( REAL  x,
int  num,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi 
)
static

Chebyshev orthogonal polynomial, computes num orthogonal functions at the point x.

Parameters
xcoordinate of the point
numnumber of shape functions to be computed
phishapefunction values
dphivalues of the derivatives of the shape functions

Definition at line 15 of file pzshapelinear.cpp.

References TPZMatrix< TVar >::Put(), and TPZFMatrix< TVar >::Zero().

◆ Expo()

void pzshape::TPZShapeLinear::Expo ( REAL  x,
int  num,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi 
)
static

Exponential polynomial, computes num orthogonal functions at the point x.

Parameters
xcoordinate of the point
numnumber of shape functions to be computed
phishapefunction values
dphivalues of the derivatives of the shape functions

Definition at line 35 of file pzshapelinear.cpp.

References TPZMatrix< TVar >::Put().

◆ GetTransformId1d()

int pzshape::TPZShapeLinear::GetTransformId1d ( TPZVec< int64_t > &  id)
static

Computes the id of the transformation which will be applied on the parameter of the element
.

Parameters
idcontains two distinct integer numbers which determine the orientation of the element
Returns
index of the tranformation The return value is used in several methods of this class

Definition at line 357 of file pzshapelinear.cpp.

Referenced by pzshape::TPZShapeTriang::Shape().

◆ Hermite()

void pzshape::TPZShapeLinear::Hermite ( REAL  x,
int  num,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi 
)
static

Hermite orthogonal polynomials.

Definition at line 179 of file pzshapelinear.cpp.

References TPZMatrix< TVar >::Put().

◆ Jacobi()

void pzshape::TPZShapeLinear::Jacobi ( REAL  x,
int  num,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi 
)
static

Jacobi orthogonal polynomials.

Definition at line 158 of file pzshapelinear.cpp.

References TPZMatrix< TVar >::Put().

◆ Legendre() [1/2]

void pzshape::TPZShapeLinear::Legendre ( REAL  x,
int  num,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi 
)
static

Legendre orthogonal polynomial, computes num orthogonal functions at the point x.

Parameters
xcoordinate of the point
numnumber of shape functions to be computed
phishapefunction values
dphivalues of the derivatives of the shape functions

Definition at line 50 of file pzshapelinear.cpp.

References TPZMatrix< TVar >::Put().

◆ Legendre() [2/2]

void pzshape::TPZShapeLinear::Legendre ( REAL  x,
int  num,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi,
int  nderiv 
)
static

Legendre function computing several derivatives.

See also
Legendre(Real, int, TPZFMatrix, TPZFMatrix)

Definition at line 94 of file pzshapelinear.cpp.

References TPZMatrix< TVar >::Put().

◆ NConnectShapeF()

int pzshape::TPZShapeLinear::NConnectShapeF ( int  side,
int  order 
)
static

Number of shapefunctions of the connect associated with the side, considering the order of interpolation of the element.

Parameters
sideassociated side
ordervector of integers indicating the interpolation order of the element
Returns
number of shape functions

Definition at line 362 of file pzshapelinear.cpp.

References PZError.

◆ NShapeF()

int pzshape::TPZShapeLinear::NShapeF ( TPZVec< int > &  order)
static

Total number of shapefunctions, considering the order of interpolation of the element.

Parameters
ordervector of integers indicating the interpolation order of the element
Returns
number of shape functions

Definition at line 369 of file pzshapelinear.cpp.

References test::res.

◆ ParametricTransform()

TPZTransform< REAL > pzshape::TPZShapeLinear::ParametricTransform ( int  transid)
static

Definition at line 335 of file pzshapelinear.cpp.

References TPZTransform< T >::Mult().

Referenced by GetSideTransform().

◆ Shape()

void pzshape::TPZShapeLinear::Shape ( TPZVec< REAL > &  pt,
TPZVec< int64_t > &  id,
TPZVec< int > &  order,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi 
)
static

Functions which computes the shapefunctions of a one-d element.

Parameters
ptcoordinate of the point
orderorder of the shape functions to be computed 0<= order
phishapefunction values
dphivalues of the derivatives of the shape functions
iddetermines the orientation of the shape functions The orientation of the shapefunctions depend on the order of the id parameters if $ id[0] < id[1] $ the shapefunctions are unchanged if $ id[0] > id[1] $ the odd ordered shapefunctions are inverted

Definition at line 214 of file pzshapelinear.cpp.

References TPZMatrix< TVar >::Cols(), PZError, TPZFMatrix< TVar >::Resize(), and TPZMatrix< TVar >::Rows().

◆ ShapeCorner()

void pzshape::TPZShapeLinear::ShapeCorner ( TPZVec< REAL > &  pt,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi 
)
static

Definition at line 269 of file pzshapelinear.cpp.

◆ ShapeGenerating()

void pzshape::TPZShapeLinear::ShapeGenerating ( TPZVec< REAL > &  pt,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi 
)
static

Computes the generating shape functions for a quadrilateral element.

Parameters
pt(input) point where the shape function is computed
phi(input/output) value of the shape functions
dphi(input/output) value of the derivatives of the shape functions holding the derivatives in a column

Computes the generating shape functions for a linear element

Parameters
pt(input) point where the shape function is computed
phi(input/output) value of the shape functions
dphi(input/output) value of the derivatives of the shape functions holding the derivatives in a column

Definition at line 203 of file pzshapelinear.cpp.

◆ ShapeInternal() [1/3]

void pzshape::TPZShapeLinear::ShapeInternal ( TPZVec< REAL > &  x,
int  ord,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi,
int  transformation_index 
)
static

Computes the values of the orthogonal shapefunctions before multiplying them by the corner shapefunctions.

Parameters
xcoordinate of the point
ordorder of the shape functions to be computed 0<= order
phishapefunction values
dphivalues of the derivatives of the shape functions
transformation_indexdetermines the transformation applied to the internal shape functions.
This parameter is computed by the GetTransformId1d method
See also
GetTransformId1d The shape1dInternal function is extensively used by the shapefunction computation of the other elements

Definition at line 312 of file pzshapelinear.cpp.

Referenced by pzshape::TPZShapeTriang::Shape(), pzshape::TPZShapePiram::ShapeInternal(), pzshape::TPZShapeTriang::ShapeInternal(), pzshape::TPZShapePrism::ShapeInternal(), pzshape::TPZShapeTetra::ShapeInternal(), pzshape::TPZShapeQuad::ShapeInternal(), and pzshape::TPZShapeCube::ShapeInternal().

◆ ShapeInternal() [2/3]

void pzshape::TPZShapeLinear::ShapeInternal ( TPZVec< REAL > &  x,
int  ord,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi 
)
static

Computes the values of the orthogonal shapefunctions before multiplying them by the corner shapefunctions.

Parameters
xcoordinate of the point
ordorder of the shape functions to be computed 0<= order
phishapefunction values
dphivalues of the derivatives of the shape functions
transformation_index= 0; functions.
This parameter is computed by the GetTransformId1d method
See also
GetTransformId1d The shape1dInternal function is extensively used by the shapefunction computation of the other elements

Definition at line 303 of file pzshapelinear.cpp.

◆ ShapeInternal() [3/3]

void pzshape::TPZShapeLinear::ShapeInternal ( int  side,
TPZVec< REAL > &  x,
int  order,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi 
)
static

Definition at line 324 of file pzshapelinear.cpp.

◆ ShapeOrder()

void pzshape::TPZShapeLinear::ShapeOrder ( TPZVec< int64_t > &  id,
TPZVec< int > &  order,
TPZGenMatrix< int > &  shapeorders 
)
static

returns the polynomial order in the natural ksi, eta of the side associated with each shapefunction

Definition at line 284 of file pzshapelinear.cpp.

References DebugStop, and TPZGenMatrix< TObj >::Rows().

◆ SideShape()

void pzshape::TPZShapeLinear::SideShape ( int  side,
TPZVec< REAL > &  pt,
TPZVec< int64_t > &  id,
TPZVec< int > &  order,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi 
)
static

Definition at line 272 of file pzshapelinear.cpp.

References Shape().

◆ SideShapeOrder()

void pzshape::TPZShapeLinear::SideShapeOrder ( int  side,
TPZVec< int64_t > &  id,
int  order,
TPZGenMatrix< int > &  shapeorders 
)
static

returns the polynomial order in the natural ksi, eta of the internal shapefunctions of a side

Parameters
sidesis a vector with copy of side as much as needed, it depends on the order

Definition at line 298 of file pzshapelinear.cpp.

References DebugStop.

◆ TransformDerivative1d()

void pzshape::TPZShapeLinear::TransformDerivative1d ( int  transid,
int  num,
TPZFMatrix< REAL > &  in 
)
static

Applies the transformation on the values of the derivatives of the shape functions of the internal shape functions.

Parameters
transididentifier of the transformation of the one-d element as obtained by the GetTransformId1d method
numnumber of shapefunctions needed to transform
inmatrix containing the values of the derivatives of the shapefunctions as a row vector
the values of the derivatives contained in this matrix are modified upon return

Definition at line 350 of file pzshapelinear.cpp.

◆ TransformPoint1d() [1/2]

void pzshape::TPZShapeLinear::TransformPoint1d ( int  transid,
REAL  in,
REAL &  out 
)
static

Computes the transformation applied to the variational parameter of the one-d element.

Parameters
transididentifier of the transformation of the one-d element as obtained by the GetTransformId1d method
incoordinate of the variational parameter
outtransformed parameter The transformation applied to compensate for odd/even brokerage between elements can also be viewed by the transformation of a variational parameter.

Definition at line 331 of file pzshapelinear.cpp.

◆ TransformPoint1d() [2/2]

void pzshape::TPZShapeLinear::TransformPoint1d ( int  transid,
double &  val 
)
static

Definition at line 343 of file pzshapelinear.cpp.

Member Data Documentation

◆ fOrthogonal

void(* pzshape::TPZShapeLinear::fOrthogonal)(REAL, int, TPZFMatrix< REAL > &, TPZFMatrix< REAL > &)
static

Pointer to function which returns num orthogonal functions at the point x.

Parameters
xcoordinate of the point
numnumber of shape functions to be computed
phishapefunction values
dphivalues of the derivatives of the shape functions

Definition at line 48 of file pzshapelinear.h.

Referenced by TPZCompEl::SetOrthogonalFunction().

◆ JacobiA

REAL pzshape::TPZShapeLinear::JacobiA
static

Jacobi parameters orthogonal polynomials.

Definition at line 85 of file pzshapelinear.h.

◆ JacobiB

REAL pzshape::TPZShapeLinear::JacobiB
static

Definition at line 86 of file pzshapelinear.h.


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