Introduction
The c++ (cpp) typenameldumatrix example is extracted from the most popular open source projects, you can refer to the following example for usage.
Programming language: C++ (Cpp)
Class/type: typenameLduMatrix
Example#1File:
TDILUPreconditioner.CProject:
OpenFOAM/OpenFOAM-dev
Foam::TDILUPreconditioner<Type, DType, LUType>::TDILUPreconditioner
(
const typename LduMatrix<Type, DType, LUType>::solver& sol,
const dictionary&
)
:
LduMatrix<Type, DType, LUType>::preconditioner(sol),
rD_(sol.matrix().diag())
{
calcInvD(rD_, sol.matrix());
}
Example#2File:
DiagonalPreconditioner.CProject:
Kiiree/RapidCFD-dev
Foam::DiagonalPreconditioner<Type, DType, LUType>::DiagonalPreconditioner
(
const typename LduMatrix<Type, DType, LUType>::solver& sol,
const dictionary&
)
:
LduMatrix<Type, DType, LUType>::preconditioner(sol),
rD(sol.matrix().diag().size())
{
const gpuField<DType>& Diag = this->solver_.matrix().diag();
thrust::transform
(
Diag.begin(),
Diag.end(),
rD.begin(),
invUnaryFunctionFunctor<DType,DType>()
);
}