27 solution.Resize(neq, 1);
49 for (
int i=1; i<=10; i++) {
56 matrix->
MultAdd(locsol, rhs, result,-1.,1.);
57 residues[i-1] =
Norm(result);
60 for (
int i=1; i<10; i++) {
61 rate[i-1] = (
log(residues[i]) -
log(residues[i-1]))/(
log(i+1.)-
log(i*1.));
63 std::cout <<
"Residues " << residues << std::endl;
64 std::cout <<
"Global convergence rates " << rate << std::endl;
Implements a vector class which allows to use external storage provided by the user. Utility.
int64_t NEquations()
This computes the number of equations associated with non-restrained nodes.
Contains declaration of TPZCompEl class which defines the interface of a computational element...
virtual void MultAdd(const TPZFMatrix< TVar > &x, const TPZFMatrix< TVar > &y, TPZFMatrix< TVar > &z, const TVar alpha=1., const TVar beta=0., const int opt=0) const
It computes z = beta * y + alpha * opt(this)*x but z and x can not overlap in memory.
TPZSkylMatrix< REAL > matrix
Implements SkyLine Structural Matrices. Structural Matrix.
int Zero() override
Makes Zero all the elements.
void LoadSolution(const TPZFMatrix< STATE > &sol)
Given the solution of the global system of equations, computes and stores the solution for the restri...
TVar Norm(const TPZFMatrix< TVar > &A)
Returns the norm of the matrix A.
Contains the TPZSkylineStructMatrix class which implements SkyLine Structural Matrices.
Contains TPZSkyline class which implements a skyline storage format.
Contains declaration of TPZCompMesh class which is a repository for computational elements...
virtual void Assemble(TPZMatrix< STATE > &mat, TPZFMatrix< STATE > &rhs, TPZAutoPointer< TPZGuiInterface > guiInterface) override
Assemble the global system of equations into the matrix which has already been created.
expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ expr_ log
TPZPlasticDiagnostic(TPZCompMesh *cmesh)
Implements computational mesh. Computational Mesh.
virtual TPZMatrix< STATE > * CreateAssemble(TPZFMatrix< STATE > &rhs, TPZAutoPointer< TPZGuiInterface > guiInterface, unsigned numthreads_assemble, unsigned numthreads_decompose)
TPZFMatrix< STATE > & Solution()
Access the solution vector.