NeoPZ
Public Member Functions | Private Attributes | List of all members
TPZGeoNode Class Reference

Implements a geometric node in the pz environment. Geometry. More...

#include <pzgnode.h>

Inheritance diagram for TPZGeoNode:
[legend]
Collaboration diagram for TPZGeoNode:
[legend]

Public Member Functions

 TPZGeoNode (int id, TPZVec< REAL > &xp, TPZGeoMesh &mesh)
 Constructor to new node with id predefined. More...
 
 TPZGeoNode ()
 Constructor to new node. More...
 
 TPZGeoNode (const TPZGeoNode &node)
 Constructor copy. More...
 
TPZGeoNodeoperator= (const TPZGeoNode &node)
 
virtual ~TPZGeoNode ()
 Destructor. More...
 
int ClassId () const override
 Returns the id of the class (used for writing reading the object) More...
 
void Read (TPZStream &buf, void *context) override
 Reads the object from disk. More...
 
void Write (TPZStream &buf, int withclassid) const override
 Writes the object to disk. More...
 
int Id () const
 Returns the identity of the current node. More...
 
void SetNodeId (int id)
 
void Initialize (TPZVec< REAL > &coord, TPZGeoMesh &mesh)
 Initialize the data structure of the node. Creates a unique id for the node automatically. More...
 
void Initialize (int id, TPZVec< REAL > &coord, TPZGeoMesh &mesh)
 Initializes the data structure of the node. Assumes that the id provided by the user is unique for the mesh. More...
 
void Initialize (const TPZGeoNode &node, TPZGeoMesh &mesh)
 Initializes the node with data from a node from a different mesh. More...
 
REAL Coord (int i) const
 Returns i-th coordinate of the current node. More...
 
void SetCoord (const TPZVec< REAL > &x)
 Sets all coordinates into the current node. It gets the dim values from x. More...
 
void SetCoord (int i, REAL coord)
 Set the i-th coordinate for current node. More...
 
void GetCoordinates (TPZVec< REAL > &co)
 Fill the coordinates of the node. More...
 
void Print (std::ostream &out=std::cout)
 Print the node data into out. 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
 

Private Attributes

int fId
 Identity of node. More...
 
REAL fCoord [3]
 Node coordinates. More...
 

Additional Inherited Members

- 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)
 

Detailed Description

Implements a geometric node in the pz environment. Geometry.

A geometric node is a place holder for 3d coordinates and a global Id
Note that the global id will influence the orientation of the shape functions
It is very important that the global Ids will not be duplicated within a single mesh

Definition at line 31 of file pzgnode.h.

Constructor & Destructor Documentation

◆ TPZGeoNode() [1/3]

TPZGeoNode::TPZGeoNode ( int  id,
TPZVec< REAL > &  xp,
TPZGeoMesh mesh 
)

Constructor to new node with id predefined.

Definition at line 14 of file pzgnode.cpp.

References fCoord, fId, TPZVec< T >::NElements(), and TPZGeoMesh::SetNodeIdUsed().

◆ TPZGeoNode() [2/3]

TPZGeoNode::TPZGeoNode ( )

Constructor to new node.

Definition at line 23 of file pzgnode.cpp.

References fCoord, and fId.

◆ TPZGeoNode() [3/3]

TPZGeoNode::TPZGeoNode ( const TPZGeoNode node)

Constructor copy.

Definition at line 27 of file pzgnode.cpp.

References Coord(), fCoord, fId, and Id().

◆ ~TPZGeoNode()

virtual TPZGeoNode::~TPZGeoNode ( )
inlinevirtual

Destructor.

Definition at line 49 of file pzgnode.h.

References ClassId().

Member Function Documentation

◆ ClassId()

int TPZGeoNode::ClassId ( ) const
overridevirtual

Returns the id of the class (used for writing reading the object)

Implements TPZSavable.

Definition at line 96 of file pzgnode.cpp.

References Hash().

Referenced by ~TPZGeoNode().

◆ Coord()

REAL TPZGeoNode::Coord ( int  i) const
inline

◆ GetCoordinates()

void TPZGeoNode::GetCoordinates ( TPZVec< REAL > &  co)

◆ Id()

int TPZGeoNode::Id ( ) const
inline

◆ Initialize() [1/3]

void TPZGeoNode::Initialize ( TPZVec< REAL > &  coord,
TPZGeoMesh mesh 
)

Initialize the data structure of the node. Creates a unique id for the node automatically.

Definition at line 38 of file pzgnode.cpp.

References TPZGeoMesh::CreateUniqueNodeId(), fCoord, fId, and TPZVec< T >::NElements().

Referenced by SetNodeId().

◆ Initialize() [2/3]

void TPZGeoNode::Initialize ( int  id,
TPZVec< REAL > &  coord,
TPZGeoMesh mesh 
)

Initializes the data structure of the node. Assumes that the id provided by the user is unique for the mesh.

Definition at line 45 of file pzgnode.cpp.

References fCoord, fId, TPZVec< T >::NElements(), and TPZGeoMesh::SetNodeIdUsed().

◆ Initialize() [3/3]

void TPZGeoNode::Initialize ( const TPZGeoNode node,
TPZGeoMesh mesh 
)

Initializes the node with data from a node from a different mesh.

Definition at line 53 of file pzgnode.cpp.

References fCoord, fId, and TPZGeoMesh::SetNodeIdUsed().

◆ operator=()

TPZGeoNode & TPZGeoNode::operator= ( const TPZGeoNode node)

Definition at line 32 of file pzgnode.cpp.

References Coord(), fCoord, fId, and Id().

◆ Print()

void TPZGeoNode::Print ( std::ostream &  out = std::cout)

Print the node data into out.

Definition at line 88 of file pzgnode.cpp.

References fCoord, and fId.

Referenced by TPZGeoEl::ComputeXInverse(), and SetNodeId().

◆ Read()

void TPZGeoNode::Read ( TPZStream buf,
void *  context 
)
inlineoverridevirtual

Reads the object from disk.

Reimplemented from TPZSavable.

Definition at line 56 of file pzgnode.h.

References TPZStream::Read().

◆ SetCoord() [1/2]

void TPZGeoNode::SetCoord ( const TPZVec< REAL > &  x)

◆ SetCoord() [2/2]

void TPZGeoNode::SetCoord ( int  i,
REAL  coord 
)

Set the i-th coordinate for current node.

Definition at line 74 of file pzgnode.cpp.

References fCoord, and PZError.

◆ SetNodeId()

void TPZGeoNode::SetNodeId ( int  id)
inline

◆ Write()

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

Writes the object to disk.

Reimplemented from TPZSavable.

Definition at line 62 of file pzgnode.h.

References TPZStream::Write().

Member Data Documentation

◆ fCoord

REAL TPZGeoNode::fCoord[3]
private

Node coordinates.

Definition at line 36 of file pzgnode.h.

Referenced by Coord(), GetCoordinates(), Initialize(), operator=(), Print(), SetCoord(), and TPZGeoNode().

◆ fId

int TPZGeoNode::fId
private

Identity of node.

Definition at line 34 of file pzgnode.h.

Referenced by Id(), Initialize(), operator=(), Print(), and TPZGeoNode().


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