From 7e05548ec035285d60f3d61f47b41cf5ca558b95 Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 14 May 2010 17:55:23 +0100 Subject: [PATCH] BUG: TimeActivatedExplicitSource : absolute source incorrect. Also added cellZone and all as source selection mechanism. --- .../TimeActivatedExplicitSource.C | 70 +++++++++++++------ .../TimeActivatedExplicitSource.H | 33 ++++----- .../TimeActivatedExplicitSourceI.H | 13 ++-- 3 files changed, 73 insertions(+), 43 deletions(-) diff --git a/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSource.C b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSource.C index b8fbe54a89..1873bbe3fe 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSource.C +++ b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSource.C @@ -33,7 +33,7 @@ template const Foam::wordList Foam::TimeActivatedExplicitSource:: selectionModeTypeNames_ ( - IStringStream("(points cellSet)")() + IStringStream("(points cellSet cellZone all)")() ); @@ -156,6 +156,15 @@ void Foam::TimeActivatedExplicitSource::setSelection dict.lookup("cellSet") >> cellSetName_; break; } + case smCellZone: + { + dict.lookup("cellZone") >> cellSetName_; + break; + } + case smAll: + { + break; + } default: { FatalErrorIn @@ -221,13 +230,14 @@ void Foam::TimeActivatedExplicitSource::setCellSet() { Info<< indent << "- selecting cells using points" << endl; - labelHashSet cellOwners; + labelHashSet selectedCells; + forAll(points_, i) { label cellI = mesh_.findCell(points_[i]); if (cellI >= 0) { - cellOwners.insert(cellI); + selectedCells.insert(cellI); } label globalCellI = returnReduce(cellI, maxOp