Go to the documentation of this file.
23 #include "ofgpu/pcg.h"
24 #include "ofgpu/sparsematrixargs.h"
34 lduMatrix::solver::addsymMatrixConstructorToTable<PCGgpu>
43 const word& fieldName,
72 scalar initialResidual(0.);
73 scalar finalResidual(0.);
74 label iterationsPerformed(0);
75 bool converged(
false);
78 word const preconditionerName = lduMatrix::preconditioner::getName(controlDict_);
80 ofgpuPCGsolve(ofgpu::SparseMatrixArgs(preconditionerName.c_str(),
83 matrix_.diag().begin(),
87 maxIter_, tolerance_, relTol_,
88 initialResidual, finalResidual, iterationsPerformed, converged));
93 preconditionerName + typeName,
The class contains the addressing required by the lduMatrix: upper, lower and losort.
A class for handling words, derived from string.
Preconditioned conjugate gradient solver for symmetric lduMatrices using a run-time selectable precon...
lduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
PCGgpu(const PCGgpu &)
Disallow default bitwise copy construct.
const labelUList & losortStartAddr() const
Return losort start addressing.
const labelUList & ownerStartAddr() const
Return owner start addressing.
virtual const labelUList & upperAddr() const =0
Return upper addressing.
iterator begin()
Return an iterator to begin traversing the UList.
const labelUList & losortAddr() const
Return losort addressing.
lduMatrix::solver::addsymMatrixConstructorToTable< PCGgpu > addPCGgpuAsymMatrixConstructorToTable_
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
virtual solverPerformance solve(scalarField &psi, const scalarField &source, const direction cmpt=0) const
Solve the matrix with this solver.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
A list of keyword definitions, which are a keyword followed by any number of values (e....
const volScalarField & psi
virtual const labelUList & lowerAddr() const =0
Return lower addressing.
label size() const
Return the number of elements in the UList.
defineTypeNameAndDebug(combustionModel, 0)