diff --git a/applications/utilities/mesh/manipulation/setSet/setSet.C b/applications/utilities/mesh/manipulation/setSet/setSet.C index c4e6b21162..4790e0ffc2 100644 --- a/applications/utilities/mesh/manipulation/setSet/setSet.C +++ b/applications/utilities/mesh/manipulation/setSet/setSet.C @@ -405,64 +405,71 @@ bool doCommand backup(mesh, setName, currentSet, setName + "_old"); } - if (action == topoSetSource::CLEAR) + switch (action) { - // Already handled above by not reading - } - else if (action == topoSetSource::INVERT) - { - currentSet.invert(currentSet.maxSize(mesh)); - } - else if (action == topoSetSource::LIST) - { - currentSet.writeDebug(Pout, mesh, 100); - Pout<< endl; - } - else if (action == topoSetSource::SUBSET) - { - if (is >> sourceType) + case topoSetSource::CLEAR: { - autoPtr setSource - ( - topoSetSource::New - ( - sourceType, - mesh, - is - ) - ); - - // Backup current set. - topoSet oldSet - ( - mesh, - currentSet.name() + "_old2", - currentSet - ); - - currentSet.clear(); - currentSet.resize(oldSet.size()); - setSource().applyToSet(topoSetSource::NEW, currentSet); - - // Combine new value of currentSet with old one. - currentSet.subset(oldSet); + // Already handled above by not reading + break; } - } - else - { - if (is >> sourceType) + case topoSetSource::INVERT: { - autoPtr setSource - ( - topoSetSource::New + currentSet.invert(currentSet.maxSize(mesh)); + break; + } + case topoSetSource::LIST: + { + currentSet.writeDebug(Pout, mesh, 100); + Pout<< endl; + break; + } + case topoSetSource::SUBSET: + { + if (is >> sourceType) + { + autoPtr setSource ( - sourceType, - mesh, - is - ) - ); + topoSetSource::New + ( + sourceType, + mesh, + is + ) + ); - setSource().applyToSet(action, currentSet); + // Backup current set. + topoSet oldSet + ( + mesh, + currentSet.name() + "_old2", + currentSet + ); + + currentSet.clear(); + currentSet.resize(oldSet.size()); + setSource().applyToSet(topoSetSource::NEW, currentSet); + + // Combine new value of currentSet with old one. + currentSet.subset(oldSet); + } + break; + } + default: + { + if (is >> sourceType) + { + autoPtr setSource + ( + topoSetSource::New + ( + sourceType, + mesh, + is + ) + ); + + setSource().applyToSet(action, currentSet); + } } } @@ -532,7 +539,7 @@ bool doCommand } } - return error; + return !error; } @@ -612,31 +619,36 @@ commandStatus parseType switch(stat) { case polyMesh::UNCHANGED: + { Pout<< " mesh not changed." << endl; - break; - + break; + } case polyMesh::POINTS_MOVED: + { Pout<< " points moved; topology unchanged." << endl; - break; - + break; + } case polyMesh::TOPO_CHANGE: + { Pout<< " topology changed; patches unchanged." << nl << " "; printMesh(runTime, mesh); - - break; - + break; + } case polyMesh::TOPO_PATCH_CHANGE: + { Pout<< " topology changed and patches changed." << nl << " "; printMesh(runTime, mesh); - break; - + break; + } default: + { FatalErrorIn("parseType") << "Illegal mesh update state " << stat << abort(FatalError); - break; + break; + } } return INVALID; diff --git a/src/postProcessing/foamCalcFunctions/field/components/components.C b/src/postProcessing/foamCalcFunctions/field/components/components.C index 644771023b..9c36d48ac1 100644 --- a/src/postProcessing/foamCalcFunctions/field/components/components.C +++ b/src/postProcessing/foamCalcFunctions/field/components/components.C @@ -112,6 +112,13 @@ void Foam::calcTypes::components::calc processed ); + writeComponentFields + ( + fieldHeader, + mesh, + processed + ); + if (!processed) { FatalError diff --git a/tutorials/rhoSonicFoam/shockTube/system/sampleDict b/tutorials/rhoSonicFoam/shockTube/system/sampleDict index 7c59b17bef..95b819ee74 100644 --- a/tutorials/rhoSonicFoam/shockTube/system/sampleDict +++ b/tutorials/rhoSonicFoam/shockTube/system/sampleDict @@ -25,13 +25,14 @@ FoamFile interpolationScheme cellPoint; -writeFormat raw; +setFormat raw; -sampleSets +sets ( - uniform + data { - name data; + type uniform; + axis x; start (-4.995 0 0); end (4.995 0 0); @@ -39,6 +40,9 @@ sampleSets } ); +surfaces +(); + fields ( T diff --git a/tutorials/solidDisplacementFoam/plateHole/system/sampleDict b/tutorials/solidDisplacementFoam/plateHole/system/sampleDict index adf21bd6cf..056f0894ff 100644 --- a/tutorials/solidDisplacementFoam/plateHole/system/sampleDict +++ b/tutorials/solidDisplacementFoam/plateHole/system/sampleDict @@ -25,13 +25,13 @@ FoamFile interpolationScheme cellPoint; -writeFormat raw; +setFormat raw; -sampleSets +sets ( - uniform + leftPatch { - name leftPatch; + type uniform; axis y; start (0 0.5 0.25); end (0 2 0.25); @@ -39,10 +39,12 @@ sampleSets } ); -fields +surfaces +(); + +fields ( sigmaxx ); - // ************************************************************************* //