9 pInvDiag=std::make_shared<TArray1<T>>(pMatrix->shape(0));
16 pInvDiag=std::make_shared<TArray1<T>>(A.
shape(0));
25 return std::make_shared<TPreconJacobi<T>>(pA);
33 assert(n==pInvDiag->size());
34 auto &InvDiag=*pInvDiag;
36 InvDiag(i)=1.0/M(i,i);
46 int n=pInvDiag->size();
47 auto &InvDiag=*pInvDiag;
49 Sol(i)=Rhs(i)*InvDiag(i);
static std::shared_ptr< TPreconJacobi< T > > create(const std::shared_ptr< TSparseMatrix< T >> pA)
Create preconditioner.
Sparse matrix class using CRS storage scheme.
void solve(TArray< T > &Sol, const TArray< T > &Rhs) const
Solve preconditioning system.
TPreconJacobi(const std::shared_ptr< TSparseMatrix< T >> pA)
Create Preconditioner.
TArray is the common template base class for arrays and dense matrices of the numcxx project...
size_t size() const
Obtain size of array.
bool pattern_changed() const
Check if pattern has changed after last solver update.
virtual void update(void)
index shape(int idim) const
Return the shape od the matrix.
void resize(size_t n)
Resize array.