44#include <boost/math/tools/roots.hpp>
48using boost::math::tools::bisect;
51GbGyroidThirdOrderLong::GbGyroidThirdOrderLong()
57GbGyroidThirdOrderLong::GbGyroidThirdOrderLong(
const double&
x1a,
const double&
x2a,
const double&
x3a,
const double&
x1b,
const double&
x2b,
const double&
x3b,
const double&
edgeLength,
const double&
dx,
const double&
thickness) :
GbObject3D()
61 this->p1->addObserver(
this);
62 this->p2->addObserver(
this);
66 this->
p3->addObserver(
this);
67 this->
p4->addObserver(
this);
79GbGyroidThirdOrderLong::~GbGyroidThirdOrderLong()
82 this->p1->removeObserver(
this);
84 this->p2->removeObserver(
this);
86 this->
p3->removeObserver(
this);
88 this->
p4->removeObserver(
this);
93 return abs(min - max) <= 10e-10;
110 double t17, t3, t2,
t18,
t20,
t8,
t13,
t5,
t9,
t6,
t11,
t14;
111 double f300,
f210,
f201,
f120,
f102,
f030,
f021,
f012,
f003,
f200,
f110,
f101,
f020,
f011,
f002,
f100,
f010,
f001,
f000;
195bool GbGyroidThirdOrderLong::isPointInGbObject3D(
const double& x1,
const double& x2,
const double& x3)
205double GbGyroidThirdOrderLong::getIntersectionRaytraceFactor(
const double& x1,
const double& x2,
const double& x3,
const double&
rx1,
const double&
rx2,
const double&
rx3)
225 if (f(from)*f(
to) < 0)
238double GbGyroidThirdOrderLong::evaluateImplicitFunction(
const double& x1,
const double& x2,
const double& x3,
const double& position)
253double GbGyroidThirdOrderLong::getX1Centroid()
255 return (0.5*(p1->x1 + p2->x1));
258double GbGyroidThirdOrderLong::getX1Minimum()
260 return (this->p1->x1 <
this->p2->x1 ?
this->p1->x1 :
this->p2->x1);
263double GbGyroidThirdOrderLong::getX1Maximum()
265 return (this->p1->x1 >
this->p2->x1 ?
this->p1->x1 :
this->p2->x1);
268double GbGyroidThirdOrderLong::getX2Centroid()
270 return (0.5*(p1->x2 + p2->x2));
273double GbGyroidThirdOrderLong::getX2Minimum()
275 return (this->p1->x2 <
this->p2->x2 ?
this->p1->x2 :
this->p2->x2);
278double GbGyroidThirdOrderLong::getX2Maximum()
280 return (this->p1->x2 >
this->p2->x2 ?
this->p1->x2 :
this->p2->x2);
283double GbGyroidThirdOrderLong::getX3Centroid()
285 return (0.5*(p1->x3 + p2->x3));
288double GbGyroidThirdOrderLong::getX3Minimum()
290 return (this->p1->x3 <
this->p2->x3 ?
this->p1->x3 :
this->p2->x3);
293double GbGyroidThirdOrderLong::getX3Maximum()
295 return (this->p1->x3 >
this->p2->x3 ?
this->p1->x3 :
this->p2->x3);
298bool GbGyroidThirdOrderLong::isCellInsideGbObject3D(
const double&
x1a,
const double&
x2a,
const double&
x3a,
const double&
x1b,
const double&
x2b,
const double&
x3b)
300 if (this->isPointInGbObject3D(
x1a,
x2a,
x3a)
301 && this->isPointInGbObject3D(
x1b,
x2a,
x3a)
302 && this->isPointInGbObject3D(
x1b,
x2b,
x3a)
303 && this->isPointInGbObject3D(
x1a,
x2b,
x3a)
304 && this->isPointInGbObject3D(
x1a,
x2a,
x3b)
305 && this->isPointInGbObject3D(
x1b,
x2a,
x3b)
306 && this->isPointInGbObject3D(
x1b,
x2b,
x3b)
307 && this->isPointInGbObject3D(
x1a,
x2b,
x3b))
314bool GbGyroidThirdOrderLong::isCellInsideOrCuttingGbObject3D(
const double&
x1a,
const double&
x2a,
const double&
x3a,
const double&
x1b,
const double&
x2b,
const double&
x3b)
316 if ((this->isPointInGbObject3D(
x1a,
x2a,
x3a) ==
false)
317 && (this->isPointInGbObject3D(
x1b,
x2a,
x3a) ==
false)
318 && (this->isPointInGbObject3D(
x1b,
x2b,
x3a) ==
false)
319 && (this->isPointInGbObject3D(
x1a,
x2b,
x3a) ==
false)
320 && (this->isPointInGbObject3D(
x1a,
x2a,
x3b) ==
false)
321 && (this->isPointInGbObject3D(
x1b,
x2a,
x3b) ==
false)
322 && (this->isPointInGbObject3D(
x1b,
x2b,
x3b) ==
false)
323 && (this->isPointInGbObject3D(
x1a,
x2b,
x3b) ==
false))
330bool GbGyroidThirdOrderLong::isCellCuttingGbObject3D(
const double&
x1a,
const double&
x2a,
const double&
x3a,
const double&
x1b,
const double&
x2b,
const double&
x3b)
346 this->notifyObserversObjectChanged();
This Interface provides basic 3D geometry objects methods.
This Class provides basic 3D point objects.
std::shared_ptr< T > SPtr
bool greaterEqual(const T1 &value, const T2 &reference)
bool lessEqual(const T1 &value, const T2 &reference)
(q) for second order Boundary Conditions (BCs)