Added static function for matrix relaxation
This commit is contained in:
parent
e5ee883b3a
commit
14b936a124
3 changed files with 38 additions and 1 deletions
|
@ -1351,6 +1351,30 @@ void Foam::checkMethod
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::tmp<Foam::fvMatrix<Type> > Foam::relax
|
||||||
|
(
|
||||||
|
const fvMatrix<Type>& m,
|
||||||
|
const scalar alpha
|
||||||
|
)
|
||||||
|
{
|
||||||
|
tmp<fvMatrix<Type> > tmatrix(new fvMatrix<Type>(m));
|
||||||
|
tmatrix().relax(alpha);
|
||||||
|
|
||||||
|
return tmatrix;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
Foam::tmp<Foam::fvMatrix<Type> > Foam::relax(const fvMatrix<Type>& m)
|
||||||
|
{
|
||||||
|
tmp<fvMatrix<Type> > tmatrix(new fvMatrix<Type>(m));
|
||||||
|
tmatrix().relax();
|
||||||
|
|
||||||
|
return tmatrix;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::lduMatrix::solverPerformance Foam::solve
|
Foam::lduMatrix::solverPerformance Foam::solve
|
||||||
(
|
(
|
||||||
|
|
|
@ -514,6 +514,19 @@ void checkMethod
|
||||||
const char*
|
const char*
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- Relax and return a copy of the matrix giver relaxation factor
|
||||||
|
template<class Type>
|
||||||
|
tmp<fvMatrix<Type> > relax
|
||||||
|
(
|
||||||
|
const fvMatrix<Type>&,
|
||||||
|
const scalar
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
//- Relax and return a copy of the matrix
|
||||||
|
template<class Type>
|
||||||
|
tmp<fvMatrix<Type> > relax(const fvMatrix<Type>&);
|
||||||
|
|
||||||
|
|
||||||
//- Solve returning the solution statistics given convergence tolerance
|
//- Solve returning the solution statistics given convergence tolerance
|
||||||
// Use the given solver controls
|
// Use the given solver controls
|
||||||
|
|
Reference in a new issue