19 #include "pzsaveable.h" 20 #include "pzmatdefs.h" 33 template<
class TVar,
class TS
ideMatrix >
48 TPZMatRed(
const int64_t dim,
const int64_t dim00);
50 template<
class TS
ideCopy>
51 TPZMatRed<TVar ,TSideMatrix>(
const TPZMatRed<TVar, TSideCopy> &cp):
TPZMatrix<TVar>(cp),
fK11(cp.fK11),
fK01(cp.fK01),
fK10(cp.fK10),
fF0(cp.fF0),
fF1(cp.fF1),
fMaxRigidBodyModes(cp.fMaxRigidBodyModes),
fNumberRigidBodyModes(cp.fNumberRigidBodyModes),
fF0IsComputed(cp.fF0IsComputed)
59 if(cp.fK00)
fK00 = cp.fK00;
83 virtual int PutVal(
const int64_t row,
const int64_t col,
const TVar& value)
override;
84 virtual const TVar &
GetVal(
const int64_t row,
const int64_t col)
const override;
85 virtual TVar &
s(
const int64_t row,
const int64_t col)
override;
88 virtual int Zero()
override;
195 void Print(
const char *name = NULL, std::ostream &out = std::cout,
199 int Redim(
const int64_t dim,
const int64_t dim00)
override;
212 const TVar alpha,
const TVar beta,
const int opt)
const override;
233 static void Swap(int64_t *row, int64_t *col);
271 template<
class TVar,
class TS
ideMatrix>
279 template<
class TVar,
class TS
ideMatrix>
void SetMaxNumberRigidBodyModes(int maxrigid)
indicate how many degrees of freedom are reserved for rigid body modes
int ClassId() const override
Saveable methods.
void SetReduced()
changes the declared dimension of the matrix to fDim1
void SimetrizeMatRed()
If fK00 is simetric, only part of the matrix is accessible to external objects.
void F1Red(TPZFMatrix< TVar > &F1)
Computes the reduced version of the right hand side .
static void Swap(int64_t *row, int64_t *col)
Swaps the row and column index.
void UGlobal(const TPZFMatrix< TVar > &U1, TPZFMatrix< TVar > &result)
Computes the complete vector based on the solution u1.
TPZFMatrix< TVar > & K11()
MatrixOutputFormat
Defines output format.
virtual int Resize(const int64_t newRows, const int64_t newCols)
Redimensions a matriz keeping the previous values.
void SetF(const TPZFMatrix< TVar > &F)
Copies the F vector in the internal data structure.
void UGlobal2(TPZFMatrix< TVar > &U1, TPZFMatrix< TVar > &result)
Defines a class of matrix solvers. Solver.
void SetF0IsComputed(bool directive)
Sets F0 as computed.
void SetK00(TPZAutoPointer< TPZMatrix< TVar > > K00)
Sets the matrix pointer of the upper left matrix to K00.
void MultAdd(const TPZFMatrix< TVar > &x, const TPZFMatrix< TVar > &y, TPZFMatrix< TVar > &z, const TVar alpha, const TVar beta, const int opt) const override
It computes z = beta * y + alpha * opt(this)*x but z and x can not overlap in memory.
bool fK01IsComputed
Is true if has been computed and overwritten .
void SetSolver(TPZAutoPointer< TPZMatrixSolver< TVar > > solver)
virtual TVar & s(const int64_t row, const int64_t col) override
The operators check on the bounds if the DEBUG variable is defined.
void SetK01IsComputed(bool directive)
Sets K01 as computed.
void Print(const char *name=NULL, std::ostream &out=std::cout, const MatrixOutputFormat=EFormatted) const override
Prints the object data structure.
void Read(TPZStream &buf, void *context) override
read objects from the stream
TPZFMatrix< TVar > & F0()
TPZFMatrix< TVar > fF0
Right hand side or force matrix.
TPZAutoPointer< TPZMatrixSolver< TVar > > fSolver
Solution method for inverting .
Contains TPZMatrixclass which implements full matrix (using column major representation).
Implements a matrix whose nonzero elements are stored in binary tree. Matrix.
bool fF0IsComputed
Is true if has been computed and overwritten .
bool fIsReduced
Is true if the declared dimension of the matrix is fDim0.
TPZAutoPointer< TPZMatrix< TVar > > fK00
Stiffnes matrix.
TPZFMatrix< TVar > fK11
Full Stiffnes matrix.
Full matrix class. Matrix.
int Redim(const int64_t dim, const int64_t dim00) override
Redim: Set the dimension of the complete matrix and reduced matrix.
void DecomposeK00()
Decompose K00 and adjust K01 and K10 to reflect rigid body modes.
int32_t Hash(std::string str)
Contains TPZMatrix<TVar>class, root matrix class.
TPZAutoPointer< TPZMatrixSolver< TVar > > Solver()
virtual int PutVal(const int64_t row, const int64_t col, const TVar &value) override
Put and Get values without bounds checking these methods are faster than "Put" e "Get" if DEBUG is de...
int fNumberRigidBodyModes
Number of rigid body modes identified during the decomposition of fK00.
Implements a simple substructuring of a linear system of equations, composed of 4 submatrices...
TPZAutoPointer< TPZMatrix< TVar > > K00()
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
void K11Reduced(TPZFMatrix< TVar > &K11, TPZFMatrix< TVar > &F1)
Computes the K11 reduced .
Contains TPZSolver class which defines a abstract class of solvers which will be used by matrix class...
virtual int IsSimetric() const override
returns 1 or 0 depending on whether the fK00 matrix is zero or not
Defines the interface for saving and reading data. Persistency.
#define CLONEDEF(A)
To create clone matrix.
Contains the declaration of TPZFlopCounter class and TPZCounter struct.
int64_t fDim0
Stores matricess dimensions.
TPZFMatrix< TVar > & F1()
virtual const TVar & GetVal(const int64_t row, const int64_t col) const override
Get values without bounds checking This method is faster than "Get" if DEBUG is defined.
int fMaxRigidBodyModes
Number of rigid body modes foreseen in the computational mesh.
~TPZMatRed()
Simple destructor.
int NumberRigidBodyModes()
return the number of rigid body modes detected during decomposition
virtual int Zero() override
This method will zero all submatrices associated with this reducable matrix class.
TPZMatRed()
Simple constructor.
int ClassId() const override
Define the class id associated with the class.
void U1(TPZFMatrix< TVar > &F)
Returns the second vector, inverting K11.
Root matrix class (abstract). Matrix.
This class implements a reference counter mechanism to administer a dynamically allocated object...