View Issue Details

IDProjectCategoryView StatusLast Update
0004213OpenFOAMBugpublic2025-02-07 14:37
Reporterbonnymei Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionno change required 
Product Versiondev 
Summary0004213: seemingly unnecessary implementation of the member function, correct, in the abstract class eddyViscosity
DescriptionIn the declaration of the eddyViscosity class, the void correct() member function is declared as a pure virtual function.
However, in eddyViscosity.C, it is defined as follows

template<class BasicMomentumTransportModel>
void Foam::eddyViscosity<BasicMomentumTransportModel>::correct()
{
    BasicMomentumTransportModel::correct();
}


However, if I am not mistaken, the code does not seem to function and appears to be misleading and unnecessary.
TagsNo tags attached.

Activities

henry

2025-02-07 08:38

manager   ~0013525

Have you tried removing this function and compiled all of OpenFOAM and run the test-loop?

bonnymei

2025-02-07 14:14

reporter   ~0013526

When I compiled it, I found that an error occurred during the compilation of boundaryFoam because it couldn’t find a reference to the correct function of eddyViscosity. Would the implementation in eddyViscosity.C be the appropriate fix to prevent this error?

henry

2025-02-07 14:35

manager   ~0013527

I found that several parts of OpenFOAM did not compile with your proposed change and worse most applications did not run because the function was missing and needed by the linker.
If I include the change you propose OpenFOAM will become useless.

henry

2025-02-07 14:37

manager   ~0013528

The proposed change breaks OpenFOAM badly in several ways and hence cannot be included.

Issue History

Date Modified Username Field Change
2025-02-07 07:04 bonnymei New Issue
2025-02-07 08:38 henry Note Added: 0013525
2025-02-07 14:14 bonnymei Note Added: 0013526
2025-02-07 14:35 henry Note Added: 0013527
2025-02-07 14:37 henry Assigned To => henry
2025-02-07 14:37 henry Status new => closed
2025-02-07 14:37 henry Resolution open => no change required
2025-02-07 14:37 henry Note Added: 0013528