NeoPZ
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TPZGraphMesh Class Reference

Represents a graphical mesh used for post processing purposes. Post processing. More...

#include <pzgraphmesh.h>

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

Public Member Functions

 TPZGraphMesh (TPZCompMesh *cm, int dimension, const std::set< int > &matids, const TPZVec< std::string > &scalarnames, const TPZVec< std::string > &vecnames)
 Constructor for graphical mesh. More...
 
 TPZGraphMesh (TPZCompMesh *cm, int dimension, const std::set< int > &matids, const TPZVec< std::string > &scalarnames, const TPZVec< std::string > &vecnames, const TPZVec< std::string > &tensornames)
 Constructor with tensorial names for graphical mesh. More...
 
virtual ~TPZGraphMesh (void)
 Default destructor. More...
 
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...
 
TPZGraphNodeFindNode (int64_t side)
 Find graphical node (connect) More...
 
TPZGraphElFindElement (int64_t sid)
 
TPZAdmChunkVector< TPZGraphEl * > & ElementList ()
 Vector of the graphical elements. More...
 
TPZAdmChunkVector< TPZGraphNode > & NodeMap ()
 Vector of the graphical nodes. More...
 
int64_t NPoints ()
 Number of points to drawing, depending on the resolution. More...
 
int64_t NElements (MElementType type)
 
int Res ()
 Get the resolution of the draw. More...
 
virtual void SetCompMesh (TPZCompMesh *mesh, const std::set< int > &matids)
 Sets the computational mesh to associate. More...
 
virtual void DrawNodes ()
 Draw the graphical nodes information. More...
 
virtual void DrawMesh (int numcases)
 Draw the graphical mesh. More...
 
virtual void DrawConnectivity (MElementType type)
 Draw the connectivity information. More...
 
virtual void DrawSolution (int step, REAL time)
 Draw solution depending on the resolution. More...
 
TPZDrawStyle Style ()
 Gets the style of the graphical mesh. More...
 
virtual void SetFileName (const std::string &filename)
 Sets the filename to output of graph. More...
 
std::ostream & Out ()
 
void SetResolution (int res)
 Sets resolution. More...
 
void Print (std::ostream &out)
 Print object attributes. More...
 
void SetNames (const TPZVec< std::string > &scalarnames, const TPZVec< std::string > &vecnames)
 Set names with scalar and vector variable names. More...
 
void SetNames (const TPZVec< std::string > &scalarnames, const TPZVec< std::string > &vecnames, const TPZVec< std::string > &tensornames)
 Set names with scalar, vectorial and tensorial variable names. More...
 
void SetMaterialIds (const std::set< int > &matids)
 Set material ids. More...
 
std::set< int > MaterialIds ()
 Get material ids. More...
 
bool Material_Is_PostProcessed (int matid)
 Return a directive if the material id is being postprocessed. More...
 
virtual TPZCompMeshMesh ()
 Return of the material for graphical mesh. More...
 
TPZVec< std::string > ScalarNames ()
 Return scalar variable names. More...
 
TPZVec< std::string > VecNames ()
 Return vectorial variable names. More...
 
TPZVec< std::string > TensorNames ()
 Return tensorial variable names. 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
 

Protected Member Functions

virtual void SequenceNodes ()
 
TPZCompElFindFirstInterpolatedElement (TPZCompMesh *mesh, int dimension)
 

Protected Attributes

TPZCompMeshfCompMesh
 Computational mesh associated. More...
 
TPZGeoMeshfGeoMesh
 Geometric mesh related. More...
 
std::set< int > fMaterialIds
 Set of material ids being post-processed. More...
 
int fDimension
 Dimension of the graphical mesh. More...
 
TPZAdmChunkVector< TPZGraphEl * > fElementList
 Vector of graphical elements. More...
 
TPZAdmChunkVector< TPZGraphNodefNodeMap
 Vector of graphical nodes (connects) More...
 
int fResolution
 Resolution of the graphical object. More...
 
TPZDrawStyle fStyle
 Style of the graphical file. More...
 
std::ofstream fOutFile
 
std::string fFileName
 
TPZVec< std::string > fScalarNames
 Vectors of the variables names (scalar, vectorial, and tensorial) More...
 
TPZVec< std::string > fVecNames
 
TPZVec< std::string > fTensorNames
 

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

Represents a graphical mesh used for post processing purposes. Post processing.

The graphical mesh represents a logically refined version of the computational mesh
This logical refinement means that the refined element object are not actually created
They only exist in the output file.

Definition at line 34 of file pzgraphmesh.h.

Constructor & Destructor Documentation

◆ TPZGraphMesh() [1/2]

TPZGraphMesh::TPZGraphMesh ( TPZCompMesh cm,
int  dimension,
const std::set< int > &  matids,
const TPZVec< std::string > &  scalarnames,
const TPZVec< std::string > &  vecnames 
)

◆ TPZGraphMesh() [2/2]

TPZGraphMesh::TPZGraphMesh ( TPZCompMesh cm,
int  dimension,
const std::set< int > &  matids,
const TPZVec< std::string > &  scalarnames,
const TPZVec< std::string > &  vecnames,
const TPZVec< std::string > &  tensornames 
)

◆ ~TPZGraphMesh()

TPZGraphMesh::~TPZGraphMesh ( void  )
virtual

Default destructor.

Definition at line 65 of file pzgraphmesh.cpp.

References fElementList, and TPZChunkVector< T, EXP >::NElements().

Member Function Documentation

◆ ClassId()

int TPZGraphMesh::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 294 of file pzgraphmesh.cpp.

References Hash().

◆ DrawConnectivity()

void TPZGraphMesh::DrawConnectivity ( MElementType  type)
virtual

Draw the connectivity information.

Reimplemented in TPZMVGraphMesh, and TPZVTKGraphMesh.

Definition at line 164 of file pzgraphmesh.cpp.

References TPZGraphEl::Connectivity(), fElementList, fStyle, TPZChunkVector< T, EXP >::NElements(), and TPZGraphEl::Type().

Referenced by TPZV3DGraphMesh::DrawMesh(), TPZDXGraphMesh::DrawMesh(), and Res().

◆ DrawMesh()

void TPZGraphMesh::DrawMesh ( int  numcases)
virtual

Draw the graphical mesh.

Reimplemented in TPZDXGraphMesh, TPZV3DGraphMesh, TPZMVGraphMesh, and TPZVTKGraphMesh.

Definition at line 157 of file pzgraphmesh.cpp.

Referenced by TPZAnalysis::PostProcess(), and Res().

◆ DrawNodes()

void TPZGraphMesh::DrawNodes ( )
virtual

Draw the graphical nodes information.

Reimplemented in TPZMVGraphMesh, and TPZVTKGraphMesh.

Definition at line 148 of file pzgraphmesh.cpp.

References TPZGraphNode::DrawCo(), fNodeMap, fStyle, and TPZChunkVector< T, EXP >::NElements().

Referenced by TPZV3DGraphMesh::DrawMesh(), TPZDXGraphMesh::DrawMesh(), and Res().

◆ DrawSolution()

void TPZGraphMesh::DrawSolution ( int  step,
REAL  time 
)
virtual

Draw solution depending on the resolution.

Reimplemented in TPZDXGraphMesh, TPZV3DGraphMesh, TPZMVGraphMesh, and TPZVTKGraphMesh.

Definition at line 160 of file pzgraphmesh.cpp.

Referenced by TPZAnalysis::PostProcess(), and Res().

◆ ElementList()

TPZAdmChunkVector< TPZGraphEl * > & TPZGraphMesh::ElementList ( )

Vector of the graphical elements.

Definition at line 104 of file pzgraphmesh.cpp.

References fElementList, and TPZAdmChunkVector< T, EXP >::Resize().

Referenced by TPZGraphEl::TPZGraphEl().

◆ FindElement()

TPZGraphEl * TPZGraphMesh::FindElement ( int64_t  sid)

◆ FindFirstInterpolatedElement()

TPZCompEl * TPZGraphMesh::FindFirstInterpolatedElement ( TPZCompMesh mesh,
int  dimension 
)
protected

◆ FindNode()

TPZGraphNode & TPZGraphMesh::FindNode ( int64_t  side)

Find graphical node (connect)

Definition at line 78 of file pzgraphmesh.cpp.

References fNodeMap, gn, TPZChunkVector< T, EXP >::NElements(), and TPZGraphNode::SequenceNumber().

◆ Material_Is_PostProcessed()

bool TPZGraphMesh::Material_Is_PostProcessed ( int  matid)

◆ MaterialIds()

std::set< int > TPZGraphMesh::MaterialIds ( )

◆ Mesh()

virtual TPZCompMesh* TPZGraphMesh::Mesh ( )
inlinevirtual

Return of the material for graphical mesh.

Return a pointer of the computational mesh

Definition at line 137 of file pzgraphmesh.h.

References fCompMesh.

◆ NElements()

int64_t TPZGraphMesh::NElements ( MElementType  type)

◆ NodeMap()

TPZAdmChunkVector< TPZGraphNode > & TPZGraphMesh::NodeMap ( )

Vector of the graphical nodes.

Definition at line 113 of file pzgraphmesh.cpp.

References fNodeMap.

Referenced by TPZGraphEl::TPZGraphEl().

◆ NPoints()

int64_t TPZGraphMesh::NPoints ( )

◆ Out()

std::ostream& TPZGraphMesh::Out ( )
inline

◆ Print()

void TPZGraphMesh::Print ( std::ostream &  out)

Print object attributes.

Definition at line 199 of file pzgraphmesh.cpp.

References fElementList, fNodeMap, TPZChunkVector< T, EXP >::NElements(), TPZGraphNode::Print(), and TPZGraphEl::Print().

Referenced by SetResolution().

◆ Read()

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

◆ Res()

int TPZGraphMesh::Res ( )
inline

◆ ScalarNames()

TPZVec<std::string> TPZGraphMesh::ScalarNames ( )
inline

Return scalar variable names.

Definition at line 140 of file pzgraphmesh.h.

References fScalarNames.

Referenced by TPZMultiphysicsInterfaceElement::CreateGraphicalElement().

◆ SequenceNodes()

void TPZGraphMesh::SequenceNodes ( )
protectedvirtual

◆ SetCompMesh()

void TPZGraphMesh::SetCompMesh ( TPZCompMesh mesh,
const std::set< int > &  matids 
)
virtual

◆ SetFileName()

void TPZGraphMesh::SetFileName ( const std::string &  filename)
virtual

Sets the filename to output of graph.

Reimplemented in TPZDXGraphMesh.

Definition at line 139 of file pzgraphmesh.cpp.

References fFileName, stats::filename, and fOutFile.

Referenced by TPZAnalysis::DefineGraphMesh(), main(), Read(), Res(), TPZDXGraphMesh::SetFileName(), and TPZNonLinMultGridAnalysis::SmoothingSolution2().

◆ SetMaterialIds()

void TPZGraphMesh::SetMaterialIds ( const std::set< int > &  matids)

Set material ids.

Definition at line 227 of file pzgraphmesh.cpp.

References fCompMesh, and SetCompMesh().

Referenced by SetResolution().

◆ SetNames() [1/2]

void TPZGraphMesh::SetNames ( const TPZVec< std::string > &  scalarnames,
const TPZVec< std::string > &  vecnames 
)

Set names with scalar and vector variable names.

Definition at line 214 of file pzgraphmesh.cpp.

References fScalarNames, fTensorNames, fVecNames, and TPZVec< T >::resize().

Referenced by SetResolution().

◆ SetNames() [2/2]

void TPZGraphMesh::SetNames ( const TPZVec< std::string > &  scalarnames,
const TPZVec< std::string > &  vecnames,
const TPZVec< std::string > &  tensornames 
)

Set names with scalar, vectorial and tensorial variable names.

Definition at line 220 of file pzgraphmesh.cpp.

References fScalarNames, fTensorNames, and fVecNames.

◆ SetResolution()

void TPZGraphMesh::SetResolution ( int  res)
inline

◆ Style()

TPZDrawStyle TPZGraphMesh::Style ( )
inline

Gets the style of the graphical mesh.

Definition at line 158 of file pzgraphmesh.h.

References fStyle.

Referenced by Res().

◆ TensorNames()

TPZVec<std::string> TPZGraphMesh::TensorNames ( )
inline

Return tensorial variable names.

Definition at line 152 of file pzgraphmesh.h.

References fTensorNames.

◆ VecNames()

TPZVec<std::string> TPZGraphMesh::VecNames ( )
inline

Return vectorial variable names.

Definition at line 146 of file pzgraphmesh.h.

References fVecNames.

Referenced by TPZMultiphysicsInterfaceElement::CreateGraphicalElement().

◆ Write()

void TPZGraphMesh::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.

Definition at line 321 of file pzgraphmesh.cpp.

References as_integer(), fCompMesh, fDimension, fElementList, fFileName, fGeoMesh, fMaterialIds, fNodeMap, fResolution, fScalarNames, fStyle, fTensorNames, fVecNames, TPZStream::Write(), TPZAdmChunkVector< T, EXP >::Write(), TPZPersistenceManager::WritePointer(), and TPZStream::WritePointers().

Member Data Documentation

◆ fCompMesh

TPZCompMesh* TPZGraphMesh::fCompMesh
protected

◆ fDimension

int TPZGraphMesh::fDimension
protected

Dimension of the graphical mesh.

Definition at line 115 of file pzgraphmesh.h.

Referenced by TPZDXGraphMesh::Close(), Read(), SetCompMesh(), and Write().

◆ fElementList

TPZAdmChunkVector<TPZGraphEl *> TPZGraphMesh::fElementList
protected

◆ fFileName

std::string TPZGraphMesh::fFileName
protected

◆ fGeoMesh

TPZGeoMesh* TPZGraphMesh::fGeoMesh
protected

Geometric mesh related.

Definition at line 111 of file pzgraphmesh.h.

Referenced by Read(), and Write().

◆ fMaterialIds

std::set<int> TPZGraphMesh::fMaterialIds
protected

Set of material ids being post-processed.

Definition at line 113 of file pzgraphmesh.h.

Referenced by Material_Is_PostProcessed(), MaterialIds(), Read(), SetCompMesh(), and Write().

◆ fNodeMap

TPZAdmChunkVector<TPZGraphNode> TPZGraphMesh::fNodeMap
protected

◆ fOutFile

std::ofstream TPZGraphMesh::fOutFile
protected

◆ fResolution

int TPZGraphMesh::fResolution
protected

Resolution of the graphical object.

Definition at line 121 of file pzgraphmesh.h.

Referenced by TPZMVGraphMesh::DrawConnectivity(), Read(), Res(), SetResolution(), and Write().

◆ fScalarNames

TPZVec<std::string> TPZGraphMesh::fScalarNames
protected

◆ fStyle

TPZDrawStyle TPZGraphMesh::fStyle
protected

◆ fTensorNames

TPZVec<std::string> TPZGraphMesh::fTensorNames
protected

◆ fVecNames

TPZVec<std::string> TPZGraphMesh::fVecNames
protected

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