36 const int initial_blocks_size = 1 );
71 int Set(
const int index,
const int dim,
const int pos = -1 );
89 int Remove(
const int index );
96 TVar &
operator()(
const int block_row,
const int block_col,
const int r,
const int c )
const;
99 const TVar &
Get(
const int block_row,
const int block_col,
const int r,
const int c )
const;
101 int Put(
const int block_row,
const int block_col,
const int r,
const int c,
const TVar& value );
104 const TVar &
Get(
const int block_row,
const int r,
const int c )
const;
106 int Put(
const int block_row,
const int r,
const int c,
const TVar& value );
109 const TVar &
GetVal(
const int bRow,
const int bCol,
const int r,
const int c )
const;
111 int PutVal(
const int bRow,
const int bCol,
const int r,
const int c,
const TVar& value );
143 int InsertBlock(
const int block_row,
const int block_col,
155 int PrintBlock(
const int block_row,
const int block_col,
const char *title =
"",
TPZostream &out = std::cout )
const;
171 int Size(
const int block_diagonal)
const {
return fBlock[block_diagonal].dim; }
177 int Position(
const int block_diagonal)
const {
return fBlock[block_diagonal].pos;}
210 return Hash(
"TNode") ^ ClassIdOrHash<TPZBlock<TVar>>() << 1;
227 return Hash(
"TPZBlock") ^ ClassIdOrHash<TVar>() << 1;
Contains declaration of the TPZSavable class which defines the interface to save and restore objects ...
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
int Position(const int block_diagonal) const
Returns the position of first element block dependent on matrix diagonal.
int Set(const int index, const int dim, const int pos=-1)
Modifies existing block dimensions or creates a new block with given index.
int InsertBlock(const int block_row, const int block_col, const int row, const int col, TPZMatrix< TVar > &target) const
Inserts a block (block_row , block_col) on current matrix target.
Implements a vector class which allows to use external storage provided by the user. Utility.
void PrintSolution(const char *title, TPZostream &out)
TVar & operator()(const int block_row, const int block_col, const int r, const int c) const
int GetBlock(const int block_row, const int block_col, TPZFMatrix< TVar > &block) const
Gets a block on current matrix.
const TVar & Get(const int block_row, const int block_col, const int r, const int c) const
Gets a element from matrix verifying.
int PutVal(const int bRow, const int bCol, const int r, const int c, const TVar &value)
Puts a element to matrix but not verify the existence.
void Read(TPZStream &buf, void *context) override
Read the element data from a stream.
int Dim() const
Returns matrix dimension pointed by block.
int Verify() const
Verifies if blocks are sequential and does not overcome matrix size.
int SetAll(TPZVec< int > &dimensions)
Computes blocks sequence.
int ClassId() const override
returns the unique identifier for reading/writing objects to streams
int PrintBlock(const int block_row, const int block_col, const char *title="", TPZostream &out=std::cout) const
Prints a matrix block.
Free store vector implementation.
int AddBlock(const int block_row, const int block_col, const TPZFMatrix< TVar > &block)
Adds a block on current matrix.
TPZManVector< TNode > fBlock
Nodes vector.
int SetNBlocks(const int num_of_blocks)
Sets number of blocks on diagonal matrix.
Full matrix class. Matrix.
int ClassId() const override
Define the class id associated with the class.
int32_t Hash(std::string str)
Contains TPZMatrix<TVar>class, root matrix class.
int NBlocks() const
Returns number of blocks on diagonal.
int Put(const int block_row, const int block_col, const int r, const int c, const TVar &value)
Puts a element to matrix verifying.
const TVar & GetVal(const int bRow, const int bCol, const int r, const int c) const
Gets a element from matrix but not verify the existence.
Implements block matrices. Matrix utility.
TPZMatrix< TVar > * fpMatrix
Pointer to TPZMatrix.
int Size(const int block_diagonal) const
Returns block dimension.
void SetMatrix(TPZMatrix< TVar > *const other)
Changes pointer to other.
TPZBlock< TVar > & operator=(const TPZBlock< TVar > &)
int PutBlock(const int block_row, const int block_col, const TPZFMatrix< TVar > &block)
Puts a block on current matrix.
Defines the interface for saving and reading data. Persistency.
Contains the declaration of TPZFlopCounter class and TPZCounter struct.
void Read(TPZStream &buf, void *context) override
read objects from the stream
int MaxBlockSize() const
Returns the max number of blocks on diagonal.
TPZMatrix< TVar > * Matrix()
Returns a pointer to current matrix.
void Print(const char *title="", TPZostream &out=std::cout, TPZMatrix< TVar > *mat=NULL)
Prints all the blocks of the matrix.
This class defines the interface to save and restore objects from TPZStream objects. Persistency.
int Remove(const int index)
Removes a block.
void Write(TPZStream &buf, int withclassid) const override
Save the element data to a stream.
virtual ~TPZBlock()
Simple Destrutor.
int Resequence(const int start=0)
Resequences blocks positioning.
Root matrix class (abstract). Matrix.