ENH: AMI - added optional normailisation flag/function

This commit is contained in:
andy
2013-05-28 12:31:47 +01:00
parent a5a15f29c5
commit 8205da653a
2 changed files with 19 additions and 8 deletions

View File

@ -241,17 +241,16 @@ Foam::label Foam::AMIMethod<SourcePatch, TargetPatch>::findTargetFace
pointIndexHit sample = treePtr_->findNearest(srcPt, 10.0*srcFaceArea);
if (debug)
{
Pout<< "Source point = " << srcPt << ", Sample point = "
<< sample.hitPoint() << ", Sample index = " << sample.index()
<< endl;
}
if (sample.hit())
{
targetFaceI = sample.index();
if (debug)
{
Pout<< "Source point = " << srcPt << ", Sample point = "
<< sample.hitPoint() << ", Sample index = " << sample.index()
<< endl;
}
}
return targetFaceI;
@ -352,4 +351,13 @@ Foam::AMIMethod<SourcePatch, TargetPatch>::~AMIMethod()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class SourcePatch, class TargetPatch>
bool Foam::AMIMethod<SourcePatch, TargetPatch>::normalise() const
{
return true;
}
// ************************************************************************* //

View File

@ -207,6 +207,9 @@ public:
// Note: this should be empty for correct functioning
inline const labelList& srcNonOverlap() const;
//- Flag to indicate that weights should be normalised
virtual bool normalise() const;
// Manipulation