View Issue Details

IDProjectCategoryView StatusLast Update
0002240OpenFOAM[All Projects] Bugpublic2016-09-09 12:34
ReporterMattijsJAssigned Tohenry 
PrioritylowSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformGNU/LinuxOSOpenSuSEOS Version13.2
Product Versiondev 
Fixed in Versiondev 
Summary0002240: codedSource derives from cellSetOption but cannot use it
DescriptioncodedSource derives from cellSetOption but the dynamically generated version does not. Hence the instantiated version cannot use the cell selection mechanism.

Choices:
1. make generated version derive from cellSetOption as well
2. or have codedSource (derived from option) and new codedCellSource (derived from cellSetOption)
TagsNo tags attached.

Activities

MattijsJ

2016-09-09 11:57

reporter  

codedFvOptionTemplate.C (4,722 bytes)

MattijsJ

2016-09-09 11:58

reporter  

codedFvOptionTemplate.H (4,913 bytes)

MattijsJ

2016-09-09 11:58

reporter  

CodedSource.C (5,679 bytes)

MattijsJ

2016-09-09 11:59

reporter  

CodedSource.H (5,942 bytes)

MattijsJ

2016-09-09 11:59

reporter  

fvOptions (2,131 bytes)
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  dev                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

    energySource
    {
        type            vectorCodedSource;

        //active          yes;

        name            sourceTime;


        vectorCodedSourceCoeffs
        {
            selectionMode   all;    //cellSet;
            //cellSet 
            fields          (U);


            codeInclude
            #{

            #};

            codeCorrect
            #{
                Pout<< "**codeCorrect**" << endl;
            #};

            codeAddSup
            #{
                Pout<< "**codeAddSup**" << endl;
                const Time& time = mesh().time();
                const scalarField& V = mesh_.V();
                Pout<< "cells:" << cells() << endl;

                vectorField& heSource = eqn.source();
                heSource -= sqr(time.value())*vector::one*V;
            #};

            codeSetValue
            #{
                Pout<< "**codeSetValue**" << endl;
            #};

            // Dummy entry. Make dependent on above to trigger recompilation
            code
            #{
                $codeInclude
                $codeCorrect
                $codeAddSup
                $codeSetValue
            #};
        }

        sourceTimeCoeffs
        {
            $vectorCodedSourceCoeffs;
        }
    }


// ************************************************************************* //
fvOptions (2,131 bytes)

MattijsJ

2016-09-09 12:00

reporter   ~0006851

I've uploaded the minimal changes for option 1.

henry

2016-09-09 12:34

manager   ~0006852

Resolved by commit 52323f8dd1db7a466e8a546996688acae84141b1

Issue History

Date Modified Username Field Change
2016-09-09 11:57 MattijsJ New Issue
2016-09-09 11:57 MattijsJ File Added: codedFvOptionTemplate.C
2016-09-09 11:58 MattijsJ File Added: codedFvOptionTemplate.H
2016-09-09 11:58 MattijsJ File Added: CodedSource.C
2016-09-09 11:59 MattijsJ File Added: CodedSource.H
2016-09-09 11:59 MattijsJ File Added: fvOptions
2016-09-09 12:00 MattijsJ Note Added: 0006851
2016-09-09 12:34 henry Assigned To => henry
2016-09-09 12:34 henry Status new => resolved
2016-09-09 12:34 henry Resolution open => fixed
2016-09-09 12:34 henry Fixed in Version => dev
2016-09-09 12:34 henry Note Added: 0006852