|
[Sponsors] |
Leaving field in an undefined state when passing thermo.mu() to lvalue |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 16, 2020, 04:21 |
Leaving field in an undefined state when passing thermo.mu() to lvalue
|
#1 |
Member
Join Date: Dec 2018
Location: Darmstadt, Germany
Posts: 87
Rep Power: 7 |
Hey everyone,
I found something interesting that I wanted to discuss before reporting it as a bug (?). In the thermophysicalModels library, more precisely in the psiThermo class, there is the following function: Code:
Foam::tmp<Foam::volScalarField> Foam::psiThermo::mu() const { return mu_; // mu_ is psiThermo member } Code:
// thermo is of type psiThermo //muSteal has been initialzed muSteal = thermo.mu(); Info << "muSteal[0] = " << muSteal[0] << nl; Info << "thermo.mu()()[0] = "<<thermo.mu()()[0] << nl; Code:
//muCopy has been initialzed muCopy= dimensionedScalar("zero",dimless,1.)*thermo.mu(); Info << "muCopy[0] = " << muCopy[0] << nl; Info << "thermo.mu()()[0] = "<<thermo.mu()()[0] << nl; Code:
const Foam::volScalarField& Foam::psiThermo::mu() const { return mu_; } Cheers RP |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Second Derivative Zero - Boundary Condition | fu-ki-pa | OpenFOAM | 11 | March 27, 2021 04:28 |
[OpenFOAM.com] An Error in recompiling of openFoam-4.0 | alimea | OpenFOAM Installation | 4 | April 8, 2020 14:44 |
can not complie fluentDataToFoam in OF2.1.1 | hewei | OpenFOAM Pre-Processing | 20 | September 8, 2018 09:19 |
OpenFOAM-2.1.x on fedora 16 x86_64 | anand_30 | OpenFOAM Installation | 3 | December 26, 2011 02:09 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 19:08 |