コード例 #1
0
Foam::GAMGPreconditioner::GAMGPreconditioner
(
    const lduMatrix::solver& sol,
    const dictionary& solverControls
)
:
    GAMGSolver
    (
        sol.fieldName(),
        sol.matrix(),
        sol.interfaceBouCoeffs(),
        sol.interfaceIntCoeffs(),
        sol.interfaces(),
        solverControls
    ),
    lduMatrix::preconditioner(sol),
    nVcycles_(2)
{
    readControls();
}
コード例 #2
0
 Foam::symGaussSeidelPrecon::symGaussSeidelPrecon
        (
            const lduMatrix::solver& sol,
            const dictionary& solverControlsUnused
        )
        :
    lduPreconditioner
    (
        sol
    ),
    mBouCoeffs_(sol.interfaceBouCoeffs().size()),
    bPrime_(sol.matrix().lduAddr().size())
{
    forAll(mBouCoeffs_, i)
    {
        if (interfaces_.set(i))
        {
            mBouCoeffs_.set(i, -coupleBouCoeffs_[i]);
        }
    }
}
コード例 #3
0
ファイル: amgPrecon.C プロジェクト: leehowe/OpenFOAM-2.1.0
//add by xiaow:begin
Foam::amgPrecon::amgPrecon
(   
    const lduMatrix::solver& sol,
    const dictionary& dict
):
    lduPreconditioner
    (
        sol
    ),
    cycle_(amgCycle::cycleNames_.read(dict.lookup("cycle"))),
    nPreSweeps_(readLabel(dict.lookup("nPreSweeps"))),
    nPostSweeps_(readLabel(dict.lookup("nPostSweeps"))),
    nMaxLevels_(readLabel(dict.lookup("nMaxLevels"))),
    scale_(dict.lookup("scale")),
    amgPtr_
    (
        new amgCycle
        (
            autoPtr<amgLevel>
            (
                new fineAmgLevel
                (
                    sol.matrix(),
                    sol.interfaceBouCoeffs(),
                    sol.interfaceIntCoeffs(),
                    sol.interfaces(),
                    dict,
                    dict.lookup("policy"),
                    readLabel(dict.lookup("groupSize")),
                    readLabel(dict.lookup("minCoarseEqns")),
                    dict.lookup("smoother")
              )
            )
        )
    ),
    xBuffer_(sol.matrix().lduAddr().size())
{
    // Make coarse levels
    amgPtr_->makeCoarseLevels(nMaxLevels_);
}