VirtualFluids 0.2.0
Parallel CFD LBM Solver
Loading...
Searching...
No Matches
GbObjectGroup3D.cpp
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#include <geometry3d/GbLine3D.h>
39
40using namespace std;
41
42/*=====================================================*/
43GbObjectGroup3D::GbObjectGroup3D() { this->setName("ObjectGroup"); }
44/*=====================================================*/
46/*=====================================================*/
47void GbObjectGroup3D::finalize() { throw UbException(UB_EXARGS, "not implemented."); }
48/*=======================================================*/
49void GbObjectGroup3D::setCenterCoordinates(const double & /*x1*/, const double & /*x2*/, const double & /*x3*/)
50{
51 throw UbException(UB_EXARGS, "not implemented.");
52}
53/*=====================================================*/
54double GbObjectGroup3D::getDistance(GbPoint3D * /*p*/) { throw UbException(UB_EXARGS, "not implemented."); }
55/*=====================================================*/
56
57void GbObjectGroup3D::setCenterX1Coordinate(const double & /*value*/)
58{
59 throw UbException(UB_EXARGS, "not implemented.");
60}
61/*=====================================================*/
62void GbObjectGroup3D::setCenterX2Coordinate(const double & /*value*/)
63{
64 throw UbException(UB_EXARGS, "not implemented.");
65}
66/*=====================================================*/
67void GbObjectGroup3D::setCenterX3Coordinate(const double & /*value*/)
68{
69 throw UbException(UB_EXARGS, "not implemented.");
70}
71/*=====================================================*/
72void GbObjectGroup3D::setRadius(const double & /*radius*/) { throw UbException(UB_EXARGS, "not implemented."); }
73/*=====================================================*/
74double GbObjectGroup3D::getDistance(const double & /*x1p*/, const double & /*x2p*/, const double & /*x3p*/)
75{
76 throw UbException(UB_EXARGS, "not implemented.");
77}
78/*=====================================================*/
79// true, wenn 'in Object' oder 'auf Boundary'!
80bool GbObjectGroup3D::isPointInGbObject3D(const double & /*x1p*/, const double & /*x2p*/, const double & /*x3p*/)
81{
82 return false;
83}
84/*=====================================================*/
85// true, wenn 'in Object' oder 'auf Boundary'!
86bool GbObjectGroup3D::isPointInGbObject3D(const double & /*x1p*/, const double & /*x2p*/, const double & /*x3p*/,
87 bool & /*pointIsOnBoundary*/)
88{
89 return false;
90}
91/*=====================================================*/
93{
95 ss << "GbObjectGroup3D[";
96 ss << "mid=" << midPoint->toString() << ", r=" << radius << "]";
97 return ss.str();
98}
99/*=====================================================*/
101/*=========================================================================*/
103{
105
106 // loop ueber alle objekte in der group
107 for (std::list<GbObject3D *>::iterator iter = this->geoobjects.begin(); iter != this->geoobjects.end(); iter++) {
108 vector<GbTriangle3D *> triangles;
109 triangles = (*iter)->getSurfaceTriangleSet();
110
111 for (size_t i = 0; i < triangles.size(); i++) {
112 // kopieren...
113 allTriangles.push_back(triangles[i]);
114 }
115 }
116 return allTriangles;
117}
118/*=======================================================*/
120/*=======================================================*/
121bool GbObjectGroup3D::hasIntersectionWithDirectedLine(GbPoint3D /*origin*/, GbPoint3D /*direction*/) { return false; }
122/*=======================================================*/
123bool GbObjectGroup3D::isCellCuttingGbObject3D(const double & /*x1a*/, const double & /*x2a*/, const double & /*x3a*/,
124 const double & /*x1b*/, const double & /*x2b*/, const double & /*x3b*/)
125{
126 return false;
127}
128/*=======================================================*/
129bool GbObjectGroup3D::isCellInsideOrCuttingGbObject3D(const double & /*x1a*/, const double & /*x2a*/,
130 const double & /*x3a*/, const double & /*x1b*/,
131 const double & /*x2b*/, const double & /*x3b*/)
132{
133 return false;
134}
135/*==========================================================*/
136double GbObjectGroup3D::getCellVolumeInsideGbObject3D(const double & /*x1a*/, const double & /*x2a*/,
137 const double & /*x3a*/, const double & /*x1b*/,
138 const double & /*x2b*/, const double & /*x3b*/)
139{
140 return 0.0;
141}
142/*==========================================================*/
143double GbObjectGroup3D::getIntersectionRaytraceFactor(const double & /*x1*/, const double & /*x2*/,
144 const double & /*x3*/, const double & /*rx1*/,
145 const double & /*rx2*/, const double & /*rx3*/)
146{
147 return 0.0;
148}
149/*=======================================================*/
150
This Class provides basic 3D line objects.
Definition GbLine3D.h:59
This Class provides basic 3D point objects.
Definition GbPoint3D.h:49
void setName(std::string name)
Definition ObObject.h:52
std::shared_ptr< T > SPtr
bool isCellInsideOrCuttingGbObject3D(const double &x1a, const double &x2a, const double &x3a, const double &x1b, const double &x2b, const double &x3b) override
double getCellVolumeInsideGbObject3D(const double &x1a, const double &x2a, const double &x3a, const double &x1b, const double &x2b, const double &x3b) override
void setCenterCoordinates(const double &x1, const double &x2, const double &x3) override
bool hasIntersectionWithDirectedLine(GbPoint3D origin, GbPoint3D direction)
bool isCellCuttingGbObject3D(const double &x1a, const double &x2a, const double &x3a, const double &x1b, const double &x2b, const double &x3b) override
~GbObjectGroup3D() override
void finalize() override
void setRadius(const double &radius)
double getDistance(GbPoint3D *p)
void setCenterX1Coordinate(const double &value) override
GbLine3D * createClippedLine3D(GbPoint3D &point1, GbPoint3D &point2) override
void addSurfaceTriangleSet(std::vector< UbTupleFloat3 > &nodes, std::vector< UbTupleInt3 > &triangles) override
double getIntersectionRaytraceFactor(const double &x1, const double &x2, const double &x3, const double &rx1, const double &rx2, const double &rx3) override
std::string toString() override
void setCenterX3Coordinate(const double &value) override
std::vector< GbTriangle3D * > getSurfaceTriangleSet() override
Definition GbLine3D.cpp:91
std::vector< GbTriangle3D * > getSurfaceTriangleSet() override
bool isPointInGbObject3D(const double &x1, const double &x2, const double &x3) override
std::string toString() override
void setCenterX2Coordinate(const double &value) override
#define UB_EXARGS
Definition UbException.h:73