NeoPZ
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
pzgeom::TPZArc3D Class Reference

Implements three dimensional arc. Geometry. More...

#include <tpzarc3d.h>

Inheritance diagram for pzgeom::TPZArc3D:
[legend]
Collaboration diagram for pzgeom::TPZArc3D:
[legend]

Public Types

enum  { NNodes }
 Number of nodes (connects) More...
 
typedef pztopology::TPZLine Top
 
- 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

 TPZArc3D (const TPZArc3D &cp, std::map< int64_t, int64_t > &gl2lcNdMap)
 Copy constructor with map of nodes. More...
 
 TPZArc3D ()
 Default constructor. More...
 
 TPZArc3D (const TPZArc3D &cp)
 Copy constructor. More...
 
TPZArc3Doperator= (const TPZArc3D &cp)
 Copy constructor. More...
 
 TPZArc3D (const TPZArc3D &cp, TPZGeoMesh &)
 Another copy constructor. More...
 
 TPZArc3D (TPZVec< int64_t > &nodeindexes)
 
 TPZArc3D (TPZFMatrix< REAL > &coord)
 
void Initialize (TPZGeoEl *refel)
 Initialize the internal data structure of the arc using the coordinates of the nodes. More...
 
template<class T >
void X (TPZFMatrix< REAL > &coord, TPZVec< T > &loc, TPZVec< T > &result) const
 
template<class T >
void GradX (TPZFMatrix< REAL > &coord, TPZVec< T > &par, TPZFMatrix< T > &gradx) const
 
void Print (std::ostream &out) const
 Creates a geometric element according to the type of the father element. 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...
 
int ClassId () const override
 Define the class id associated with the class. More...
 
- Public Member Functions inherited from pzgeom::TPZNodeRep< 3, pztopology::TPZLine >
virtual void SetNeighbourInfo (int side, TPZGeoElSide &neigh, TPZTransform<> &trans)
 
bool IsLinearMapping () const
 
bool IsGeoBlendEl () const
 
bool ResetBlendConnectivity (const int64_t &side, const int64_t &index)
 
 TPZNodeRep (TPZVec< int64_t > &nodeindexes)
 Constructor with list of nodes. More...
 
 TPZNodeRep ()
 Empty constructor. More...
 
 TPZNodeRep (const TPZNodeRep &cp, std::map< int64_t, int64_t > &gl2lcNdMap)
 Constructor with node map. More...
 
 TPZNodeRep (const TPZNodeRep< N, pztopology::TPZLine > &cp)
 Copy constructor. More...
 
void Read (TPZStream &buf, void *context) override
 
void Write (TPZStream &buf, int withclassid) const override
 
void Initialize (TPZVec< int64_t > &nodeindexes)
 
void Initialize (TPZGeoEl *)
 
void Print (std::ostream &out) const
 
int ClassId () const override
 
- Public Member Functions inherited from pztopology::TPZLine
 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 std::string TypeName ()
 
static bool IsLinearMapping (int side)
 
static void InsertExampleElement (TPZGeoMesh &gmesh, int matid, TPZVec< REAL > &lowercorner, TPZVec< REAL > &size)
 
- 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)
 

Protected Member Functions

void ComputeAtributes (TPZFMatrix< REAL > &coord)
 
void ComputeR2Points (TPZFMatrix< REAL > &coord, double &xa, double &ya, double &xb, double &yb)
 
double ArcAngle (TPZFMatrix< REAL > &coord, double xa, double ya, double xb, double yb) const
 

Protected Attributes

Atributes
TPZFNMatrix< 9 > fICnBase
 
TPZFNMatrix< 9 > fIBaseCn
 
TPZManVector< REAL, 3 > fCenter3D
 
TPZManVector< REAL, 3 > finitialVector
 
REAL fAngle
 
REAL fRadius
 
REAL fXcenter
 
REAL fYcenter
 

Additional Inherited Members

- Public Attributes inherited from pzgeom::TPZNodeRep< 3, pztopology::TPZLine >
int64_t fNodeIndexes [N]
 Node indexes of the element. More...
 
- Static Public Attributes inherited from pzgeom::TPZNodeRep< 3, pztopology::TPZLine >
static const int NNodes
 
- Static Protected Attributes inherited from pztopology::TPZLine
static int fPermutations [2][3]
 Valid permutations between nodes. More...
 

Detailed Description

Implements three dimensional arc. Geometry.

Author
Paulo Cesar de Alvarenga Lucci (Caju)
Since
2007

Definition at line 26 of file tpzarc3d.h.

Member Typedef Documentation

◆ Top

Definition at line 29 of file tpzarc3d.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Number of nodes (connects)

Enumerator
NNodes 

Definition at line 31 of file tpzarc3d.h.

Constructor & Destructor Documentation

◆ TPZArc3D() [1/6]

pzgeom::TPZArc3D::TPZArc3D ( const TPZArc3D cp,
std::map< int64_t, int64_t > &  gl2lcNdMap 
)
inline

Copy constructor with map of nodes.

Definition at line 34 of file tpzarc3d.h.

References fAngle, fCenter3D, fIBaseCn, fICnBase, finitialVector, fRadius, fXcenter, and fYcenter.

◆ TPZArc3D() [2/6]

pzgeom::TPZArc3D::TPZArc3D ( )
inline

Default constructor.

Definition at line 57 of file tpzarc3d.h.

◆ TPZArc3D() [3/6]

pzgeom::TPZArc3D::TPZArc3D ( const TPZArc3D cp)
inline

Copy constructor.

Definition at line 62 of file tpzarc3d.h.

References fAngle, fCenter3D, fIBaseCn, fICnBase, finitialVector, fRadius, fXcenter, and fYcenter.

◆ TPZArc3D() [4/6]

pzgeom::TPZArc3D::TPZArc3D ( const TPZArc3D cp,
TPZGeoMesh  
)
inline

Another copy constructor.

Definition at line 90 of file tpzarc3d.h.

References fAngle, fCenter3D, fIBaseCn, fICnBase, finitialVector, fRadius, fXcenter, and fYcenter.

◆ TPZArc3D() [5/6]

pzgeom::TPZArc3D::TPZArc3D ( TPZVec< int64_t > &  nodeindexes)
inline

Definition at line 102 of file tpzarc3d.h.

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

◆ TPZArc3D() [6/6]

pzgeom::TPZArc3D::TPZArc3D ( TPZFMatrix< REAL > &  coord)
inline

Definition at line 113 of file tpzarc3d.h.

References ComputeAtributes().

Member Function Documentation

◆ ArcAngle()

double TPZArc3D::ArcAngle ( TPZFMatrix< REAL > &  coord,
double  xa,
double  ya,
double  xb,
double  yb 
) const
protected

This method return the absolute angle with respect of the arc formed between (ini - center) and (fin - center), passing by midnode Note: (xm,ym) don't appear because this coordinates are always (0,0) - it's the origin of R2 basis

Computing the Center Coordinates in this R2 base M_PI

angle between (ini-center) 'n' (mid-center)

angle between (fin-center) 'n' (mid-center)

angle between (ini-center) 'n' (fin-center)

verification if midpoint is in smaller arc angle (<= pi) or in the bigger arc angle (>= pi) Note: smaller and bigger arc angles reffers to the angle formed between (ini-center) and (fin-center) vectors, where [smaller + bigger = 2PI]

Smaller Arc Angle = Angle3

Bigger Arc Angle = 2Pi - Angle3

Definition at line 187 of file tpzarc3d.cpp.

References acos, atan2(), cos(), DebugStop, fabs, and sqrt.

Referenced by Write().

◆ ClassId()

int TPZArc3D::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.

Definition at line 393 of file tpzarc3d.cpp.

References pzgeom::TPZNodeRep< N, Topology >::ClassId(), and Hash().

Referenced by Write().

◆ ComputeAtributes()

void TPZArc3D::ComputeAtributes ( TPZFMatrix< REAL > &  coord)
protected

fIBaseCn -> Basis Change Matrix: from Base(R2) to Canonic(R3) | fIBaseCn 1st column = BaseX | fIBaseCn 2nd column = BaseY

fIBaseCn 3rd column = BaseZ = Cross[BaseX,BaseY] |

fICnBase -> Basis Change Matrix: from Canonic(R3) to Base(R2) | fICnBase(i,0) = Inverse[fIBaseCn]

Computing the Center Coordinates in R2 base

Computing the Center Coordinates in R3 base

Computing Radius

Computing (Center->First_Point) vector

Definition at line 25 of file tpzarc3d.cpp.

References DebugStop, fabs, TPZFMatrix< TVar >::GramSchmidt(), Norm(), and sqrt.

Referenced by Initialize(), TPZArc3D(), and Write().

◆ ComputeR2Points()

void TPZArc3D::ComputeR2Points ( TPZFMatrix< REAL > &  coord,
double &  xa,
double &  ya,
double &  xb,
double &  yb 
)
protected

This method compute the 3 given points with respect to R2 Basis

vector (ini - middle) written in new R2 base

vector (final - middle) written in new R2 base

Definition at line 161 of file tpzarc3d.cpp.

References TPZVec< T >::Fill().

Referenced by Write().

◆ GradX()

template<class T >
void pzgeom::TPZArc3D::GradX ( TPZFMatrix< REAL > &  coord,
TPZVec< T > &  par,
TPZFMatrix< T > &  gradx 
) const
inline

Computing Axes

Vector From MappedPoint to Ini

Vector From MappedPoint to Fin

Vector From MappedPoint to Center

Tangent Vector From Point in the Arc

Definition at line 179 of file tpzarc3d.h.

References DebugStop, fabs, fAngle, fCenter3D, fRadius, sqrt, and X().

◆ Initialize()

void pzgeom::TPZArc3D::Initialize ( TPZGeoEl refel)
inline

Initialize the internal data structure of the arc using the coordinates of the nodes.

Definition at line 119 of file tpzarc3d.h.

References co, ComputeAtributes(), TPZGeoNode::Coord(), and TPZGeoEl::NodePtr().

◆ InsertExampleElement()

void TPZArc3D::InsertExampleElement ( TPZGeoMesh gmesh,
int  matid,
TPZVec< REAL > &  lowercorner,
TPZVec< REAL > &  size 
)
static

Computing Axes Vector From MappedPoint to Ini Vector From MappedPoint to Fin Vector From MappedPoint to Center Tangent Vector From Point in the Arc Creates a geometric element according to the type of the father element

Definition at line 339 of file tpzarc3d.cpp.

References TPZAdmChunkVector< T, EXP >::AllocateNewElement(), and TPZGeoMesh::NodeVec().

Referenced by Write().

◆ IsLinearMapping()

static bool pzgeom::TPZArc3D::IsLinearMapping ( int  side)
inlinestatic

Definition at line 227 of file tpzarc3d.h.

◆ operator=()

TPZArc3D& pzgeom::TPZArc3D::operator= ( const TPZArc3D cp)
inline

Copy constructor.

Definition at line 75 of file tpzarc3d.h.

References fAngle, fCenter3D, fIBaseCn, fICnBase, finitialVector, fRadius, fXcenter, and fYcenter.

◆ Print()

void pzgeom::TPZArc3D::Print ( std::ostream &  out) const
inline

Creates a geometric element according to the type of the father element.

Definition at line 240 of file tpzarc3d.h.

References fAngle, fCenter3D, fIBaseCn, fICnBase, finitialVector, fRadius, fXcenter, fYcenter, pzgeom::TPZNodeRep< N, Topology >::Print(), and TPZMatrix< TVar >::Print().

◆ Read()

void pzgeom::TPZArc3D::Read ( TPZStream buf,
void *  context 
)
inlineoverridevirtual

◆ TypeName()

static std::string pzgeom::TPZArc3D::TypeName ( )
inlinestatic

Definition at line 225 of file tpzarc3d.h.

◆ Write()

void pzgeom::TPZArc3D::Write ( TPZStream buf,
int  withclassid 
) const
inlineoverridevirtual

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.

Definition at line 262 of file tpzarc3d.h.

References ArcAngle(), ClassId(), ComputeAtributes(), ComputeR2Points(), fAngle, fCenter3D, fIBaseCn, fICnBase, finitialVector, fRadius, fXcenter, fYcenter, InsertExampleElement(), TPZStream::Write(), pzgeom::TPZNodeRep< N, Topology >::Write(), and TPZFNMatrix< N, TVar >::Write().

◆ X()

template<class T >
void pzgeom::TPZArc3D::X ( TPZFMatrix< REAL > &  coord,
TPZVec< T > &  loc,
TPZVec< T > &  result 
) const
inline

Computing initialVector = (iniR2 - CenterR2)

MappedPoint_R2 = centerCoord + vectorRotated , where Vx = RotationMatrix . Va

Changing Basis of Obtained MappedPoint from R2 to R3

Definition at line 135 of file tpzarc3d.h.

References cos(), fAngle, fIBaseCn, finitialVector, fRadius, fXcenter, fYcenter, TPZFMatrix< TVar >::GetVal(), and sin.

Referenced by GradX().

Member Data Documentation

◆ fAngle

REAL pzgeom::TPZArc3D::fAngle
protected

Definition at line 298 of file tpzarc3d.h.

Referenced by GradX(), operator=(), Print(), Read(), TPZArc3D(), Write(), and X().

◆ fCenter3D

TPZManVector< REAL,3 > pzgeom::TPZArc3D::fCenter3D
protected

Definition at line 294 of file tpzarc3d.h.

Referenced by GradX(), operator=(), Print(), Read(), TPZArc3D(), and Write().

◆ fIBaseCn

TPZFNMatrix<9> pzgeom::TPZArc3D::fIBaseCn
protected

Definition at line 293 of file tpzarc3d.h.

Referenced by operator=(), Print(), Read(), TPZArc3D(), Write(), and X().

◆ fICnBase

TPZFNMatrix<9> pzgeom::TPZArc3D::fICnBase
protected

Definition at line 293 of file tpzarc3d.h.

Referenced by operator=(), Print(), Read(), TPZArc3D(), and Write().

◆ finitialVector

TPZManVector< REAL,3 > pzgeom::TPZArc3D::finitialVector
protected

Definition at line 294 of file tpzarc3d.h.

Referenced by operator=(), Print(), Read(), TPZArc3D(), Write(), and X().

◆ fRadius

REAL pzgeom::TPZArc3D::fRadius
protected

Definition at line 298 of file tpzarc3d.h.

Referenced by GradX(), operator=(), Print(), Read(), TPZArc3D(), Write(), and X().

◆ fXcenter

REAL pzgeom::TPZArc3D::fXcenter
protected

Definition at line 298 of file tpzarc3d.h.

Referenced by operator=(), Print(), Read(), TPZArc3D(), Write(), and X().

◆ fYcenter

REAL pzgeom::TPZArc3D::fYcenter
protected

Definition at line 298 of file tpzarc3d.h.

Referenced by operator=(), Print(), Read(), TPZArc3D(), Write(), and X().


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