diff --git a/applications/solvers/financial/financialFoam/financialFoam.C b/applications/solvers/financial/financialFoam/financialFoam.C index 8b21f09285..68b3f9fbbe 100644 --- a/applications/solvers/financial/financialFoam/financialFoam.C +++ b/applications/solvers/financial/financialFoam/financialFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,8 +30,9 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" -#include "writeCellGraph.H" #include "OSspecific.H" +#include "setWriter.H" +#include "writeFile.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -73,8 +74,20 @@ int main(int argc, char *argv[]) if (runTime.writeTime()) { - writeCellGraph(V, runTime.graphFormat()); - writeCellGraph(delta, runTime.graphFormat()); + setWriter::New(runTime.graphFormat())->write + ( + runTime.globalPath() + /functionObjects::writeFile::outputPrefix + /args.executable() + /runTime.timeName(), + + args.executable(), + + coordSet(true, word::null, mesh.C().primitiveField(), "x"), + + "V", V.primitiveField(), + "delta", delta.primitiveField() + ); } Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C b/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C index a7c67c5fbe..4441e5a29c 100644 --- a/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C +++ b/applications/solvers/incompressible/boundaryFoam/boundaryFoam.C @@ -41,7 +41,8 @@ Description #include "fvModels.H" #include "fvConstraints.H" #include "wallFvPatch.H" -#include "makeGraph.H" +#include "setWriter.H" +#include "writeFile.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/incompressible/boundaryFoam/makeGraphs.H b/applications/solvers/incompressible/boundaryFoam/makeGraphs.H index 2691a796fa..17bbdaf89f 100644 --- a/applications/solvers/incompressible/boundaryFoam/makeGraphs.H +++ b/applications/solvers/incompressible/boundaryFoam/makeGraphs.H @@ -13,21 +13,32 @@ volSymmTensorField R runTime.write(); -const word& gFormat = runTime.graphFormat(); +setWriter::New(runTime.graphFormat())->write +( + runTime.globalPath() + /functionObjects::writeFile::outputPrefix + /args.executable() + /runTime.timeName(), -makeGraph(y, flowDirection & U, "Uf", gFormat); + args.executable(), -makeGraph(y, turbulence->nu(), gFormat); -makeGraph(y, turbulence->k(), gFormat); -makeGraph(y, turbulence->epsilon(), gFormat); + coordSet(true, "y", y), -makeGraph(y, flowDirection & R & flowDirection, "Rff", gFormat); -makeGraph(y, wallNormal & R & wallNormal, "Rww", gFormat); -makeGraph(y, flowDirection & R & wallNormal, "Rfw", gFormat); + "Uf", (flowDirection & U)().primitiveField(), -makeGraph(y, sqrt(mag(R.component(symmTensor::XX))), "u", gFormat); -makeGraph(y, sqrt(mag(R.component(symmTensor::YY))), "v", gFormat); -makeGraph(y, sqrt(mag(R.component(symmTensor::ZZ))), "w", gFormat); -makeGraph(y, R.component(symmTensor::XY), "uv", gFormat); + "nu", turbulence->nu()().primitiveField(), + "k", turbulence->nu()().primitiveField(), + "epsilon", turbulence->nu()().primitiveField(), -makeGraph(y, mag(fvc::grad(U)), "gammaDot", gFormat); + "Rff", (flowDirection & R & flowDirection)().primitiveField(), + "Rww", (wallNormal & R & wallNormal)().primitiveField(), + "Rfw", (flowDirection & R & wallNormal)().primitiveField(), + + "u", sqrt(mag(R.component(symmTensor::XX)))().primitiveField(), + "v", sqrt(mag(R.component(symmTensor::YY)))().primitiveField(), + "w", sqrt(mag(R.component(symmTensor::ZZ)))().primitiveField(), + + "uv", R.component(symmTensor::XY)().primitiveField(), + + "gammaDot", mag(fvc::grad(U))().primitiveField() +); diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/functionObjects/sizeDistribution/sizeDistribution.C b/applications/solvers/multiphase/multiphaseEulerFoam/functionObjects/sizeDistribution/sizeDistribution.C index 6fe1fc5871..02b761dc47 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/functionObjects/sizeDistribution/sizeDistribution.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/functionObjects/sizeDistribution/sizeDistribution.C @@ -130,16 +130,10 @@ void Foam::functionObjects::sizeDistribution::correctVolAverages() } N_[i] = gSum(V*Ni)/this->V(); + V_[i] = fi.x().value(); a_[i] = gSum(V*ai)/this->V(); d_[i] = gSum(V*di)/this->V(); } - - forAll(bins_, i) - { - const Foam::diameterModels::sizeGroup& fi = popBal_.sizeGroups()[i]; - - bins_[i] = point(fi.x().value(), a_[i], d_[i]); - } } @@ -154,13 +148,15 @@ void Foam::functionObjects::sizeDistribution::writeMoments() writeTime(file()); } + const scalarField& bin = this->bin(); + for (label k = 0; k <= maxOrder_; k++) { scalar result = 0; forAll(N_, i) { - result += pow(bins_[i][binCmpt_], k)*N_[i]; + result += pow(bin[i], k)*N_[i]; } if (Pstream::master()) @@ -192,23 +188,25 @@ void Foam::functionObjects::sizeDistribution::writeStdDev() scalar mean = 0; scalar var = 0; - if(sum(N_) != 0) + const scalarField& bin = this->bin(); + + if (sum(N_) != 0) { if (geometric_) { - mean = exp(sum(Foam::log(bins_.component(binCmpt_))*N_/sum(N_))); + mean = exp(sum(Foam::log(bin)*N_/sum(N_))); var = - sum(sqr(Foam::log(bins_.component(binCmpt_)) - Foam::log(mean)) + sum(sqr(Foam::log(bin) - Foam::log(mean)) *N_/sum(N_)); stdDev = exp(sqrt(var)); } else { - mean = sum(bins_.component(binCmpt_)*N_/sum(N_)); + mean = sum(bin*N_/sum(N_)); - var = sum(sqr(bins_.component(binCmpt_) - mean)*N_/sum(N_)); + var = sum(sqr(bin - mean)*N_/sum(N_)); stdDev = sqrt(var); } @@ -225,6 +223,8 @@ void Foam::functionObjects::sizeDistribution::writeDistribution() { scalarField result(N_); + const scalarField& bin = this->bin(); + switch (functionType_) { case ftNumber: @@ -239,7 +239,7 @@ void Foam::functionObjects::sizeDistribution::writeDistribution() Log << " writing volume distribution. " << endl; - result *= bins_.component(0); + result *= V_; break; } @@ -263,12 +263,12 @@ void Foam::functionObjects::sizeDistribution::writeDistribution() { List bndrs(N_.size() + 1); - bndrs.first() = bins_.first()[binCmpt_]; - bndrs.last() = bins_.last()[binCmpt_]; + bndrs.first() = bin.first(); + bndrs.last() = bin.last(); for (label i = 1; i < N_.size(); i++) { - bndrs[i] = (bins_[i][binCmpt_] + bins_[i-1][binCmpt_])/2.0; + bndrs[i] = (bin[i]+ bin[i-1])/2.0; } forAll(result, i) @@ -287,15 +287,19 @@ void Foam::functionObjects::sizeDistribution::writeDistribution() if (Pstream::master()) { - const coordSet coords + formatterPtr_->write ( - "sizeDistribution", - "xyz", - bins_, - mag(bins_) + file_.baseTimeDir(), + name(), + coordSet(true, "volume", V_), + "area", + a_, + "diameter", + d_, + word(functionTypeNames_[functionType_]) + + (densityFunction_ ? "Density" : "Concentration"), + result ); - - writeGraph(coords, functionTypeNames_[functionType_], result); } } @@ -347,44 +351,6 @@ void Foam::functionObjects::sizeDistribution::writeFileHeader } -void Foam::functionObjects::sizeDistribution::writeGraph -( - const coordSet& coords, - const word& functionTypeName, - const scalarField& values -) -{ - const wordList functionTypeNames(1, functionTypeName); - - fileName outputPath = file_.baseTimeDir(); - - mkDir(outputPath); - OFstream graphFile - ( - outputPath/(this->name() + ".dat") - ); - - volRegion::writeFileHeader(file_, graphFile); - - file_.writeCommented(graphFile, "Volume area diameter " + functionTypeName); - - if (densityFunction_) - { - graphFile << "Density"; - } - else - { - graphFile << "Concentration"; - } - - graphFile << endl; - - List yPtrs(1); - yPtrs[0] = &values; - scalarFormatter_().write(coords, functionTypeNames, yPtrs, graphFile); -} - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::functionObjects::sizeDistribution::sizeDistribution @@ -409,42 +375,11 @@ Foam::functionObjects::sizeDistribution::sizeDistribution functionType_(functionTypeNames_.read(dict.lookup("functionType"))), coordinateType_(coordinateTypeNames_.read(dict.lookup("coordinateType"))), N_(popBal_.sizeGroups().size(), 0), + V_(popBal_.sizeGroups().size(), 0), a_(popBal_.sizeGroups().size(), 0), - d_(popBal_.sizeGroups().size(), 0), - bins_(N_.size()), - binCmpt_(0) + d_(popBal_.sizeGroups().size(), 0) { read(dict); - - switch (coordinateType_) - { - case ctVolume: - { - binCmpt_ = 0; - - break; - } - case ctArea: - { - binCmpt_ = 1; - - break; - } - case ctDiameter: - { - binCmpt_ = 2; - - break; - } - case ctProjectedAreaDiameter: - { - binCmpt_ = 2; - - break; - } - } - - scalarFormatter_ = setWriter::New("raw"); } @@ -465,6 +400,8 @@ bool Foam::functionObjects::sizeDistribution::read(const dictionary& dict) geometric_ = dict.lookupOrDefault("geometric", false); maxOrder_ = dict.lookupOrDefault("maxOrder", 3); + formatterPtr_ = setWriter::New(dict.lookup("setFormat"), dict); + resetName(name()); return false; diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/functionObjects/sizeDistribution/sizeDistribution.H b/applications/solvers/multiphase/multiphaseEulerFoam/functionObjects/sizeDistribution/sizeDistribution.H index 3a2c859f4e..ea684746cc 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/functionObjects/sizeDistribution/sizeDistribution.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/functionObjects/sizeDistribution/sizeDistribution.H @@ -134,8 +134,8 @@ protected: //- File containing data for all functionTypes except moments writeFile file_; - //- Output formatter, set to raw - autoPtr> scalarFormatter_; + //- Output formatter + autoPtr formatterPtr_; //- Reference to populationBalanceModel const Foam::diameterModels::populationBalanceModel& popBal_; @@ -149,6 +149,9 @@ protected: //- List of volume-averaged number concentrations scalarField N_; + //- ??? + scalarField V_; + //- List of volume-averaged surface areas scalarField a_; @@ -167,18 +170,29 @@ protected: //- Highest moment order label maxOrder_; - //- Bins (representative volume/area/diameter) - pointField bins_; - - //- Bin component used according to chosen coordinate type - label binCmpt_; - // Protected Member Functions //- Filter field according to cellIds tmp filterField(const scalarField& field) const; + //- Bin component used according to chosen coordinate type + inline const scalarField& bin() const + { + switch (coordinateType_) + { + case ctVolume: + return V_; + case ctArea: + return a_; + case ctDiameter: + return d_; + case ctProjectedAreaDiameter: + return d_; + } + return scalarField::null(); + } + //- Correct volume averages void correctVolAverages(); @@ -194,14 +208,6 @@ protected: //- Output file header information for functionType moments virtual void writeFileHeader(const label i); - //- Output function for all functionType number/volume - void writeGraph - ( - const coordSet& coords, - const word& functionTypeName, - const scalarField& values - ); - public: diff --git a/applications/test/graph/Make/files b/applications/test/graph/Make/files deleted file mode 100644 index 337a894c04..0000000000 --- a/applications/test/graph/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -Test-graph.C - -EXE = $(FOAM_USER_APPBIN)/Test-graph diff --git a/applications/test/graph/Make/options b/applications/test/graph/Make/options deleted file mode 100644 index 73db7f9560..0000000000 --- a/applications/test/graph/Make/options +++ /dev/null @@ -1,7 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude - -EXE_LIBS = \ - -lsampling \ - -lmeshTools diff --git a/applications/test/graph/Test-graph.C b/applications/test/graph/Test-graph.C deleted file mode 100644 index 42dc9d735d..0000000000 --- a/applications/test/graph/Test-graph.C +++ /dev/null @@ -1,70 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Application - graphTest - -Description - Test program for making graphs - -\*---------------------------------------------------------------------------*/ - -#include "graph.H" - -using namespace Foam; - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main() -{ - scalarField alpha(200); - scalarField phie(alpha.size()); - scalarField phic(alpha.size()); - - forAll(alpha, i) - { - alpha[i] = scalar(i)/50.0; - } - - scalar R = 5.0; - - phie = (R - 1)/(sqrt(R/(alpha + 1.0e-6)) + 1.0) + 1.0; - phic = (R - 1)/(sqrt(R*alpha) + 1.0) + 1.0; - - - graph phi("@f! (R = 5)", "@a!", "@f!", alpha); - phi.insert - ( - "@f!&e!", new curve("@f!&e!", curve::curveStyle::CONTINUOUS, phie) - ); - phi.insert - ( - "@f!&c!", new curve("@f!&c!", curve::curveStyle::CONTINUOUS, phic) - ); - phi.write("phi", "xmgr"); - - Info<< "end" << endl; -} - - -// ************************************************************************* // diff --git a/applications/test/graph/graphTest2.C b/applications/test/graph/graphTest2.C deleted file mode 100644 index 9a463e836e..0000000000 --- a/applications/test/graph/graphTest2.C +++ /dev/null @@ -1,64 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Application - graphTest - -Description - Test program for making graphs - -\*---------------------------------------------------------------------------*/ - -#include "graph.H" - -using namespace Foam; - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main() -{ - scalarField eta(200); - scalarField C1mR(eta.size()); - - forAll(eta, i) - { - eta[i] = scalar(i)/10.0; - } - - scalar C1 = 1.42; - scalar eta0 = 4.38; - scalar beta = 0.012; - - C1mR = C1 - ((eta*(1.0 - eta/eta0))/(1.0 + beta*pow(eta, 3.0))); - - graph("C&1! - R", "C&1! - R", "@h!", eta, C1mR).write - ( - "C1mR", - "xmgr" - ); - - Info<< "end" << endl; -} - - -// ************************************************************************* // diff --git a/applications/test/graphXi/Make/files b/applications/test/graphXi/Make/files deleted file mode 100644 index 344e4ddc20..0000000000 --- a/applications/test/graphXi/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -Test-graphXi.C - -EXE = $(FOAM_USER_APPBIN)/Test-graphXi diff --git a/applications/test/graphXi/Make/options b/applications/test/graphXi/Make/options deleted file mode 100644 index 73db7f9560..0000000000 --- a/applications/test/graphXi/Make/options +++ /dev/null @@ -1,7 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude - -EXE_LIBS = \ - -lsampling \ - -lmeshTools diff --git a/applications/test/graphXi/Test-graphXi.C b/applications/test/graphXi/Test-graphXi.C deleted file mode 100644 index b507ee2bdb..0000000000 --- a/applications/test/graphXi/Test-graphXi.C +++ /dev/null @@ -1,66 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM. If not, see . - -Application - graphTest - -Description - Test program for making graphs - -\*---------------------------------------------------------------------------*/ - -#include "graph.H" -#include "OFstream.H" -#include "mathematicalConstants.H" - -using namespace Foam; - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main() -{ - scalarField x(100); - scalarField r(x.size()); - - forAll(x, i) - { - x[i] = -3 + 0.06*i; - } - - scalarField b(0.5*(1.0 + erf(x))); - scalarField c(1.0 - b); - scalarField gradb((1/::sqrt(constant::mathematical::pi))*exp(-sqr(x))); - scalarField lapb(-2*x*gradb); - - r = lapb*b*c/(gradb*gradb); - - - graph("r", "x", "r", x, r).write("r", "xmgr"); - - Info<< "end" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/test/graphXi/r.agr b/applications/test/graphXi/r.agr deleted file mode 100644 index d012ca6512..0000000000 --- a/applications/test/graphXi/r.agr +++ /dev/null @@ -1,107 +0,0 @@ -@title "r" -@xaxis label "x" -@yaxis label "r" -@s0 legend "r" -@target G0.S0 -@type xy --3 0.951803 --2.94 0.950065 --2.88 0.948234 --2.82 0.946302 --2.76 0.944261 --2.7 0.942103 --2.64 0.939817 --2.58 0.937392 --2.52 0.934816 --2.46 0.932074 --2.4 0.929149 --2.34 0.926023 --2.28 0.922673 --2.22 0.919075 --2.16 0.915199 --2.1 0.911012 --2.04 0.906476 --1.98 0.901547 --1.92 0.896176 --1.86 0.890307 --1.8 0.883875 --1.74 0.87681 --1.68 0.869032 --1.62 0.860453 --1.56 0.850978 --1.5 0.840503 --1.44 0.828916 --1.38 0.8161 --1.32 0.801931 --1.26 0.786282 --1.2 0.769024 --1.14 0.750029 --1.08 0.729172 --1.02 0.706337 --0.96 0.681414 --0.9 0.654311 --0.84 0.624951 --0.78 0.59328 --0.72 0.559268 --0.66 0.522911 --0.6 0.48424 --0.54 0.443314 --0.48 0.40023 --0.42 0.355116 --0.36 0.308137 --0.3 0.259489 --0.24 0.2094 --0.18 0.158121 --0.12 0.10593 --0.06 0.0531214 --1.11022e-16 9.8391e-17 -0.06 -0.0531214 -0.12 -0.10593 -0.18 -0.158121 -0.24 -0.2094 -0.3 -0.259489 -0.36 -0.308137 -0.42 -0.355116 -0.48 -0.40023 -0.54 -0.443314 -0.6 -0.48424 -0.66 -0.522911 -0.72 -0.559268 -0.78 -0.59328 -0.84 -0.624951 -0.9 -0.654311 -0.96 -0.681414 -1.02 -0.706337 -1.08 -0.729172 -1.14 -0.750029 -1.2 -0.769024 -1.26 -0.786282 -1.32 -0.801931 -1.38 -0.8161 -1.44 -0.828916 -1.5 -0.840503 -1.56 -0.850978 -1.62 -0.860453 -1.68 -0.869032 -1.74 -0.87681 -1.8 -0.883875 -1.86 -0.890307 -1.92 -0.896176 -1.98 -0.901547 -2.04 -0.906476 -2.1 -0.911012 -2.16 -0.915199 -2.22 -0.919075 -2.28 -0.922673 -2.34 -0.926023 -2.4 -0.929149 -2.46 -0.932074 -2.52 -0.934816 -2.58 -0.937392 -2.64 -0.939817 -2.7 -0.942103 -2.76 -0.944261 -2.82 -0.946302 -2.88 -0.948234 -2.94 -0.950065 - diff --git a/applications/test/graphXi/r.dat b/applications/test/graphXi/r.dat deleted file mode 100644 index 28642e4680..0000000000 --- a/applications/test/graphXi/r.dat +++ /dev/null @@ -1,103 +0,0 @@ -# JPlot file -# column 1: x -# column 2: r --3 0.951803 --2.94 0.950065 --2.88 0.948234 --2.82 0.946302 --2.76 0.944261 --2.7 0.942103 --2.64 0.939817 --2.58 0.937392 --2.52 0.934816 --2.46 0.932074 --2.4 0.929149 --2.34 0.926023 --2.28 0.922673 --2.22 0.919075 --2.16 0.915199 --2.1 0.911012 --2.04 0.906476 --1.98 0.901547 --1.92 0.896176 --1.86 0.890307 --1.8 0.883875 --1.74 0.87681 --1.68 0.869032 --1.62 0.860453 --1.56 0.850978 --1.5 0.840503 --1.44 0.828916 --1.38 0.8161 --1.32 0.801931 --1.26 0.786282 --1.2 0.769024 --1.14 0.750029 --1.08 0.729172 --1.02 0.706337 --0.96 0.681414 --0.9 0.654311 --0.84 0.624951 --0.78 0.59328 --0.72 0.559268 --0.66 0.522911 --0.6 0.48424 --0.54 0.443314 --0.48 0.40023 --0.42 0.355116 --0.36 0.308137 --0.3 0.259489 --0.24 0.2094 --0.18 0.158121 --0.12 0.10593 --0.06 0.0531214 --1.11022e-16 9.8391e-17 -0.06 -0.0531214 -0.12 -0.10593 -0.18 -0.158121 -0.24 -0.2094 -0.3 -0.259489 -0.36 -0.308137 -0.42 -0.355116 -0.48 -0.40023 -0.54 -0.443314 -0.6 -0.48424 -0.66 -0.522911 -0.72 -0.559268 -0.78 -0.59328 -0.84 -0.624951 -0.9 -0.654311 -0.96 -0.681414 -1.02 -0.706337 -1.08 -0.729172 -1.14 -0.750029 -1.2 -0.769024 -1.26 -0.786282 -1.32 -0.801931 -1.38 -0.8161 -1.44 -0.828916 -1.5 -0.840503 -1.56 -0.850978 -1.62 -0.860453 -1.68 -0.869032 -1.74 -0.87681 -1.8 -0.883875 -1.86 -0.890307 -1.92 -0.896176 -1.98 -0.901547 -2.04 -0.906476 -2.1 -0.911012 -2.16 -0.915199 -2.22 -0.919075 -2.28 -0.922673 -2.34 -0.926023 -2.4 -0.929149 -2.46 -0.932074 -2.52 -0.934816 -2.58 -0.937392 -2.64 -0.939817 -2.7 -0.942103 -2.76 -0.944261 -2.82 -0.946302 -2.88 -0.948234 -2.94 -0.950065 diff --git a/applications/test/graphXi/r.gplt b/applications/test/graphXi/r.gplt deleted file mode 100644 index 29092adf71..0000000000 --- a/applications/test/graphXi/r.gplt +++ /dev/null @@ -1,110 +0,0 @@ -#set term postscript color -set output "r.ps" -set title "r" 0,0 -show title -set xlabel "x" 0,0 -show xlabel -set ylabel "r" 0,0 -show ylabel -plot'-' title "r" with lines; pause -1 - --3 0.951803 --2.94 0.950065 --2.88 0.948234 --2.82 0.946302 --2.76 0.944261 --2.7 0.942103 --2.64 0.939817 --2.58 0.937392 --2.52 0.934816 --2.46 0.932074 --2.4 0.929149 --2.34 0.926023 --2.28 0.922673 --2.22 0.919075 --2.16 0.915199 --2.1 0.911012 --2.04 0.906476 --1.98 0.901547 --1.92 0.896176 --1.86 0.890307 --1.8 0.883875 --1.74 0.87681 --1.68 0.869032 --1.62 0.860453 --1.56 0.850978 --1.5 0.840503 --1.44 0.828916 --1.38 0.8161 --1.32 0.801931 --1.26 0.786282 --1.2 0.769024 --1.14 0.750029 --1.08 0.729172 --1.02 0.706337 --0.96 0.681414 --0.9 0.654311 --0.84 0.624951 --0.78 0.59328 --0.72 0.559268 --0.66 0.522911 --0.6 0.48424 --0.54 0.443314 --0.48 0.40023 --0.42 0.355116 --0.36 0.308137 --0.3 0.259489 --0.24 0.2094 --0.18 0.158121 --0.12 0.10593 --0.06 0.0531214 --1.11022e-16 9.8391e-17 -0.06 -0.0531214 -0.12 -0.10593 -0.18 -0.158121 -0.24 -0.2094 -0.3 -0.259489 -0.36 -0.308137 -0.42 -0.355116 -0.48 -0.40023 -0.54 -0.443314 -0.6 -0.48424 -0.66 -0.522911 -0.72 -0.559268 -0.78 -0.59328 -0.84 -0.624951 -0.9 -0.654311 -0.96 -0.681414 -1.02 -0.706337 -1.08 -0.729172 -1.14 -0.750029 -1.2 -0.769024 -1.26 -0.786282 -1.32 -0.801931 -1.38 -0.8161 -1.44 -0.828916 -1.5 -0.840503 -1.56 -0.850978 -1.62 -0.860453 -1.68 -0.869032 -1.74 -0.87681 -1.8 -0.883875 -1.86 -0.890307 -1.92 -0.896176 -1.98 -0.901547 -2.04 -0.906476 -2.1 -0.911012 -2.16 -0.915199 -2.22 -0.919075 -2.28 -0.922673 -2.34 -0.926023 -2.4 -0.929149 -2.46 -0.932074 -2.52 -0.934816 -2.58 -0.937392 -2.64 -0.939817 -2.7 -0.942103 -2.76 -0.944261 -2.82 -0.946302 -2.88 -0.948234 -2.94 -0.950065 diff --git a/applications/test/graphXi/r.ps b/applications/test/graphXi/r.ps deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/applications/test/graphXi/r.xy b/applications/test/graphXi/r.xy deleted file mode 100644 index d6d8f2b40c..0000000000 --- a/applications/test/graphXi/r.xy +++ /dev/null @@ -1,100 +0,0 @@ --3 0.951803 --2.94 0.950065 --2.88 0.948234 --2.82 0.946302 --2.76 0.944261 --2.7 0.942103 --2.64 0.939817 --2.58 0.937392 --2.52 0.934816 --2.46 0.932074 --2.4 0.929149 --2.34 0.926023 --2.28 0.922673 --2.22 0.919075 --2.16 0.915199 --2.1 0.911012 --2.04 0.906476 --1.98 0.901547 --1.92 0.896176 --1.86 0.890307 --1.8 0.883875 --1.74 0.87681 --1.68 0.869032 --1.62 0.860453 --1.56 0.850978 --1.5 0.840503 --1.44 0.828916 --1.38 0.8161 --1.32 0.801931 --1.26 0.786282 --1.2 0.769024 --1.14 0.750029 --1.08 0.729172 --1.02 0.706337 --0.96 0.681414 --0.9 0.654311 --0.84 0.624951 --0.78 0.59328 --0.72 0.559268 --0.66 0.522911 --0.6 0.48424 --0.54 0.443314 --0.48 0.40023 --0.42 0.355116 --0.36 0.308137 --0.3 0.259489 --0.24 0.2094 --0.18 0.158121 --0.12 0.10593 --0.06 0.0531214 --1.11022e-16 9.8391e-17 -0.06 -0.0531214 -0.12 -0.10593 -0.18 -0.158121 -0.24 -0.2094 -0.3 -0.259489 -0.36 -0.308137 -0.42 -0.355116 -0.48 -0.40023 -0.54 -0.443314 -0.6 -0.48424 -0.66 -0.522911 -0.72 -0.559268 -0.78 -0.59328 -0.84 -0.624951 -0.9 -0.654311 -0.96 -0.681414 -1.02 -0.706337 -1.08 -0.729172 -1.14 -0.750029 -1.2 -0.769024 -1.26 -0.786282 -1.32 -0.801931 -1.38 -0.8161 -1.44 -0.828916 -1.5 -0.840503 -1.56 -0.850978 -1.62 -0.860453 -1.68 -0.869032 -1.74 -0.87681 -1.8 -0.883875 -1.86 -0.890307 -1.92 -0.896176 -1.98 -0.901547 -2.04 -0.906476 -2.1 -0.911012 -2.16 -0.915199 -2.22 -0.919075 -2.28 -0.922673 -2.34 -0.926023 -2.4 -0.929149 -2.46 -0.932074 -2.52 -0.934816 -2.58 -0.937392 -2.64 -0.939817 -2.7 -0.942103 -2.76 -0.944261 -2.82 -0.946302 -2.88 -0.948234 -2.94 -0.950065 diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/automatic/automatic.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/automatic/automatic.C index 49cc85a356..392a580224 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/automatic/automatic.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellSizeControlSurfaces/surfaceCellSizeFunction/cellSizeCalculationType/automatic/automatic.C @@ -300,7 +300,8 @@ Foam::tmp Foam::automatic::load() vtkSurfaceWriter ( - surface_.searchableSurface::time().writeFormat() + surface_.searchableSurface::time().writeFormat(), + surface_.searchableSurface::time().writeCompression() ).write ( surface_.searchableSurface::time().constant()/ diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C index f539b5ef14..08d6a28e2d 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C @@ -523,7 +523,11 @@ void Foam::writeAMIWeightsSum // Write the surface if (Pstream::master()) { - vtkSurfaceWriter(mesh.time().writeFormat()).write + vtkSurfaceWriter + ( + mesh.time().writeFormat(), + mesh.time().writeCompression() + ).write ( file.path(), "weightsSum_" + file.name(), @@ -581,7 +585,7 @@ Foam::label Foam::checkGeometry const polyMesh& mesh, const bool allGeometry, const autoPtr& surfWriter, - const autoPtr>& setWriter + const autoPtr& setWriter ) { label noFailedChecks = 0; diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.H b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.H index ba95d7488f..21c7234f94 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.H +++ b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.H @@ -40,6 +40,6 @@ namespace Foam const polyMesh& mesh, const bool allGeometry, const autoPtr&, - const autoPtr>& + const autoPtr& ); } diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C b/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C index d3d976c855..94bf2a252e 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C @@ -160,17 +160,20 @@ int main(int argc, char *argv[]) autoPtr surfWriter; - autoPtr> setWriter; + autoPtr setWriter; if (writeSets) { surfWriter = surfaceWriter::New ( surfaceFormat, - mesh.time().writeFormat() + mesh.time().writeFormat(), + mesh.time().writeCompression() ); - setWriter = Foam::setWriter::New + setWriter = Foam::setWriter::New ( - vtkSetWriter::typeName + vtkSetWriter::typeName, + mesh.time().writeFormat(), + mesh.time().writeCompression() ); } diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkTools.C b/applications/utilities/mesh/manipulation/checkMesh/checkTools.C index 827ac5dea0..e182adaacf 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkTools.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkTools.C @@ -42,6 +42,7 @@ License #include "globalIndex.H" #include "PatchTools.H" #include "writeFile.H" +#include "coordSet.H" void Foam::printMeshStats(const polyMesh& mesh, const bool allTopology) @@ -377,7 +378,7 @@ void Foam::mergeAndWrite void Foam::mergeAndWrite ( - const setWriter& writer, + const setWriter& writer, const pointSet& set ) { @@ -447,41 +448,19 @@ void Foam::mergeAndWrite mergedPts = pointField(mesh.points(), mergedIDs); } - // Write with scalar pointID if (Pstream::master()) { - scalarField scalarPointIDs(mergedIDs.size()); - forAll(mergedIDs, i) - { - scalarPointIDs[i] = 1.0*mergedIDs[i]; - } - - coordSet points(set.name(), "distance", mergedPts, mag(mergedPts)); - - List flds(1, &scalarPointIDs); - - wordList fldNames(1, "pointID"); - - // Output e.g. pointSet p0 to - // postProcessing/