writeEntry: Rationalised for consistency, ease of use and maintainability
The writeEntry form is now defined and used consistently throughout OpenFOAM making it easier to use and extend, particularly to support binary IO of complex dictionary entries.
This commit is contained in:
@ -204,7 +204,6 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::updateCoeffs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Write
|
|
||||||
void Foam::smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const
|
void Foam::smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchScalarField::write(os);
|
fvPatchScalarField::write(os);
|
||||||
@ -214,10 +213,10 @@ void Foam::smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const
|
|||||||
writeEntryIfDifferent<word>(os, "psi", "thermo:psi", psiName_);
|
writeEntryIfDifferent<word>(os, "psi", "thermo:psi", psiName_);
|
||||||
writeEntryIfDifferent<word>(os, "mu", "thermo:mu", muName_);
|
writeEntryIfDifferent<word>(os, "mu", "thermo:mu", muName_);
|
||||||
|
|
||||||
Foam::writeEntry(os, "accommodationCoeff", accommodationCoeff_);
|
writeEntry(os, "accommodationCoeff", accommodationCoeff_);
|
||||||
Twall_.writeEntry("Twall", os);
|
writeEntry(os, "Twall", Twall_);
|
||||||
Foam::writeEntry(os, "gamma", gamma_);
|
writeEntry(os, "gamma", gamma_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -206,15 +206,15 @@ void Foam::maxwellSlipUFvPatchVectorField::write(Ostream& os) const
|
|||||||
writeEntryIfDifferent<word>(os, "mu", "thermo:mu", muName_);
|
writeEntryIfDifferent<word>(os, "mu", "thermo:mu", muName_);
|
||||||
writeEntryIfDifferent<word>(os, "tauMC", "tauMC", tauMCName_);
|
writeEntryIfDifferent<word>(os, "tauMC", "tauMC", tauMCName_);
|
||||||
|
|
||||||
Foam::writeEntry(os, "accommodationCoeff", accommodationCoeff_);
|
writeEntry(os, "accommodationCoeff", accommodationCoeff_);
|
||||||
Uwall_.writeEntry("Uwall", os);
|
writeEntry(os, "Uwall", Uwall_);
|
||||||
Foam::writeEntry(os, "thermalCreep", thermalCreep_);
|
writeEntry(os, "thermalCreep", thermalCreep_);
|
||||||
Foam::writeEntry(os, "curvature", curvature_);
|
writeEntry(os, "curvature", curvature_);
|
||||||
|
|
||||||
refValue().writeEntry("refValue", os);
|
writeEntry(os, "refValue", refValue());
|
||||||
valueFraction().writeEntry("valueFraction", os);
|
writeEntry(os, "valueFraction", valueFraction());
|
||||||
|
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -188,8 +188,8 @@ template<class Type>
|
|||||||
void Foam::mixedFixedValueSlipFvPatchField<Type>::write(Ostream& os) const
|
void Foam::mixedFixedValueSlipFvPatchField<Type>::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
transformFvPatchField<Type>::write(os);
|
transformFvPatchField<Type>::write(os);
|
||||||
refValue_.writeEntry("refValue", os);
|
writeEntry(os, "refValue", refValue_);
|
||||||
valueFraction_.writeEntry("valueFraction", os);
|
writeEntry(os, "valueFraction", valueFraction_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -119,7 +119,7 @@ void Foam::fixedRhoFvPatchScalarField::write(Ostream& os) const
|
|||||||
|
|
||||||
writeEntryIfDifferent<word>(os, "p", "p", this->pName_);
|
writeEntryIfDifferent<word>(os, "p", "p", this->pName_);
|
||||||
writeEntryIfDifferent<word>(os, "psi", "thermo:psi", psiName_);
|
writeEntryIfDifferent<word>(os, "psi", "thermo:psi", psiName_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -108,7 +108,7 @@ void Foam::adjointOutletPressureFvPatchScalarField::updateCoeffs()
|
|||||||
void Foam::adjointOutletPressureFvPatchScalarField::write(Ostream& os) const
|
void Foam::adjointOutletPressureFvPatchScalarField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchScalarField::write(os);
|
fvPatchScalarField::write(os);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -109,7 +109,7 @@ void Foam::adjointOutletVelocityFvPatchVectorField::updateCoeffs()
|
|||||||
void Foam::adjointOutletVelocityFvPatchVectorField::write(Ostream& os) const
|
void Foam::adjointOutletVelocityFvPatchVectorField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchVectorField::write(os);
|
fvPatchVectorField::write(os);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -125,8 +125,8 @@ alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
|
|||||||
void alphaContactAngleFvPatchScalarField::write(Ostream& os) const
|
void alphaContactAngleFvPatchScalarField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchScalarField::write(os);
|
fvPatchScalarField::write(os);
|
||||||
Foam::writeEntry(os, "thetaProperties", thetaProps_);
|
writeEntry(os, "thetaProperties", thetaProps_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -125,8 +125,8 @@ alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
|
|||||||
void alphaContactAngleFvPatchScalarField::write(Ostream& os) const
|
void alphaContactAngleFvPatchScalarField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchScalarField::write(os);
|
fvPatchScalarField::write(os);
|
||||||
Foam::writeEntry(os, "thetaProperties", thetaProps_);
|
writeEntry(os, "thetaProperties", thetaProps_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -125,8 +125,8 @@ alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
|
|||||||
void alphaContactAngleFvPatchScalarField::write(Ostream& os) const
|
void alphaContactAngleFvPatchScalarField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchScalarField::write(os);
|
fvPatchScalarField::write(os);
|
||||||
Foam::writeEntry(os, "thetaProperties", thetaProps_);
|
writeEntry(os, "thetaProperties", thetaProps_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -191,12 +191,12 @@ void alphatFixedDmdtWallBoilingWallFunctionFvPatchScalarField::write
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
fvPatchField<scalar>::write(os);
|
fvPatchField<scalar>::write(os);
|
||||||
Foam::writeEntry(os, "vaporPhase", vaporPhaseName_);
|
writeEntry(os, "vaporPhase", vaporPhaseName_);
|
||||||
Foam::writeEntry(os, "relax", relax_);
|
writeEntry(os, "relax", relax_);
|
||||||
Foam::writeEntry(os, "fixedDmdt", fixedDmdt_);
|
writeEntry(os, "fixedDmdt", fixedDmdt_);
|
||||||
Foam::writeEntry(os, "L", L_);
|
writeEntry(os, "L", L_);
|
||||||
dmdt_.writeEntry("dmdt", os);
|
writeEntry(os, "dmdt", dmdt_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -323,12 +323,12 @@ void alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::write
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
fvPatchField<scalar>::write(os);
|
fvPatchField<scalar>::write(os);
|
||||||
Foam::writeEntry(os, "Prt", Prt_);
|
writeEntry(os, "Prt", Prt_);
|
||||||
Foam::writeEntry(os, "Cmu", Cmu_);
|
writeEntry(os, "Cmu", Cmu_);
|
||||||
Foam::writeEntry(os, "kappa", kappa_);
|
writeEntry(os, "kappa", kappa_);
|
||||||
Foam::writeEntry(os, "E", E_);
|
writeEntry(os, "E", E_);
|
||||||
dmdt_.writeEntry("dmdt", os);
|
writeEntry(os, "dmdt", dmdt_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2015-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -124,9 +124,9 @@ void alphatPhaseChangeWallFunctionFvPatchScalarField::
|
|||||||
write(Ostream& os) const
|
write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchField<scalar>::write(os);
|
fvPatchField<scalar>::write(os);
|
||||||
dmdt_.writeEntry("dmdt", os);
|
writeEntry(os, "dmdt", dmdt_);
|
||||||
mDotL_.writeEntry("mDotL", os);
|
writeEntry(os, "mDotL", mDotL_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -682,9 +682,9 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::write(Ostream& os) const
|
|||||||
{
|
{
|
||||||
fvPatchField<scalar>::write(os);
|
fvPatchField<scalar>::write(os);
|
||||||
|
|
||||||
Foam::writeEntry(os, "phaseType", phaseTypeNames_[phaseType_]);
|
writeEntry(os, "phaseType", phaseTypeNames_[phaseType_]);
|
||||||
|
|
||||||
Foam::writeEntry(os, "relax", relax_);
|
writeEntry(os, "relax", relax_);
|
||||||
|
|
||||||
switch (phaseType_)
|
switch (phaseType_)
|
||||||
{
|
{
|
||||||
@ -722,12 +722,12 @@ void alphatWallBoilingWallFunctionFvPatchScalarField::write(Ostream& os) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Foam::writeEntry(os, "otherPhase", otherPhaseName_);
|
writeEntry(os, "otherPhase", otherPhaseName_);
|
||||||
dmdt_.writeEntry("dmdt", os);
|
writeEntry(os, "dmdt", dmdt_);
|
||||||
dDep_.writeEntry("dDep", os);
|
writeEntry(os, "dDep", dDep_);
|
||||||
qq_.writeEntry("qQuenching", os);
|
writeEntry(os, "qQuenching", qq_);
|
||||||
alphatConv_.writeEntry("alphatConv", os);
|
writeEntry(os, "alphatConv", alphatConv_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -109,8 +109,8 @@ void Foam::copiedFixedValueFvPatchScalarField::updateCoeffs()
|
|||||||
void Foam::copiedFixedValueFvPatchScalarField::write(Ostream& os) const
|
void Foam::copiedFixedValueFvPatchScalarField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchField<scalar>::write(os);
|
fvPatchField<scalar>::write(os);
|
||||||
Foam::writeEntry(os, "sourceFieldName", sourceFieldName_);
|
writeEntry(os, "sourceFieldName", sourceFieldName_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -170,9 +170,9 @@ void Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::updateCoeffs()
|
|||||||
void Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::write(Ostream& os) const
|
void Foam::fixedMultiPhaseHeatFluxFvPatchScalarField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchField<scalar>::write(os);
|
fvPatchField<scalar>::write(os);
|
||||||
Foam::writeEntry(os, "relax", relax_);
|
writeEntry(os, "relax", relax_);
|
||||||
q_.writeEntry("q", os);
|
writeEntry(os, "q", q_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -125,8 +125,8 @@ alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
|
|||||||
void alphaContactAngleFvPatchScalarField::write(Ostream& os) const
|
void alphaContactAngleFvPatchScalarField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchScalarField::write(os);
|
fvPatchScalarField::write(os);
|
||||||
Foam::writeEntry(os, "thetaProperties", thetaProps_);
|
writeEntry(os, "thetaProperties", thetaProps_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -245,8 +245,8 @@ void Foam::JohnsonJacksonParticleSlipFvPatchVectorField::write
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
fvPatchVectorField::write(os);
|
fvPatchVectorField::write(os);
|
||||||
Foam::writeEntry(os, "specularityCoefficient", specularityCoefficient_);
|
writeEntry(os, "specularityCoefficient", specularityCoefficient_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -289,9 +289,9 @@ void Foam::JohnsonJacksonParticleThetaFvPatchScalarField::write
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
fvPatchScalarField::write(os);
|
fvPatchScalarField::write(os);
|
||||||
Foam::writeEntry(os, "restitutionCoefficient", restitutionCoefficient_);
|
writeEntry(os, "restitutionCoefficient", restitutionCoefficient_);
|
||||||
Foam::writeEntry(os, "specularityCoefficient", specularityCoefficient_);
|
writeEntry(os, "specularityCoefficient", specularityCoefficient_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -245,8 +245,8 @@ void Foam::JohnsonJacksonParticleSlipFvPatchVectorField::write
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
fvPatchVectorField::write(os);
|
fvPatchVectorField::write(os);
|
||||||
Foam::writeEntry(os, "specularityCoefficient", specularityCoefficient_);
|
writeEntry(os, "specularityCoefficient", specularityCoefficient_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -289,9 +289,9 @@ void Foam::JohnsonJacksonParticleThetaFvPatchScalarField::write
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
fvPatchScalarField::write(os);
|
fvPatchScalarField::write(os);
|
||||||
Foam::writeEntry(os, "restitutionCoefficient", restitutionCoefficient_);
|
writeEntry(os, "restitutionCoefficient", restitutionCoefficient_);
|
||||||
Foam::writeEntry(os, "specularityCoefficient", specularityCoefficient_);
|
writeEntry(os, "specularityCoefficient", specularityCoefficient_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -125,10 +125,10 @@ void Foam::hydrostaticDisplacementFvPatchVectorField::updateCoeffs()
|
|||||||
void Foam::hydrostaticDisplacementFvPatchVectorField::write(Ostream& os) const
|
void Foam::hydrostaticDisplacementFvPatchVectorField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchVectorField::write(os);
|
fvPatchVectorField::write(os);
|
||||||
Foam::writeEntry(os, "rhoLiquid", rhoLiquid_);
|
writeEntry(os, "rhoLiquid", rhoLiquid_);
|
||||||
Foam::writeEntry(os, "liquidSurfacePressure", liquidSurfacePressure_);
|
writeEntry(os, "liquidSurfacePressure", liquidSurfacePressure_);
|
||||||
Foam::writeEntry(os, "liquidSurfacePoint", liquidSurfacePoint_);
|
writeEntry(os, "liquidSurfacePoint", liquidSurfacePoint_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -200,9 +200,9 @@ void Foam::tractionDisplacementFvPatchVectorField::updateCoeffs()
|
|||||||
void Foam::tractionDisplacementFvPatchVectorField::write(Ostream& os) const
|
void Foam::tractionDisplacementFvPatchVectorField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchVectorField::write(os);
|
fvPatchVectorField::write(os);
|
||||||
traction_.writeEntry("traction", os);
|
writeEntry(os, "traction", traction_);
|
||||||
pressure_.writeEntry("pressure", os);
|
writeEntry(os, "pressure", pressure_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -187,13 +187,12 @@ void tractionDisplacementCorrectionFvPatchVectorField::updateCoeffs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Write
|
|
||||||
void tractionDisplacementCorrectionFvPatchVectorField::write(Ostream& os) const
|
void tractionDisplacementCorrectionFvPatchVectorField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchVectorField::write(os);
|
fvPatchVectorField::write(os);
|
||||||
traction_.writeEntry("traction", os);
|
writeEntry(os, "traction", traction_);
|
||||||
pressure_.writeEntry("pressure", os);
|
writeEntry(os, "pressure", pressure_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -198,7 +198,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
list4.write(Info, true) << endl;
|
list4.write(Info, true) << endl;
|
||||||
|
|
||||||
list4.writeEntry("PackedBoolList", Info);
|
writeEntry(Info, "PackedBoolList", list4);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -54,8 +54,6 @@ int main(int argc, char *argv[])
|
|||||||
autoPtr<tabulatedWallFunctions::tabulatedWallFunction>
|
autoPtr<tabulatedWallFunctions::tabulatedWallFunction>
|
||||||
twf(tabulatedWallFunctions::tabulatedWallFunction::New(dict, mesh));
|
twf(tabulatedWallFunctions::tabulatedWallFunction::New(dict, mesh));
|
||||||
|
|
||||||
// twf->writeData(Info);
|
|
||||||
|
|
||||||
twf->write();
|
twf->write();
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|||||||
@ -27,6 +27,11 @@ cyclicSlip
|
|||||||
type cyclicSlip;
|
type cyclicSlip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
conformalCoupled
|
||||||
|
{
|
||||||
|
type conformalCoupled;
|
||||||
|
}
|
||||||
|
|
||||||
empty
|
empty
|
||||||
{
|
{
|
||||||
type empty;
|
type empty;
|
||||||
|
|||||||
@ -220,12 +220,12 @@ void Foam::CLASS::write
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
FVPATCHF::write(os);
|
FVPATCHF::write(os);
|
||||||
Foam::writeEntry(os, "scalarData", scalarData_);
|
writeEntry(os, "scalarData", scalarData_);
|
||||||
Foam::writeEntry(os, "data", data_);
|
writeEntry(os, "data", data_);
|
||||||
fieldData_.writeEntry("fieldData", os);
|
writeEntry(os, "fieldData", fieldData_);
|
||||||
timeVsData_->writeData(os);
|
writeEntry(os, timeVsData_());
|
||||||
Foam::writeEntry(os, "wordData", wordData_);
|
writeEntry(os, "wordData", wordData_);
|
||||||
this->writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -66,6 +66,9 @@ template<class T, class Key, class Hash> class HashPtrTable;
|
|||||||
template<class Type1, class Type2>
|
template<class Type1, class Type2>
|
||||||
class Tuple2;
|
class Tuple2;
|
||||||
|
|
||||||
|
template<class T, class Key, class Hash>
|
||||||
|
void writeEntry(Ostream& os, const HashTable<T, Key, Hash>& ht);
|
||||||
|
|
||||||
template<class T, class Key, class Hash>
|
template<class T, class Key, class Hash>
|
||||||
Istream& operator>>(Istream&, HashTable<T, Key, Hash>&);
|
Istream& operator>>(Istream&, HashTable<T, Key, Hash>&);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -90,6 +90,15 @@ Foam::HashTable<T, Key, Hash>::printInfo(Ostream& os) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * IOstream Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class T, class Key, class Hash>
|
||||||
|
void Foam::writeEntry(Ostream& os, const HashTable<T, Key, Hash>& ht)
|
||||||
|
{
|
||||||
|
os << ht;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class T, class Key, class Hash>
|
template<class T, class Key, class Hash>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -54,6 +54,9 @@ namespace Foam
|
|||||||
|
|
||||||
template<class T, unsigned Size> class FixedList;
|
template<class T, unsigned Size> class FixedList;
|
||||||
|
|
||||||
|
template<class T, unsigned Size>
|
||||||
|
void writeEntry(Ostream& os, const FixedList<T, Size>&);
|
||||||
|
|
||||||
template<class T, unsigned Size>
|
template<class T, unsigned Size>
|
||||||
Istream& operator>>(Istream&, FixedList<T, Size>&);
|
Istream& operator>>(Istream&, FixedList<T, Size>&);
|
||||||
|
|
||||||
@ -207,12 +210,6 @@ public:
|
|||||||
// needed to make FixedList consistent with List
|
// needed to make FixedList consistent with List
|
||||||
void transfer(const FixedList<T, Size>&);
|
void transfer(const FixedList<T, Size>&);
|
||||||
|
|
||||||
//- Write the FixedList as a dictionary entry
|
|
||||||
void writeEntry(Ostream&) const;
|
|
||||||
|
|
||||||
//- Write the FixedList as a dictionary entry with keyword
|
|
||||||
void writeEntry(const word& keyword, Ostream&) const;
|
|
||||||
|
|
||||||
|
|
||||||
// Member operators
|
// Member operators
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -29,6 +29,15 @@ License
|
|||||||
#include "token.H"
|
#include "token.H"
|
||||||
#include "contiguous.H"
|
#include "contiguous.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * IOstream Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class T, unsigned Size>
|
||||||
|
void Foam::writeEntry(Ostream& os, const FixedList<T, Size>& l)
|
||||||
|
{
|
||||||
|
writeListEntry(os, l);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class T, unsigned Size>
|
template<class T, unsigned Size>
|
||||||
@ -133,34 +142,6 @@ Foam::Istream& Foam::operator>>(Foam::Istream& is, FixedList<T, Size>& L)
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class T, unsigned Size>
|
|
||||||
void Foam::FixedList<T, Size>::writeEntry(Ostream& os) const
|
|
||||||
{
|
|
||||||
if
|
|
||||||
(
|
|
||||||
token::compound::isCompound("List<" + word(pTraits<T>::typeName) + '>')
|
|
||||||
)
|
|
||||||
{
|
|
||||||
os << word("List<" + word(pTraits<T>::typeName) + '>') << " ";
|
|
||||||
}
|
|
||||||
|
|
||||||
os << *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T, unsigned Size>
|
|
||||||
void Foam::FixedList<T, Size>::writeEntry
|
|
||||||
(
|
|
||||||
const word& keyword,
|
|
||||||
Ostream& os
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
os.writeKeyword(keyword);
|
|
||||||
writeEntry(os);
|
|
||||||
os << token::END_STATEMENT << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T, unsigned Size>
|
template<class T, unsigned Size>
|
||||||
Foam::Ostream& Foam::operator<<(Ostream& os, const FixedList<T, Size>& L)
|
Foam::Ostream& Foam::operator<<(Ostream& os, const FixedList<T, Size>& L)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -490,26 +490,6 @@ Foam::Ostream& Foam::PackedList<nBits>::write
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<unsigned nBits>
|
|
||||||
void Foam::PackedList<nBits>::writeEntry(Ostream& os) const
|
|
||||||
{
|
|
||||||
os << *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<unsigned nBits>
|
|
||||||
void Foam::PackedList<nBits>::writeEntry
|
|
||||||
(
|
|
||||||
const word& keyword,
|
|
||||||
Ostream& os
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
os.writeKeyword(keyword);
|
|
||||||
writeEntry(os);
|
|
||||||
os << token::END_STATEMENT << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<unsigned nBits>
|
template<unsigned nBits>
|
||||||
@ -546,6 +526,15 @@ void Foam::PackedList<nBits>::operator=(const UIndirectList<label>& lst)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * IOstream Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<unsigned nBits>
|
||||||
|
void Foam::writeEntry(Ostream& os, const PackedList<nBits>& l)
|
||||||
|
{
|
||||||
|
os << l;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<unsigned nBits>
|
template<unsigned nBits>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -117,8 +117,12 @@ class Ostream;
|
|||||||
// Forward declaration of friend functions and operators
|
// Forward declaration of friend functions and operators
|
||||||
template<unsigned nBits> class PackedList;
|
template<unsigned nBits> class PackedList;
|
||||||
|
|
||||||
|
template<unsigned nBits>
|
||||||
|
void writeEntry(Ostream& os, const PackedList<nBits>&);
|
||||||
|
|
||||||
template<unsigned nBits>
|
template<unsigned nBits>
|
||||||
Istream& operator>>(Istream&, PackedList<nBits>&);
|
Istream& operator>>(Istream&, PackedList<nBits>&);
|
||||||
|
|
||||||
template<unsigned nBits>
|
template<unsigned nBits>
|
||||||
Ostream& operator<<(Ostream&, const PackedList<nBits>&);
|
Ostream& operator<<(Ostream&, const PackedList<nBits>&);
|
||||||
|
|
||||||
@ -377,13 +381,6 @@ public:
|
|||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
|
||||||
//- Write as a dictionary entry
|
|
||||||
void writeEntry(Ostream&) const;
|
|
||||||
|
|
||||||
//- Write as a dictionary entry with keyword
|
|
||||||
void writeEntry(const word& keyword, Ostream&) const;
|
|
||||||
|
|
||||||
|
|
||||||
// Member operators
|
// Member operators
|
||||||
|
|
||||||
//- Append a value at the end of the list
|
//- Append a value at the end of the list
|
||||||
|
|||||||
@ -59,11 +59,13 @@ template<class T> class SubList;
|
|||||||
|
|
||||||
// Forward declaration of friend functions and operators
|
// Forward declaration of friend functions and operators
|
||||||
template<class T> class UList;
|
template<class T> class UList;
|
||||||
|
template<class T> void writeEntry(Ostream& os, const UList<T>&);
|
||||||
template<class T> Ostream& operator<<(Ostream&, const UList<T>&);
|
template<class T> Ostream& operator<<(Ostream&, const UList<T>&);
|
||||||
template<class T> Istream& operator>>(Istream&, UList<T>&);
|
template<class T> Istream& operator>>(Istream&, UList<T>&);
|
||||||
|
|
||||||
typedef UList<label> labelUList;
|
typedef UList<label> labelUList;
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class UList Declaration
|
Class UList Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -221,21 +223,6 @@ public:
|
|||||||
void deepCopy(const UList<T>&);
|
void deepCopy(const UList<T>&);
|
||||||
|
|
||||||
|
|
||||||
// Write
|
|
||||||
|
|
||||||
//- Write the UList as a dictionary entry
|
|
||||||
void writeEntry(Ostream&) const;
|
|
||||||
|
|
||||||
//- Write the UList as a dictionary entry with keyword
|
|
||||||
void writeEntry(const word& keyword, Ostream&) const;
|
|
||||||
|
|
||||||
//- Write the UList as a dictionary entry
|
|
||||||
void writeEntryList(Ostream&) const;
|
|
||||||
|
|
||||||
//- Write the UList as a dictionary entry with keyword
|
|
||||||
void writeEntryList(const word& keyword, Ostream&) const;
|
|
||||||
|
|
||||||
|
|
||||||
// Member operators
|
// Member operators
|
||||||
|
|
||||||
//- Return element of UList
|
//- Return element of UList
|
||||||
@ -416,6 +403,15 @@ inline void reverse(UList<T>&, const label n);
|
|||||||
template<class T>
|
template<class T>
|
||||||
inline void reverse(UList<T>&);
|
inline void reverse(UList<T>&);
|
||||||
|
|
||||||
|
template<class ListType>
|
||||||
|
void writeListEntry(Ostream& os, const ListType& l);
|
||||||
|
|
||||||
|
template<class ListType>
|
||||||
|
void writeListEntries(Ostream& os, const ListType& l);
|
||||||
|
|
||||||
|
template<class ListType>
|
||||||
|
void writeListEntries(Ostream& os, const word& keyword, const ListType& l);
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -29,46 +29,42 @@ License
|
|||||||
#include "SLList.H"
|
#include "SLList.H"
|
||||||
#include "contiguous.H"
|
#include "contiguous.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * IOstream Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class T>
|
template<class ListType>
|
||||||
void Foam::UList<T>::writeEntry(Ostream& os) const
|
void Foam::writeListEntry(Ostream& os, const ListType& l)
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
size()
|
l.size()
|
||||||
&& token::compound::isCompound
|
&& token::compound::isCompound
|
||||||
(
|
(
|
||||||
"List<" + word(pTraits<T>::typeName) + '>'
|
"List<"
|
||||||
|
+ word(pTraits<typename ListType::value_type>::typeName) + '>'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
os << word("List<" + word(pTraits<T>::typeName) + '>') << " ";
|
os << word
|
||||||
|
(
|
||||||
|
"List<"
|
||||||
|
+ word(pTraits<typename ListType::value_type>::typeName) + '>'
|
||||||
|
) << " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
os << *this;
|
os << l;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
template<class ListType>
|
||||||
void Foam::UList<T>::writeEntry(const word& keyword, Ostream& os) const
|
void Foam::writeListEntries(Ostream& os, const ListType& l)
|
||||||
{
|
|
||||||
os.writeKeyword(keyword);
|
|
||||||
writeEntry(os);
|
|
||||||
os << token::END_STATEMENT << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
void Foam::UList<T>::writeEntryList(Ostream& os) const
|
|
||||||
{
|
{
|
||||||
// Write size and start delimiter
|
// Write size and start delimiter
|
||||||
os << nl << size() << nl << token::BEGIN_LIST;
|
os << nl << l.size() << nl << token::BEGIN_LIST;
|
||||||
|
|
||||||
// Write contents
|
// Write contents
|
||||||
forAll(*this, i)
|
forAll(l, i)
|
||||||
{
|
{
|
||||||
this->operator[](i).writeEntry(os);
|
writeEntry(os, l[i]);
|
||||||
os << nl;
|
os << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,15 +73,22 @@ void Foam::UList<T>::writeEntryList(Ostream& os) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
template<class ListType>
|
||||||
void Foam::UList<T>::writeEntryList(const word& keyword, Ostream& os) const
|
void Foam::writeListEntries(Ostream& os, const word& keyword, const ListType& l)
|
||||||
{
|
{
|
||||||
os.writeKeyword(keyword);
|
os.writeKeyword(keyword);
|
||||||
writeEntryList(os);
|
writeListEntries(os, l);
|
||||||
os << token::END_STATEMENT << endl;
|
os << token::END_STATEMENT << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
void Foam::writeEntry(Ostream& os, const UList<T>& l)
|
||||||
|
{
|
||||||
|
writeListEntry(os, l);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
|
|||||||
@ -53,12 +53,9 @@ template<class T> class PtrList;
|
|||||||
|
|
||||||
// Forward declaration of friend functions and operators
|
// Forward declaration of friend functions and operators
|
||||||
template<class T> class UPtrList;
|
template<class T> class UPtrList;
|
||||||
|
template<class T> void writeEntry(Ostream& os, const UPtrList<T>&);
|
||||||
template<class T>
|
template<class T> Istream& operator>>(Istream&, UPtrList<T>&);
|
||||||
Istream& operator>>(Istream&, UPtrList<T>&);
|
template<class T> Ostream& operator<<(Ostream&, const UPtrList<T>&);
|
||||||
|
|
||||||
template<class T>
|
|
||||||
Ostream& operator<<(Ostream&, const UPtrList<T>&);
|
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
@ -154,21 +151,6 @@ public:
|
|||||||
void reorder(const labelUList&);
|
void reorder(const labelUList&);
|
||||||
|
|
||||||
|
|
||||||
// Write
|
|
||||||
|
|
||||||
//- Write the UPtrList as a dictionary entry
|
|
||||||
void writeEntry(Ostream&) const;
|
|
||||||
|
|
||||||
//- Write the UPtrList as a dictionary entry with keyword
|
|
||||||
void writeEntry(const word& keyword, Ostream&) const;
|
|
||||||
|
|
||||||
//- Write the UPtrList as a dictionary entry
|
|
||||||
void writeEntryList(Ostream&) const;
|
|
||||||
|
|
||||||
//- Write the UPtrList as a dictionary entry with keyword
|
|
||||||
void writeEntryList(const word& keyword, Ostream&) const;
|
|
||||||
|
|
||||||
|
|
||||||
// Member operators
|
// Member operators
|
||||||
|
|
||||||
//- Return element const reference
|
//- Return element const reference
|
||||||
|
|||||||
@ -26,60 +26,12 @@ License
|
|||||||
#include "UPtrList.H"
|
#include "UPtrList.H"
|
||||||
#include "Ostream.H"
|
#include "Ostream.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * IOstream Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
void Foam::UPtrList<T>::writeEntry(Ostream& os) const
|
void Foam::writeEntry(Ostream& os, const UPtrList<T>& l)
|
||||||
{
|
{
|
||||||
if
|
writeListEntry(os, l);
|
||||||
(
|
|
||||||
size()
|
|
||||||
&& token::compound::isCompound
|
|
||||||
(
|
|
||||||
"List<" + word(pTraits<T>::typeName) + '>'
|
|
||||||
)
|
|
||||||
)
|
|
||||||
{
|
|
||||||
os << word("List<" + word(pTraits<T>::typeName) + '>') << " ";
|
|
||||||
}
|
|
||||||
|
|
||||||
os << *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
void Foam::UPtrList<T>::writeEntry(const word& keyword, Ostream& os) const
|
|
||||||
{
|
|
||||||
os.writeKeyword(keyword);
|
|
||||||
writeEntry(os);
|
|
||||||
os << token::END_STATEMENT << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
void Foam::UPtrList<T>::writeEntryList(Ostream& os) const
|
|
||||||
{
|
|
||||||
// Write size and start delimiter
|
|
||||||
os << nl << size() << nl << token::BEGIN_LIST;
|
|
||||||
|
|
||||||
// Write contents
|
|
||||||
forAll(*this, i)
|
|
||||||
{
|
|
||||||
this->operator[](i).writeEntry(os);
|
|
||||||
os << nl;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Write end delimiter
|
|
||||||
os << nl << token::END_LIST << nl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
|
||||||
void Foam::UPtrList<T>::writeEntryList(const word& keyword, Ostream& os) const
|
|
||||||
{
|
|
||||||
os.writeKeyword(keyword);
|
|
||||||
writeEntryList(os);
|
|
||||||
os << token::END_STATEMENT << endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -130,40 +130,6 @@ Foam::ListCompactIO<T, BaseType>::ListCompactIO(Istream& is)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class T, class BaseType>
|
|
||||||
void Foam::ListCompactIO<T, BaseType>::writeEntry(Ostream& os) const
|
|
||||||
{
|
|
||||||
// Keep ascii writing same.
|
|
||||||
if (os.format() == IOstream::ASCII)
|
|
||||||
{
|
|
||||||
os << static_cast<const List<T>&>(*this);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
labelList start;
|
|
||||||
List<BaseType> elems;
|
|
||||||
convertToCompact(start, elems);
|
|
||||||
start.writeEntry(os);
|
|
||||||
elems.writeEntry(os);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class T, class BaseType>
|
|
||||||
void Foam::ListCompactIO<T, BaseType>::writeEntry
|
|
||||||
(
|
|
||||||
const word& keyword,
|
|
||||||
Ostream& os
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
os.writeKeyword(keyword);
|
|
||||||
writeEntry(os);
|
|
||||||
os << token::END_STATEMENT << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class T, class BaseType>
|
template<class T, class BaseType>
|
||||||
@ -183,6 +149,27 @@ void Foam::ListCompactIO<T, BaseType>::operator=(const List<T>& rhs)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class T, class BaseType>
|
||||||
|
void Foam::writeEntry(Ostream& os, const ListCompactIO<T, BaseType>& l)
|
||||||
|
{
|
||||||
|
// Keep ascii writing same.
|
||||||
|
if (os.format() == IOstream::ASCII)
|
||||||
|
{
|
||||||
|
os << static_cast<const List<T>&>(l);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
labelList start;
|
||||||
|
List<BaseType> elems;
|
||||||
|
l.convertToCompact(start, elems);
|
||||||
|
writeEntry(os, start);
|
||||||
|
writeEntry(os, elems);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class T, class BaseType>
|
template<class T, class BaseType>
|
||||||
|
|||||||
@ -52,17 +52,22 @@ class Ostream;
|
|||||||
// Forward declaration of friend functions and operators
|
// Forward declaration of friend functions and operators
|
||||||
template<class T, class BaseType> class ListCompactIO;
|
template<class T, class BaseType> class ListCompactIO;
|
||||||
|
|
||||||
|
template<class T, class BaseType>
|
||||||
|
void writeEntry(Ostream& os, const ListCompactIO<T, BaseType>& l);
|
||||||
|
|
||||||
template<class T, class BaseType> Istream& operator>>
|
template<class T, class BaseType> Istream& operator>>
|
||||||
(
|
(
|
||||||
Istream&,
|
Istream&,
|
||||||
ListCompactIO<T, BaseType>&
|
ListCompactIO<T, BaseType>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class T, class BaseType> Ostream& operator<<
|
template<class T, class BaseType> Ostream& operator<<
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const ListCompactIO<T, BaseType>&
|
const ListCompactIO<T, BaseType>&
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class ListCompactIO Declaration
|
Class ListCompactIO Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -106,16 +111,6 @@ public:
|
|||||||
ListCompactIO(Istream&);
|
ListCompactIO(Istream&);
|
||||||
|
|
||||||
|
|
||||||
// Member functions
|
|
||||||
|
|
||||||
//- Write the list in compact form as a dictionary entry to Ostream
|
|
||||||
void writeEntry(Ostream& os) const;
|
|
||||||
|
|
||||||
//- Write the list in compact form as a dictionary entry with keyword
|
|
||||||
// to Ostream
|
|
||||||
void writeEntry(const word& keyword, Ostream& os) const;
|
|
||||||
|
|
||||||
|
|
||||||
// Member operators
|
// Member operators
|
||||||
|
|
||||||
void operator=(const ListCompactIO<T, BaseType>&);
|
void operator=(const ListCompactIO<T, BaseType>&);
|
||||||
@ -123,6 +118,15 @@ public:
|
|||||||
void operator=(const List<T>&);
|
void operator=(const List<T>&);
|
||||||
|
|
||||||
|
|
||||||
|
// IOstream functions
|
||||||
|
|
||||||
|
friend void writeEntry <T, BaseType>
|
||||||
|
(
|
||||||
|
Ostream& os,
|
||||||
|
const ListCompactIO<T, BaseType>& l
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
// IOstream operators
|
// IOstream operators
|
||||||
|
|
||||||
//- Read List from Istream, discarding contents of existing List.
|
//- Read List from Istream, discarding contents of existing List.
|
||||||
|
|||||||
@ -59,6 +59,8 @@ SourceFiles
|
|||||||
#include "wordList.H"
|
#include "wordList.H"
|
||||||
#include "className.H"
|
#include "className.H"
|
||||||
|
|
||||||
|
#include "VectorSpace.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
@ -586,15 +588,14 @@ dictionary operator+(const dictionary& dict1, const dictionary& dict2);
|
|||||||
dictionary operator|(const dictionary& dict1, const dictionary& dict2);
|
dictionary operator|(const dictionary& dict1, const dictionary& dict2);
|
||||||
|
|
||||||
|
|
||||||
|
// Global Functions
|
||||||
|
|
||||||
|
//- Write a dictionary entry
|
||||||
|
void writeEntry(Ostream& os, const dictionary& dict);
|
||||||
|
|
||||||
//- Helper function to write the keyword and entry
|
//- Helper function to write the keyword and entry
|
||||||
template<class EntryType>
|
template<class EntryType>
|
||||||
void writeEntry
|
void writeEntry(Ostream& os, const word& entryName, const EntryType& value);
|
||||||
(
|
|
||||||
Ostream& os,
|
|
||||||
const word& entryName,
|
|
||||||
const EntryType& value
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
//- Helper function to write the keyword and entry only if the
|
//- Helper function to write the keyword and entry only if the
|
||||||
// values are not equal. The value is then output as value2
|
// values are not equal. The value is then output as value2
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -152,6 +152,14 @@ bool Foam::dictionary::substituteKeyword(const word& keyword)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * IOstream Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::writeEntry(Ostream& os, const dictionary& value)
|
||||||
|
{
|
||||||
|
os << value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Istream Operator * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Istream Operator * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::Istream& Foam::operator>>(Istream& is, dictionary& dict)
|
Foam::Istream& Foam::operator>>(Istream& is, dictionary& dict)
|
||||||
|
|||||||
@ -158,6 +158,8 @@ void Foam::dictionary::set(const keyType& k, const T& t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * IOstream Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class EntryType>
|
template<class EntryType>
|
||||||
void Foam::writeEntry
|
void Foam::writeEntry
|
||||||
(
|
(
|
||||||
@ -166,7 +168,9 @@ void Foam::writeEntry
|
|||||||
const EntryType& value
|
const EntryType& value
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
os.writeKeyword(entryName) << value << token::END_STATEMENT << nl;
|
os.writeKeyword(entryName);
|
||||||
|
writeEntry(os, value);
|
||||||
|
os << token::END_STATEMENT << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -50,7 +50,7 @@ Description
|
|||||||
const IOdictionary& d = static_cast<const IOdictionary&>(dict);
|
const IOdictionary& d = static_cast<const IOdictionary&>(dict);
|
||||||
const fvMesh& mesh = refCast<const fvMesh>(d.db());
|
const fvMesh& mesh = refCast<const fvMesh>(d.db());
|
||||||
scalarField fld(mesh.nCells(), 12.34);
|
scalarField fld(mesh.nCells(), 12.34);
|
||||||
fld.writeEntry("", os);
|
writeEntry(os, "", fld);
|
||||||
#};
|
#};
|
||||||
|
|
||||||
//- Optional:
|
//- Optional:
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -430,6 +430,9 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void writeEntry(Ostream& os, const dimensionSet& value);
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -708,6 +708,12 @@ Foam::Ostream& Foam::dimensionSet::write
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::writeEntry(Ostream& os, const dimensionSet& value)
|
||||||
|
{
|
||||||
|
os << value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::Istream& Foam::operator>>(Istream& is, dimensionSet& dset)
|
Foam::Istream& Foam::operator>>(Istream& is, dimensionSet& dset)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -594,6 +594,15 @@ Foam::dimensioned<Type> Foam::min
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * IOstream Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void Foam::writeEntry(Ostream& os, const dimensioned<Type>& dt)
|
||||||
|
{
|
||||||
|
os << dt;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -229,6 +229,10 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void writeEntry(Ostream& os, const dimensioned<Type>& dt);
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type, direction r>
|
template<class Type, direction r>
|
||||||
|
|||||||
@ -110,7 +110,7 @@ bool Foam::DimensionedField<Type, GeoMesh>::writeData
|
|||||||
writeEntry(os, "dimensions", dimensions());
|
writeEntry(os, "dimensions", dimensions());
|
||||||
os << nl;
|
os << nl;
|
||||||
|
|
||||||
Field<Type>::writeEntry(fieldDictEntry, os);
|
writeEntry(os, fieldDictEntry, static_cast<const Field<Type>&>(*this));
|
||||||
|
|
||||||
// Check state of Ostream
|
// Check state of Ostream
|
||||||
os.check
|
os.check
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -720,42 +720,6 @@ Foam::tmp<Foam::Field<Type>> Foam::Field<Type>::T() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
void Foam::Field<Type>::writeEntry(const word& keyword, Ostream& os) const
|
|
||||||
{
|
|
||||||
os.writeKeyword(keyword);
|
|
||||||
|
|
||||||
bool uniform = false;
|
|
||||||
|
|
||||||
if (this->size() && contiguous<Type>())
|
|
||||||
{
|
|
||||||
uniform = true;
|
|
||||||
|
|
||||||
forAll(*this, i)
|
|
||||||
{
|
|
||||||
if (this->operator[](i) != this->operator[](0))
|
|
||||||
{
|
|
||||||
uniform = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (uniform)
|
|
||||||
{
|
|
||||||
os << "uniform " << this->operator[](0) << token::END_STATEMENT;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
os << "nonuniform ";
|
|
||||||
List<Type>::writeEntry(os);
|
|
||||||
os << token::END_STATEMENT;
|
|
||||||
}
|
|
||||||
|
|
||||||
os << endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -851,6 +815,39 @@ COMPUTED_ASSIGNMENT(scalar, /=)
|
|||||||
#undef COMPUTED_ASSIGNMENT
|
#undef COMPUTED_ASSIGNMENT
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * IOstream Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void Foam::writeEntry(Ostream& os, const Field<Type>& f)
|
||||||
|
{
|
||||||
|
bool uniform = false;
|
||||||
|
|
||||||
|
if (f.size() && contiguous<Type>())
|
||||||
|
{
|
||||||
|
uniform = true;
|
||||||
|
|
||||||
|
forAll(f, i)
|
||||||
|
{
|
||||||
|
if (f[i] != f[0])
|
||||||
|
{
|
||||||
|
uniform = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (uniform)
|
||||||
|
{
|
||||||
|
os << "uniform " << f[0];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
os << "nonuniform ";
|
||||||
|
writeEntry(os, static_cast<const List<Type>&>(f));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -61,6 +61,9 @@ class Field;
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
class SubField;
|
class SubField;
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void writeEntry(Ostream& os, const Field<Type>&);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Ostream& operator<<(Ostream&, const Field<Type>&);
|
Ostream& operator<<(Ostream&, const Field<Type>&);
|
||||||
|
|
||||||
@ -349,9 +352,6 @@ public:
|
|||||||
//- Return the field transpose (only defined for second rank tensors)
|
//- Return the field transpose (only defined for second rank tensors)
|
||||||
tmp<Field<Type>> T() const;
|
tmp<Field<Type>> T() const;
|
||||||
|
|
||||||
//- Write the field as a dictionary entry
|
|
||||||
void writeEntry(const word& keyword, Ostream& os) const;
|
|
||||||
|
|
||||||
|
|
||||||
// Member operators
|
// Member operators
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -179,7 +179,7 @@ template<class Type>
|
|||||||
void Foam::valuePointPatchField<Type>::write(Ostream& os) const
|
void Foam::valuePointPatchField<Type>::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
pointPatchField<Type>::write(os);
|
pointPatchField<Type>::write(os);
|
||||||
this->writeEntry("value", os);
|
writeEntry(os, "value", static_cast<const Field<Type>&>(*this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -285,7 +285,7 @@ Foam::codedFixedValuePointPatchField<Type>::redirectPatchField() const
|
|||||||
|
|
||||||
OStringStream os;
|
OStringStream os;
|
||||||
writeEntry(os, "type", name_);
|
writeEntry(os, "type", name_);
|
||||||
static_cast<const Field<Type>&>(*this).writeEntry("value", os);
|
writeEntry(os, "value", static_cast<const Field<Type>&>(*this));
|
||||||
IStringStream is(os.str());
|
IStringStream is(os.str());
|
||||||
dictionary dict(is);
|
dictionary dict(is);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -138,7 +138,7 @@ write(Ostream& os) const
|
|||||||
{
|
{
|
||||||
// Note: write value
|
// Note: write value
|
||||||
fixedValuePointPatchField<Type>::write(os);
|
fixedValuePointPatchField<Type>::write(os);
|
||||||
uniformValue_->writeData(os);
|
writeEntry(os, uniformValue_());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -122,23 +122,6 @@ void Foam::pointPatchField<Type>::write(Ostream& os) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
template<class EntryType>
|
|
||||||
void Foam::pointPatchField<Type>::writeEntryIfDifferent
|
|
||||||
(
|
|
||||||
Ostream& os,
|
|
||||||
const word& entryName,
|
|
||||||
const EntryType& value1,
|
|
||||||
const EntryType& value2
|
|
||||||
) const
|
|
||||||
{
|
|
||||||
if (value1 != value2)
|
|
||||||
{
|
|
||||||
writeEntry(os, entryName, value2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::tmp<Foam::Field<Type>>
|
Foam::tmp<Foam::Field<Type>>
|
||||||
Foam::pointPatchField<Type>::patchInternalField() const
|
Foam::pointPatchField<Type>::patchInternalField() const
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -436,17 +436,6 @@ public:
|
|||||||
//- Write
|
//- Write
|
||||||
virtual void write(Ostream&) const;
|
virtual void write(Ostream&) const;
|
||||||
|
|
||||||
//- Helper function to write the keyword and entry only if the
|
|
||||||
// values are not equal. The value is then output as value2
|
|
||||||
template<class EntryType>
|
|
||||||
void writeEntryIfDifferent
|
|
||||||
(
|
|
||||||
Ostream& os,
|
|
||||||
const word& entryName,
|
|
||||||
const EntryType& value1,
|
|
||||||
const EntryType& value2
|
|
||||||
) const;
|
|
||||||
|
|
||||||
|
|
||||||
// Member operators
|
// Member operators
|
||||||
|
|
||||||
|
|||||||
@ -354,16 +354,16 @@ void Foam::interpolationLookUpTable<Type>::write
|
|||||||
|
|
||||||
control.writeHeader(os);
|
control.writeHeader(os);
|
||||||
|
|
||||||
Foam::writeEntry(os, "fields", entries_);
|
writeEntry(os, "fields", entries_);
|
||||||
|
|
||||||
Foam::writeEntry(os, "output", output_);
|
writeEntry(os, "output", output_);
|
||||||
|
|
||||||
if (this->size() == 0)
|
if (this->size() == 0)
|
||||||
{
|
{
|
||||||
FatalErrorInFunction
|
FatalErrorInFunction
|
||||||
<< "table is empty" << nl << exit(FatalError);
|
<< "table is empty" << nl << exit(FatalError);
|
||||||
}
|
}
|
||||||
Foam::writeEntry(os, "values", *this);
|
writeEntry(os, "values", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -563,8 +563,8 @@ void Foam::coupledPolyPatch::write(Ostream& os) const
|
|||||||
polyPatch::write(os);
|
polyPatch::write(os);
|
||||||
// if (matchTolerance_ != defaultMatchTol_)
|
// if (matchTolerance_ != defaultMatchTol_)
|
||||||
{
|
{
|
||||||
Foam::writeEntry(os, "matchTolerance", matchTolerance_);
|
writeEntry(os, "matchTolerance", matchTolerance_);
|
||||||
Foam::writeEntry(os, "transform", transformTypeNames[transform_]);
|
writeEntry(os, "transform", transformTypeNames[transform_]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -120,10 +120,10 @@ Foam::genericPolyPatch::~genericPolyPatch()
|
|||||||
|
|
||||||
void Foam::genericPolyPatch::write(Ostream& os) const
|
void Foam::genericPolyPatch::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
Foam::writeEntry(os, "type", actualTypeName_);
|
writeEntry(os, "type", actualTypeName_);
|
||||||
patchIdentifier::write(os);
|
patchIdentifier::write(os);
|
||||||
Foam::writeEntry(os, "nFaces", size());
|
writeEntry(os, "nFaces", size());
|
||||||
Foam::writeEntry(os, "startFace", start());
|
writeEntry(os, "startFace", start());
|
||||||
|
|
||||||
forAllConstIter(dictionary, dict_, iter)
|
forAllConstIter(dictionary, dict_, iter)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1446,20 +1446,20 @@ void Foam::cyclicPolyPatch::write(Ostream& os) const
|
|||||||
coupledPolyPatch::write(os);
|
coupledPolyPatch::write(os);
|
||||||
if (!neighbPatchName_.empty())
|
if (!neighbPatchName_.empty())
|
||||||
{
|
{
|
||||||
Foam::writeEntry(os, "neighbourPatch", neighbPatchName_);
|
writeEntry(os, "neighbourPatch", neighbPatchName_);
|
||||||
}
|
}
|
||||||
coupleGroup_.write(os);
|
coupleGroup_.write(os);
|
||||||
switch (transform())
|
switch (transform())
|
||||||
{
|
{
|
||||||
case ROTATIONAL:
|
case ROTATIONAL:
|
||||||
{
|
{
|
||||||
Foam::writeEntry(os, "rotationAxis", rotationAxis_);
|
writeEntry(os, "rotationAxis", rotationAxis_);
|
||||||
Foam::writeEntry(os, "rotationCentre", rotationCentre_);
|
writeEntry(os, "rotationCentre", rotationCentre_);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TRANSLATIONAL:
|
case TRANSLATIONAL:
|
||||||
{
|
{
|
||||||
Foam::writeEntry(os, "separationVector", separationVector_);
|
writeEntry(os, "separationVector", separationVector_);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case NOORDERING:
|
case NOORDERING:
|
||||||
|
|||||||
@ -1219,24 +1219,24 @@ bool Foam::oldCyclicPolyPatch::order
|
|||||||
void Foam::oldCyclicPolyPatch::write(Ostream& os) const
|
void Foam::oldCyclicPolyPatch::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
// Replacement of polyPatch::write to write 'cyclic' instead of type():
|
// Replacement of polyPatch::write to write 'cyclic' instead of type():
|
||||||
Foam::writeEntry(os, "type", cyclicPolyPatch::typeName);
|
writeEntry(os, "type", cyclicPolyPatch::typeName);
|
||||||
patchIdentifier::write(os);
|
patchIdentifier::write(os);
|
||||||
Foam::writeEntry(os, "nFaces", size());
|
writeEntry(os, "nFaces", size());
|
||||||
Foam::writeEntry(os, "startFace", start());
|
writeEntry(os, "startFace", start());
|
||||||
|
|
||||||
|
|
||||||
Foam::writeEntry(os, "featureCos", featureCos_);
|
writeEntry(os, "featureCos", featureCos_);
|
||||||
switch (transform())
|
switch (transform())
|
||||||
{
|
{
|
||||||
case ROTATIONAL:
|
case ROTATIONAL:
|
||||||
{
|
{
|
||||||
Foam::writeEntry(os, "rotationAxis", rotationAxis_);
|
writeEntry(os, "rotationAxis", rotationAxis_);
|
||||||
Foam::writeEntry(os, "rotationCentre", rotationCentre_);
|
writeEntry(os, "rotationCentre", rotationCentre_);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TRANSLATIONAL:
|
case TRANSLATIONAL:
|
||||||
{
|
{
|
||||||
Foam::writeEntry(os, "separationVector", separationVector_);
|
writeEntry(os, "separationVector", separationVector_);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|||||||
@ -1112,8 +1112,8 @@ bool Foam::processorPolyPatch::order
|
|||||||
void Foam::processorPolyPatch::write(Ostream& os) const
|
void Foam::processorPolyPatch::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
coupledPolyPatch::write(os);
|
coupledPolyPatch::write(os);
|
||||||
Foam::writeEntry(os, "myProcNo", myProcNo_);
|
writeEntry(os, "myProcNo", myProcNo_);
|
||||||
Foam::writeEntry(os, "neighbProcNo", neighbProcNo_);
|
writeEntry(os, "neighbProcNo", neighbProcNo_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -337,10 +337,10 @@ bool Foam::processorCyclicPolyPatch::order
|
|||||||
void Foam::processorCyclicPolyPatch::write(Ostream& os) const
|
void Foam::processorCyclicPolyPatch::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
processorPolyPatch::write(os);
|
processorPolyPatch::write(os);
|
||||||
Foam::writeEntry(os, "referPatch", referPatchName_);
|
writeEntry(os, "referPatch", referPatchName_);
|
||||||
if (tag_ != -1)
|
if (tag_ != -1)
|
||||||
{
|
{
|
||||||
Foam::writeEntry(os, "tag", tag_);
|
writeEntry(os, "tag", tag_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -356,10 +356,10 @@ void Foam::polyPatch::clearAddressing()
|
|||||||
|
|
||||||
void Foam::polyPatch::write(Ostream& os) const
|
void Foam::polyPatch::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
Foam::writeEntry(os, "type", type());
|
writeEntry(os, "type", type());
|
||||||
patchIdentifier::write(os);
|
patchIdentifier::write(os);
|
||||||
Foam::writeEntry(os, "nFaces", size());
|
writeEntry(os, "nFaces", size());
|
||||||
Foam::writeEntry(os, "startFace", start());
|
writeEntry(os, "startFace", start());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -139,7 +139,7 @@ void Foam::cellZone::writeDict(Ostream& os) const
|
|||||||
os << nl << name() << nl << token::BEGIN_BLOCK << nl
|
os << nl << name() << nl << token::BEGIN_BLOCK << nl
|
||||||
<< " type " << type() << token::END_STATEMENT << nl;
|
<< " type " << type() << token::END_STATEMENT << nl;
|
||||||
|
|
||||||
writeEntry(this->labelsName, os);
|
writeEntry(os, this->labelsName, *this);
|
||||||
|
|
||||||
os << token::END_BLOCK << endl;
|
os << token::END_BLOCK << endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -532,8 +532,8 @@ void Foam::faceZone::writeDict(Ostream& os) const
|
|||||||
os << nl << name() << nl << token::BEGIN_BLOCK << nl
|
os << nl << name() << nl << token::BEGIN_BLOCK << nl
|
||||||
<< " type " << type() << token::END_STATEMENT << nl;
|
<< " type " << type() << token::END_STATEMENT << nl;
|
||||||
|
|
||||||
writeEntry(this->labelsName, os);
|
writeEntry(os, this->labelsName, *this);
|
||||||
flipMap().writeEntry("flipMap", os);
|
writeEntry(os, "flipMap", flipMap());
|
||||||
|
|
||||||
os << token::END_BLOCK << endl;
|
os << token::END_BLOCK << endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -191,7 +191,7 @@ void Foam::pointZone::writeDict(Ostream& os) const
|
|||||||
os << nl << name_ << nl << token::BEGIN_BLOCK << nl
|
os << nl << name_ << nl << token::BEGIN_BLOCK << nl
|
||||||
<< " type " << type() << token::END_STATEMENT << nl;
|
<< " type " << type() << token::END_STATEMENT << nl;
|
||||||
|
|
||||||
writeEntry(this->labelsName, os);
|
writeEntry(os, this->labelsName, *this);
|
||||||
|
|
||||||
os << token::END_BLOCK << endl;
|
os << token::END_BLOCK << endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -62,7 +62,7 @@ word name(const Scalar val)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * IOstream Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
Scalar readScalar(Istream& is)
|
Scalar readScalar(Istream& is)
|
||||||
{
|
{
|
||||||
@ -73,6 +73,14 @@ Scalar readScalar(Istream& is)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void writeEntry(Ostream& os, const Scalar value)
|
||||||
|
{
|
||||||
|
os << value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||||
|
|
||||||
Istream& operator>>(Istream& is, Scalar& s)
|
Istream& operator>>(Istream& is, Scalar& s)
|
||||||
{
|
{
|
||||||
token t(is);
|
token t(is);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -362,9 +362,15 @@ inline Scalar stabilise(const Scalar s, const Scalar small)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * IOstream Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
Scalar readScalar(Istream&);
|
Scalar readScalar(Istream&);
|
||||||
|
|
||||||
|
void writeEntry(Ostream& os, const Scalar value);
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||||
|
|
||||||
Istream& operator>>(Istream&, Scalar&);
|
Istream& operator>>(Istream&, Scalar&);
|
||||||
Ostream& operator<<(Ostream&, const Scalar);
|
Ostream& operator<<(Ostream&, const Scalar);
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -69,6 +69,11 @@ class Tuple2
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
// Static data members
|
||||||
|
|
||||||
|
static const char* const typeName;
|
||||||
|
|
||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- Null constructor for lists
|
//- Null constructor for lists
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -73,6 +73,15 @@ Foam::word Foam::name
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * IOstream Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Form, class Cmpt, Foam::direction Ncmpts>
|
||||||
|
void Foam::writeEntry(Ostream& os, const VectorSpace<Form, Cmpt, Ncmpts>& value)
|
||||||
|
{
|
||||||
|
os << value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Form, class Cmpt, Foam::direction Ncmpts>
|
template<class Form, class Cmpt, Foam::direction Ncmpts>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -53,6 +53,9 @@ namespace Foam
|
|||||||
|
|
||||||
template<class Form, class Cmpt, direction Ncmpts> class VectorSpace;
|
template<class Form, class Cmpt, direction Ncmpts> class VectorSpace;
|
||||||
|
|
||||||
|
template<class Form, class Cmpt, direction Ncmpts>
|
||||||
|
void writeEntry(Ostream& os, const VectorSpace<Form, Cmpt, Ncmpts>& value);
|
||||||
|
|
||||||
template<class Form, class Cmpt, direction Ncmpts>
|
template<class Form, class Cmpt, direction Ncmpts>
|
||||||
Istream& operator>>
|
Istream& operator>>
|
||||||
(
|
(
|
||||||
|
|||||||
@ -271,7 +271,7 @@ void Foam::Function1Types::CSV<Type>::writeData(Ostream& os) const
|
|||||||
|
|
||||||
writeEntry(os, "nHeaderLine", nHeaderLine_);
|
writeEntry(os, "nHeaderLine", nHeaderLine_);
|
||||||
writeEntry(os, "refColumn", refColumn_);
|
writeEntry(os, "refColumn", refColumn_);
|
||||||
componentColumns_.writeEntry("componentColumns", os);
|
writeEntry(os, componentColumns_);
|
||||||
writeEntry(os, "separator", string(separator_));
|
writeEntry(os, "separator", string(separator_));
|
||||||
writeEntry(os, "mergeSeparators", mergeSeparators_);
|
writeEntry(os, "mergeSeparators", mergeSeparators_);
|
||||||
writeEntry(os, "file", fName_);
|
writeEntry(os, "file", fName_);
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -149,6 +149,15 @@ void Foam::Function1<Type>::writeData(Ostream& os) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * IOstream Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void Foam::writeEntry(Ostream& os, const Function1<Type>& f1)
|
||||||
|
{
|
||||||
|
f1.writeData(os);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
@ -164,7 +173,6 @@ Foam::Ostream& Foam::operator<<
|
|||||||
"Ostream& operator<<(Ostream&, const Function1<Type>&)"
|
"Ostream& operator<<(Ostream&, const Function1<Type>&)"
|
||||||
);
|
);
|
||||||
|
|
||||||
os << f1.name_;
|
|
||||||
f1.writeData(os);
|
f1.writeData(os);
|
||||||
|
|
||||||
return os;
|
return os;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -169,6 +169,10 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void writeEntry(Ostream& os, const Function1<Type>& f1);
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class FieldFunction1 Declaration
|
Class FieldFunction1 Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -66,6 +66,11 @@ inline label readLabel(Istream& is)
|
|||||||
return INT_SIZE(readInt,) (is);
|
return INT_SIZE(readInt,) (is);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void writeEntry(Ostream& os, const label value)
|
||||||
|
{
|
||||||
|
os << value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -282,6 +282,15 @@ inline spatialTransform Xt(const vector& r)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * IOstream Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
//- Write the spatial transformation as an entry
|
||||||
|
inline void writeEntry(Ostream& os, const spatialTransform& st)
|
||||||
|
{
|
||||||
|
os << st;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -224,6 +224,10 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void writeEntry(Ostream& os, const char* value);
|
||||||
|
void writeEntry(Ostream& os, const string& value);
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -34,6 +34,20 @@ Foam::string::string(Istream& is)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * IOstream Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::writeEntry(Ostream& os, const char* value)
|
||||||
|
{
|
||||||
|
os << value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::writeEntry(Ostream& os, const string& value)
|
||||||
|
{
|
||||||
|
os << value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::Istream& Foam::operator>>(Istream& is, string& s)
|
Foam::Istream& Foam::operator>>(Istream& is, string& s)
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -32,4 +32,13 @@ const char* const Foam::word::typeName = "word";
|
|||||||
int Foam::word::debug(Foam::debug::debugSwitch(word::typeName, 0));
|
int Foam::word::debug(Foam::debug::debugSwitch(word::typeName, 0));
|
||||||
const Foam::word Foam::word::null;
|
const Foam::word Foam::word::null;
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * IOstream Functions * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
void Foam::writeEntry(Ostream& os, const word& value)
|
||||||
|
{
|
||||||
|
os << value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -135,6 +135,9 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
void writeEntry(Ostream& os, const word& value);
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
} // End namespace Foam
|
} // End namespace Foam
|
||||||
|
|||||||
@ -161,8 +161,8 @@ void convectiveHeatTransferFvPatchScalarField::updateCoeffs()
|
|||||||
void convectiveHeatTransferFvPatchScalarField::write(Ostream& os) const
|
void convectiveHeatTransferFvPatchScalarField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchField<scalar>::write(os);
|
fvPatchField<scalar>::write(os);
|
||||||
Foam::writeEntry(os, "L", L_);
|
writeEntry(os, "L", L_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -479,61 +479,61 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::write
|
|||||||
{
|
{
|
||||||
fvPatchScalarField::write(os);
|
fvPatchScalarField::write(os);
|
||||||
|
|
||||||
Foam::writeEntry(os, "mode", operationModeNames[mode_]);
|
writeEntry(os, "mode", operationModeNames[mode_]);
|
||||||
temperatureCoupledBase::write(os);
|
temperatureCoupledBase::write(os);
|
||||||
|
|
||||||
switch (mode_)
|
switch (mode_)
|
||||||
{
|
{
|
||||||
case fixedPower:
|
case fixedPower:
|
||||||
{
|
{
|
||||||
Foam::writeEntry(os, "Q", Q_);
|
writeEntry(os, "Q", Q_);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case fixedHeatFlux:
|
case fixedHeatFlux:
|
||||||
{
|
{
|
||||||
q_.writeEntry("q", os);
|
writeEntry(os, "q", q_);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case fixedHeatTransferCoeff:
|
case fixedHeatTransferCoeff:
|
||||||
{
|
{
|
||||||
h_.writeEntry("h", os);
|
writeEntry(os, "h", h_);
|
||||||
Ta_->writeData(os);
|
writeEntry(os, Ta_());
|
||||||
|
|
||||||
if (relaxation_ < 1)
|
if (relaxation_ < 1)
|
||||||
{
|
{
|
||||||
Foam::writeEntry(os, "relaxation", relaxation_);
|
writeEntry(os, "relaxation", relaxation_);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (emissivity_ > 0)
|
if (emissivity_ > 0)
|
||||||
{
|
{
|
||||||
Foam::writeEntry(os, "emissivity", emissivity_);
|
writeEntry(os, "emissivity", emissivity_);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (thicknessLayers_.size())
|
if (thicknessLayers_.size())
|
||||||
{
|
{
|
||||||
thicknessLayers_.writeEntry("thicknessLayers", os);
|
writeEntry(os, "thicknessLayers", thicknessLayers_);
|
||||||
kappaLayers_.writeEntry("kappaLayers", os);
|
writeEntry(os, "kappaLayers", kappaLayers_);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Foam::writeEntry(os, "qr", qrName_);
|
writeEntry(os, "qr", qrName_);
|
||||||
|
|
||||||
if (qrName_ != "none")
|
if (qrName_ != "none")
|
||||||
{
|
{
|
||||||
Foam::writeEntry(os, "qrRelaxation", qrRelaxation_);
|
writeEntry(os, "qrRelaxation", qrRelaxation_);
|
||||||
|
|
||||||
qrPrevious_.writeEntry("qrPrevious", os);
|
writeEntry(os, "qrPrevious", qrPrevious_);
|
||||||
}
|
}
|
||||||
|
|
||||||
refValue().writeEntry("refValue", os);
|
writeEntry(os, "refValue", refValue());
|
||||||
refGrad().writeEntry("refGradient", os);
|
writeEntry(os, "refGradient", refGrad());
|
||||||
valueFraction().writeEntry("valueFraction", os);
|
writeEntry(os, "valueFraction", valueFraction());
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -430,14 +430,14 @@ void thermalBaffle1DFvPatchScalarField<solidType>::write(Ostream& os) const
|
|||||||
|
|
||||||
if (this->owner())
|
if (this->owner())
|
||||||
{
|
{
|
||||||
baffleThickness()().writeEntry("thickness", os);
|
writeEntry(os, "thickness", baffleThickness()());
|
||||||
Qs()().writeEntry("Qs", os);
|
writeEntry(os, "Qs", Qs()());
|
||||||
solid().write(os);
|
solid().write(os);
|
||||||
}
|
}
|
||||||
|
|
||||||
qrPrevious_.writeEntry("qrPrevious", os);
|
writeEntry(os, "qrPrevious", qrPrevious_);
|
||||||
Foam::writeEntry(os, "qr", qrName_);
|
writeEntry(os, "qr", qrName_);
|
||||||
Foam::writeEntry(os, "qrRelaxation", qrRelaxation_);
|
writeEntry(os, "qrRelaxation", qrRelaxation_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -199,10 +199,10 @@ void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::
|
|||||||
write(Ostream& os) const
|
write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchField<scalar>::write(os);
|
fvPatchField<scalar>::write(os);
|
||||||
Foam::writeEntry(os, "phi", phiName_);
|
writeEntry(os, "phi", phiName_);
|
||||||
Foam::writeEntry(os, "rho", rhoName_);
|
writeEntry(os, "rho", rhoName_);
|
||||||
Foam::writeEntry(os, "massFluxFraction", massFluxFraction_);
|
writeEntry(os, "massFluxFraction", massFluxFraction_);
|
||||||
this->writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -265,9 +265,9 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::write
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
mixedFvPatchScalarField::write(os);
|
mixedFvPatchScalarField::write(os);
|
||||||
Foam::writeEntry(os, "Tnbr", TnbrName_);
|
writeEntry(os, "Tnbr", TnbrName_);
|
||||||
thicknessLayers_.writeEntry("thicknessLayers", os);
|
writeEntry(os, "thicknessLayers", thicknessLayers_);
|
||||||
kappaLayers_.writeEntry("kappaLayers", os);
|
writeEntry(os, "kappaLayers", kappaLayers_);
|
||||||
|
|
||||||
temperatureCoupledBase::write(os);
|
temperatureCoupledBase::write(os);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -270,11 +270,11 @@ void turbulentTemperatureRadCoupledMixedFvPatchScalarField::write
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
mixedFvPatchScalarField::write(os);
|
mixedFvPatchScalarField::write(os);
|
||||||
Foam::writeEntry(os, "Tnbr", TnbrName_);
|
writeEntry(os, "Tnbr", TnbrName_);
|
||||||
Foam::writeEntry(os, "qrNbr", qrNbrName_);
|
writeEntry(os, "qrNbr", qrNbrName_);
|
||||||
Foam::writeEntry(os, "qr", qrName_);
|
writeEntry(os, "qr", qrName_);
|
||||||
thicknessLayers_.writeEntry("thicknessLayers", os);
|
writeEntry(os, "thicknessLayers", thicknessLayers_);
|
||||||
kappaLayers_.writeEntry("kappaLayers", os);
|
writeEntry(os, "kappaLayers", kappaLayers_);
|
||||||
|
|
||||||
temperatureCoupledBase::write(os);
|
temperatureCoupledBase::write(os);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -300,11 +300,11 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
void alphatJayatillekeWallFunctionFvPatchScalarField::write(Ostream& os) const
|
void alphatJayatillekeWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchField<scalar>::write(os);
|
fvPatchField<scalar>::write(os);
|
||||||
Foam::writeEntry(os, "Prt", Prt_);
|
writeEntry(os, "Prt", Prt_);
|
||||||
Foam::writeEntry(os, "Cmu", Cmu_);
|
writeEntry(os, "Cmu", Cmu_);
|
||||||
Foam::writeEntry(os, "kappa", kappa_);
|
writeEntry(os, "kappa", kappa_);
|
||||||
Foam::writeEntry(os, "E", E_);
|
writeEntry(os, "E", E_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -129,8 +129,8 @@ void alphatWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
void alphatWallFunctionFvPatchScalarField::write(Ostream& os) const
|
void alphatWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchField<scalar>::write(os);
|
fvPatchField<scalar>::write(os);
|
||||||
Foam::writeEntry(os, "Prt", Prt_);
|
writeEntry(os, "Prt", Prt_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -174,9 +174,9 @@ void Foam::wallHeatTransferFvPatchScalarField::updateCoeffs()
|
|||||||
void Foam::wallHeatTransferFvPatchScalarField::write(Ostream& os) const
|
void Foam::wallHeatTransferFvPatchScalarField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchScalarField::write(os);
|
fvPatchScalarField::write(os);
|
||||||
Tinf_.writeEntry("Tinf", os);
|
writeEntry(os, "Tinf", Tinf_);
|
||||||
alphaWall_.writeEntry("alphaWall", os);
|
writeEntry(os, "alphaWall", alphaWall_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -268,11 +268,11 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs()
|
|||||||
void alphatJayatillekeWallFunctionFvPatchScalarField::write(Ostream& os) const
|
void alphatJayatillekeWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchField<scalar>::write(os);
|
fvPatchField<scalar>::write(os);
|
||||||
Foam::writeEntry(os, "Prt", Prt_);
|
writeEntry(os, "Prt", Prt_);
|
||||||
Foam::writeEntry(os, "Cmu", Cmu_);
|
writeEntry(os, "Cmu", Cmu_);
|
||||||
Foam::writeEntry(os, "kappa", kappa_);
|
writeEntry(os, "kappa", kappa_);
|
||||||
Foam::writeEntry(os, "E", E_);
|
writeEntry(os, "E", E_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -159,10 +159,10 @@ void turbulentMixingLengthDissipationRateInletFvPatchScalarField::write
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
fvPatchScalarField::write(os);
|
fvPatchScalarField::write(os);
|
||||||
Foam::writeEntry(os, "mixingLength", mixingLength_);
|
writeEntry(os, "mixingLength", mixingLength_);
|
||||||
Foam::writeEntry(os, "phi", this->phiName_);
|
writeEntry(os, "phi", this->phiName_);
|
||||||
Foam::writeEntry(os, "k", kName_);
|
writeEntry(os, "k", kName_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -155,10 +155,10 @@ void turbulentMixingLengthFrequencyInletFvPatchScalarField::write
|
|||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
fvPatchScalarField::write(os);
|
fvPatchScalarField::write(os);
|
||||||
Foam::writeEntry(os, "mixingLength", mixingLength_);
|
writeEntry(os, "mixingLength", mixingLength_);
|
||||||
Foam::writeEntry(os, "phi", this->phiName_);
|
writeEntry(os, "phi", this->phiName_);
|
||||||
Foam::writeEntry(os, "k", kName_);
|
writeEntry(os, "k", kName_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -126,8 +126,8 @@ void Foam::fixedShearStressFvPatchVectorField::updateCoeffs()
|
|||||||
void Foam::fixedShearStressFvPatchVectorField::write(Ostream& os) const
|
void Foam::fixedShearStressFvPatchVectorField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fvPatchVectorField::write(os);
|
fvPatchVectorField::write(os);
|
||||||
Foam::writeEntry(os, "tau", tau0_);
|
writeEntry(os, "tau", tau0_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -178,9 +178,9 @@ void Foam::porousBafflePressureFvPatchField::write(Ostream& os) const
|
|||||||
fixedJumpFvPatchField<scalar>::write(os);
|
fixedJumpFvPatchField<scalar>::write(os);
|
||||||
writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
|
writeEntryIfDifferent<word>(os, "phi", "phi", phiName_);
|
||||||
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
writeEntryIfDifferent<word>(os, "rho", "rho", rhoName_);
|
||||||
Foam::writeEntry(os, "D", D_);
|
writeEntry(os, "D", D_);
|
||||||
Foam::writeEntry(os, "I", I_);
|
writeEntry(os, "I", I_);
|
||||||
Foam::writeEntry(os, "length", length_);
|
writeEntry(os, "length", length_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -57,9 +57,9 @@ void Foam::epsilonWallFunctionFvPatchScalarField::writeLocalEntries
|
|||||||
Ostream& os
|
Ostream& os
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
Foam::writeEntry(os, "Cmu", Cmu_);
|
writeEntry(os, "Cmu", Cmu_);
|
||||||
Foam::writeEntry(os, "kappa", kappa_);
|
writeEntry(os, "kappa", kappa_);
|
||||||
Foam::writeEntry(os, "E", E_);
|
writeEntry(os, "E", E_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -55,9 +55,9 @@ void fWallFunctionFvPatchScalarField::checkType()
|
|||||||
|
|
||||||
void fWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
|
void fWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
|
||||||
{
|
{
|
||||||
Foam::writeEntry(os, "Cmu", Cmu_);
|
writeEntry(os, "Cmu", Cmu_);
|
||||||
Foam::writeEntry(os, "kappa", kappa_);
|
writeEntry(os, "kappa", kappa_);
|
||||||
Foam::writeEntry(os, "E", E_);
|
writeEntry(os, "E", E_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -233,10 +233,10 @@ void kLowReWallFunctionFvPatchScalarField::evaluate
|
|||||||
|
|
||||||
void kLowReWallFunctionFvPatchScalarField::write(Ostream& os) const
|
void kLowReWallFunctionFvPatchScalarField::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
Foam::writeEntry(os, "Cmu", Cmu_);
|
writeEntry(os, "Cmu", Cmu_);
|
||||||
Foam::writeEntry(os, "kappa", kappa_);
|
writeEntry(os, "kappa", kappa_);
|
||||||
Foam::writeEntry(os, "E", E_);
|
writeEntry(os, "E", E_);
|
||||||
Foam::writeEntry(os, "Ceps2", Ceps2_);
|
writeEntry(os, "Ceps2", Ceps2_);
|
||||||
fixedValueFvPatchField<scalar>::write(os);
|
fixedValueFvPatchField<scalar>::write(os);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -131,7 +131,7 @@ template<class Type>
|
|||||||
void Foam::kqRWallFunctionFvPatchField<Type>::write(Ostream& os) const
|
void Foam::kqRWallFunctionFvPatchField<Type>::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
zeroGradientFvPatchField<Type>::write(os);
|
zeroGradientFvPatchField<Type>::write(os);
|
||||||
this->writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -294,10 +294,10 @@ void nutURoughWallFunctionFvPatchScalarField::write(Ostream& os) const
|
|||||||
{
|
{
|
||||||
fvPatchField<scalar>::write(os);
|
fvPatchField<scalar>::write(os);
|
||||||
writeLocalEntries(os);
|
writeLocalEntries(os);
|
||||||
Foam::writeEntry(os, "roughnessHeight", roughnessHeight_);
|
writeEntry(os, "roughnessHeight", roughnessHeight_);
|
||||||
Foam::writeEntry(os, "roughnessConstant", roughnessConstant_);
|
writeEntry(os, "roughnessConstant", roughnessConstant_);
|
||||||
Foam::writeEntry(os, "roughnessFactor", roughnessFactor_);
|
writeEntry(os, "roughnessFactor", roughnessFactor_);
|
||||||
writeEntry("value", os);
|
writeEntry(os, "value", *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user