From da5a362f3dc79ef18de0275afbc1b98d293e4581 Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 14 May 2010 17:51:19 +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 1552b8f8..151c94ea 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSource.C +++ b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSource.C @@ -34,7 +34,7 @@ template const Foam::wordList Foam::TimeActivatedExplicitSource:: selectionModeTypeNames_ ( - IStringStream("(points cellSet)")() + IStringStream("(points cellSet cellZone all)")() ); @@ -157,6 +157,15 @@ void Foam::TimeActivatedExplicitSource::setSelection dict.lookup("cellSet") >> cellSetName_; break; } + case smCellZone: + { + dict.lookup("cellZone") >> cellSetName_; + break; + } + case smAll: + { + break; + } default: { FatalErrorIn @@ -222,13 +231,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