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 417
    • Issues 417
    • 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
  • #1898
Closed
Open
Issue created Oct 22, 2020 by Oleg Rogozin@olegrog

Macro FatalIOErrorInLookup does not work in surfaceInterpolationScheme.C

Summary

A program does not print a list of available surfaceInterpolationSchemes in case of wrong input parameters.

Steps to reproduce

Fill system/fvSchemes with

divSchemes
{
    default         Gauss unknown;
}

Then, the debug output is as follows:

    From static Foam::tmp<Foam::fv::divScheme<Type> > Foam::fv::divScheme<Type>::New(const Foam::fvMesh&, Foam::Istream&) [with Type = Foam::Vector<double>]
    in file /opt/OpenFOAM/OpenFOAM-v2006/src/finiteVolume/lnInclude/divScheme.C at line 56
    Constructing divScheme<Type>

    From static Foam::tmp<Foam::surfaceInterpolationScheme<Type> > Foam::surfaceInterpolationScheme<Type>::New(const Foam::fvMesh&, Foam::Istream&) [with Type = Foam::Vector<double>]
    in file lnInclude/surfaceInterpolationScheme.C at line 58
    Discretisation scheme = unknown


--> FOAM FATAL ERROR:


FOAM exiting

Example case

What is the current bug behaviour?

There is no list of registered schemes.

What is the expected correct behavior?

--> FOAM FATAL IO ERROR:
Unknown discretisation scheme unknown

Valid schemes are :
61
(
CoBlended
Gamma
...

Relevant logs and/or images

Environment information

  • OpenFOAM version : newer than v1912
  • Operating system :
  • Hardware info :
  • Compiler :

Possible fixes

The bug was introduced in this commit.

To fix the bug, the following code from surfaceInterpolationScheme.C

        FatalIOErrorInLookup
        (
            schemeData,
            "discretisation",
            schemeName,
            *MeshConstructorTablePtr_
        ) << exit(FatalError);

can be replaced by

        FatalIOErrorInLookup
        (
            schemeData,
            "discretisation",
            schemeName,
            *MeshConstructorTablePtr_
        ) << exit(FatalIOError);
Assignee
Assign to
Time tracking