Added static function for matrix relaxation

This commit is contained in:
Hrvoje Jasak 2015-11-11 16:52:23 +00:00
parent e5ee883b3a
commit 14b936a124
3 changed files with 38 additions and 1 deletions

View file

@ -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>
Foam::lduMatrix::solverPerformance Foam::solve
(

View file

@ -514,6 +514,19 @@ void checkMethod
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
// Use the given solver controls