Skip to content

Commit

Permalink
feat(strmtrx): adds timers on create assemble
Browse files Browse the repository at this point in the history
  • Loading branch information
orlandini committed May 29, 2024
1 parent 0012153 commit cc75e1e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions StrMatrix/TPZStrMatParInterface.cpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
#include "TPZStrMatParInterface.h"
#include "pzbasematrix.h"
#include "TPZStructMatrix.h"
#include "TPZSimpleTimer.h"

TPZBaseMatrix *TPZStrMatParInterface::CreateAssemble(
TPZBaseMatrix &rhs) {
this->InitCreateAssemble();

TPZStructMatrix *myself = dynamic_cast<TPZStructMatrix*>(this);
TPZBaseMatrix *stiff = myself->Create();
TPZBaseMatrix *stiff{nullptr};
{
TPZSimpleTimer timer("Create matrix");
stiff = myself->Create();
}

const int64_t cols = MAX(1, rhs.Cols());
if(ComputeRhs()) rhs.Redim(myself->EquationFilter().NEqExpand(), cols);
Assemble(*stiff, rhs);
{
TPZSimpleTimer timer("Assemble");
Assemble(*stiff, rhs);
}
this->EndCreateAssemble(stiff);
#ifdef PZ_LOG2
if (loggerel.isDebugEnabled()) {
Expand Down

0 comments on commit cc75e1e

Please sign in to comment.