mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add Barycentric2D outside() test
This commit is contained in:
committed by
Andrew Heather
parent
f94be1bebb
commit
d25b19f6aa
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2017 OpenFOAM Foundation
|
||||
@ -27,8 +27,8 @@ Class
|
||||
Foam::Barycentric2D
|
||||
|
||||
Description
|
||||
Templated 2D Barycentric derived from VectorSpace. Has 3 components, one of
|
||||
which is redundant.
|
||||
Templated 2D Barycentric derived from VectorSpace.
|
||||
Has 3 components, one of which is redundant.
|
||||
|
||||
SourceFiles
|
||||
Barycentric2DI.H
|
||||
@ -95,9 +95,19 @@ public:
|
||||
inline const Cmpt& b() const;
|
||||
inline const Cmpt& c() const;
|
||||
|
||||
|
||||
// Edit
|
||||
|
||||
inline Cmpt& a();
|
||||
inline Cmpt& b();
|
||||
inline Cmpt& c();
|
||||
|
||||
|
||||
// Tests
|
||||
|
||||
//- True if any coordinates are negative
|
||||
inline bool outside() const;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd |
|
||||
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
| Copyright (C) 2017 OpenFOAM Foundation
|
||||
@ -97,6 +97,13 @@ inline Cmpt& Foam::Barycentric2D<Cmpt>::c()
|
||||
}
|
||||
|
||||
|
||||
template<class Cmpt>
|
||||
inline bool Foam::Barycentric2D<Cmpt>::outside() const
|
||||
{
|
||||
return ((this->v_[A] < 0) || (this->v_[B]) < 0 || (this->v_[C] < 0));
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
|
||||
Reference in New Issue
Block a user