VirtualFluids 0.2.0
Parallel CFD LBM Solver
Loading...
Searching...
No Matches
GbGyroidThirdOrderLong.h
Go to the documentation of this file.
1//=======================================================================================
2// ____ ____ __ ______ __________ __ __ __ __
3// \ \ | | | | | _ \ |___ ___| | | | | / \ | |
4// \ \ | | | | | |_) | | | | | | | / \ | |
5// \ \ | | | | | _ / | | | | | | / /\ \ | |
6// \ \ | | | | | | \ \ | | | \__/ | / ____ \ | |____
7// \ \ | | |__| |__| \__\ |__| \________/ /__/ \__\ |_______|
8// \ \ | | ________________________________________________________________
9// \ \ | | | ______________________________________________________________|
10// \ \| | | | __ __ __ __ ______ _______
11// \ | | |_____ | | | | | | | | | _ \ / _____)
12// \ | | _____| | | | | | | | | | | \ \ \_______
13// \ | | | | |_____ | \_/ | | | | |_/ / _____ |
14// \ _____| |__| |________| \_______/ |__| |______/ (_______/
15//
16// This file is part of VirtualFluids. VirtualFluids is free software: you can
17// redistribute it and/or modify it under the terms of the GNU General Public
18// License as published by the Free Software Foundation, either version 3 of
19// the License, or (at your option) any later version.
20//
21// VirtualFluids is distributed in the hope that it will be useful, but WITHOUT
22// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
23// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
24// for more details.
25//
26// SPDX-License-Identifier: GPL-3.0-or-later
27// SPDX-FileCopyrightText: Copyright © VirtualFluids Project contributors, see AUTHORS.md in root folder
28//
33//=======================================================================================
34#ifndef GbGyroidThirdOrderLong_H
35#define GbGyroidThirdOrderLong_H
36
37#ifdef VF_BOOST
38
39#include <vector>
40
41#include <GbPoint3D.h>
44
45#define _USE_MATH_DEFINES
46#include <cmath>
47#include <math.h>
48
49class GbLine3D;
51
52#include <PointerDefinitions.h>
55
56
57class GbGyroidThirdOrderLong : public GbObject3D, public UbObserver
58{
59public:
61 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=0);
62 GbGyroidThirdOrderLong(const double & x1a, const double & x2a, const double & x3a, const double & x1b, const double & x2b, const double & x3b, const double & x1c, const double & x2c, const double & x3c, const double & x1d, const double & x2d, const double & x3d, const double & edgeLength, const double & dx);
65
66 GbGyroidThirdOrderLong* clone() override { return new GbGyroidThirdOrderLong(this); }
67 void finalize() override { throw UbException(UB_EXARGS, "finalize() - not implemented"); }
68
69
70
71 double getX1Centroid() override;
72 double getX1Minimum() override;
73 double getX1Maximum() override;
74 double getX2Centroid()override;
75 double getX2Minimum() override;
76 double getX2Maximum() override;
77 double getX3Centroid()override;
78 double getX3Minimum() override;
79 double getX3Maximum() override;
80 void setCenterCoordinates(const double &x1, const double &x2, const double &x3) override {throw UbException(UB_EXARGS, "finalize() - not implemented");
81 }
82
83 void translate(const double& x1, const double& x2, const double& x3) override { throw UbException(UB_EXARGS, "finalize() - not implemented"); }
84 void rotate(const double& rx1, const double& rx2, const double& rx3) override{ throw UbException(UB_EXARGS, "finalize() - not implemented"); }
85 void scale(const double& sx1, const double& sx2, const double& sx3) override { throw UbException(UB_EXARGS, "finalize() - not implemented"); }
86
87 double getLengthX1();
88 double getLengthX2();
89 double getLengthX3();
90
91 bool isPointInGbObject3D(const double &x1p, const double &x2p, const double &x3p, bool &pointinboundary) override { throw UbException(UB_EXARGS, "finalize() - not implemented"); }
92 bool isPointInGbObject3D(const double &x1p, const double &x2p, const double &x3p) override;
93 bool isCellInsideGbObject3D(const double &x1a, const double &x2a, const double &x3a, const double &x1b,
94 const double &x2b, const double &x3b) override;
95 bool isCellCuttingGbObject3D(const double &x1a, const double &x2a, const double &x3a, const double &x1b,
96 const double &x2b, const double &x3b) override;
97 bool isCellInsideOrCuttingGbObject3D(const double &x1a, const double &x2a, const double &x3a, const double &x1b,
98 const double &x2b, const double &x3b) override;
99 double getCellVolumeInsideGbObject3D(const double &x1a, const double &x2a, const double &x3a, const double &x1b,
100 const double &x2b, const double &x3b) override { throw UbException(UB_EXARGS, "finalize() - not implemented"); }
101
102 GbPoint3D *calculateInterSectionPoint3D(GbPoint3D &point1, GbPoint3D &point2);
103 GbLine3D *createClippedLine3D (GbPoint3D &point1, GbPoint3D &point2) override { throw UbException(UB_EXARGS, "finalize() - not implemented"); }
104
105 std::vector<GbTriangle3D *> getSurfaceTriangleSet() override { throw UbException(UB_EXARGS, "finalize() - not implemented"); }
106
107 void addSurfaceTriangleSet(std::vector<UbTupleFloat3> &nodes, std::vector<UbTupleInt3> &triangles) override { throw UbException(UB_EXARGS, "finalize() - not implemented"); }
108
109 bool hasRaytracing() override { return true; }
110
111 double getIntersectionRaytraceFactor (const double& x1, const double& x2, const double& x3, const double& rx1, const double& rx2, const double& rx3) override;
112
113 double evaluateImplicitFunction(const double & x1, const double & x2, const double & x3, const double & position);
114
115 double getDistance(const double& x1p, const double& x2p, const double& x3p) { throw UbException(UB_EXARGS, "finalize() - not implemented"); }
116
117 std::string toString() override { throw UbException(UB_EXARGS, "finalize() - not implemented"); }
118
119 void objectChanged(UbObservable *changedObject) override;
120 void objectWillBeDeleted(UbObservable *objectForDeletion) override;
121
123
124protected:
125 GbPoint3D* p1;
126 GbPoint3D* p2;
127 GbPoint3D* p3;
128 GbPoint3D* p4;
129 double edgeLength;
130 double dx;
131 double thickness;
132private:
133};
134
135
136
137#endif
138#endif
139
This Class provides basic 3D line objects.
Definition GbLine3D.h:59
This Interface provides basic 3D geometry objects methods.
Definition GbObject3D.h:64
This Class provides basic 3D point objects.
Definition GbPoint3D.h:49
Observable object.
Observer.
Definition UbObserver.h:51
std::shared_ptr< T > SPtr
virtual bool isPointInGbObject3D(GbPoint3D *p)
const real dx
#define UB_EXARGS
Definition UbException.h:73
double getDistance(const GbPoint3D &p11, const GbPoint3D &p12)
std::string toString(const T &x, int precision=15)
Definition UbSystem.h:199