NeoPZ
|
Abstract class implements storage and decomposition process of the frontal matrix involving non-simetry characteristics. Frontal. More...
#include <TPZFrontNonSym.h>
Public Member Functions | |
std::string | GetMatrixType () |
Type of matrix. More... | |
~TPZFrontNonSym () | |
Simple destructor. More... | |
TPZFrontNonSym () | |
Simple constructor. More... | |
TPZFrontNonSym (int64_t GlobalSize) | |
Constructor with a initial size parameter. More... | |
TPZFrontNonSym (const TPZFrontNonSym &cp) | |
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 LU. 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 the ith,jth element of the matrix. . More... | |
const TVar & | Element (int64_t i, int64_t j) const |
Returns the ith,jth element of the 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 |
Extract the front 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) const |
It prints TPZFront data. More... | |
void | PrintGlobal (const char *name, std::ostream &out) |
virtual void | TensorProductIJ (int ithread, typename TPZFront< TVar >::STensorProductMTData *data) override |
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 | |
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 used by this equation to be used by future assembly processes. More... | |
int | Local (int64_t global) |
Returns 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 non-simetry characteristics. Frontal.
The Front matrix itself. It is controled by TPZFrontMatrix.
TPZFrontNonSym is a non symmetrical matrix. It uses LU decomposition scheme.
Definition at line 392 of file TPZFrontMatrix.cpp.
TPZFrontNonSym< TVar >::~TPZFrontNonSym | ( | ) |
Simple destructor.
Definition at line 490 of file TPZFrontNonSym.cpp.
TPZFrontNonSym< TVar >::TPZFrontNonSym | ( | ) |
Simple constructor.
Definition at line 478 of file TPZFrontNonSym.cpp.
References ELU, TPZFront< TVar >::fDecomposeType, and TPZFront< TVar >::fWork.
TPZFrontNonSym< TVar >::TPZFrontNonSym | ( | int64_t | GlobalSize | ) |
Constructor with a initial size parameter.
Definition at line 470 of file TPZFrontNonSym.cpp.
References ELU, TPZFront< TVar >::fDecomposeType, and TPZFront< TVar >::fWork.
TPZFrontNonSym< TVar >::TPZFrontNonSym | ( | const TPZFrontNonSym< TVar > & | cp | ) |
Definition at line 485 of file TPZFrontNonSym.cpp.
void TPZFrontNonSym< TVar >::AddKel | ( | TPZFMatrix< TVar > & | elmat, |
TPZVec< int64_t > & | destinationindex | ||
) |
Add a contribution of a stiffness matrix.
elmat | Already formed element matrix |
destinationindex | Destine index on the global matrix |
Definition at line 368 of file TPZFrontNonSym.cpp.
References TPZVec< T >::NElements().
Referenced by TPZFrontNonSym< TVar >::Element(), and TPZFrontNonSym< TVar >::main().
|
virtual |
Add a contribution of a stiffness matrix.
void
elmat | Already formed element matrix |
sourceindex | Source index |
destinationindex | Destine index on the global matrix |
Definition at line 350 of file TPZFrontNonSym.cpp.
References TPZVec< T >::NElements().
void TPZFrontNonSym< TVar >::AllocData | ( | ) |
Allocates data for Front.
Definition at line 98 of file TPZFrontNonSym.cpp.
Referenced by TPZFrontNonSym< TVar >::Element(), and TPZFrontNonSym< 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 203 of file TPZFrontNonSym.h.
References TPZFront< TVar >::ClassId(), and Hash().
Referenced by TPZFrontNonSym< TVar >::Element().
void TPZFrontNonSym< TVar >::Compress | ( | ) |
Compress data structure.
First this->fLocal initialization Any needed updates is done on next loop
Definition at line 396 of file TPZFrontNonSym.cpp.
References TPZVec< T >::NElements(), and TPZStack< T, NumExtAlloc >::Push().
Referenced by TPZFrontNonSym< TVar >::main(), and TPZFrontNonSym< TVar >::SetDecomposeType().
void TPZFrontNonSym< TVar >::DecomposeEquations | ( | int64_t | mineq, |
int64_t | maxeq, | ||
TPZEqnArray< TVar > & | result | ||
) |
Decompose these equations and put the result in eqnarray.
Default decompose method is LU.
mineq | starting index of equations to be decomposed |
maxeq | finishing index of equations to be decomposed |
result | result of decomposition. |
Definition at line 455 of file TPZFrontNonSym.cpp.
References TPZEqnArray< TVar >::Reset(), and TPZEqnArray< TVar >::SetNonSymmetric().
Referenced by TPZFrontNonSym< TVar >::main(), and TPZFrontNonSym< 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 180 of file TPZFrontNonSym.cpp.
References TPZEqnArray< TVar >::AddTerm(), TPZEqnArray< TVar >::BeginEquation(), ELU, TPZEqnArray< TVar >::EndEquation(), fabs, LOGPZ_DEBUG, and TOL.
Referenced by TPZFrontNonSym< TVar >::Element().
|
private |
Definition at line 165 of file TPZFrontNonSym.cpp.
References DebugStop.
|
private |
Definition at line 170 of file TPZFrontNonSym.cpp.
References DebugStop.
|
private |
Definition at line 175 of file TPZFrontNonSym.cpp.
References DebugStop.
|
inline |
Returns the ith,jth element of the matrix.
.
Definition at line 118 of file TPZFrontNonSym.h.
References TPZFront< TVar >::fData, and TPZFront< TVar >::fMaxFront.
Referenced by TPZFrontNonSym< TVar >::ExtractFrontMatrix().
|
inline |
Returns the ith,jth element of the matrix.
.
Definition at line 126 of file TPZFrontNonSym.h.
References TPZFrontNonSym< TVar >::AddKel(), TPZFrontNonSym< TVar >::AllocData(), TPZFrontNonSym< TVar >::ClassId(), TPZFrontNonSym< TVar >::DecomposeOneEquation(), TPZFrontNonSym< TVar >::ExtractFrontMatrix(), TPZFront< TVar >::fData, TPZFront< TVar >::fMaxFront, TPZFrontNonSym< TVar >::FreeGlobal(), TPZFrontNonSym< TVar >::Local(), TPZFrontNonSym< TVar >::NFree(), TPZFrontNonSym< TVar >::Print(), TPZFrontNonSym< TVar >::PrintGlobal(), TPZFrontNonSym< TVar >::Reset(), and TPZFrontNonSym< TVar >::TensorProductIJ().
void TPZFrontNonSym< TVar >::Expand | ( | int | largefrontsize | ) |
Expand the front matrix.
largefrontsize | New size of front |
Definition at line 382 of file TPZFrontNonSym.cpp.
Referenced by TPZFrontNonSym< TVar >::SetDecomposeType().
|
overridevirtual |
Extract the front matrix.
Reimplemented from TPZFront< TVar >.
Definition at line 575 of file TPZFrontNonSym.cpp.
References TPZFrontNonSym< TVar >::Element(), TPZFront< TVar >::fLocal, TPZFront< TVar >::fNextRigidBodyMode, TPZFrontNonSym< TVar >::Local(), TPZVec< T >::NElements(), and TPZFMatrix< TVar >::Redim().
Referenced by TPZFrontNonSym< TVar >::Element().
|
private |
Sets the global equation as freed, allowing the space
used by this equation to be used by future assembly processes.
global | Global index to be freed. |
Definition at line 151 of file TPZFrontNonSym.cpp.
Referenced by TPZFrontNonSym< TVar >::Element().
std::string TPZFrontNonSym< TVar >::GetMatrixType | ( | ) |
Type of matrix.
Definition at line 570 of file TPZFrontNonSym.cpp.
|
private |
Returns a local index corresponding to a global equation number.
global | Global index inquired |
Definition at line 128 of file TPZFrontNonSym.cpp.
Referenced by TPZFrontNonSym< TVar >::Element(), and TPZFrontNonSym< TVar >::ExtractFrontMatrix().
|
static |
Static main used for testing
Populates data structure
Definition at line 495 of file TPZFrontNonSym.cpp.
References TPZFrontNonSym< TVar >::AddKel(), TPZFrontNonSym< TVar >::AllocData(), TPZFrontNonSym< TVar >::Compress(), TPZFrontNonSym< TVar >::DecomposeEquations(), ECholesky, TPZEqnArray< TVar >::EqnBackward(), TPZEqnArray< TVar >::EqnForward(), TPZEqnArray< TVar >::Print(), TPZMatrix< TVar >::Print(), TPZMatrix< TVar >::SolveDirect(), TPZFrontNonSym< TVar >::SymbolicAddKel(), and TPZFrontNonSym< TVar >::SymbolicDecomposeEquations().
|
overridevirtual |
Returns the number of free equations.
Reimplemented from TPZFront< TVar >.
Definition at line 122 of file TPZFrontNonSym.cpp.
Referenced by TPZFrontNonSym< TVar >::Element().
void TPZFrontNonSym< TVar >::Print | ( | const char * | name, |
std::ostream & | out | ||
) | const |
It prints TPZFront data.
Definition at line 57 of file TPZFrontNonSym.cpp.
Referenced by TPZFrontNonSym< TVar >::Element().
void TPZFrontNonSym< TVar >::PrintGlobal | ( | const char * | name, |
std::ostream & | out | ||
) |
Definition at line 37 of file TPZFrontNonSym.cpp.
Referenced by TPZFrontNonSym< TVar >::Element().
void TPZFrontNonSym< TVar >::Reset | ( | int64_t | GlobalSize = 0 | ) |
Resets data structure.
GlobalSize | Initial global size to be used in reseting |
Definition at line 108 of file TPZFrontNonSym.cpp.
Referenced by TPZFrontNonSym< TVar >::Element().
|
inlineoverridevirtual |
Set the decomposition type.
Implements TPZFront< TVar >.
Definition at line 78 of file TPZFrontNonSym.h.
References TPZFrontNonSym< TVar >::Compress(), DebugStop, TPZFrontNonSym< TVar >::DecomposeEquations(), ELU, TPZFrontNonSym< TVar >::Expand(), TPZFront< TVar >::fDecomposeType, TPZFrontNonSym< TVar >::SymbolicAddKel(), and TPZFrontNonSym< TVar >::SymbolicDecomposeEquations().
void TPZFrontNonSym< TVar >::SymbolicAddKel | ( | TPZVec< int64_t > & | destinationindex | ) |
Add a contribution of a stiffness matrix using the indexes to compute the frontwidth.
Definition at line 434 of file TPZFrontNonSym.cpp.
References TPZVec< T >::NElements().
Referenced by TPZFrontNonSym< TVar >::main(), and TPZFrontNonSym< TVar >::SetDecomposeType().
void TPZFrontNonSym< TVar >::SymbolicDecomposeEquations | ( | int64_t | mineq, |
int64_t | maxeq | ||
) |
Decompose these equations in a symbolic way and store freed indexes in fFree.
Definition at line 448 of file TPZFrontNonSym.cpp.
Referenced by TPZFrontNonSym< TVar >::main(), and TPZFrontNonSym< TVar >::SetDecomposeType().
|
overridevirtual |
i
j
while
Reimplemented from TPZFront< TVar >.
Definition at line 328 of file TPZFrontNonSym.cpp.
References DebugStop, TPZFront< TVar >::STensorProductMTData::fAuxVecCol, TPZFront< TVar >::STensorProductMTData::fAuxVecRow, TPZFront< TVar >::STensorProductMTData::fRunning, TPZFront< TVar >::STensorProductMTData::fWorkSem, TPZVec< T >::NElements(), TPZFront< TVar >::STensorProductMTData::NThreads(), tht::SemaphoreWait(), and TPZFront< TVar >::STensorProductMTData::WorkDone().
Referenced by TPZFrontNonSym< TVar >::Element().