From 618d9d33b2fe8f4c76eb98312a1c2a17392e4879 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Mon, 12 Jun 2023 17:14:37 +0100 Subject: [PATCH] controlDict: the optional graphFormat entry is now used as the default for all setFormat entries Foam::graph superseded by the more general Foam::setWriter reducing code maintenance overhead, simplifying usage and further development. --- .../legacy/incompressible/dnsFoam/dnsFoam.C | 13 +- .../populationBalanceSizeDistribution.C | 6 +- .../lagrangian/particleTracks/createFields.H | 5 +- .../postProcessing/noise/createFields.H | 21 -- .../utilities/postProcessing/noise/noise.C | 96 ++++-- .../utilities/preProcessing/boxTurb/boxTurb.C | 13 +- .../functionObject/functionObject.C | 7 +- .../functionObject/functionObject.H | 10 +- .../regionFunctionObject.C | 8 +- .../regionFunctionObject.H | 5 +- .../functionObjects/timeControl/timeControl.H | 4 +- .../timeControl/timeControlFunctionObject.C | 4 +- .../field/CourantNo/CourantNo.C | 4 +- src/functionObjects/field/age/age.C | 2 +- src/functionObjects/field/comfort/comfort.C | 6 +- .../field/fieldAverage/fieldAverage.C | 14 +- .../fieldAverage/fieldAverageTemplates.C | 14 +- .../surfaceFieldValue/surfaceFieldValueI.H | 2 +- .../volFieldValue/volFieldValueTemplates.C | 2 +- .../field/histogram/histogram.C | 10 +- .../field/layerAverage/layerAverage.C | 10 +- .../field/nearWallFields/nearWallFields.C | 10 +- .../patchCutLayerAverage.C | 10 +- .../field/readFields/readFieldsTemplates.C | 4 +- .../regionSizeDistribution.C | 14 +- .../field/streamlines/streamlines.C | 10 +- .../turbulenceFieldsTemplates.C | 4 +- .../field/wallHeatFlux/wallHeatFlux.C | 4 +- .../wallHeatTransferCoeff.C | 4 +- .../field/wallShearStress/wallShearStress.C | 4 +- .../phaseScalarTransport.C | 12 +- .../solvers/scalarTransport/scalarTransport.C | 4 +- .../codedFunctionObject/codedFunctionObject.C | 5 +- .../codedFunctionObject/codedFunctionObject.H | 5 +- .../removeRegisteredObject.C | 4 +- .../setTimeStep/setTimeStepFunctionObject.C | 5 +- .../setTimeStep/setTimeStepFunctionObject.H | 5 +- .../setWriteIntervalFunctionObject.C | 5 +- .../setWriteIntervalFunctionObject.H | 5 +- src/functionObjects/utilities/stopAt/stopAt.C | 3 +- src/functionObjects/utilities/stopAt/stopAt.H | 5 +- .../utilities/systemCall/systemCall.C | 6 +- .../timeActivatedFileUpdate.C | 5 +- .../timeActivatedFileUpdate.H | 5 +- .../timeStep/timeStepFunctionObject.C | 4 +- .../writeDictionary/writeDictionary.C | 10 +- .../utilities/writeObjects/writeObjects.C | 6 +- .../SizeDistribution/SizeDistribution.C | 14 +- src/randomProcesses/Make/files | 36 +-- src/randomProcesses/Make/options | 6 +- src/randomProcesses/fft/calcEk.C | 48 --- src/randomProcesses/fft/calcEk.H | 25 -- src/randomProcesses/fft/kShellIntegration.C | 14 +- src/randomProcesses/fft/kShellIntegration.H | 8 +- .../jplotGraph/jplotGraph.H => fft/writeEk.C} | 101 +++---- .../rawGraph/rawGraph.H => fft/writeEk.H} | 73 ++--- src/randomProcesses/graph/curve/curve.C | 72 ----- src/randomProcesses/graph/curve/curve.H | 188 ------------ src/randomProcesses/graph/curve/curveTools.C | 182 ----------- src/randomProcesses/graph/curve/curveTools.H | 82 ----- src/randomProcesses/graph/graph.C | 266 ---------------- src/randomProcesses/graph/graph.H | 285 ------------------ .../graph/writers/gnuplotGraph/gnuplotGraph.C | 78 ----- .../graph/writers/gnuplotGraph/gnuplotGraph.H | 101 ------- .../graph/writers/jplotGraph/jplotGraph.C | 60 ---- .../graph/writers/rawGraph/rawGraph.C | 49 --- .../graph/writers/xmgrGraph/xmgrGraph.C | 67 ---- .../graph/writers/xmgrGraph/xmgrGraph.H | 102 ------- src/randomProcesses/noise/noiseFFT.C | 95 ++---- src/randomProcesses/noise/noiseFFT.H | 29 +- src/sampling/probes/probes.C | 4 +- .../sampledSet/sampledSets/sampledSets.C | 7 +- 72 files changed, 372 insertions(+), 2034 deletions(-) delete mode 100644 applications/utilities/postProcessing/noise/createFields.H delete mode 100644 src/randomProcesses/fft/calcEk.C delete mode 100644 src/randomProcesses/fft/calcEk.H rename src/randomProcesses/{graph/writers/jplotGraph/jplotGraph.H => fft/writeEk.C} (58%) rename src/randomProcesses/{graph/writers/rawGraph/rawGraph.H => fft/writeEk.H} (59%) delete mode 100644 src/randomProcesses/graph/curve/curve.C delete mode 100644 src/randomProcesses/graph/curve/curve.H delete mode 100644 src/randomProcesses/graph/curve/curveTools.C delete mode 100644 src/randomProcesses/graph/curve/curveTools.H delete mode 100644 src/randomProcesses/graph/graph.C delete mode 100644 src/randomProcesses/graph/graph.H delete mode 100644 src/randomProcesses/graph/writers/gnuplotGraph/gnuplotGraph.C delete mode 100644 src/randomProcesses/graph/writers/gnuplotGraph/gnuplotGraph.H delete mode 100644 src/randomProcesses/graph/writers/jplotGraph/jplotGraph.C delete mode 100644 src/randomProcesses/graph/writers/rawGraph/rawGraph.C delete mode 100644 src/randomProcesses/graph/writers/xmgrGraph/xmgrGraph.C delete mode 100644 src/randomProcesses/graph/writers/xmgrGraph/xmgrGraph.H diff --git a/applications/legacy/incompressible/dnsFoam/dnsFoam.C b/applications/legacy/incompressible/dnsFoam/dnsFoam.C index c6e84016aa..b4a1c33c65 100644 --- a/applications/legacy/incompressible/dnsFoam/dnsFoam.C +++ b/applications/legacy/incompressible/dnsFoam/dnsFoam.C @@ -34,8 +34,7 @@ Description #include "Kmesh.H" #include "UOprocess.H" #include "fft.H" -#include "calcEk.H" -#include "graph.H" +#include "writeEk.H" #include "writeFile.H" #include "pisoControl.H" @@ -130,15 +129,7 @@ int main(int argc, char *argv[]) if (runTime.writeTime()) { - calcEk(U, K).write - ( - runTime.path() - /functionObjects::writeFile::outputPrefix - /"graphs" - /runTime.name(), - "Ek", - runTime.graphFormat() - ); + writeEk(U, K); } Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/applications/modules/multiphaseEuler/functionObjects/populationBalanceSizeDistribution/populationBalanceSizeDistribution.C b/applications/modules/multiphaseEuler/functionObjects/populationBalanceSizeDistribution/populationBalanceSizeDistribution.C index 1c659c3687..2e82e13605 100644 --- a/applications/modules/multiphaseEuler/functionObjects/populationBalanceSizeDistribution/populationBalanceSizeDistribution.C +++ b/applications/modules/multiphaseEuler/functionObjects/populationBalanceSizeDistribution/populationBalanceSizeDistribution.C @@ -408,7 +408,11 @@ bool Foam::functionObjects::populationBalanceSizeDistribution::read fvMeshFunctionObject::read(dict); - formatterPtr_ = setWriter::New(dict.lookup("setFormat"), dict); + formatterPtr_ = setWriter::New + ( + dict.lookupOrDefault("setFormat", time_.graphFormat()), + dict + ); return false; } diff --git a/applications/utilities/postProcessing/lagrangian/particleTracks/createFields.H b/applications/utilities/postProcessing/lagrangian/particleTracks/createFields.H index 5604c11211..0e189b90d3 100644 --- a/applications/utilities/postProcessing/lagrangian/particleTracks/createFields.H +++ b/applications/utilities/postProcessing/lagrangian/particleTracks/createFields.H @@ -6,4 +6,7 @@ label sampleFrequency(propsDict.lookup