Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 473
    • Issues 473
    • 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
  • #2435
Closed
Open
Issue created Apr 08, 2022 by Ben Malin@Zino

Minor error with mappedFile PatchFunction1

Summary

When a field name is specified other than the default, the format of the write function is incorrect

Steps to reproduce

Run a case using the PatchFunction1 mappedFile with a non-default fieldTable entry. The result is then output in the format:

patch
{
    type ...;
    fieldTable "[non-default name]";
    value
    {
        type    mappedField;
        ...
    }
}

If this result is then used to run another case, the fieldTable entry gets missed and an error will be thrown that the field can't be found at constant/boundaryData/patch/...

The correct behavior is:

patch
{
    type ...;
    value
    {
        type    mappedField;
        fieldTable "[non-default name]";
        ...
    }
}

Possible fixes

Easy fix, minor change to writeData function. Just need to move the os.writeEntryIfDifferent("fieldTable") to be within the os.beginBlock(word(this->name() + "Coeffs")) section.

Edited Apr 08, 2022 by Ben Malin
Assignee
Assign to
Time tracking