mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -481,7 +481,8 @@ Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::faceAreaWeightAMI
|
||||
const scalarField& srcMagSf,
|
||||
const scalarField& tgtMagSf,
|
||||
const faceAreaIntersect::triangulationMode& triMode,
|
||||
const bool reverseTarget
|
||||
const bool reverseTarget,
|
||||
const bool restartUncoveredSourceFace
|
||||
)
|
||||
:
|
||||
AMIMethod<SourcePatch, TargetPatch>
|
||||
@ -492,7 +493,8 @@ Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::faceAreaWeightAMI
|
||||
tgtMagSf,
|
||||
triMode,
|
||||
reverseTarget
|
||||
)
|
||||
),
|
||||
restartUncoveredSourceFace_(restartUncoveredSourceFace)
|
||||
{}
|
||||
|
||||
|
||||
@ -557,7 +559,7 @@ void Foam::faceAreaWeightAMI<SourcePatch, TargetPatch>::calculate
|
||||
|
||||
|
||||
// Check for badly covered faces
|
||||
if (debug)
|
||||
if (restartUncoveredSourceFace_)
|
||||
{
|
||||
restartUncoveredSourceFace
|
||||
(
|
||||
|
||||
@ -51,6 +51,13 @@ class faceAreaWeightAMI
|
||||
:
|
||||
public AMIMethod<SourcePatch, TargetPatch>
|
||||
{
|
||||
private:
|
||||
|
||||
// Private data
|
||||
|
||||
//- Flag to restart uncovered source faces
|
||||
const bool restartUncoveredSourceFace_;
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
@ -136,7 +143,8 @@ public:
|
||||
const scalarField& srcMagSf,
|
||||
const scalarField& tgtMagSf,
|
||||
const faceAreaIntersect::triangulationMode& triMode,
|
||||
const bool reverseTarget = false
|
||||
const bool reverseTarget = false,
|
||||
const bool restartUncoveredSourceFace = true
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -47,13 +47,11 @@ Foam::pointIndexHit Foam::searchableSphere::findNearest
|
||||
{
|
||||
pointIndexHit info(false, sample, -1);
|
||||
|
||||
const vector n(sample-centre_);
|
||||
scalar magSqrN = magSqr(n);
|
||||
const vector n(sample - centre_);
|
||||
scalar magN = mag(n);
|
||||
|
||||
if (nearestDistSqr >= magSqrN)
|
||||
if (nearestDistSqr >= sqr(magN - radius_))
|
||||
{
|
||||
scalar magN = Foam::sqrt(magSqrN);
|
||||
|
||||
if (magN < ROOTVSMALL)
|
||||
{
|
||||
info.rawPoint() = centre_ + vector(1,0,0)*radius_;
|
||||
|
||||
Reference in New Issue
Block a user