From 88b65189d8acf38dc0b9483f4b30e2ca293f54ca Mon Sep 17 00:00:00 2001 From: Prashant Date: Tue, 11 Apr 2017 17:47:35 +0530 Subject: [PATCH 1/5] BUG: adding case path to support parallel execution (Fixes #449) --- .../timeVaryingMappedFixedValueFvPatchField.C | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C index c32deca90d..41ee0ebe63 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/timeVaryingMappedFixedValue/timeVaryingMappedFixedValueFvPatchField.C @@ -416,7 +416,8 @@ void Foam::timeVaryingMappedFixedValueFvPatchField::checkTable() // Reread values and interpolate fileName valsFile ( - this->db().time().caseConstant() + this->db().time().path() + /this->db().time().caseConstant() /"boundaryData" /this->patch().name() /sampleTimes_[endSampleTime_].name() From 5f17b01998890f43593a51a78febca21a1cd82f0 Mon Sep 17 00:00:00 2001 From: Andrew Heather Date: Tue, 18 Apr 2017 11:37:34 +0100 Subject: [PATCH 2/5] TUT: Updated gamma value in sonicFoam tutorial - see #455 --- tutorials/compressible/sonicFoam/RAS/nacaAirfoil/0/p | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/0/p b/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/0/p index 398442fa78..406c937d7b 100644 --- a/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/0/p +++ b/tutorials/compressible/sonicFoam/RAS/nacaAirfoil/0/p @@ -32,7 +32,7 @@ boundaryField type waveTransmissive; field p; psi thermo:psi; - gamma 1.3; + gamma 1.4; fieldInf $pressure; lInf 1; value $internalField; From c072f911c9d4c22a3f98508a3d856f91a242d1d1 Mon Sep 17 00:00:00 2001 From: Andrew Heather Date: Wed, 19 Apr 2017 13:44:54 +0100 Subject: [PATCH 3/5] BUG: Corrected compilation errors --- .../cellSizeAndAlignmentGrid/cellSizeAndAlignmentGrid.C | 6 +++--- .../conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.C | 1 + .../smoothAlignmentSolver/smoothAlignmentSolver.C | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/applications/utilities/mesh/generation/foamyMesh/cellSizeAndAlignmentGrid/cellSizeAndAlignmentGrid.C b/applications/utilities/mesh/generation/foamyMesh/cellSizeAndAlignmentGrid/cellSizeAndAlignmentGrid.C index a9026a5156..8f57ee2bbf 100644 --- a/applications/utilities/mesh/generation/foamyMesh/cellSizeAndAlignmentGrid/cellSizeAndAlignmentGrid.C +++ b/applications/utilities/mesh/generation/foamyMesh/cellSizeAndAlignmentGrid/cellSizeAndAlignmentGrid.C @@ -62,7 +62,7 @@ Foam::tmp> filterFarPoints ) { tmp> tNewField(new Field(field.size())); - Field& newField = tNewField(); + Field& newField = tNewField.ref(); label added = 0; label count = 0; @@ -160,7 +160,7 @@ Foam::tmp buildAlignmentField(const T& mesh) ( new triadField(mesh.vertexCount(), triad::unset) ); - triadField& alignments = tAlignments(); + triadField& alignments = tAlignments.ref(); for ( @@ -188,7 +188,7 @@ Foam::tmp buildPointField(const T& mesh) ( new pointField(mesh.vertexCount(), point(GREAT, GREAT, GREAT)) ); - pointField& points = tPoints(); + pointField& points = tPoints.ref(); for ( diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.C index 4831560f5d..39626ceafa 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.C @@ -24,6 +24,7 @@ License \*---------------------------------------------------------------------------*/ #include "DelaunayMesh.H" +#include "polyMesh.H" #include "labelPair.H" #include "PrintTable.H" #include "pointIOField.H" diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/smoothAlignmentSolver/smoothAlignmentSolver.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/smoothAlignmentSolver/smoothAlignmentSolver.C index e975f6d4f2..33abcb622c 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/smoothAlignmentSolver/smoothAlignmentSolver.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/cellShapeControl/smoothAlignmentSolver/smoothAlignmentSolver.C @@ -35,7 +35,7 @@ Foam::tmp> Foam::smoothAlignmentSolver::filterFarPoints ) { tmp> tNewField(new Field(field.size())); - Field& newField = tNewField(); + Field& newField = tNewField.ref(); label added = 0; label count = 0; From cc16d9dabe538fc2f99b96df998780f917298040 Mon Sep 17 00:00:00 2001 From: Andrew Heather Date: Mon, 24 Apr 2017 14:33:37 +0100 Subject: [PATCH 4/5] BUG: runTimePostProcessing - corrected clipBox behaviour (see #456) --- .../graphics/runTimePostProcessing/scene.C | 23 +++++++++++++++++-- .../graphics/runTimePostProcessing/scene.H | 9 +++++++- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/functionObjects/graphics/runTimePostProcessing/scene.C b/src/functionObjects/graphics/runTimePostProcessing/scene.C index 4af8b0d0e8..d282d64081 100644 --- a/src/functionObjects/graphics/runTimePostProcessing/scene.C +++ b/src/functionObjects/graphics/runTimePostProcessing/scene.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -131,6 +131,21 @@ void Foam::functionObjects::runTimePostPro::scene::readColours } +void Foam::functionObjects::runTimePostPro::scene::setActorVisibility +( + vtkRenderer* renderer, + const bool visible +) const +{ + vtkActorCollection *actors = renderer->GetActors(); + for (int i = 0; i < actors->GetNumberOfItems(); ++i) + { + vtkActor *actor = vtkActor::SafeDownCast(actors->GetItemAsObject(i)); + actor->SetVisibility(visible); + } +} + + void Foam::functionObjects::runTimePostPro::scene::initialise ( vtkRenderer* renderer, @@ -239,9 +254,13 @@ void Foam::functionObjects::runTimePostPro::scene::setCamera // to be done once on initialisation if (clipBox_ != boundBox::greatBox) { - // Call ResetCamera() to fit clip box in view + setActorVisibility(renderer, false); clipBoxActor_->VisibilityOn(); + + // Call ResetCamera() to fit clip box in view renderer->ResetCamera(); + + setActorVisibility(renderer, true); clipBoxActor_->VisibilityOff(); } diff --git a/src/functionObjects/graphics/runTimePostProcessing/scene.H b/src/functionObjects/graphics/runTimePostProcessing/scene.H index 549b430e39..127fcb6db6 100644 --- a/src/functionObjects/graphics/runTimePostProcessing/scene.H +++ b/src/functionObjects/graphics/runTimePostProcessing/scene.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -105,6 +105,13 @@ class scene //- Read colour properties void readColours(const dictionary& dict); + //- Set visibility of all actors on/off + void setActorVisibility + ( + vtkRenderer* renderer, + const bool visible + ) const; + //- Disallow default bitwise copy construct scene(const scene&); From d26ed93389e9db289dc1c18b37f2c06f5b2c3bdc Mon Sep 17 00:00:00 2001 From: Andrew Heather Date: Tue, 25 Apr 2017 12:30:35 +0100 Subject: [PATCH 5/5] BUG: writeFile - corrected write of output file at start time --- src/OpenFOAM/db/functionObjects/writeFile/writeFile.C | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C b/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C index 33f1c3754d..210114175f 100644 --- a/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C +++ b/src/OpenFOAM/db/functionObjects/writeFile/writeFile.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2015-2017 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -92,8 +92,9 @@ Foam::autoPtr Foam::functionObjects::writeFile::createFile if (Pstream::master() && writeToFile_) { - const scalar timeNow = fileObr_.time().timeOutputValue(); - const word startTimeName = Time::timeName(timeNow); + const scalar startTime = fileObr_.time().startTime().value(); + const scalar userStartTime = fileObr_.time().timeToUserTime(startTime); + const word startTimeName = Time::timeName(userStartTime); fileName outputDir(baseFileDir()/prefix_/startTimeName);