View Issue Details

IDProjectCategoryView StatusLast Update
0002227OpenFOAMPatchpublic2016-09-03 20:55
ReporterMattijsJ Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSOpenSuSEOS Version13.2
Product Versiondev 
Summary0002227: decomposePar -region reads wrong decomposeParDict
DescriptionIt reads the system/decomposeParDict instead of system/<region>/decomposeParDict.

Attached the fix - src/parallel/decompose/decompose/decompositionModel.C was using mesh.db() instead of mesh as the objectRegistry.
TagsNo tags attached.

Activities

MattijsJ

2016-09-01 17:12

reporter  

decompositionModel.C (4,024 bytes)   
/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     |
    \\  /    A nd           | Copyright (C) 2014-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 "decompositionModel.H"
#include "polyMesh.H"
#include "Time.H"

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

namespace Foam
{
    defineTypeNameAndDebug(decompositionModel, 0);
}

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

Foam::decompositionModel::decompositionModel
(
    const polyMesh& mesh,
    const fileName& decompDictFile
)
:
    MeshObject
    <
        polyMesh,
        Foam::UpdateableMeshObject,
        decompositionModel
    >(mesh),
    IOdictionary
    (
        selectIO
        (
            IOobject
            (
                "decomposeParDict",
                mesh.time().system(),
                mesh.local(),
                mesh,
                IOobject::MUST_READ,
                IOobject::NO_WRITE,
                false   //io.registerObject()
            ),
            decompDictFile
        )
    )
{}


Foam::decompositionModel::decompositionModel
(
    const polyMesh& mesh,
    const dictionary& dict,
    const fileName& decompDictFile
)
:
    MeshObject
    <
        polyMesh,
        Foam::UpdateableMeshObject,
        decompositionModel
    >(mesh),
    IOdictionary
    (
        selectIO
        (
            IOobject
            (
                "decomposeParDict",
                mesh.time().system(),
                mesh.local(),
                mesh,
                (dict.size() ? IOobject::NO_READ : IOobject::MUST_READ),
                IOobject::NO_WRITE,
                false   //io.registerObject()
            ),
            decompDictFile
        ),
        dict
    )
{}


// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //

const Foam::decompositionModel& Foam::decompositionModel::New
(
    const polyMesh& mesh,
    const fileName& decompDictFile
)
{
    return
        MeshObject
        <
            polyMesh,
            Foam::UpdateableMeshObject,
            decompositionModel
        >::New(mesh, decompDictFile);
}


const Foam::decompositionModel& Foam::decompositionModel::New
(
    const polyMesh& mesh,
    const dictionary& dict,
    const fileName& decompDictFile
)
{
    return
        MeshObject
        <
            polyMesh,
            Foam::UpdateableMeshObject,
            decompositionModel
        >::New(mesh, dict, decompDictFile);
}


// * * * * * * * * * * * * * * * Member Functions  * * * * * * * * * * * * * //

Foam::IOobject Foam::decompositionModel::selectIO
(
    const IOobject& io,
    const fileName& f
)
{
    return
    (
        f.size()
      ? IOobject        // construct from filePath instead
        (
            f,
            io.db(),
            io.readOpt(),
            io.writeOpt(),
            io.registerObject()
        )
     :  io
    );
}


// ************************************************************************* //
decompositionModel.C (4,024 bytes)   

henry

2016-09-03 20:54

manager   ~0006810

Resolved in OpenFOAM-4.x by commit 5c32111a210efa5553e553d31f67870c013e424c
Resolved in OpenFOAM-dev by commit dbe30eaef77997813f2aa81f26a7f5f6614262a1

Issue History

Date Modified Username Field Change
2016-09-01 17:12 MattijsJ New Issue
2016-09-01 17:12 MattijsJ File Added: decompositionModel.C
2016-09-03 20:54 henry Note Added: 0006810
2016-09-03 20:54 henry Status new => resolved
2016-09-03 20:54 henry Fixed in Version => 4.x
2016-09-03 20:54 henry Resolution open => fixed
2016-09-03 20:54 henry Assigned To => henry