commit
0410eb6864
|
@ -24,6 +24,7 @@ Licence:
|
||||||
#include "cGAbsoluteLinearCF.hpp"
|
#include "cGAbsoluteLinearCF.hpp"
|
||||||
#include "cGRelativeLinearCF.hpp"
|
#include "cGRelativeLinearCF.hpp"
|
||||||
#include "cGNonLinearCF.hpp"
|
#include "cGNonLinearCF.hpp"
|
||||||
|
#include "cGNonLinearCF2.hpp"
|
||||||
|
|
||||||
#include "grainRolling.hpp"
|
#include "grainRolling.hpp"
|
||||||
|
|
||||||
|
@ -42,6 +43,9 @@ using nonLimitedCGRelativeLinearGrainRolling = grainRolling<cGRelativeLinear<fal
|
||||||
using limitedCGNonLinearGrainRolling = grainRolling<cGNonLinear<true>>;
|
using limitedCGNonLinearGrainRolling = grainRolling<cGNonLinear<true>>;
|
||||||
using nonLimitedCGNonLinearGrainRolling = grainRolling<cGNonLinear<false>>;
|
using nonLimitedCGNonLinearGrainRolling = grainRolling<cGNonLinear<false>>;
|
||||||
|
|
||||||
|
using limitedCGNonLinear2GrainRolling = grainRolling<cGNonLinear2<true>>;
|
||||||
|
using nonLimitedCGNonLinear2GrainRolling = grainRolling<cGNonLinear2<false>>;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -96,10 +96,10 @@ public:
|
||||||
realx3 w_hat = wi-wj;
|
realx3 w_hat = wi-wj;
|
||||||
real w_hat_mag = length(w_hat);
|
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;
|
w_hat /= w_hat_mag;
|
||||||
else
|
else
|
||||||
w_hat = zero;
|
w_hat = static_cast<real>(0.0);
|
||||||
|
|
||||||
auto Reff = (Ri*Rj)/(Ri+Rj);
|
auto Reff = (Ri*Rj)/(Ri+Rj);
|
||||||
|
|
||||||
|
|
|
@ -94,10 +94,10 @@ public:
|
||||||
realx3 w_hat = wi-wj;
|
realx3 w_hat = wi-wj;
|
||||||
real w_hat_mag = length(w_hat);
|
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;
|
w_hat /= w_hat_mag;
|
||||||
else
|
else
|
||||||
w_hat = zero;
|
w_hat = static_cast<real>(0.0);
|
||||||
|
|
||||||
auto Reff = (Ri*Rj)/(Ri+Rj);
|
auto Reff = (Ri*Rj)/(Ri+Rj);
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ pFlow::rotatingAxis::rotatingAxis
|
||||||
timeInterval(),
|
timeInterval(),
|
||||||
line(p1, p2),
|
line(p1, p2),
|
||||||
omega_(omega),
|
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_;
|
auto tmp = omega_;
|
||||||
omega_ = omega;
|
omega_ = omega;
|
||||||
rotating_ = !equal(omega, zero);
|
rotating_ = !equal(omega, static_cast<real>(0.0));
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ bool pFlow::rotatingAxis::read
|
||||||
if(!timeInterval::read(dict))return false;
|
if(!timeInterval::read(dict))return false;
|
||||||
if(!line::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);
|
setOmega(omega);
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -112,20 +112,20 @@ public:
|
||||||
bool inPositiveDistance(const realx3& p, real dist)const
|
bool inPositiveDistance(const realx3& p, real dist)const
|
||||||
{
|
{
|
||||||
real d = pointFromPlane(p);
|
real d = pointFromPlane(p);
|
||||||
return d >= zero && d <= dist;
|
return d >= static_cast<real>(0.0) && d <= dist;
|
||||||
}
|
}
|
||||||
|
|
||||||
INLINE_FUNCTION_HD
|
INLINE_FUNCTION_HD
|
||||||
bool inNegativeDistance(const realx3& p, real dist)const
|
bool inNegativeDistance(const realx3& p, real dist)const
|
||||||
{
|
{
|
||||||
real d = pointFromPlane(p);
|
real d = pointFromPlane(p);
|
||||||
return d < zero && d >= -dist;
|
return d < static_cast<real>(0.0) && d >= -dist;
|
||||||
}
|
}
|
||||||
|
|
||||||
INLINE_FUNCTION_HD
|
INLINE_FUNCTION_HD
|
||||||
bool pointOnPlane(const realx3& p)const
|
bool pointOnPlane(const realx3& p)const
|
||||||
{
|
{
|
||||||
return equal(pointFromPlane(p),zero);
|
return equal(pointFromPlane(p),static_cast<real>(0.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
INLINE_FUNCTION_HD
|
INLINE_FUNCTION_HD
|
||||||
|
|
|
@ -38,8 +38,8 @@ INLINE_FUNCTION_HD
|
||||||
realx3 normal(const realx3& p1, const realx3& p2, const realx3& p3)
|
realx3 normal(const realx3& p1, const realx3& p2, const realx3& p3)
|
||||||
{
|
{
|
||||||
auto n = cross(p2-p1, p3-p1);
|
auto n = cross(p2-p1, p3-p1);
|
||||||
if( equal(n.length(), zero) )
|
if( equal(n.length(), static_cast<real>(0.0)) )
|
||||||
return zero3;
|
return realx3(0);
|
||||||
else
|
else
|
||||||
return normalize(n);
|
return normalize(n);
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ bool valid
|
||||||
const realx3& p3
|
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));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue