ENH: Field sources - added warning msg if seed point is not found

- also minor code style tweaks
This commit is contained in:
andy
2010-02-04 13:50:05 +00:00
parent 21c3504199
commit 7c0386fcf5
5 changed files with 19 additions and 8 deletions

View File

@ -220,6 +220,8 @@ void Foam::TimeActivatedExplicitSource<Type>::setCellSet()
{
case smPoints:
{
Info<< indent << "- selecting cells using points" << endl;
labelHashSet cellOwners;
forAll(points_, i)
{
@ -228,7 +230,16 @@ void Foam::TimeActivatedExplicitSource<Type>::setCellSet()
{
cellOwners.insert(cellI);
}
label globalCellI = returnReduce(cellI, maxOp<label>());
if (globalCellI < 0)
{
WarningIn("TimeActivatedExplicitSource<Type>::setCellIds()")
<< "Unable to find owner cell for point " << points_[i]
<< endl;
}
}
cellsPtr_.reset(new cellSet(mesh_, "points", cellOwners));
break;
@ -243,7 +254,7 @@ void Foam::TimeActivatedExplicitSource<Type>::setCellSet()
}
default:
{
FatalErrorIn("TimeActivatedExplicitSource::setCellIds()")
FatalErrorIn("TimeActivatedExplicitSource<Type>::setCellIds()")
<< "Unknown selectionMode "
<< selectionModeTypeNames_[selectionMode_]
<< ". Valid selectionMode types are" << selectionModeTypeNames_

View File

@ -365,7 +365,7 @@ public:
friend Ostream& operator<< <Type>
(
Ostream& os,
const TimeActivatedExplicitSource& sp
const TimeActivatedExplicitSource& source
);
};

View File

@ -70,7 +70,7 @@ void Foam::TimeActivatedExplicitSource<Type>::writeData(Ostream& os) const
{
FatalErrorIn
(
"TimeActivatedExplicitSource<Type>::writeDict"
"TimeActivatedExplicitSource<Type>::writeData"
"("
"Ostream&, "
"bool"
@ -91,10 +91,10 @@ template<class Type>
Foam::Ostream& Foam::operator<<
(
Ostream& os,
const TimeActivatedExplicitSource<Type>& sp
const TimeActivatedExplicitSource<Type>& source
)
{
sp.writeData(os);
source.writeData(os);
return os;
}

View File

@ -212,10 +212,10 @@ template<class Type>
Foam::Ostream& Foam::operator<<
(
Ostream& os,
const TimeActivatedExplicitSourceList<Type>& spl
const TimeActivatedExplicitSourceList<Type>& sources
)
{
spl.writeData(os);
sources.writeData(os);
return os;
}

View File

@ -150,7 +150,7 @@ public:
friend Ostream& operator<< <Type>
(
Ostream& os,
const TimeActivatedExplicitSourceList& sp
const TimeActivatedExplicitSourceList& sources
);
};