NeoPZ
|
Abstract class implements storage and decomposition process of the frontal matrix involving simmetry characteristics. Frontal. More...
#include <TPZFrontSym.h>
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. . More... | |
const TVar & | Element (int64_t i, int64_t j) const |
Returns ith, jth element of matrix. . 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 TPZSavable * | CreateInstance (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... | |
STensorProductMTData * | fProductMTData |
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.
TPZFrontSym< TVar >::~TPZFrontSym | ( | ) |
Simple destructor.
Definition at line 453 of file TPZFrontSym.cpp.
TPZFrontSym< TVar >::TPZFrontSym | ( | ) |
Simple constructor.
Definition at line 447 of file TPZFrontSym.cpp.
References ECholesky, and TPZFront< TVar >::fDecomposeType.
Referenced by TPZFrontSym< TVar >::TPZFrontSym().
|
inline |
Definition at line 52 of file TPZFrontSym.h.
References TPZFrontSym< TVar >::TPZFrontSym().
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.
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().
|
virtual |
Add a contribution of a stiffness matrix.
void
Definition at line 312 of file TPZFrontSym.cpp.
References TPZVec< T >::NElements().
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().
|
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().
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().
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.
mineq | index of equations to be decomposed |
maxeq | index of equations to be decomposed |
result | result 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().
|
private |
Decomposes ieq equation and add the result to EqnArray.
ieq | Index of equation to be decomposed |
eqnarray | EqnArray 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().
|
private |
Definition at line 151 of file TPZFrontSym.cpp.
References DebugStop.
|
private |
Definition at line 156 of file TPZFrontSym.cpp.
References DebugStop.
|
private |
Definition at line 161 of file TPZFrontSym.cpp.
References DebugStop.
|
inline |
Returns ith, jth element of matrix. .
Definition at line 98 of file TPZFrontSym.h.
References TPZFront< TVar >::fData.
Referenced by TPZFrontSym< TVar >::ExtractFrontMatrix().
|
inline |
Returns ith, jth element of matrix. .
Definition at line 107 of file TPZFrontSym.h.
References TPZFrontSym< TVar >::AddKel(), TPZFrontSym< TVar >::ClassId(), TPZFrontSym< TVar >::ExtractFrontMatrix(), and TPZFront< TVar >::fData.
|
inlineprivate |
Definition at line 129 of file TPZFrontSym.h.
References TPZFrontSym< TVar >::AllocData(), DebugStop, TPZFrontSym< TVar >::DecomposeOneEquation(), TPZFront< TVar >::fData, TPZFrontSym< TVar >::FreeGlobal(), TPZFrontSym< TVar >::GetDecomposeType(), TPZFrontSym< TVar >::Local(), TPZFrontSym< TVar >::NFree(), TPZFrontSym< TVar >::Print(), TPZFrontSym< TVar >::PrintGlobal(), TPZFrontSym< TVar >::Reset(), and TPZFrontSym< TVar >::TensorProductIJ().
void TPZFrontSym< TVar >::Expand | ( | int | largefrontsize | ) |
Expand the front matrix.
Definition at line 359 of file TPZFrontSym.cpp.
Referenced by TPZFrontSym< TVar >::SetDecomposeType().
|
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().
|
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().
DecomposeType TPZFrontSym< TVar >::GetDecomposeType | ( | ) | const |
Returns decomposition type.
Definition at line 28 of file TPZFrontSym.cpp.
Referenced by TPZFrontSym< TVar >::Element4JGreatEqualI().
std::string TPZFrontSym< TVar >::GetMatrixType | ( | ) |
Returns its type.
Definition at line 549 of file TPZFrontSym.cpp.
|
private |
return a local index corresponding to a global equation number
Definition at line 117 of file TPZFrontSym.cpp.
Referenced by TPZFrontSym< TVar >::Element4JGreatEqualI().
|
static |
Static main used for testing
Populates data structure
Definition at line 456 of file TPZFrontSym.cpp.
References TPZFrontSym< TVar >::AddKel(), TPZFrontSym< TVar >::AllocData(), TPZFrontSym< TVar >::Compress(), TPZFrontSym< TVar >::DecomposeEquations(), ECholesky, TPZEqnArray< TVar >::EqnBackward(), TPZEqnArray< TVar >::EqnForward(), TPZEqnArray< TVar >::Print(), TPZMatrix< TVar >::Print(), TPZMatrix< TVar >::SolveDirect(), TPZFrontSym< TVar >::SymbolicAddKel(), and TPZFrontSym< TVar >::SymbolicDecomposeEquations().
|
overridevirtual |
Returns the number of free equations.
Reimplemented from TPZFront< TVar >.
Definition at line 111 of file TPZFrontSym.cpp.
Referenced by TPZFrontSym< TVar >::Element4JGreatEqualI().
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().
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().
void TPZFrontSym< TVar >::Reset | ( | int64_t | GlobalSize = 0 | ) |
Resets data structure.
Definition at line 100 of file TPZFrontSym.cpp.
Referenced by TPZFrontSym< TVar >::Element4JGreatEqualI().
|
inlineoverridevirtual |
Set the decomposition type.
Implements TPZFront< TVar >.
Definition at line 60 of file TPZFrontSym.h.
References TPZFrontSym< TVar >::Compress(), DebugStop, TPZFrontSym< TVar >::DecomposeEquations(), ECholesky, ELDLt, TPZFrontSym< TVar >::Expand(), TPZFront< TVar >::fDecomposeType, TPZFrontSym< TVar >::SymbolicAddKel(), and TPZFrontSym< TVar >::SymbolicDecomposeEquations().
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().
void TPZFrontSym< TVar >::SymbolicDecomposeEquations | ( | int64_t | mineq, |
int64_t | maxeq | ||
) |
Decompose these equations in a symbolic way and store freed indexes in fFree.
mineq | Initial equation index |
maxeq | Final equation index |
Definition at line 421 of file TPZFrontSym.cpp.
Referenced by TPZFrontSym< TVar >::main(), and TPZFrontSym< TVar >::SetDecomposeType().
|
overridevirtual |
Does the tensor product betweem two vectors in the positions dependent of ithread.
i
j
i
j
while
Reimplemented from TPZFront< TVar >.
Definition at line 270 of file TPZFrontSym.cpp.
References DebugStop, ECholesky, ELDLt, TPZFront< TVar >::STensorProductMTData::fAuxVecCol, TPZFront< TVar >::STensorProductMTData::fAuxVecRow, TPZFront< TVar >::STensorProductMTData::fDiagonal, TPZFront< TVar >::STensorProductMTData::fMat, TPZFront< TVar >::STensorProductMTData::fRunning, TPZFront< TVar >::STensorProductMTData::fWorkSem, matrix, TPZVec< T >::NElements(), TPZFront< TVar >::STensorProductMTData::NThreads(), tht::SemaphoreWait(), and TPZFront< TVar >::STensorProductMTData::WorkDone().
Referenced by TPZFrontSym< TVar >::Element4JGreatEqualI().