NeoPZ
Classes | Public Member Functions | Protected Attributes | Private Member Functions | List of all members
TPZFront< TVar > Class Template Referenceabstract

Abstract class implements storage and decomposition process of the frontal matrix. Frontal. More...

#include <pzsmfrontalanal.h>

Inheritance diagram for TPZFront< TVar >:
[legend]
Collaboration diagram for TPZFront< TVar >:
[legend]

Classes

struct  STensorProductMTData
 struct para paralelizar a decomposicao da matriz More...
 

Public Member Functions

int64_t NElements ()
 Static main used for testing. More...
 
virtual ~TPZFront ()
 Simple destructor. More...
 
 TPZFront ()
 Simple constructor. More...
 
 TPZFront (int64_t GlobalSize)
 Constructor with a initial size parameter. More...
 
 TPZFront (const TPZFront< TVar > &cp)
 
void SymbolicDecomposeEquations (int64_t mineq, int64_t maxeq)
 Decompose these equations in a symbolic way and store freed indexes in fFree. More...
 
void SymbolicAddKel (TPZVec< int64_t > &destinationindex)
 Add a contribution of a stiffness matrix using the indexes to compute the frontwidth. More...
 
int Work ()
 
void SetNumRigidBodyModes (int nrigid)
 Indicate the first equation dedicated to rigid body modes. More...
 
int ClassId () const override
 Define the class id associated with the class. More...
 
virtual void ExtractFrontMatrix (TPZFMatrix< TVar > &front)
 Extracts the so far condensed matrix. More...
 
DecomposeType GetDecomposeType () const
 Returns decomposition type.
Default LU. More...
 
virtual void SetDecomposeType (DecomposeType dectype)=0
 Set the decomposition type. More...
 
int NonNullFrontSize () const
 Return the number of equations in the condensed front matrix It would be equal to FrontSize if the front is compressed. More...
 
virtual int64_t NFree ()
 Returns the number of free equations. More...
 
void Reset (int64_t GlobalSize=0)
 
void Print (const char *name, std::ostream &out) const
 It prints TPZFront data. More...
 
void PrintGlobal (const char *name, std::ostream &out=std::cout)
 
int FrontSize ()
 returns the actual front size More...
 
void ProductTensorMTInitData (int nthreads)
 
void ProductTensorMTFinish ()
 void More...
 
void ProductTensorMT (TPZVec< TVar > &AuxVecCol, TPZVec< TVar > &AuxVecRow)
 void More...
 
virtual void TensorProductIJ (int ithread, typename TPZFront< TVar >::STensorProductMTData *data)
 void 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 void Write (TPZStream &buf, int withclassid) const
 Writes this object to the TPZStream buffer. Include the classid if withclassid = true. More...
 
virtual void Read (TPZStream &buf, void *context)
 read objects from the stream More...
 
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 Attributes

int fWork
 
int fMaxFront
 Maximum size of the front. More...
 
TPZManVector< int64_t > fGlobal
 Global equation associated to each front equation. More...
 
TPZVec< int64_t > fLocal
 Front equation to each global equation. More...
 
int64_t fFront
 Actual front size. More...
 
int64_t fNextRigidBodyMode
 Equation where rigid body modes can be stored. More...
 
TPZStack< int > fFree
 Colection of already decomposed equations still on the front. More...
 
TPZVec< TVar > fData
 Frontal matrix data. More...
 
int fExpandRatio
 Expansion Ratio of frontal matrix. More...
 
DecomposeType fDecomposeType
 Used Decomposition method. More...
 
STensorProductMTDatafProductMTData
 

Private Member Functions

void FreeGlobal (int64_t global)
 Sets the global equation as freed, allowing the space used by this equation to be used. More...
 
int Local (int64_t global)
 return a local index corresponding to a global equation number 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

template<class TVar>
class TPZFront< TVar >

Abstract class implements storage and decomposition process of the frontal matrix. Frontal.

The Front matrix itself.
It is controled by TPZFrontMatrix.

Definition at line 15 of file pzsmfrontalanal.h.

Constructor & Destructor Documentation

◆ ~TPZFront()

template<class TVar >
TPZFront< TVar >::~TPZFront ( )
virtual

Simple destructor.

Definition at line 65 of file TPZFront.cpp.

◆ TPZFront() [1/3]

template<class TVar >
TPZFront< TVar >::TPZFront ( )

Simple constructor.

Definition at line 21 of file TPZFront.cpp.

◆ TPZFront() [2/3]

template<class TVar >
TPZFront< TVar >::TPZFront ( int64_t  GlobalSize)

Constructor with a initial size parameter.

Parameters
GlobalSizeInitial size of the Frontal Matrix

Definition at line 32 of file TPZFront.cpp.

◆ TPZFront() [3/3]

template<class TVar>
TPZFront< TVar >::TPZFront ( const TPZFront< TVar > &  cp)

Definition at line 47 of file TPZFront.cpp.

Member Function Documentation

◆ ClassId()

template<class TVar >
int TPZFront< TVar >::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 TPZFrontNonSym< TVar >, and TPZFrontSym< TVar >.

Definition at line 317 of file TPZFront.h.

Referenced by TPZFrontSym< TVar >::ClassId(), TPZFrontNonSym< TVar >::ClassId(), and TPZFront< STATE >::SetNumRigidBodyModes().

◆ ExtractFrontMatrix()

template<class TVar>
virtual void TPZFront< TVar >::ExtractFrontMatrix ( TPZFMatrix< TVar > &  front)
inlinevirtual

Extracts the so far condensed matrix.

Reimplemented in TPZFrontNonSym< TVar >, and TPZFrontSym< TVar >.

Definition at line 93 of file TPZFront.h.

Referenced by TPZSubMeshFrontalAnalysis::CondensedSolution().

◆ FreeGlobal()

template<class TVar >
void TPZFront< TVar >::FreeGlobal ( int64_t  global)
private

Sets the global equation as freed, allowing the space used by this equation to be used.

Parameters
globalEquation number to be freedBy future assembly processes.

Definition at line 137 of file TPZFront.cpp.

Referenced by TPZFront< STATE >::SymbolicDecomposeEquations().

◆ FrontSize()

template<class TVar>
int TPZFront< TVar >::FrontSize ( )
inline

returns the actual front size

Definition at line 128 of file TPZFront.h.

◆ GetDecomposeType()

template<class TVar>
DecomposeType TPZFront< TVar >::GetDecomposeType ( ) const
inline

Returns decomposition type.
Default LU.

Definition at line 99 of file TPZFront.h.

◆ Local()

template<class TVar >
int TPZFront< TVar >::Local ( int64_t  global)
private

return a local index corresponding to a global equation number

Parameters
globalGlobal equation index which has a local indexation

Definition at line 151 of file TPZFront.cpp.

Referenced by TPZFront< STATE >::SymbolicAddKel().

◆ NElements()

template<class TVar >
int64_t TPZFront< TVar >::NElements ( )

Static main used for testing.

Definition at line 307 of file TPZFront.cpp.

◆ NFree()

template<class TVar >
int64_t TPZFront< TVar >::NFree ( )
virtual

Returns the number of free equations.

Reimplemented in TPZFrontNonSym< TVar >, and TPZFrontSym< TVar >.

Definition at line 313 of file TPZFront.cpp.

Referenced by TPZFront< STATE >::NonNullFrontSize().

◆ NonNullFrontSize()

template<class TVar>
int TPZFront< TVar >::NonNullFrontSize ( ) const
inline

Return the number of equations in the condensed front matrix It would be equal to FrontSize if the front is compressed.

Definition at line 110 of file TPZFront.h.

◆ Print()

template<class TVar >
void TPZFront< TVar >::Print ( const char *  name,
std::ostream &  out 
) const

It prints TPZFront data.

Definition at line 93 of file TPZFront.cpp.

Referenced by TPZFront< STATE >::NonNullFrontSize().

◆ PrintGlobal()

template<class TVar >
void TPZFront< TVar >::PrintGlobal ( const char *  name,
std::ostream &  out = std::cout 
)

Definition at line 69 of file TPZFront.cpp.

Referenced by TPZFront< STATE >::NonNullFrontSize().

◆ ProductTensorMT()

template<class TVar>
void TPZFront< TVar >::ProductTensorMT ( TPZVec< TVar > &  AuxVecCol,
TPZVec< TVar > &  AuxVecRow 
)
inline

void

Definition at line 306 of file TPZFront.h.

◆ ProductTensorMTFinish()

template<class TVar>
void TPZFront< TVar >::ProductTensorMTFinish ( )
inline

void

Definition at line 302 of file TPZFront.h.

Referenced by TPZParFrontStructMatrix< front >::Assemble().

◆ ProductTensorMTInitData()

template<class TVar>
void TPZFront< TVar >::ProductTensorMTInitData ( int  nthreads)
inline

Definition at line 298 of file TPZFront.h.

Referenced by TPZParFrontStructMatrix< front >::Assemble().

◆ Reset()

template<class TVar >
void TPZFront< TVar >::Reset ( int64_t  GlobalSize = 0)

Resets data structure

Implements tests for TPZFront

Definition at line 292 of file TPZFront.cpp.

Referenced by TPZFront< STATE >::NonNullFrontSize().

◆ SetDecomposeType()

template<class TVar>
virtual void TPZFront< TVar >::SetDecomposeType ( DecomposeType  dectype)
pure virtual

◆ SetNumRigidBodyModes()

template<class TVar>
void TPZFront< TVar >::SetNumRigidBodyModes ( int  nrigid)
inline

Indicate the first equation dedicated to rigid body modes.

Definition at line 63 of file TPZFront.h.

Referenced by TPZFrontStructMatrix< front >::CreateAssemble().

◆ SymbolicAddKel()

template<class TVar >
void TPZFront< TVar >::SymbolicAddKel ( TPZVec< int64_t > &  destinationindex)

Add a contribution of a stiffness matrix using the indexes to compute the frontwidth.

Parameters
destinationindexDestination index of each element added

Add a contribution of a stiffness matrix using the indexes to compute the frontwidth

Definition at line 176 of file TPZFront.cpp.

◆ SymbolicDecomposeEquations()

template<class TVar >
void TPZFront< TVar >::SymbolicDecomposeEquations ( int64_t  mineq,
int64_t  maxeq 
)

Decompose these equations in a symbolic way and store freed indexes in fFree.

Parameters
mineqInitial equation
maxeqFinal equation

Definition at line 190 of file TPZFront.cpp.

◆ TensorProductIJ()

template<class TVar>
void TPZFront< TVar >::TensorProductIJ ( int  ithread,
typename TPZFront< TVar >::STensorProductMTData data 
)
virtual

void

Faz o tensor product de fato

Reimplemented in TPZFrontNonSym< TVar >, and TPZFrontSym< TVar >.

Definition at line 327 of file TPZFront.cpp.

Referenced by TPZFront< TVar >::STensorProductMTData::Execute(), and TPZFront< STATE >::ProductTensorMT().

◆ Work()

template<class TVar>
int TPZFront< TVar >::Work ( )
inline

Definition at line 58 of file TPZFront.h.

Member Data Documentation

◆ fData

template<class TVar>
TPZVec<TVar> TPZFront< TVar >::fData
protected

◆ fDecomposeType

template<class TVar>
DecomposeType TPZFront< TVar >::fDecomposeType
protected

◆ fExpandRatio

template<class TVar>
int TPZFront< TVar >::fExpandRatio
protected

Expansion Ratio of frontal matrix.

Definition at line 167 of file TPZFront.h.

Referenced by TPZFront< STATE >::Reset(), and TPZFront< STATE >::TPZFront().

◆ fFree

template<class TVar>
TPZStack<int> TPZFront< TVar >::fFree
protected

Colection of already decomposed equations still on the front.

Definition at line 161 of file TPZFront.h.

Referenced by TPZFront< STATE >::FreeGlobal(), and TPZFront< STATE >::Reset().

◆ fFront

template<class TVar>
int64_t TPZFront< TVar >::fFront
protected

Actual front size.

Definition at line 155 of file TPZFront.h.

Referenced by TPZFront< STATE >::FrontSize(), TPZFront< STATE >::Reset(), and TPZFront< STATE >::SymbolicAddKel().

◆ fGlobal

template<class TVar>
TPZManVector<int64_t> TPZFront< TVar >::fGlobal
protected

Global equation associated to each front equation.

If we need a position in globalmatrix of a equation "i" in the frontmatrix
then we can use fGlobal[i]. If the global equation "i" is not used $ then fGlobal[i]==-1 $

Definition at line 145 of file TPZFront.h.

Referenced by TPZFront< STATE >::FreeGlobal(), TPZFront< STATE >::NFree(), TPZFront< STATE >::Reset(), and TPZFront< STATE >::SymbolicAddKel().

◆ fLocal

template<class TVar>
TPZVec<int64_t> TPZFront< TVar >::fLocal
protected

Front equation to each global equation.

If we need a position in frontmatrix of a global equation "i"
then we can use fLocal[i]. If the global equation is not represented in the front then $ fLocal[i]==-1 $.

Definition at line 152 of file TPZFront.h.

Referenced by TPZFrontSym< TVar >::ExtractFrontMatrix(), TPZFrontNonSym< TVar >::ExtractFrontMatrix(), TPZFront< STATE >::FreeGlobal(), TPZFront< STATE >::NElements(), TPZFront< STATE >::NonNullFrontSize(), TPZFront< STATE >::Reset(), and TPZFront< STATE >::SetNumRigidBodyModes().

◆ fMaxFront

template<class TVar>
int TPZFront< TVar >::fMaxFront
protected

Maximum size of the front.

Definition at line 136 of file TPZFront.h.

Referenced by TPZFrontNonSym< TVar >::Element(), TPZFront< STATE >::Reset(), and TPZFront< STATE >::SymbolicAddKel().

◆ fNextRigidBodyMode

template<class TVar>
int64_t TPZFront< TVar >::fNextRigidBodyMode
protected

Equation where rigid body modes can be stored.

Definition at line 158 of file TPZFront.h.

Referenced by TPZFrontNonSym< TVar >::ExtractFrontMatrix(), TPZFront< STATE >::Reset(), TPZFront< STATE >::SetNumRigidBodyModes(), and TPZFront< STATE >::TPZFront().

◆ fProductMTData

template<class TVar>
STensorProductMTData* TPZFront< TVar >::fProductMTData
protected

◆ fWork

template<class TVar>
int TPZFront< TVar >::fWork
protected

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