Skip to content

Class faMatrix is not fully compilable

Summary

Method faMatrix::setValues() (src/finiteArea/faMatrices/faMatrix/faMatrix.C) does not compile under OpenFOAM-v2006 as it uses:

  • method lduMatrix::eliminatedEqns() that is part of foam-extend-4.1-project, but misses in OpenFOAM-v2006
  • non-const internalField() method that seems to be renamed to ref() under OpenFOAM-v2006

Steps to reproduce

Try to compile the attached code:

faMatrixBug.tgz

Example case

N/A

What is the current bug behaviour?

Compilation error.

What is the expected correct behavior?

Compilation success.

Relevant logs and/or images

N/A

Environment information

  • OpenFOAM version : OpenFOAM-v2006
  • Operating system : CentOS 8 (4.18.0-193.14.2.el8_2.x86_64)
  • Hardware info : VirtualBox 6.1.12 r139181
  • Compiler : gcc 8.3.1

Bug breaks basic C++ rules, should not depend on a specific environment.

Possible fixes

Quick and dirty patch:

faMatrix.C.patch

A more elegant solution would involve the port of the lduMatrix class from foam-extend-project.

Edited by Ghost User