define member variables as const where appropriate

turn 'word' member variables into 'const word' if they are initialized
once (in the constructor) and never changed
This commit is contained in:
danielque
2020-09-22 11:26:57 +02:00
parent b8c987ae94
commit 78620f134f
8 changed files with 36 additions and 36 deletions

View File

@ -56,15 +56,15 @@ private:
const fvMesh& mesh_;
word velFieldName_;
const word velFieldName_;
const volVectorField& U_;
word voidfractionFieldName_;
const word voidfractionFieldName_;
const volScalarField& voidfraction_;
word densityFieldName_;
const word densityFieldName_;
const volScalarField& rho_;

View File

@ -72,28 +72,28 @@ private:
volScalarField changeOfGasMassField_;
word tempFieldName_;
const word tempFieldName_;
const volScalarField& tempField_; // ref to gas temperature field
word partTempName_;
const word partTempName_;
word densityFieldName_;
const word densityFieldName_;
const volScalarField& rho_;
word partRhoName_;
const word partRhoName_;
word voidfractionFieldName_;
const word voidfractionFieldName_;
const volScalarField& voidfraction_;
// total mole field
word molarConcFieldName_;
const word molarConcFieldName_;
const volScalarField& molarConc_;
word partMolarConcName_;
const word partMolarConcName_;
label loopCounter_;

View File

@ -54,7 +54,7 @@ protected:
scalar totalHeatFlux_;
word QPartPartName_;
const word QPartPartName_;
volScalarField QPartPart_;
@ -64,15 +64,15 @@ protected:
const volScalarField& partTempField_;
word prescribedVoidfractionFieldName_;
const word prescribedVoidfractionFieldName_;
const volScalarField& prescribedVoidfraction_;
word voidfractionFieldName_;
const word voidfractionFieldName_;
const volScalarField& voidfraction_;
word partHeatFluxName_;
const word partHeatFluxName_;
scalarList typePartThermCond_;

View File

@ -68,11 +68,11 @@ protected:
scalar NusseltScalingFactor_;
word QPartFluidName_;
const word QPartFluidName_;
volScalarField QPartFluid_;
word QPartFluidCoeffName_;
const word QPartFluidCoeffName_;
volScalarField QPartFluidCoeff_;
@ -90,27 +90,27 @@ protected:
dimensionedScalar partTempAve_;
word tempFieldName_;
const word tempFieldName_;
const volScalarField& tempField_; // ref to temperature field
word voidfractionFieldName_;
const word voidfractionFieldName_;
const volScalarField& voidfraction_; // ref to voidfraction field
scalar maxSource_; // max (limited) value of src field
word velFieldName_;
const word velFieldName_;
const volVectorField& U_;
word densityFieldName_;
const word densityFieldName_;
const volScalarField& rho_;
word partTempName_;
const word partTempName_;
word partHeatFluxName_;
const word partHeatFluxName_;
const word partHeatFluxCoeffRegName_;

View File

@ -67,11 +67,11 @@ protected:
scalar NusseltScalingFactor_;
word QPartFluidName_;
const word QPartFluidName_;
volScalarField QPartFluid_;
word QPartFluidCoeffName_;
const word QPartFluidCoeffName_;
volScalarField QPartFluidCoeff_;
@ -89,27 +89,27 @@ protected:
dimensionedScalar partTempAve_;
word tempFieldName_;
const word tempFieldName_;
const volScalarField& tempField_; // ref to temperature field
word voidfractionFieldName_;
const word voidfractionFieldName_;
const volScalarField& voidfraction_; // ref to voidfraction field
scalar maxSource_; // max (limited) value of src field
word velFieldName_;
const word velFieldName_;
const volVectorField& U_;
word densityFieldName_;
const word densityFieldName_;
const volScalarField& rho_;
word partTempName_;
const word partTempName_;
word partHeatFluxName_;
const word partHeatFluxName_;
const word partHeatFluxCoeffRegName_;

View File

@ -55,12 +55,12 @@ private:
mutable bool initialExec_;
word refFieldName_;
const word refFieldName_;
mutable autoPtr<volScalarField> refField_;
// default deformation in region
word defaultDeformCellsName_;
const word defaultDeformCellsName_;
autoPtr<cellSet> defaultDeformCells_;

View File

@ -51,11 +51,11 @@ private:
mutable OFstream recErrorFile_;
word voidfractionFieldName_;
const word voidfractionFieldName_;
const volScalarField& voidfraction_;
word voidfractionRecFieldName_;
const word voidfractionRecFieldName_;
const volScalarField& voidfractionRec_;

View File

@ -54,11 +54,11 @@ private:
dictionary propsDict_;
word partKsFieldName_;
const word partKsFieldName_;
volScalarField& partKsField_;
word voidfractionFieldName_;
const word voidfractionFieldName_;
const volScalarField& voidfraction_;