Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 420
    • Issues 420
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 7
    • Merge requests 7
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #1227
Closed
Open
Issue created Mar 06, 2019 by Kutalmış Berçin@kutiMaintainer

ENH: Inform users that the functionObject in question is disabled when it throws FatalErrorInFunction-type warnings

Functionality to add/problem to solve

I initialised a variable in the constructor of a (developing) functionObject via a function call which involves a check with FatalErrorInFunction:

bool Foam::functionObjects::myFunctionObject::isTemporalVariant
(
    const bool runTimeModifiable
) const
{
    if (runTimeModifiable)
    {
        FatalErrorInFunction
            << "Available only for fixed time-step computations."
            << exit(FatalError);
    }

    return false;
}
//... Member initialiser list in the constructor
isTemporalVariant_(isTemporalVariant(runTime.runTimeModifiable())),
//...

FatalErrorInFunction is called when the user sets controlDict\runTimeModifiable true.

FatalErrorInFunction throws FOAM Warning instead of FOAM FATAL ERROR.

-> FOAM Warning : 
Available only for fixed time-step computations.

    From function bool Foam::functionObjects::myFunctionObject::isTemporalVariant(bool) const
    in file streamingTotalDMD.C at line 53.
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 896
    
--> while loading function object 'myFunctionObject1'

Yet, IMHO, the user was not informed that the functionObject is disabled, and the computation is let to run.

Target audience

Users of functionObjects.

Proposal

Append information stating that the relevant functionObject is disabled, and the remaining functionObjects and the computation itself are allowed to continue their run.

What does success look like, and how can we measure that?

N/A

Links / references

N/A

Funding

N/A

Edited Mar 06, 2019 by Kutalmış Berçin
Assignee
Assign to
Time tracking