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

#include <pzpostprocanalysis.h>

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

Public Member Functions

 TPZPostProcAnalysis (TPZCompMesh *pRef)
 
 TPZPostProcAnalysis ()
 
 TPZPostProcAnalysis (const TPZPostProcAnalysis &copy)
 
TPZPostProcAnalysisoperator= (const TPZPostProcAnalysis &copy)
 
virtual ~TPZPostProcAnalysis ()
 
void SetCompMesh (TPZCompMesh *pRef, bool mustOptimizeBandwidth=false) override
 Set the computational mesh we are going to post process. More...
 
TPZCompMeshReferenceCompMesh ()
 
virtual void Assemble () override
 
virtual void Solve () override
 
void TransferSolution ()
 
void SetPostProcessVariables (TPZVec< int > &matIds, TPZVec< std::string > &varNames)
 
void AutoBuildDisc ()
 
int ClassId () const override
 Returns the unique identifier for reading/writing objects to streams. More...
 
void Write (TPZStream &buf, int withclassid) const override
 Save the element data to a stream. More...
 
void Read (TPZStream &buf, void *context) override
 Read the element data from a stream. More...
 
- Public Member Functions inherited from TPZAnalysis
 TPZAnalysis (TPZCompMesh *mesh, bool mustOptimizeBandwidth=true, std::ostream &out=std::cout)
 Create an TPZAnalysis object from one mesh pointer. More...
 
 TPZAnalysis (TPZAutoPointer< TPZCompMesh > mesh, bool mustOptimizeBandwidth=true, std::ostream &out=std::cout)
 Create an TPZAnalysis object from one mesh auto pointer object. More...
 
void SetGuiInterface (TPZAutoPointer< TPZGuiInterface > gui)
 Defines gui interface object. More...
 
TPZAutoPointer< TPZGuiInterfaceGetGuiInterface () const
 Gets gui interface object. More...
 
bool AmIKilled ()
 Returns if the process was canceled through gui interface. More...
 
 TPZAnalysis ()
 Create an empty TPZAnalysis object. More...
 
virtual ~TPZAnalysis (void)
 Destructor: deletes all protected dynamic allocated objects. More...
 
void CleanUp ()
 deletes all data structures More...
 
void SetRenumber (TPZAutoPointer< TPZRenumbering > renumber)
 Change the renumbering scheme. More...
 
void OptimizeBandwidth ()
 Sets the computer connection block number from the graphical connections block number otimization. More...
 
int HighestDimension ()
 Returns the dimension of the material which has the highest dimension. More...
 
void Resequence (int firstel=-1)
 Recompute the node sequence. More...
 
int ComputeNumberofLoadCases ()
 Determine the number of load cases from the material objects and return its value. More...
 
virtual void AssembleResidual ()
 Assemble the load vector. More...
 
TPZFMatrix< STATE > & Rhs ()
 Returns the load vector. More...
 
TPZFMatrix< STATE > & Solution ()
 Returns the solution matrix. More...
 
TPZCompMeshMesh () const
 Returns the pointer to the computational mesh. More...
 
TPZAutoPointer< TPZStructMatrixStructMatrix ()
 Returns a reference to the structural matrix. More...
 
TPZMatrixSolver< STATE > * BuildPreconditioner (EPrecond preconditioner, bool overlap)
 Define the type of preconditioner used. More...
 
void SetStep (int step)
 ste the step for post processing More...
 
void SetThreadsForError (int nthreads)
 
int GetStep ()
 
void SetTime (REAL time)
 Sets time will be used in dx files. More...
 
REAL GetTime ()
 Gets time used in dx files. More...
 
void ShowShape (const std::string &plotfile, TPZVec< int64_t > &equationindices)
 Graphic of the solution as V3DGrap visualization. More...
 
void ShowShape (const std::string &plotfile, TPZVec< int64_t > &equationindices, int matid, const TPZVec< std::string > &varname)
 Graphic of the solution as V3DGrap visualization. More...
 
void LoadShape (double dx, double dy, int64_t numelem, TPZConnect *nod)
 Make assembling and clean the load and solution vectors. More...
 
virtual void Run (std::ostream &out=std::cout)
 Calls the appropriate sequence of methods to build a solution or a time stepping sequence. More...
 
virtual void DefineGraphMesh (int dimension, const TPZVec< std::string > &scalnames, const TPZVec< std::string > &vecnames, const std::string &plotfile)
 Define GrapMesh as V3D, DX, MV or VTK depending on extension of the file. More...
 
virtual void DefineGraphMesh (int dimension, const TPZVec< std::string > &scalnames, const TPZVec< std::string > &vecnames, const TPZVec< std::string > &tensnames, const std::string &plotfile)
 Define GrapMesh as VTK with tensorial names depending on extension of the file. More...
 
virtual void DefineGraphMesh (int dimension, const std::set< int > &matids, const TPZVec< std::string > &scalnames, const TPZVec< std::string > &vecnames, const std::string &plotfile)
 Define GrapMesh as V3D, DX, MV or VTK depending on extension of the file. More...
 
virtual void DefineGraphMesh (int dimension, const std::set< int > &matids, const TPZVec< std::string > &scalnames, const TPZVec< std::string > &vecnames, const TPZVec< std::string > &tensnames, const std::string &plotfile)
 Define GrapMesh as VTK with tensorial names depending on extension of the file. More...
 
virtual void CloseGraphMesh ()
 Clean the GrapMesh vector. More...
 
TPZGraphMeshGraphMesh (int dimension)
 Defines the postprocessing parameters for the graphical grid. More...
 
virtual void PostProcess (int resolution)
 Draw solution over mesh for all dimensions. More...
 
virtual void PostProcess (int resolution, int dimension)
 Draw solution over mesh by dimension. More...
 
void IdentifyPostProcessingMatIds (int dimension, std::set< int > &matids)
 Fill mat ids with materials with provided dimension wich are not boundary conditinos or interface. More...
 
virtual void LoadSolution ()
 Load the solution into the computable grid. More...
 
virtual void LoadSolution (const TPZFMatrix< STATE > &sol)
 Load the solution into the computable mesh considering sol as Solution vector of the analysis. More...
 
TPZVec< STATE > Integrate (const std::string &varname, const std::set< int > &matids)
 Integrate the postprocessed variable name over the elements included in the set matids. More...
 
void SetExact (std::function< void(const TPZVec< REAL > &loc, TPZVec< STATE > &result, TPZFMatrix< STATE > &deriv)> f)
 Sets the pointer of the exact solution function. More...
 
virtual void PostProcess (TPZVec< REAL > &loc, std::ostream &out=std::cout)
 Compute the local error over all elements and global errors in several norms and print out. More...
 
virtual void PostProcessError (TPZVec< REAL > &, bool store_error=true, std::ostream &out=std::cout)
 Compute the local error over all elements and global errors in several norms and print out without calculating the errors of the variables for hdiv spaces. More...
 
virtual void PostProcessErrorSerial (TPZVec< REAL > &, bool store_error=true, std::ostream &out=std::cout)
 
virtual void PostProcessErrorParallel (TPZVec< REAL > &, bool store_error=true, std::ostream &out=std::cout)
 
void CreateListOfCompElsToComputeError (TPZAdmChunkVector< TPZCompEl *> &elvec)
 
void Print (const std::string &name, std::ostream &out)
 Print connect and solution information. More...
 
void PrintVectorByElement (std::ostream &out, TPZFMatrix< STATE > &vec, REAL tol=1.e-10)
 Print the residual vector for those elements with entry above a given tolerance. More...
 
TPZMatrixSolver< STATE > & Solver ()
 Get the solver matrix. More...
 
void AnimateRun (int64_t num_iter, int steps, TPZVec< std::string > &scalnames, TPZVec< std::string > &vecnames, const std::string &plotfile)
 Run and print the solution step by step. More...
 
void SetSolver (TPZMatrixSolver< STATE > &solver)
 Set solver matrix. More...
 
void SetStructuralMatrix (TPZAutoPointer< TPZStructMatrix > strmatrix)
 Set structural matrix as auto pointer for analysis. More...
 
void SetStructuralMatrix (TPZStructMatrix &strmatrix)
 Set structural matrix for analysis. More...
 
virtual void DefineElementTable (int dimension, TPZVec< int64_t > &GeoElIds, TPZVec< REAL > &points)
 Fill the computational element vector to post processing depending over geometric mesh defined. More...
 
virtual void SetTableVariableNames (TPZVec< std::string > varnames)
 Sets the names of the variables into the data structure for post processing. More...
 
virtual void PrePostProcessTable (std::ostream &out_file)
 Prepare data to print post processing and print coordinates. More...
 
virtual void PostProcessTable (std::ostream &out_file)
 Print the solution related with the computational element vector in post process. More...
 
void PostProcessTable (TPZFMatrix< REAL > &pos, std::ostream &out=std::cout)
 Compute and print the local error over all elements in data structure of post process, also compute global errors in several norms. 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 SetAllCreateFunctionsPostProc (TPZCompMesh *cmesh)
 
static void SetAllCreateFunctionsContinuous ()
 
static TPZCompElCreatePostProcDisc (TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
 
static TPZCompElCreatePointEl (TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
 
static TPZCompElCreateLinearEl (TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
 
static TPZCompElCreateQuadEl (TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
 
static TPZCompElCreateTriangleEl (TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
 
static TPZCompElCreateCubeEl (TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
 
static TPZCompElCreatePyramEl (TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
 
static TPZCompElCreateTetraEl (TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
 
static TPZCompElCreatePrismEl (TPZGeoEl *gel, TPZCompMesh &mesh, int64_t &index)
 
- 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 Attributes

TPZCompMeshfpMainMesh
 
- Protected Attributes inherited from TPZAnalysis
TPZGeoMeshfGeoMesh
 Geometric Mesh. More...
 
TPZCompMeshfCompMesh
 Computational mesh. More...
 
TPZGraphMeshfGraphMesh [3]
 Graphical mesh. More...
 
TPZFMatrix< STATE > fRhs
 Load vector. More...
 
TPZFMatrix< STATE > fSolution
 Solution vector. More...
 
TPZMatrixSolver< STATE > * fSolver
 Type of solver to be applied. More...
 
TPZVec< std::string > fScalarNames [3]
 Scalar variables names - to post process. More...
 
TPZVec< std::string > fVectorNames [3]
 Vectorial variables names - to post process. More...
 
TPZVec< std::string > fTensorNames [3]
 Tensorial variables names - to post process. More...
 
int fStep
 Time step. More...
 
REAL fTime
 Time variable which is used in dx output. More...
 
int fNthreadsError
 Number of threads to be used for post-processing error. More...
 
TPZAutoPointer< TPZStructMatrixfStructMatrix
 Structural matrix. More...
 
TPZAutoPointer< TPZRenumberingfRenumber
 Renumbering scheme. More...
 
TPZAutoPointer< TPZGuiInterfacefGuiInterface
 Pointer for gui interface object. More...
 
TTablePostProcess fTable
 

Additional Inherited Members

- Public Types inherited from TPZAnalysis
enum  EPrecond { EJacobi, EBlockJacobi, EElement, ENodeCentered }
 Preconditioners which can be created by objects of this class. More...
 
- Public Attributes inherited from TPZAnalysis
std::function< void(const TPZVec< REAL > &loc, TPZVec< STATE > &result, TPZFMatrix< STATE > &deriv)> fExact
 Pointer to Exact solution function, it is necessary to calculating errors. More...
 

Detailed Description

The Post Processing Analysis makes the interface among the computational analysis and itself, being also in charge of getting the current solution from the main analysis.

Definition at line 23 of file pzpostprocanalysis.h.

Constructor & Destructor Documentation

◆ TPZPostProcAnalysis() [1/3]

TPZPostProcAnalysis::TPZPostProcAnalysis ( TPZCompMesh pRef)

Definition at line 75 of file pzpostprocanalysis.cpp.

References SetCompMesh().

◆ TPZPostProcAnalysis() [2/3]

TPZPostProcAnalysis::TPZPostProcAnalysis ( )

Definition at line 70 of file pzpostprocanalysis.cpp.

◆ TPZPostProcAnalysis() [3/3]

TPZPostProcAnalysis::TPZPostProcAnalysis ( const TPZPostProcAnalysis copy)

Definition at line 83 of file pzpostprocanalysis.cpp.

◆ ~TPZPostProcAnalysis()

TPZPostProcAnalysis::~TPZPostProcAnalysis ( )
virtual

Definition at line 95 of file pzpostprocanalysis.cpp.

References TPZAnalysis::fCompMesh.

Member Function Documentation

◆ Assemble()

void TPZPostProcAnalysis::Assemble ( )
overridevirtual

Assemble() blank implementation in order to avoid its usage. In such an Analysis class the Assemble() method is useless.

Reimplemented from TPZAnalysis.

Definition at line 311 of file pzpostprocanalysis.cpp.

References PZError.

Referenced by ReferenceCompMesh().

◆ AutoBuildDisc()

void TPZPostProcAnalysis::AutoBuildDisc ( )

◆ ClassId()

int TPZPostProcAnalysis::ClassId ( ) const
overridevirtual

Returns the unique identifier for reading/writing objects to streams.

Reimplemented from TPZAnalysis.

Definition at line 438 of file pzpostprocanalysis.cpp.

References TPZAnalysis::ClassId(), and Hash().

Referenced by ReferenceCompMesh().

◆ CreateCubeEl()

TPZCompEl * TPZPostProcAnalysis::CreateCubeEl ( TPZGeoEl gel,
TPZCompMesh mesh,
int64_t &  index 
)
static

◆ CreateLinearEl()

TPZCompEl * TPZPostProcAnalysis::CreateLinearEl ( TPZGeoEl gel,
TPZCompMesh mesh,
int64_t &  index 
)
static

◆ CreatePointEl()

TPZCompEl * TPZPostProcAnalysis::CreatePointEl ( TPZGeoEl gel,
TPZCompMesh mesh,
int64_t &  index 
)
static

◆ CreatePostProcDisc()

TPZCompEl * TPZPostProcAnalysis::CreatePostProcDisc ( TPZGeoEl gel,
TPZCompMesh mesh,
int64_t &  index 
)
static

TPZCompElPostProc<TCOMPEL> creation function setup

Definition at line 432 of file pzpostprocanalysis.cpp.

◆ CreatePrismEl()

TPZCompEl * TPZPostProcAnalysis::CreatePrismEl ( TPZGeoEl gel,
TPZCompMesh mesh,
int64_t &  index 
)
static

◆ CreatePyramEl()

TPZCompEl * TPZPostProcAnalysis::CreatePyramEl ( TPZGeoEl gel,
TPZCompMesh mesh,
int64_t &  index 
)
static

◆ CreateQuadEl()

TPZCompEl * TPZPostProcAnalysis::CreateQuadEl ( TPZGeoEl gel,
TPZCompMesh mesh,
int64_t &  index 
)
static

◆ CreateTetraEl()

TPZCompEl * TPZPostProcAnalysis::CreateTetraEl ( TPZGeoEl gel,
TPZCompMesh mesh,
int64_t &  index 
)
static

◆ CreateTriangleEl()

TPZCompEl * TPZPostProcAnalysis::CreateTriangleEl ( TPZGeoEl gel,
TPZCompMesh mesh,
int64_t &  index 
)
static

◆ operator=()

TPZPostProcAnalysis & TPZPostProcAnalysis::operator= ( const TPZPostProcAnalysis copy)

Definition at line 89 of file pzpostprocanalysis.cpp.

References SetCompMesh().

◆ Read()

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

Read the element data from a stream.

Reimplemented from TPZAnalysis.

Definition at line 449 of file pzpostprocanalysis.cpp.

References fpMainMesh, TPZPersistenceManager::GetInstance(), and TPZAnalysis::Read().

Referenced by ReferenceCompMesh().

◆ ReferenceCompMesh()

TPZCompMesh* TPZPostProcAnalysis::ReferenceCompMesh ( )
inline

◆ SetAllCreateFunctionsContinuous()

static void TPZPostProcAnalysis::SetAllCreateFunctionsContinuous ( )
static

Referenced by ReferenceCompMesh().

◆ SetAllCreateFunctionsPostProc()

void TPZPostProcAnalysis::SetAllCreateFunctionsPostProc ( TPZCompMesh cmesh)
static

◆ SetCompMesh()

void TPZPostProcAnalysis::SetCompMesh ( TPZCompMesh pRef,
bool  mustOptimizeBandwidth = false 
)
overridevirtual

Set the computational mesh we are going to post process.

Reimplemented from TPZAnalysis.

Definition at line 104 of file pzpostprocanalysis.cpp.

References TPZAnalysis::CleanUp(), TPZAnalysis::fCompMesh, fpMainMesh, TPZCompMesh::Reference(), and SetAllCreateFunctionsPostProc().

Referenced by operator=(), PYBIND11_MODULE(), and TPZPostProcAnalysis().

◆ SetPostProcessVariables()

void TPZPostProcAnalysis::SetPostProcessVariables ( TPZVec< int > &  matIds,
TPZVec< std::string > &  varNames 
)

Informs the material IDs and the variable names that are to be postprocessed, if matching. Should be called right after the class instantiation

Definition at line 136 of file pzpostprocanalysis.cpp.

References AutoBuildDisc(), DebugStop, TPZCompMesh::ExpandSolution(), TPZCompMesh::FindMaterial(), fpMainMesh, TPZCompMesh::InsertMaterialObject(), TPZCompMeshReferred::LoadReferred(), TPZAnalysis::Mesh(), TPZVec< T >::NElements(), PZError, TPZCompMeshReferred::ReferredMesh(), and TPZPostProcMat::SetPostProcessVarIndexList().

Referenced by PYBIND11_MODULE(), and ReferenceCompMesh().

◆ Solve()

void TPZPostProcAnalysis::Solve ( )
overridevirtual

Solve() blank implementation in order to avoid its usage. In such an Analysis class the Solve() method is useless.

Reimplemented from TPZAnalysis.

Definition at line 316 of file pzpostprocanalysis.cpp.

References PZError.

Referenced by ReferenceCompMesh().

◆ TransferSolution()

void TPZPostProcAnalysis::TransferSolution ( )

TransferSolution is in charge of transferring the solution from the base analysis/mesh to the current post processing mesh, solving for the dof to provide a LSM extrapolation.

Definition at line 320 of file pzpostprocanalysis.cpp.

References TPZAnalysis::AssembleResidual(), TPZMatrix< TVar >::Cols(), DebugStop, TPZCompMesh::ElementSolution(), fpMainMesh, TPZAnalysis::fSolution, TPZCompEl::Index(), TPZAnalysis::LoadSolution(), TPZAnalysis::Mesh(), TPZCompMesh::NElements(), TPZFMatrix< TVar >::Redim(), TPZCompMeshReferred::ReferredEl(), and TPZAnalysis::Rhs().

Referenced by PYBIND11_MODULE(), ReferenceCompMesh(), and TPZElastoPlasticAnalysis::TransferSolution().

◆ Write()

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

Save the element data to a stream.

Reimplemented from TPZAnalysis.

Definition at line 442 of file pzpostprocanalysis.cpp.

References fpMainMesh, TPZAnalysis::Write(), and TPZPersistenceManager::WritePointer().

Referenced by ReferenceCompMesh().

Member Data Documentation

◆ fpMainMesh

TPZCompMesh* TPZPostProcAnalysis::fpMainMesh
protected

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