NeoPZ
Public Types | Public Member Functions | Static Public Member Functions | Static Protected Attributes | Friends | List of all members
pztopology::TPZLine Class Reference

Defines the topology of a line element. Topology Sides 0 and 1 are vertices, side 2 is the line. More...

#include <tpzline.h>

Inheritance diagram for pztopology::TPZLine:
[legend]
Collaboration diagram for pztopology::TPZLine:
[legend]

Public Types

enum  {
  NCornerNodes, NSides, Dimension, NFaces,
  NPermutations
}
 Enumerate for topological characteristics. More...
 

Public Member Functions

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 Public Member Functions

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 ()
 
About sides of the topological element
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...
 
About points at the parametric spaces
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)
 
About type of the topological element
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...
 
About Transformations
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 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)
 

Static Protected Attributes

static int fPermutations [2][3]
 Valid permutations between nodes. More...
 

Friends

void pztopology::GetPermutation (const int permute, TPZVec< int > &permutation)
 

Methods related over numeric integration

typedef TPZInt1d IntruleType
 Typedef to numerical integration rule. More...
 
typedef TPZGraphEl1dd GraphElType
 Typedef to graphical element type. More...
 
static TPZIntPointsCreateSideIntegrationRule (int side, int order)
 Create an integration rule over side. More...
 

Detailed Description

Defines the topology of a line element. Topology Sides 0 and 1 are vertices, side 2 is the line.

Author
Philippe R. B. Devloo

Definition at line 38 of file tpzline.h.

Member Typedef Documentation

◆ GraphElType

Typedef to graphical element type.

Definition at line 217 of file tpzline.h.

◆ IntruleType

Typedef to numerical integration rule.

Definition at line 215 of file tpzline.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Enumerate for topological characteristics.

Enumerator
NCornerNodes 
NSides 
Dimension 
NFaces 
NPermutations 

Definition at line 42 of file tpzline.h.

Constructor & Destructor Documentation

◆ TPZLine()

pztopology::TPZLine::TPZLine ( )
inline

Default constructor.

Definition at line 50 of file tpzline.h.

◆ ~TPZLine()

virtual pztopology::TPZLine::~TPZLine ( )
inlinevirtual

Default destructor.

Definition at line 54 of file tpzline.h.

Member Function Documentation

◆ BlendFactorForSide()

template<class T >
template void TPZLine::BlendFactorForSide< REAL > ( const int &  side,
const TPZVec< T > &  xi,
T &  blendFactor,
TPZVec< T > &  corrFactorDxi 
)
static

This method calculates the influence (a.k.a. the blend function) of the side side regarding an interior point qsi. It is used by the TPZGeoBlend class.

Parameters
sidethe index of the side
xicoordinates of the interior point
blendFactorinfluence (0 <= blendFactor <= 1)
corrFactorDxiderivative of the blendFactor in respect to xi

Definition at line 78 of file tpzline.cpp.

References DebugStop, pztopology::GetTolerance(), LOGPZ_FATAL, PZError, TPZVec< T >::Resize(), and pzgeom::tol.

Referenced by Shape().

◆ CenterPoint()

void TPZLine::CenterPoint ( int  side,
TPZVec< REAL > &  center 
)
static

Returns the barycentric coordinates in the master element space of the original element.

Definition at line 224 of file tpzline.cpp.

References DebugStop, and TPZVec< T >::size().

Referenced by PYBIND11_MODULE(), and Shape().

◆ CheckProjectionForSingularity()

template<class T >
template bool TPZLine::CheckProjectionForSingularity< REAL > ( const int &  side,
const TPZVec< T > &  xiInterior 
)
static

This method will check if the projection to a certain side (MapToSide method) is regular, i.e., if the interior point in the parametric domain is not too close to the projection's singularity.

Parameters
sidethe index of the side upon which the interior point will be projected upon
xiInteriorcoordinates of the interior point
Returns
true if the interior point is far from the singularity

Definition at line 165 of file tpzline.cpp.

Referenced by Shape().

◆ ClassId()

int TPZLine::ClassId ( ) const
overridevirtual

Define the class id associated with the class.

This id has to be unique for all classes A non unique id is flagged at the startup of the program

Implements TPZSavable.

Reimplemented in pzgeom::TPZNodeRep< 3, pztopology::TPZLine >, and pzgeom::TPZNodeRep< 2, pztopology::TPZLine >.

Definition at line 540 of file tpzline.cpp.

References Hash().

◆ ComputeDirections()

void TPZLine::ComputeDirections ( int  side,
TPZFMatrix< REAL > &  gradx,
TPZFMatrix< REAL > &  directions,
TPZVec< int > &  sidevectors 
)
static

◆ ComputeHDivDirections()

template<class TVar >
template void TPZLine::ComputeHDivDirections< REAL > ( TPZFMatrix< TVar > &  gradx,
TPZFMatrix< TVar > &  directions 
)
inlinestatic

Compute the directions of the HDiv vectors.

Definition at line 240 of file tpzline.h.

References TPZAxesTools< TVar >::ComputeDetjac(), and NBilinearSides().

◆ ContainedSideLocId()

int TPZLine::ContainedSideLocId ( int  side,
int  c 
)
static

Returns the local connect number of the connect "c" along side "side".

Definition at line 389 of file tpzline.cpp.

References PZError.

Referenced by Shape().

◆ CreateSideIntegrationRule()

TPZIntPoints * TPZLine::CreateSideIntegrationRule ( int  side,
int  order 
)
static

Create an integration rule over side.

Parameters
sideSide to create integration rule
orderOrder of the integration rule to be created

Definition at line 344 of file tpzline.cpp.

References PZError.

Referenced by PYBIND11_MODULE(), and Shape().

◆ GetSideHDivDirections() [1/2]

void TPZLine::GetSideHDivDirections ( TPZVec< int > &  sides,
TPZVec< int > &  dir,
TPZVec< int > &  bilinearounao 
)
static

Definition at line 506 of file tpzline.cpp.

References TPZVec< T >::Resize().

Referenced by RefElVolume().

◆ GetSideHDivDirections() [2/2]

void TPZLine::GetSideHDivDirections ( TPZVec< int > &  sides,
TPZVec< int > &  dir,
TPZVec< int > &  bilinearounao,
TPZVec< int > &  sidevectors 
)
static

Definition at line 523 of file tpzline.cpp.

References TPZVec< T >::Resize().

◆ GetSideHDivPermutation()

void TPZLine::GetSideHDivPermutation ( int  transformationid,
TPZVec< int > &  permgather 
)
static

Identifies the permutation of the nodes needed to make neighbouring elements compatible in terms of order of shape functions.

Parameters
sideSide for which the permutation is needed
idIds of the corner nodes of the elements
permgatherPermutation vector in a gather order

Identifies the permutation of the nodes needed to make neighbouring elements compatible in terms of order of shape functions

Parameters
side: side for which the permutation is needed
id: ids of the corner nodes of the elements
permgather: permutation vector in a gather order

Definition at line 447 of file tpzline.cpp.

References TPZVec< T >::Resize().

Referenced by TPZGeoElRefLess< TGeo >::HDivPermutation(), and TPZCompElHDiv< TSHAPE >::SideShapeFunction().

◆ GetTransformId() [1/2]

int TPZLine::GetTransformId ( TPZVec< int64_t > &  id)
static

Method which identifies the transformation based on the IDs of the corner nodes.

Parameters
idIndexes of the corner nodes
Returns
Index of the transformation of the point corresponding to the topology

Method which identifies the transformation based on the IDs of the corner nodes

Parameters
idindexes of the corner nodes
Returns
index of the transformation of the point corresponding to the topology

Definition at line 412 of file tpzline.cpp.

Referenced by TPZGeoElRefLess< TGeo >::HDivPermutation(), Shape(), and TPZCompElHDiv< TSHAPE >::SideShapeFunction().

◆ GetTransformId() [2/2]

int TPZLine::GetTransformId ( int  side,
TPZVec< int64_t > &  id 
)
static

Method which identifies the transformation of a side based on the IDs of the corner nodes.

Parameters
sideIndex of side
idIndexes of the corner nodes
Returns
Index of the transformation of the point corresponding to the topology

Method which identifies the transformation of a side based on the IDs of the corner nodes

Parameters
idindexes of the corner nodes
Returns
index of the transformation of the point corresponding to the topology

Definition at line 423 of file tpzline.cpp.

References LOGPZ_ERROR.

◆ HigherDimensionSides()

void TPZLine::HigherDimensionSides ( int  side,
TPZStack< int > &  high 
)
static

Returns all sides whose closure contains side.

Parameters
sidesmaller dimension side
highvector which will contain all sides whose closure contain sidefrom

Definition at line 206 of file tpzline.cpp.

References TPZStack< T, NumExtAlloc >::Push(), and PZError.

Referenced by PYBIND11_MODULE(), and Shape().

◆ IsInParametricDomain()

bool TPZLine::IsInParametricDomain ( const TPZVec< REAL > &  pt,
REAL  tol = pztopology::gTolerance 
)
static

Verifies if the parametric point pt is in the element parametric domain.

Definition at line 154 of file tpzline.cpp.

References fabs.

Referenced by IsInSideParametricDomain(), PYBIND11_MODULE(), and Shape().

◆ LowerDimensionSides() [1/2]

void TPZLine::LowerDimensionSides ( int  side,
TPZStack< int > &  smallsides 
)
static

Get all sides with lower dimension on side.

Definition at line 136 of file tpzline.cpp.

References TPZStack< T, NumExtAlloc >::Push(), and TPZManVector< T, NumExtAlloc >::Resize().

Referenced by PYBIND11_MODULE(), and Shape().

◆ LowerDimensionSides() [2/2]

void TPZLine::LowerDimensionSides ( int  side,
TPZStack< int > &  smallsides,
int  DimTarget 
)
static

Get all sides with lower dimension but equal to DimTarget on side.

Definition at line 145 of file tpzline.cpp.

References TPZStack< T, NumExtAlloc >::Push(), and TPZManVector< T, NumExtAlloc >::Resize().

◆ MapToSide()

template<class T >
template void TPZLine::MapToSide< REAL > ( int  side,
TPZVec< T > &  InternalPar,
TPZVec< T > &  SidePar,
TPZFMatrix< T > &  JacToSide 
)
static

◆ NBilinearSides()

int TPZLine::NBilinearSides ( )
static

Returns the number of bilinear sides to this shape. Needed to compute the number shapefunctions( NConnectShapeF )

Definition at line 60 of file tpzline.cpp.

Referenced by ComputeHDivDirections().

◆ NContainedSides()

int TPZLine::NContainedSides ( int  side)
static

Returns the number of nodes (not connectivities) associated with a side.

Definition at line 381 of file tpzline.cpp.

References DebugStop, and PZError.

Referenced by Shape().

◆ NSideNodes()

int TPZLine::NSideNodes ( int  side)
static

Returns the number of nodes (not connectivities) associated with a side.

Definition at line 120 of file tpzline.cpp.

Referenced by PYBIND11_MODULE(), and Shape().

◆ NumSides() [1/2]

int TPZLine::NumSides ( )
static

Returns the number of connects for a set dimension.

Definition at line 376 of file tpzline.cpp.

Referenced by PYBIND11_MODULE(), and Shape().

◆ NumSides() [2/2]

int TPZLine::NumSides ( int  dimension)
static

Returns the number of connects for a set dimension.

Definition at line 125 of file tpzline.cpp.

References PZError.

◆ ParametricDomainNodeCoord()

void TPZLine::ParametricDomainNodeCoord ( int  node,
TPZVec< REAL > &  nodeCoord 
)
static

Definition at line 180 of file tpzline.cpp.

References DebugStop, and TPZVec< T >::Resize().

Referenced by Shape().

◆ RandomPoint()

void TPZLine::RandomPoint ( TPZVec< REAL > &  pt)
static

Generates a random point in the master domain.

Definition at line 236 of file tpzline.cpp.

References val().

Referenced by Shape().

◆ Read()

void TPZLine::Read ( TPZStream buf,
void *  context 
)
overridevirtual

read objects from the stream

Reimplemented from TPZSavable.

Reimplemented in pzgeom::TPZNodeRep< 3, pztopology::TPZLine >, and pzgeom::TPZNodeRep< 2, pztopology::TPZLine >.

Definition at line 544 of file tpzline.cpp.

◆ RefElVolume()

static constexpr REAL pztopology::TPZLine::RefElVolume ( )
inlinestatic

Volume of the master element (measure of the element)

Definition at line 231 of file tpzline.h.

References pztopology::bilinearounao, ComputeDirections(), and GetSideHDivDirections().

Referenced by PYBIND11_MODULE().

◆ Shape()

static void pztopology::TPZLine::Shape ( TPZVec< REAL > &  loc,
TPZFMatrix< REAL > &  phi,
TPZFMatrix< REAL > &  dphi 
)
inlinestatic

◆ SideDimension()

int TPZLine::SideDimension ( int  side)
static

Returns the dimension of the side.

Definition at line 245 of file tpzline.cpp.

References PZError.

Referenced by pzrefine::TPZRefLinear::GetTransform(), PYBIND11_MODULE(), and Shape().

◆ SideNodeLocId()

int TPZLine::SideNodeLocId ( int  side,
int  node 
)
static

Returns the local node number of the node "node" along side "side".

Definition at line 216 of file tpzline.cpp.

References PZError.

Referenced by PYBIND11_MODULE(), and Shape().

◆ SideToSideTransform()

TPZTransform TPZLine::SideToSideTransform ( int  sidefrom,
int  sideto 
)
static

Returns the transformation which takes a point from the side sidefrom to the side sideto.

Parameters
sidefromSide where the point resides
sidetoSide whose closure contains sidefrom

Definition at line 253 of file tpzline.cpp.

References TPZTransform< T >::Mult(), PZError, and TPZTransform< T >::Sum().

Referenced by PYBIND11_MODULE(), and Shape().

◆ TransformElementToSide()

TPZTransform TPZLine::TransformElementToSide ( int  side)
static

Returns the transformation which transform a point from the interior of the element to the side.

Parameters
sideSide to which the point will be tranformed (0<=side<=2)
Returns
TPZTransform<> object

Definition at line 293 of file tpzline.cpp.

References TPZTransform< T >::Mult(), PZError, TPZTransform< T >::Sum(), and TPZFMatrix< TVar >::Zero().

Referenced by PYBIND11_MODULE(), and Shape().

◆ TransformSideToElement()

TPZTransform TPZLine::TransformSideToElement ( int  side)
static

Returns the transformation which transform a point from the side to the interior of the element.

Parameters
sideSide from which the point will be tranformed (0<=side<=2)
Returns
TPZTransform<> object

Definition at line 316 of file tpzline.cpp.

References TPZTransform< T >::Mult(), PZError, TPZTransform< T >::Sum(), and TPZFMatrix< TVar >::Zero().

Referenced by PYBIND11_MODULE(), and Shape().

◆ TShape()

template<class T >
template void TPZLine::TShape< REAL > ( const TPZVec< T > &  loc,
TPZFMatrix< T > &  phi,
TPZFMatrix< T > &  dphi 
)
inlinestatic

Compute the shape being used to construct the x mapping from local parametric coordinates.

Definition at line 69 of file tpzline.cpp.

Referenced by GetSideShapeFunction(), pzgeom::TPZGeoLinear::GradX(), ProjectBissectionInParametricDomain(), and Shape().

◆ Type() [1/2]

MElementType TPZLine::Type ( )
static

Returns the type of the element as specified in file pzeltype.h.

Definition at line 357 of file tpzline.cpp.

References EOned.

Referenced by Shape().

◆ Type() [2/2]

MElementType TPZLine::Type ( int  side)
static

Returns the type of the element side as specified in file pzeltype.h.

Definition at line 362 of file tpzline.cpp.

References ENoType, EOned, and EPoint.

◆ Write()

void TPZLine::Write ( TPZStream buf,
int  withclassid 
) const
overridevirtual

Writes this object to the TPZStream buffer. Include the classid if withclassid = true.

Writes this object to the TPZStream buffer. Include the classid if withclassid = true

Reimplemented from TPZSavable.

Reimplemented in pzgeom::TPZNodeRep< 3, pztopology::TPZLine >, and pzgeom::TPZNodeRep< 2, pztopology::TPZLine >.

Definition at line 548 of file tpzline.cpp.

Friends And Related Function Documentation

◆ pztopology::GetPermutation

void pztopology::GetPermutation ( const int  permute,
TPZVec< int > &  permutation 
)
friend

Member Data Documentation

◆ fPermutations

int TPZLine::fPermutations
staticprotected

Valid permutations between nodes.

Definition at line 259 of file tpzline.h.


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