NeoPZ
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
TPZFrontSym< TVar > Class Template Reference

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

#include <TPZFrontSym.h>

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

Public Member Functions

std::string GetMatrixType ()
 Returns its type. More...
 
 ~TPZFrontSym ()
 Simple destructor. More...
 
 TPZFrontSym ()
 Simple constructor. More...
 
 TPZFrontSym (const TPZFrontSym< TVar > &cp)
 
 TPZFrontSym (int64_t GlobalSize)
 Constructor with a initial size parameter. More...
 
virtual void SetDecomposeType (DecomposeType dectype) override
 Set the decomposition type. More...
 
void DecomposeEquations (int64_t mineq, int64_t maxeq, TPZEqnArray< TVar > &result)
 Decompose these equations and put the result in eqnarray
Default decompose method is Cholesky. More...
 
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...
 
void Compress ()
 Compress data structure. More...
 
void Expand (int largefrontsize)
 Expand the front matrix. More...
 
TVar & Element (int64_t i, int64_t j)
 Returns ith, jth element of matrix. $ (sourceindex[i],sourceindex[j]) $. More...
 
const TVar & Element (int64_t i, int64_t j) const
 Returns ith, jth element of matrix. $ (sourceindex[i],sourceindex[j]) $. More...
 
void AddKel (TPZFMatrix< TVar > &elmat, TPZVec< int64_t > &destinationindex)
 Add a contribution of a stiffness matrix. More...
 
virtual void AddKel (TPZFMatrix< TVar > &elmat, TPZVec< int64_t > &sourceindex, TPZVec< int64_t > &destinationindex)
 Add a contribution of a stiffness matrix. More...
 
virtual void ExtractFrontMatrix (TPZFMatrix< TVar > &front) override
 Reorders the elements of the frontmatrix into the full matrix. More...
 
int ClassId () const override
 Define the class id associated with the class. More...
 
virtual int64_t NFree () override
 Returns the number of free equations. More...
 
void Reset (int64_t GlobalSize=0)
 Resets data structure. More...
 
void AllocData ()
 Allocates data for Front. More...
 
void Print (const char *name, std::ostream &out=std::cout) const
 Prints TPZFront data. More...
 
void PrintGlobal (const char *name, std::ostream &out=std::cout)
 
DecomposeType GetDecomposeType () const
 Returns decomposition type. More...
 
virtual void TensorProductIJ (int ithread, typename TPZFront< TVar >::STensorProductMTData *data) override
 Does the tensor product betweem two vectors in the positions dependent of ithread. More...
 
- Public Member Functions inherited from TPZFront< TVar >
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...
 
DecomposeType GetDecomposeType () const
 Returns decomposition type.
Default LU. 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...
 
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...
 
- 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
 

Static Public Member Functions

static void main ()
 
- 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)
 

Private Member Functions

TVar & Element4JGreatEqualI (int64_t i, int64_t j)
 
void DecomposeOneEquation (int64_t ieq, TPZEqnArray< TVar > &eqnarray)
 Decomposes ieq equation and add the result to EqnArray. More...
 
void FreeGlobal (int64_t global)
 Sets the global equation as freed, allowing the space. More...
 
int Local (int64_t global)
 return a local index corresponding to a global equation number More...
 
template<>
void DecomposeOneEquation (int64_t ieq, TPZEqnArray< std::complex< float > > &eqnarray)
 
template<>
void DecomposeOneEquation (int64_t ieq, TPZEqnArray< std::complex< double > > &eqnarray)
 
template<>
void DecomposeOneEquation (int64_t ieq, TPZEqnArray< std::complex< long double > > &eqnarray)
 

Additional Inherited Members

- Protected Attributes inherited from TPZFront< TVar >
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
 

Detailed Description

template<class TVar>
class TPZFrontSym< TVar >

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

The Front matrix itself. It is controled by TPZFrontMatrix.
TPZFrontSym is a symmetrical matrix. It uses a Cholesky decomposition scheme.

Definition at line 390 of file TPZFrontMatrix.cpp.

Constructor & Destructor Documentation

◆ ~TPZFrontSym()

template<class TVar >
TPZFrontSym< TVar >::~TPZFrontSym ( )

Simple destructor.

Definition at line 453 of file TPZFrontSym.cpp.

◆ TPZFrontSym() [1/3]

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

Simple constructor.

Definition at line 447 of file TPZFrontSym.cpp.

References ECholesky, and TPZFront< TVar >::fDecomposeType.

Referenced by TPZFrontSym< TVar >::TPZFrontSym().

◆ TPZFrontSym() [2/3]

template<class TVar>
TPZFrontSym< TVar >::TPZFrontSym ( const TPZFrontSym< TVar > &  cp)
inline

Definition at line 52 of file TPZFrontSym.h.

References TPZFrontSym< TVar >::TPZFrontSym().

◆ TPZFrontSym() [3/3]

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

Constructor with a initial size parameter.

Definition at line 441 of file TPZFrontSym.cpp.

References ECholesky, and TPZFront< TVar >::fDecomposeType.

Member Function Documentation

◆ AddKel() [1/2]

template<class TVar >
void TPZFrontSym< TVar >::AddKel ( TPZFMatrix< TVar > &  elmat,
TPZVec< int64_t > &  destinationindex 
)

Add a contribution of a stiffness matrix.

Definition at line 329 of file TPZFrontSym.cpp.

References TPZVec< T >::NElements().

Referenced by TPZFrontSym< TVar >::Element(), and TPZFrontSym< TVar >::main().

◆ AddKel() [2/2]

template<class TVar >
void TPZFrontSym< TVar >::AddKel ( TPZFMatrix< TVar > &  elmat,
TPZVec< int64_t > &  sourceindex,
TPZVec< int64_t > &  destinationindex 
)
virtual

Add a contribution of a stiffness matrix.

void

Definition at line 312 of file TPZFrontSym.cpp.

References TPZVec< T >::NElements().

◆ AllocData()

template<class TVar >
void TPZFrontSym< TVar >::AllocData ( )

Allocates data for Front.

Definition at line 91 of file TPZFrontSym.cpp.

Referenced by TPZFrontSym< TVar >::Element4JGreatEqualI(), and TPZFrontSym< TVar >::main().

◆ ClassId()

template<class TVar >
int TPZFrontSym< 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

Reimplemented from TPZFront< TVar >.

Definition at line 576 of file TPZFrontSym.cpp.

References TPZFront< TVar >::ClassId(), and Hash().

Referenced by TPZFrontSym< TVar >::Element().

◆ Compress()

template<class TVar >
void TPZFrontSym< TVar >::Compress ( )

Compress data structure.

First this->fLocal initialization Any needed updates is done on next loop

Definition at line 364 of file TPZFrontSym.cpp.

References TPZVec< T >::NElements(), and TPZStack< T, NumExtAlloc >::Push().

Referenced by TPZFrontSym< TVar >::main(), and TPZFrontSym< TVar >::SetDecomposeType().

◆ DecomposeEquations()

template<class TVar >
void TPZFrontSym< TVar >::DecomposeEquations ( int64_t  mineq,
int64_t  maxeq,
TPZEqnArray< TVar > &  result 
)

Decompose these equations and put the result in eqnarray
Default decompose method is Cholesky.

Parameters
mineqindex of equations to be decomposed
maxeqindex of equations to be decomposed
resultresult of decomposition

Definition at line 427 of file TPZFrontSym.cpp.

References TPZEqnArray< TVar >::Reset(), and TPZEqnArray< TVar >::SetSymmetric().

Referenced by TPZFrontSym< TVar >::main(), and TPZFrontSym< TVar >::SetDecomposeType().

◆ DecomposeOneEquation() [1/4]

template<class TVar >
void TPZFrontSym< TVar >::DecomposeOneEquation ( int64_t  ieq,
TPZEqnArray< TVar > &  eqnarray 
)
private

Decomposes ieq equation and add the result to EqnArray.

Parameters
ieqIndex of equation to be decomposed
eqnarrayEqnArray to store resulting members

Definition at line 167 of file TPZFrontSym.cpp.

References TPZEqnArray< TVar >::AddTerm(), TPZEqnArray< TVar >::BeginEquation(), ECholesky, TPZEqnArray< TVar >::EndEquation(), and sqrt.

Referenced by TPZFrontSym< TVar >::Element4JGreatEqualI().

◆ DecomposeOneEquation() [2/4]

template<>
void TPZFrontSym< std::complex< float > >::DecomposeOneEquation ( int64_t  ieq,
TPZEqnArray< std::complex< float > > &  eqnarray 
)
private

Definition at line 151 of file TPZFrontSym.cpp.

References DebugStop.

◆ DecomposeOneEquation() [3/4]

template<>
void TPZFrontSym< std::complex< double > >::DecomposeOneEquation ( int64_t  ieq,
TPZEqnArray< std::complex< double > > &  eqnarray 
)
private

Definition at line 156 of file TPZFrontSym.cpp.

References DebugStop.

◆ DecomposeOneEquation() [4/4]

template<>
void TPZFrontSym< std::complex< long double > >::DecomposeOneEquation ( int64_t  ieq,
TPZEqnArray< std::complex< long double > > &  eqnarray 
)
private

Definition at line 161 of file TPZFrontSym.cpp.

References DebugStop.

◆ Element() [1/2]

template<class TVar>
TVar& TPZFrontSym< TVar >::Element ( int64_t  i,
int64_t  j 
)
inline

Returns ith, jth element of matrix. $ (sourceindex[i],sourceindex[j]) $.

Definition at line 98 of file TPZFrontSym.h.

References TPZFront< TVar >::fData.

Referenced by TPZFrontSym< TVar >::ExtractFrontMatrix().

◆ Element() [2/2]

template<class TVar>
const TVar& TPZFrontSym< TVar >::Element ( int64_t  i,
int64_t  j 
) const
inline

◆ Element4JGreatEqualI()

template<class TVar>
TVar& TPZFrontSym< TVar >::Element4JGreatEqualI ( int64_t  i,
int64_t  j 
)
inlineprivate

◆ Expand()

template<class TVar >
void TPZFrontSym< TVar >::Expand ( int  largefrontsize)

Expand the front matrix.

Definition at line 359 of file TPZFrontSym.cpp.

Referenced by TPZFrontSym< TVar >::SetDecomposeType().

◆ ExtractFrontMatrix()

template<class TVar >
void TPZFrontSym< TVar >::ExtractFrontMatrix ( TPZFMatrix< TVar > &  front)
overridevirtual

Reorders the elements of the frontmatrix into the full matrix.

Reimplemented from TPZFront< TVar >.

Definition at line 554 of file TPZFrontSym.cpp.

References TPZFrontSym< TVar >::Element(), TPZFront< TVar >::fLocal, TPZVec< T >::NElements(), and TPZFMatrix< TVar >::Redim().

Referenced by TPZFrontSym< TVar >::Element().

◆ FreeGlobal()

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

Sets the global equation as freed, allowing the space.

Used by this equation to be used by future assembly processes

Definition at line 137 of file TPZFrontSym.cpp.

Referenced by TPZFrontSym< TVar >::Element4JGreatEqualI().

◆ GetDecomposeType()

template<class TVar >
DecomposeType TPZFrontSym< TVar >::GetDecomposeType ( ) const

Returns decomposition type.

Definition at line 28 of file TPZFrontSym.cpp.

Referenced by TPZFrontSym< TVar >::Element4JGreatEqualI().

◆ GetMatrixType()

template<class TVar >
std::string TPZFrontSym< TVar >::GetMatrixType ( )

Returns its type.

Definition at line 549 of file TPZFrontSym.cpp.

◆ Local()

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

return a local index corresponding to a global equation number

Definition at line 117 of file TPZFrontSym.cpp.

Referenced by TPZFrontSym< TVar >::Element4JGreatEqualI().

◆ main()

template<class TVar >
void TPZFrontSym< TVar >::main ( )
static

◆ NFree()

template<class TVar >
int64_t TPZFrontSym< TVar >::NFree ( )
overridevirtual

Returns the number of free equations.

Reimplemented from TPZFront< TVar >.

Definition at line 111 of file TPZFrontSym.cpp.

Referenced by TPZFrontSym< TVar >::Element4JGreatEqualI().

◆ Print()

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

Prints TPZFront data.

Definition at line 51 of file TPZFrontSym.cpp.

Referenced by TPZFrontSym< TVar >::Element4JGreatEqualI().

◆ PrintGlobal()

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

Definition at line 33 of file TPZFrontSym.cpp.

Referenced by TPZFrontSym< TVar >::Element4JGreatEqualI().

◆ Reset()

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

Resets data structure.

Definition at line 100 of file TPZFrontSym.cpp.

Referenced by TPZFrontSym< TVar >::Element4JGreatEqualI().

◆ SetDecomposeType()

template<class TVar>
virtual void TPZFrontSym< TVar >::SetDecomposeType ( DecomposeType  dectype)
inlineoverridevirtual

◆ SymbolicAddKel()

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

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

Definition at line 408 of file TPZFrontSym.cpp.

References TPZVec< T >::NElements().

Referenced by TPZFrontSym< TVar >::main(), and TPZFrontSym< TVar >::SetDecomposeType().

◆ SymbolicDecomposeEquations()

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

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

Parameters
mineqInitial equation index
maxeqFinal equation index

Definition at line 421 of file TPZFrontSym.cpp.

Referenced by TPZFrontSym< TVar >::main(), and TPZFrontSym< TVar >::SetDecomposeType().

◆ TensorProductIJ()

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

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