Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 380
    • Issues 380
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #1943

Closed
Open
Created Nov 30, 2020 by Carlos Peña-Monferrer@carpemonf

Accessing field in codedSource with codeCorrect

Hi,

The documentation for codedSource mentions the following arguments:

  • codeCorrect: field
  • codeAddSup: eqn, fieldi
  • codeConstrain: eqn, fieldi

I can use eqn and fieldi from codeAddSup, however when trying to use field from codeCorrect it complains about not being declared. Is there something missing in the following code?

codedSource
{
    type            vectorCodedSource;
    selectionMode   all;

    fields          (U);
    name            testing;

    codeCorrect
    #{
        vectorField& testField = field;
    #};

    codeAddSup
    #{
        vectorField& fieldSource = eqn.source();
        label fieldLabel = fieldi;
    #};

    codeConstrain
    #{
    #};
}

Thanks.

Assignee
Assign to
Time tracking