Merge branch 'develop' of github.com:PhasicFlow/phasicFlow into develop

This commit is contained in:
HRN 2025-02-01 22:15:34 +03:30
commit 3b88b6156d
7 changed files with 18 additions and 14 deletions

View File

@ -24,6 +24,7 @@ Licence:
#include "cGAbsoluteLinearCF.hpp"
#include "cGRelativeLinearCF.hpp"
#include "cGNonLinearCF.hpp"
#include "cGNonLinearCF2.hpp"
#include "grainRolling.hpp"
@ -42,6 +43,9 @@ using nonLimitedCGRelativeLinearGrainRolling = grainRolling<cGRelativeLinear<fal
using limitedCGNonLinearGrainRolling = grainRolling<cGNonLinear<true>>;
using nonLimitedCGNonLinearGrainRolling = grainRolling<cGNonLinear<false>>;
using limitedCGNonLinear2GrainRolling = grainRolling<cGNonLinear2<true>>;
using nonLimitedCGNonLinear2GrainRolling = grainRolling<cGNonLinear2<false>>;
}

View File

@ -96,10 +96,10 @@ public:
realx3 w_hat = wi-wj;
real w_hat_mag = length(w_hat);
if( !equal(w_hat_mag,zero) )
if( !equal(w_hat_mag,static_cast<real>(0.0)) )
w_hat /= w_hat_mag;
else
w_hat = zero;
w_hat = static_cast<real>(0.0);
auto Reff = (Ri*Rj)/(Ri+Rj);

View File

@ -94,10 +94,10 @@ public:
realx3 w_hat = wi-wj;
real w_hat_mag = length(w_hat);
if( !equal(w_hat_mag,zero) )
if( !equal(w_hat_mag,static_cast<real>(0.0)) )
w_hat /= w_hat_mag;
else
w_hat = zero;
w_hat = static_cast<real>(0.0);
auto Reff = (Ri*Rj)/(Ri+Rj);

View File

@ -46,4 +46,4 @@ createInteraction(pFlow::cfModels::limitedCGNonLinearGrainRolling, pFlow::rotati
createInteraction(pFlow::cfModels::nonLimitedCGNonLinearGrainRolling, pFlow::rotationAxisMotionGeometry);
createInteraction(pFlow::cfModels::limitedCGNonLinearGrainRolling, pFlow::stationaryGeometry);
createInteraction(pFlow::cfModels::nonLimitedCGNonLinearGrainRolling, pFlow::stationaryGeometry);
createInteraction(pFlow::cfModels::nonLimitedCGNonLinearGrainRolling, pFlow::stationaryGeometry);

View File

@ -47,7 +47,7 @@ pFlow::rotatingAxis::rotatingAxis
timeInterval(),
line(p1, p2),
omega_(omega),
rotating_(!equal(omega,zero))
rotating_(!equal(omega,static_cast<real>(0.0)))
{
}
@ -58,7 +58,7 @@ pFlow::real pFlow::rotatingAxis::setOmega(real omega)
{
auto tmp = omega_;
omega_ = omega;
rotating_ = !equal(omega, zero);
rotating_ = !equal(omega, static_cast<real>(0.0));
return tmp;
}
@ -72,7 +72,7 @@ bool pFlow::rotatingAxis::read
if(!timeInterval::read(dict))return false;
if(!line::read(dict)) return false;
real omega = dict.getValOrSet("omega", zero);
real omega = dict.getValOrSet("omega", static_cast<real>(0.0));
setOmega(omega);
return true;

View File

@ -112,20 +112,20 @@ public:
bool inPositiveDistance(const realx3& p, real dist)const
{
real d = pointFromPlane(p);
return d >= zero && d <= dist;
return d >= static_cast<real>(0.0) && d <= dist;
}
INLINE_FUNCTION_HD
bool inNegativeDistance(const realx3& p, real dist)const
{
real d = pointFromPlane(p);
return d < zero && d >= -dist;
return d < static_cast<real>(0.0) && d >= -dist;
}
INLINE_FUNCTION_HD
bool pointOnPlane(const realx3& p)const
{
return equal(pointFromPlane(p),zero);
return equal(pointFromPlane(p),static_cast<real>(0.0));
}
INLINE_FUNCTION_HD

View File

@ -38,8 +38,8 @@ INLINE_FUNCTION_HD
realx3 normal(const realx3& p1, const realx3& p2, const realx3& p3)
{
auto n = cross(p2-p1, p3-p1);
if( equal(n.length(), zero) )
return zero3;
if( equal(n.length(), static_cast<real>(0.0)) )
return realx3(0);
else
return normalize(n);
}
@ -52,7 +52,7 @@ bool valid
const realx3& p3
)
{
return !equal(cross(p2-p1, p3-p1).length(), zero);
return !equal(cross(p2-p1, p3-p1).length(), static_cast<real>(0.0));
}
}