VirtualFluids 0.2.0
Parallel CFD LBM Solver
Loading...
Searching...
No Matches
GbGyroidThirdOrder.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 GbGyroidThirdOrder_H
35#define GbGyroidThirdOrder_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 GbGyroidThirdOrder : public GbObject3D, public UbObserver
58{
59public:
61 GbGyroidThirdOrder(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
63 GbGyroidThirdOrder(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);
66
67 GbGyroidThirdOrder* clone() override { return new GbGyroidThirdOrder(this); }
68 void finalize() override { throw UbException(UB_EXARGS, "finalize() - not implemented"); }
69
70 double getX1Centroid() override;
71 double getX1Minimum() override;
72 double getX1Maximum() override;
73 double getX2Centroid()override;
74 double getX2Minimum() override;
75 double getX2Maximum() override;
76 double getX3Centroid()override;
77 double getX3Minimum() override;
78 double getX3Maximum() override;
79 void setCenterCoordinates(const double &x1, const double &x2, const double &x3) override {throw UbException(UB_EXARGS, "finalize() - not implemented");
80 }
81
82 void translate(const double& x1, const double& x2, const double& x3) override { throw UbException(UB_EXARGS, "finalize() - not implemented"); }
83 void rotate(const double& rx1, const double& rx2, const double& rx3) override{ throw UbException(UB_EXARGS, "finalize() - not implemented"); }
84 void scale(const double& sx1, const double& sx2, const double& sx3) override { throw UbException(UB_EXARGS, "finalize() - not implemented"); }
85
86 double getLengthX1();
87 double getLengthX2();
88 double getLengthX3();
89
90 bool isPointInGbObject3D(const double &x1p, const double &x2p, const double &x3p, bool &pointinboundary) override { throw UbException(UB_EXARGS, "finalize() - not implemented"); }
91 bool isPointInGbObject3D(const double &x1p, const double &x2p, const double &x3p) override;
92 bool isCellInsideGbObject3D(const double &x1a, const double &x2a, const double &x3a, const double &x1b,
93 const double &x2b, const double &x3b) override;
94 bool isCellCuttingGbObject3D(const double &x1a, const double &x2a, const double &x3a, const double &x1b,
95 const double &x2b, const double &x3b) override;
96 bool isCellInsideOrCuttingGbObject3D(const double &x1a, const double &x2a, const double &x3a, const double &x1b,
97 const double &x2b, const double &x3b) override;
98 double getCellVolumeInsideGbObject3D(const double &x1a, const double &x2a, const double &x3a, const double &x1b,
99 const double &x2b, const double &x3b) override { throw UbException(UB_EXARGS, "finalize() - not implemented"); }
100 GbPoint3D *calculateInterSectionPoint3D(GbPoint3D &point1, GbPoint3D &point2);
101 GbLine3D *createClippedLine3D (GbPoint3D &point1, GbPoint3D &point2) override { throw UbException(UB_EXARGS, "finalize() - not implemented"); }
102 std::vector<GbTriangle3D *> getSurfaceTriangleSet() override { throw UbException(UB_EXARGS, "finalize() - not implemented"); }
103 void addSurfaceTriangleSet(std::vector<UbTupleFloat3> &nodes, std::vector<UbTupleInt3> &triangles) override { throw UbException(UB_EXARGS, "finalize() - not implemented"); }
104 bool hasRaytracing() override { return true; }
105 double getIntersectionRaytraceFactor (const double& x1, const double& x2, const double& x3, const double& rx1, const double& rx2, const double& rx3) override;
106 double evaluateImplicitFunction(const double & x1, const double & x2, const double & x3, const double & position);
107 double getDistance(const double& x1p, const double& x2p, const double& x3p) { throw UbException(UB_EXARGS, "finalize() - not implemented"); }
108 std::string toString() override { throw UbException(UB_EXARGS, "finalize() - not implemented"); }
109 void objectChanged(UbObservable *changedObject) override;
110 void objectWillBeDeleted(UbObservable *objectForDeletion) override;
112
113protected:
114 GbPoint3D* p1;
115 GbPoint3D* p2;
116 GbPoint3D* p3;
117 GbPoint3D* p4;
118 double edgeLength;
119 double dx;
120 double thickness;
121private:
122};
123
124
125
126#endif
127#endif
128
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