mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: relocate zero_one to pTraits, allows reuse for scalar clamping
ENH: add pTraits and IO for std::int8_t STYLE: cull some implicitly available includes - pTraits.H is included by label/scalar etc - zero.H is included by UList STYLE: cull redundant forward declarations for Istream/Ostream
This commit is contained in:
@ -49,16 +49,13 @@ SourceFiles
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
// Forward Declarations
|
||||
class Istream;
|
||||
class Ostream;
|
||||
|
||||
namespace functionObjects
|
||||
{
|
||||
// Forward Declarations
|
||||
class eulerianParticle;
|
||||
}
|
||||
|
||||
// Forward declaration of friend functions and operators
|
||||
// Forward Declarations
|
||||
Istream& operator>>(Istream&, functionObjects::eulerianParticle&);
|
||||
Ostream& operator<<(Ostream&, const functionObjects::eulerianParticle&);
|
||||
|
||||
|
||||
@ -92,15 +92,13 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of classes
|
||||
class Istream;
|
||||
class Ostream;
|
||||
// Forward Declarations
|
||||
class objectRegistry;
|
||||
|
||||
namespace functionObjects
|
||||
{
|
||||
|
||||
// Forward declaration of friend functions and operators
|
||||
// Forward Declarations
|
||||
class fieldAverageItem;
|
||||
Istream& operator>>(Istream&, fieldAverageItem&);
|
||||
Ostream& operator<<(Ostream&, const fieldAverageItem&);
|
||||
|
||||
@ -670,7 +670,7 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::processValues
|
||||
// Uniformity index
|
||||
const scalar ui = 1 - numer/(2*mag(mean*areaTotal) + ROOTVSMALL);
|
||||
|
||||
return clamp(ui, 0, 1);
|
||||
return clamp(ui, zero_one{});
|
||||
}
|
||||
|
||||
default:
|
||||
@ -756,7 +756,7 @@ Foam::functionObjects::fieldValues::surfaceFieldValue::processValues
|
||||
// Uniformity index
|
||||
const scalar ui = 1 - numer/(2*mag(mean*areaTotal) + ROOTVSMALL);
|
||||
|
||||
return vector(clamp(ui, 0, 1), 0, 0);
|
||||
return vector(clamp(ui, zero_one{}), 0, 0);
|
||||
}
|
||||
|
||||
default:
|
||||
|
||||
@ -152,7 +152,7 @@ Description
|
||||
For option 6, the following relation is used:
|
||||
|
||||
\f[
|
||||
fCoWeight = clamp((Co - Co1)/(Co2 - Co1), 0, 1)
|
||||
fCoWeight = clamp((Co - Co1)/(Co2 - Co1), zero_one{});
|
||||
\f]
|
||||
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user