View Issue Details

IDProjectCategoryView StatusLast Update
0002234OpenFOAMPatchpublic2016-09-06 12:58
ReporterMattijsJ Assigned Tohenry  
PrioritylowSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSOpenSuSEOS Version13.2
Product Versiondev 
Fixed in Versiondev 
Summary0002234: algebraicPairGAMGAgglomeration agglomerates based on upper coefficients only
Descriptionit does

agglomerate(mesh, mag(matrix.upper()));

attached a fix for if asymmetric matrices.
TagsNo tags attached.

Activities

MattijsJ

2016-09-04 19:48

reporter  

algebraicPairGAMGAgglomeration.C (2,144 bytes)   
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     |
    \\  /    A nd           | Copyright (C) 2011-2016 OpenFOAM Foundation
     \\/     M anipulation  |
-------------------------------------------------------------------------------
License
    This file is part of OpenFOAM.

    OpenFOAM is free software: you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    for more details.

    You should have received a copy of the GNU General Public License
    along with OpenFOAM.  If not, see <http://www.gnu.org/licenses/>.

\*---------------------------------------------------------------------------*/

#include "algebraicPairGAMGAgglomeration.H"
#include "lduMatrix.H"
#include "addToRunTimeSelectionTable.H"

// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

namespace Foam
{
    defineTypeNameAndDebug(algebraicPairGAMGAgglomeration, 0);

    addToRunTimeSelectionTable
    (
        GAMGAgglomeration,
        algebraicPairGAMGAgglomeration,
        lduMatrix
    );
}


// * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //

Foam::algebraicPairGAMGAgglomeration::algebraicPairGAMGAgglomeration
(
    const lduMatrix& matrix,
    const dictionary& controlDict
)
:
    pairGAMGAgglomeration(matrix.mesh(), controlDict)
{
    const lduMesh& mesh = matrix.mesh();

    if (matrix.hasLower())
    {
        agglomerate(mesh, max(mag(matrix.upper()), mag(matrix.lower())));
    }
    else
    {
        agglomerate(mesh, mag(matrix.upper()));
    }
}


// ************************************************************************* //

henry

2016-09-04 21:13

manager   ~0006822

Why use the max of the upper and lower coefficient?

> max(mag(matrix.upper()), mag(matrix.lower()))

What about using the sum:

mag(matrix.upper()) + mag(matrix.lower())

MattijsJ

2016-09-06 12:46

reporter   ~0006833

From what I can see in the literature the strength of connections is taken as the max, e.g. from wissrech.ins.uni-bonn.de/research/pub/metsch/emg-2005.ps.gz
"Also note that, with this defini-
tion of strength, it is possible that a point i strongly
depends on j, but point j only weakly depends on i,
even though A is symmetric"

henry

2016-09-06 12:58

manager   ~0006835

Resolved by commit 4232f90093b87323bd3d96d9fab7b209f19ed1db

Issue History

Date Modified Username Field Change
2016-09-04 19:48 MattijsJ New Issue
2016-09-04 19:48 MattijsJ File Added: algebraicPairGAMGAgglomeration.C
2016-09-04 21:13 henry Note Added: 0006822
2016-09-06 12:46 MattijsJ Note Added: 0006833
2016-09-06 12:58 henry Assigned To => henry
2016-09-06 12:58 henry Status new => resolved
2016-09-06 12:58 henry Resolution open => fixed
2016-09-06 12:58 henry Fixed in Version => dev
2016-09-06 12:58 henry Note Added: 0006835