From a6093ee08128dd42d0ba127aeb1de20913634206 Mon Sep 17 00:00:00 2001 From: Vuko Vukcevic Date: Thu, 6 Dec 2018 16:11:17 +0100 Subject: [PATCH 1/9] Deleted donorBasedLayeredFringe This was pushed by mistake and it's not really finished. --- .../donorBasedLayeredFringe.C | 216 ------------------ .../donorBasedLayeredFringe.H | 147 ------------ 2 files changed, 363 deletions(-) delete mode 100644 src/overset/oversetMesh/oversetFringe/donorBasedLayerFringe/donorBasedLayeredFringe.C delete mode 100644 src/overset/oversetMesh/oversetFringe/donorBasedLayerFringe/donorBasedLayeredFringe.H diff --git a/src/overset/oversetMesh/oversetFringe/donorBasedLayerFringe/donorBasedLayeredFringe.C b/src/overset/oversetMesh/oversetFringe/donorBasedLayerFringe/donorBasedLayeredFringe.C deleted file mode 100644 index f293cb0d1..000000000 --- a/src/overset/oversetMesh/oversetFringe/donorBasedLayerFringe/donorBasedLayeredFringe.C +++ /dev/null @@ -1,216 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | foam-extend: Open Source CFD - \\ / O peration | Version: 4.1 - \\ / A nd | Web: http://www.foam-extend.org - \\/ M anipulation | For copyright notice see file Copyright -------------------------------------------------------------------------------- -License - This file is part of foam-extend. - - foam-extend 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. - - foam-extend 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 foam-extend. If not, see . - -\*---------------------------------------------------------------------------*/ - -#include "donorBasedLayeredFringe.H" -#include "oversetRegion.H" -#include "polyPatchID.H" -#include "addToRunTimeSelectionTable.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - defineTypeNameAndDebug(donorBasedLayeredFringe, 0); - addToRunTimeSelectionTable - ( - oversetFringe, - donorBasedLayeredFringe, - dictionary - ); -} - -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - -void Foam::donorBasedLayeredFringe::calcAddressing() const -{ - if (fringeHolesPtr_ || acceptorsPtr_) - { - FatalErrorIn - ( - "void Foam::donorBasedLayeredFringe::calcAddressing() const" - ) << "Fringe addressing already calculated" - << abort(FatalError); - } - - // We need to wait for the fringe from donor region to finish the - // assembly. Simply create empty acceptor and fringe hole lists - acceptorsPtr_ = new labelList(); - fringeHolesPtr_ = new labelList(); -} - - -void Foam::donorBasedLayeredFringe::clearAddressing() const -{ - deleteDemandDrivenData(fringeHolesPtr_); - deleteDemandDrivenData(acceptorsPtr_); - deleteDemandDrivenData(finalDonorAcceptorsPtr_); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -// Construct from dictionary -Foam::donorBasedLayeredFringe::donorBasedLayeredFringe -( - const fvMesh& mesh, - const oversetRegion& region, - const dictionary& dict -) -: - oversetFringe(mesh, region, dict), - fringeHolesPtr_(NULL), - acceptorsPtr_(NULL), - finalDonorAcceptorsPtr_(NULL), - nLayers_(readLabel(dict.lookup("nLayers"))) -{ - // Sanity check for number of layers - if (nLayers_ < 1) - { - FatalErrorIn - ( - "donorBasedLayeredFringe::donorBasedLayeredFringe\n" - "(\n" - " const fvMesh& mesh,\n" - " const oversetRegion& region,\n" - " const dictionary& dict,\n" - ")\n" - ) << "Invalid number of layers specified in donor based layered" - << "fringe dictionary." - << nl - << "Please specify value between greater than 0." - << endl; - } -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::donorBasedLayeredFringe::~donorBasedLayeredFringe() -{ - clearAddressing(); -} - - -// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // - -bool Foam::donorBasedLayeredFringe::updateIteration -( - donorAcceptorList& donorAcceptorRegionData -) const -{ - if (finalDonorAcceptorsPtr_) - { - FatalErrorIn("donorBasedLayeredFringe::updateIteration(donorAcceptorList&") - << "finalDonorAcceptorPtr_ already allocated. Something went " - << "wrong with the iteration procedure (flag was not updated)." - << abort(FatalError); - } - - // Get overset mesh - const oversetMesh& om = region().overset(); - - // Get list of donor regions of this overset region - const labelList& donorRegions = region().donorRegions(); - - // Check whether all donor regions have finished with the donor search - - - - // Allocate the list by reusing the argument list - finalDonorAcceptorsPtr_ = new donorAcceptorList - ( - donorAcceptorRegionData, - true - ); - - // Set the flag to true and return - updateSuitableOverlapFlag(true); - - return foundSuitableOverlap(); -} - - -const Foam::labelList& Foam::donorBasedLayeredFringe::fringeHoles() const -{ - if (!fringeHolesPtr_) - { - calcAddressing(); - } - - return *fringeHolesPtr_; -} - - -const Foam::labelList& Foam::donorBasedLayeredFringe::candidateAcceptors() const -{ - if (!acceptorsPtr_) - { - calcAddressing(); - } - - return *acceptorsPtr_; -} - - -Foam::donorAcceptorList& Foam::donorBasedLayeredFringe::finalDonorAcceptors() const -{ - if (!finalDonorAcceptorsPtr_) - { - FatalErrorIn("donorBasedLayeredFringe::finalDonorAcceptors()") - << "finalDonorAcceptorPtr_ not allocated. Make sure you have " - << "called donorBasedLayeredFringe::updateIteration() before asking for " - << "final set of donor/acceptor pairs." - << abort(FatalError); - } - - if (!foundSuitableOverlap()) - { - FatalErrorIn("donorBasedLayeredFringe::finalDonorAcceptors()") - << "Attemted to access finalDonorAcceptors but suitable overlap " - << "has not been found. This is not allowed. " - << abort(FatalError); - } - - return *finalDonorAcceptorsPtr_; -} - - -void Foam::donorBasedLayeredFringe::update() const -{ - if (updateFringe_) - { - Info<< "donorBasedLayeredFringe::update() const" << endl; - - // Clear out - clearAddressing(); - } - - // Set flag to false and clear final donor/acceptors only - deleteDemandDrivenData(finalDonorAcceptorsPtr_); - updateSuitableOverlapFlag(false); -} - - -// ************************************************************************* // diff --git a/src/overset/oversetMesh/oversetFringe/donorBasedLayerFringe/donorBasedLayeredFringe.H b/src/overset/oversetMesh/oversetFringe/donorBasedLayerFringe/donorBasedLayeredFringe.H deleted file mode 100644 index f645f4ab1..000000000 --- a/src/overset/oversetMesh/oversetFringe/donorBasedLayerFringe/donorBasedLayeredFringe.H +++ /dev/null @@ -1,147 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | foam-extend: Open Source CFD - \\ / O peration | Version: 4.1 - \\ / A nd | Web: http://www.foam-extend.org - \\/ M anipulation | For copyright notice see file Copyright -------------------------------------------------------------------------------- -License - This file is part of foam-extend. - - foam-extend 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. - - foam-extend 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 foam-extend. If not, see . - -Class - donorBasedLayeredFringeFringe - -Description - Fringe algorithm based on layered approach, where the acceptors of the - region are defined as neighbours of the donors toward the interior of the - region. - - This is achieved by waiting for the acceptors of the donor region to be - found and then defining acceptors. - -Author - Vuko Vukcevic, Wikki Ltd. All rights reserved. - -SourceFiles - donorBasedLayeredFringeFringe.C - -\*---------------------------------------------------------------------------*/ - -#ifndef donorBasedLayeredFringeFringe_H -#define donorBasedLayeredFringeFringe_H - -#include "oversetFringe.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -/*---------------------------------------------------------------------------*\ - Class donorBasedLayeredFringeFringe Declaration -\*---------------------------------------------------------------------------*/ - -class donorBasedLayeredFringeFringe -: - public oversetFringe -{ - // Private data - - //- Fringe hole cells - mutable labelList* fringeHolesPtr_; - - //- Acceptor cells - mutable labelList* acceptorsPtr_; - - //- Final donor/acceptor pairs for this region (fringe) - mutable donorAcceptorList* finalDonorAcceptorsPtr_; - - //- Number of layers from donors to acceptors of this region - label nLayers_; - - - // Private Member Functions - - //- Disallow default bitwise copy construct - donorBasedLayeredFringeFringe(const donorBasedLayeredFringeFringe&); - - //- Disallow default bitwise assignment - void operator=(const donorBasedLayeredFringeFringe&); - - - // Calculate hole and acceptor addressing - void calcAddressing() const; - - // Clear addressing - void clearAddressing() const; - - -public: - - //- Runtime type information - TypeName("donorBasedLayeredFringe"); - - - // Constructors - - //- Construct from dictionary - donorBasedLayeredFringeFringe - ( - const fvMesh& mesh, - const oversetRegion& region, - const dictionary& dict - ); - - - // Destructor - - virtual ~donorBasedLayeredFringeFringe(); - - - // Member Functions - - //- Update iteration. Note: invalidates parameter - virtual bool updateIteration - ( - donorAcceptorList& donorAcceptorRegionData - ) const; - - //- Return list of deactivated (hole) cells - // Fringe hole cells are collected in addition to geometric hole - // cells, which fall outside of all donor regions - virtual const labelList& fringeHoles() const; - - //- Return list of acceptor cells - virtual const labelList& candidateAcceptors() const; - - //- Return list of final donor acceptor pairs. Note: caller may - // invalidate finalDonorAcceptorsPtr_ for optimisation purposes - virtual donorAcceptorList& finalDonorAcceptors() const; - - //- Update the fringe - virtual void update() const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // From 73df75ce1aad4b199ea0ff0dea07c50b90bfc414 Mon Sep 17 00:00:00 2001 From: Vuko Vukcevic Date: Thu, 15 Nov 2018 18:22:51 +0100 Subject: [PATCH 2/9] Improvement in refinement cell selection Check whether the refinement level would exceed the maximum specified refinement level only after the buffer layers have been considered. --- .../polyhedralRefinement.C | 15 ++++++++----- .../prismatic2DRefinement.C | 15 ++++++++----- .../refinement/refinement/refinement.C | 21 +++++-------------- 3 files changed, 25 insertions(+), 26 deletions(-) diff --git a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/polyhedralRefinement/polyhedralRefinement.C b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/polyhedralRefinement/polyhedralRefinement.C index 9264459dc..d3036301c 100644 --- a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/polyhedralRefinement/polyhedralRefinement.C +++ b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/polyhedralRefinement/polyhedralRefinement.C @@ -2028,11 +2028,7 @@ void Foam::polyhedralRefinement::setCellsToRefine // Get cell index const label& cellI = refinementCellCandidates[i]; - if - ( - roughCellCountAfterRefinement < maxCells_ - && cellLevel_[cellI] < maxRefinementLevel_ - ) + if (roughCellCountAfterRefinement < maxCells_) { // Mark cell for refinement refineCell[cellI] = true; @@ -2049,6 +2045,15 @@ void Foam::polyhedralRefinement::setCellsToRefine extendMarkedCellsAcrossFaces(refineCell); } + // Remove all cells that would exceed the maximum refinement level + forAll (refineCell, cellI) + { + if (refineCell[cellI] && (cellLevel_[cellI] + 1 > maxRefinementLevel_)) + { + refineCell[cellI] = false; + } + } + // Make sure that the refinement is face consistent (2:1 consistency) and // point consistent (4:1 consistency) if necessary diff --git a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/prismatic2DRefinement/prismatic2DRefinement.C b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/prismatic2DRefinement/prismatic2DRefinement.C index 4f8c2fa8a..f627b7f55 100644 --- a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/prismatic2DRefinement/prismatic2DRefinement.C +++ b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/prismatic2DRefinement/prismatic2DRefinement.C @@ -2587,11 +2587,7 @@ void Foam::prismatic2DRefinement::setCellsToRefine // Get cell index const label& cellI = refinementCellCandidates[i]; - if - ( - roughCellCountAfterRefinement < maxCells_ - && cellLevel_[cellI] < maxRefinementLevel_ - ) + if (roughCellCountAfterRefinement < maxCells_) { // Mark cell for refinement refineCell[cellI] = true; @@ -2608,6 +2604,15 @@ void Foam::prismatic2DRefinement::setCellsToRefine extendMarkedCellsAcrossFaces(refineCell); } + // Remove all cells that exceed the maximum refinement level + forAll (refineCell, cellI) + { + if (refineCell[cellI] && (cellLevel_[cellI] + 1 > maxRefinementLevel_)) + { + refineCell[cellI] = false; + } + } + // Make sure that the refinement is face consistent (2:1 consistency) and // point consistent (4:1 consistency) if necessary diff --git a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/refinement/refinement.C b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/refinement/refinement.C index b607dfb1e..64a8a10b3 100644 --- a/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/refinement/refinement.C +++ b/src/dynamicMesh/dynamicMesh/polyMeshModifiers/refinement/refinement/refinement.C @@ -111,17 +111,9 @@ void Foam::refinement::extendMarkedCellsAcrossFaces const label& own = owner[faceI]; const label& nei = neighbour[faceI]; - if (cellLevel_[own] < maxRefinementLevel_) - { - // Mark owner - markedCell[own] = true; - } - - if (cellLevel_[nei] < maxRefinementLevel_) - { - // Mark neighbour - markedCell[nei] = true; - } + // Mark owner and neighbour cells + markedCell[own] = true; + markedCell[nei] = true; } } @@ -134,11 +126,8 @@ void Foam::refinement::extendMarkedCellsAcrossFaces // exceeded const label& own = owner[faceI]; - if (cellLevel_[own] < maxRefinementLevel_) - { - // Mark owner - markedCell[own] = true; - } + // Mark owner + markedCell[own] = true; } } } From ea8c85198c95ad2652b03ea1b691ca8d3798b896 Mon Sep 17 00:00:00 2001 From: Vuko Vukcevic Date: Mon, 26 Nov 2018 10:27:15 +0100 Subject: [PATCH 3/9] Whitespace clean-up and minor formatting --- .../dynamicPolyRefinementFvMesh/dynamicPolyRefinementFvMesh.C | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dynamicMesh/topoChangerFvMesh/dynamicPolyRefinementFvMesh/dynamicPolyRefinementFvMesh.C b/src/dynamicMesh/topoChangerFvMesh/dynamicPolyRefinementFvMesh/dynamicPolyRefinementFvMesh.C index 9bc1cdef8..5ae37fd8e 100644 --- a/src/dynamicMesh/topoChangerFvMesh/dynamicPolyRefinementFvMesh/dynamicPolyRefinementFvMesh.C +++ b/src/dynamicMesh/topoChangerFvMesh/dynamicPolyRefinementFvMesh/dynamicPolyRefinementFvMesh.C @@ -361,8 +361,10 @@ bool Foam::dynamicPolyRefinementFvMesh::update() // Update current time index to skip multiple topo change checks // per time step curTimeIndex_ = time().timeIndex(); - } + } + Pout<< "No refinement/unrefinement" << endl; + // No refinement/unrefinement at this time step. Return false return false; } From d078a848158bfbb32e0cbd91b1018262d6b72c1e Mon Sep 17 00:00:00 2001 From: Vuko Vukcevic Date: Tue, 27 Nov 2018 14:15:44 +0100 Subject: [PATCH 4/9] Bugfix in GeometricField::storeOldTimes Need to update timeIndex_ regardless whether the old field has been found. --- .../fields/GeometricFields/GeometricField/GeometricField.C | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/foam/fields/GeometricFields/GeometricField/GeometricField.C b/src/foam/fields/GeometricFields/GeometricField/GeometricField.C index 3ecdc54bb..dd0bbc6e9 100644 --- a/src/foam/fields/GeometricFields/GeometricField/GeometricField.C +++ b/src/foam/fields/GeometricFields/GeometricField/GeometricField.C @@ -743,10 +743,10 @@ void Foam::GeometricField::storeOldTimes() const ) { storeOldTime(); - - // Correct time index. Bug fix, Zeljko Tukovic 14/Jun/2010 - timeIndex_ = this->time().timeIndex(); } + + // Correct time index. Bug fix, Zeljko Tukovic 14/Jun/2010 + timeIndex_ = this->time().timeIndex(); } // Store old-time field From 619089e8867f5d85e384b489589f306668bb78fe Mon Sep 17 00:00:00 2001 From: Vuko Vukcevic Date: Sat, 8 Dec 2018 13:03:43 +0100 Subject: [PATCH 5/9] Bugfix in pointPatchInterpolate Regarding boundary condition update for non coupled boundaries of point fields. Author: Dario Zivkovic. --- .../pointPatchInterpolation/pointPatchInterpolate.C | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolate.C b/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolate.C index e04eabc26..d429df7c3 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolate.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolate.C @@ -180,9 +180,15 @@ void pointPatchInterpolation::interpolate pf.internalField() ); } + else + { + // Bugfix: Need to update ordinary boundary conditions. + // Dario Zivkovic, 8/Dec/2018. + pf.boundaryField()[patchi].evaluate(); + } } - // Coupled boundaries already updated. Nothing to do. VV, 4/Dec/2017. + // All boundaries already updated. Nothing to do. VV, 4/Dec/2017. if (debug) { From ef386d6d44d9c5ac0469d69ee70db7f0cdfcd613 Mon Sep 17 00:00:00 2001 From: Vuko Vukcevic Date: Sat, 8 Dec 2018 13:03:43 +0100 Subject: [PATCH 6/9] Bugfix in pointPatchInterpolate Regarding boundary condition update for non coupled boundaries of point fields. Author: Dario Zivkovic. --- .../pointPatchInterpolate.C | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolate.C b/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolate.C index e04eabc26..1155c95d1 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolate.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolate.C @@ -169,6 +169,12 @@ void pointPatchInterpolation::interpolate { pf.boundaryField()[patchi].initAddField(); } + else + { + // Bugfix: Need to update ordinary boundary conditions. + // Dario Zivkovic, 8/Dec/2018. + pf.boundaryField()[patchi].initEvaluate(); + } } forAll(pf.boundaryField(), patchi) @@ -180,9 +186,15 @@ void pointPatchInterpolation::interpolate pf.internalField() ); } + else + { + // Bugfix: Need to update ordinary boundary conditions. + // Dario Zivkovic, 8/Dec/2018. + pf.boundaryField()[patchi].evaluate(); + } } - // Coupled boundaries already updated. Nothing to do. VV, 4/Dec/2017. + // All boundaries already updated. Nothing to do. VV, 4/Dec/2017. if (debug) { From 9d01881b39480908bbc2d44119e055871ba5d350 Mon Sep 17 00:00:00 2001 From: Vuko Vukcevic Date: Tue, 11 Dec 2018 12:44:59 +0100 Subject: [PATCH 7/9] Wrapped Pout statements around debug switch --- .../dynamicPolyRefinementFvMesh.C | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/src/dynamicMesh/topoChangerFvMesh/dynamicPolyRefinementFvMesh/dynamicPolyRefinementFvMesh.C b/src/dynamicMesh/topoChangerFvMesh/dynamicPolyRefinementFvMesh/dynamicPolyRefinementFvMesh.C index 5ae37fd8e..cec584173 100644 --- a/src/dynamicMesh/topoChangerFvMesh/dynamicPolyRefinementFvMesh/dynamicPolyRefinementFvMesh.C +++ b/src/dynamicMesh/topoChangerFvMesh/dynamicPolyRefinementFvMesh/dynamicPolyRefinementFvMesh.C @@ -271,11 +271,15 @@ bool Foam::dynamicPolyRefinementFvMesh::update() ( refinementSelectionPtr_->refinementCellCandidates()() ); - Pout<< "Selected " << refCandidates.size() - << " refinement candidates." - << endl; + + if (debug) + { + Pout<< "Selected " << refCandidates.size() + << " refinement candidates." + << endl; + } } - else + else if (debug) { Pout<< "Skipping refinement for this time-step..." << endl; } @@ -297,11 +301,15 @@ bool Foam::dynamicPolyRefinementFvMesh::update() ( refinementSelectionPtr_->unrefinementPointCandidates()() ); - Pout<< "Selected " << unrefCandidates.size() - << " unrefinement candidates." - << endl; + + if (debug) + { + Pout<< "Selected " << unrefCandidates.size() + << " unrefinement candidates." + << endl; + } } - else + else if (debug) { Pout<< "Skipping unrefinement for this time-step..." << endl; } @@ -344,13 +352,13 @@ bool Foam::dynamicPolyRefinementFvMesh::update() // some topo changes if (sizeCellMap) { - Pout<< "Successfully performed polyhedral refinement. " + Info<< "Successfully performed polyhedral refinement. " << "Changed from " << nOldCells << " to " << sizeCellMap << " cells." << endl; } else { - Pout<< "Refinement/unrefinement not performed in this time step " + Info<< "Refinement/unrefinement not performed in this time step " << "since no cells were selected." << endl; } @@ -363,7 +371,7 @@ bool Foam::dynamicPolyRefinementFvMesh::update() curTimeIndex_ = time().timeIndex(); } - Pout<< "No refinement/unrefinement" << endl; + Info<< "No refinement/unrefinement" << endl; // No refinement/unrefinement at this time step. Return false return false; From 2afc0297bc404ad79d9483b973abede675e5be9d Mon Sep 17 00:00:00 2001 From: Vuko Vukcevic Date: Wed, 12 Dec 2018 16:16:31 +0100 Subject: [PATCH 8/9] Added access function to polyMeshGen in cartesianMeshGenerator --- .../cartesianMeshGenerator/cartesianMeshGenerator.H | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mesh/cfMesh/cartesianMesh/cartesianMeshGenerator/cartesianMeshGenerator.H b/src/mesh/cfMesh/cartesianMesh/cartesianMeshGenerator/cartesianMeshGenerator.H index 6c5259114..f21f4d686 100644 --- a/src/mesh/cfMesh/cartesianMesh/cartesianMeshGenerator/cartesianMeshGenerator.H +++ b/src/mesh/cfMesh/cartesianMesh/cartesianMeshGenerator/cartesianMeshGenerator.H @@ -140,6 +140,12 @@ public: //- write the mesh void writeMesh() const; + + //- Access to polyMeshGen member + const polyMeshGen& mesh() const + { + return mesh_; + } }; From 75d5b4a2895c0748b3c58bbc104e73dd5a1e85eb Mon Sep 17 00:00:00 2001 From: Vuko Vukcevic Date: Fri, 21 Dec 2018 19:26:11 +0100 Subject: [PATCH 9/9] Bugfix in pointPatchInterpolate Regarding boundary condition update for non coupled boundaries of point fields, take 2 (my mistake: Vuko Vukcevic) Author: Dario Zivkovic. --- .../pointPatchInterpolate.C | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolate.C b/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolate.C index 1155c95d1..9d7c9ab4f 100644 --- a/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolate.C +++ b/src/finiteVolume/interpolation/volPointInterpolation/pointPatchInterpolation/pointPatchInterpolate.C @@ -169,12 +169,6 @@ void pointPatchInterpolation::interpolate { pf.boundaryField()[patchi].initAddField(); } - else - { - // Bugfix: Need to update ordinary boundary conditions. - // Dario Zivkovic, 8/Dec/2018. - pf.boundaryField()[patchi].initEvaluate(); - } } forAll(pf.boundaryField(), patchi) @@ -186,15 +180,11 @@ void pointPatchInterpolation::interpolate pf.internalField() ); } - else - { - // Bugfix: Need to update ordinary boundary conditions. - // Dario Zivkovic, 8/Dec/2018. - pf.boundaryField()[patchi].evaluate(); - } } - // All boundaries already updated. Nothing to do. VV, 4/Dec/2017. + // Bugfix: Must update boundary conditions for e.g. fixedValue that changes + // within e.g. fvMotion solver. Dario Zivkovic, 21/Dec/2018. + pf.correctBoundaryConditions(); if (debug) {