|
[Sponsors] |
customized densityBasedTurbo compilation error in FE4.0 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 15, 2020, 22:17 |
customized densityBasedTurbo compilation error in FE4.0
|
#1 |
Member
Bidesh Sengupta
Join Date: Sep 2018
Location: Sngapore
Posts: 76
Rep Power: 8 |
Hi Foamers,
I am trying to write some code by modifying densityBasedTurbo in foam extend 4. I am getting the following error: ************************************************** ************************************************** ************************* BSTurboFoam.C:127:25: error: passing ‘const surfaceVectorField {aka const Foam::GeometricField<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh>}’ as ‘this’ argument discards qualifiers [-fpermissive] dbnsFlux.dotX() = mrfZones.faceU(); ************************************************** ************************************************** ************************ In BSTurboFoam.C : dbnsFlux.dotX() = mrfZones.faceU(); ************************************************** ************************************************** ************************ In numericFlux.C: template<class Flux, class Limiter> Foam::numericFlux<Flux, Limiter>::numericFlux ( const volScalarField& p, const volVectorField& U, const volScalarField& T, basicThermo& thermo ) : numericFluxBase<Flux>(p.mesh()), p_(p), U_(U), T_(T), thermo_(thermo), rhoFlux_ ( .... ), rhoUFlux_ ( ... ), rhoEFlux_ ( ... ), dotX_ ( IOobject ( "dotX", this->mesh().time().timeName(), this->mesh(), IOobject::NO_READ, IOobject::NO_WRITE ), this->mesh(), dimensionedVector("zero", dimVelocity, vector::zero) ) {} ************************************************** ************************************************** ************************* In MRFZone.C : void Foam::MRFZone::faceU ( surfaceVectorField& zoneFaceU ) const { ... } ************************************************** ************************************************** ************************* In MRFZones.C : Foam::tmp<Foam::surfaceVectorField> Foam::MRFZones::faceU() const { tmp<surfaceVectorField> tMRFZonesFaceU ( new surfaceVectorField ( ... ) ); surfaceVectorField& MRFZonesFaceU = tMRFZonesFaceU(); forAll(*this, i) { operator[](i).faceU(MRFZonesFaceU); } return tMRFZonesFaceU; } I shall be greatly helped if the error gets resolved and can proceed further. Thanks a lot for your time. Bidesh |
|
January 20, 2020, 20:42 |
|
#2 |
Member
Bidesh Sengupta
Join Date: Sep 2018
Location: Sngapore
Posts: 76
Rep Power: 8 |
Any help please...
|
|
Tags |
coding style, compilation error, dbnsturbfoam, density based solver, foam ext 4.0 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compilation Error (V 1.7.1; Icc 12.1.0, OpenMPI 1.4.3) | floydfan | OpenFOAM Installation | 7 | December 20, 2011 06:56 |