VirtualFluids 0.2.0
Parallel CFD LBM Solver
Loading...
Searching...
No Matches
Sphere.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 SPHERE_H
35#define SPHERE_H
36
37#include "PointerDefinitions.h"
38#include "global.h"
39#include "geometries/Object.h"
40
41namespace vf::gpu {
42
43class Sphere : public Object
44{
45public:
46 Sphere(const double& centerX, const double& centerY, const double& centerZ, const double& radius);
47
48 static SPtr<Sphere> makeShared(double centerX, double centerY, double centerZ, double radius);
49
50 SPtr<Object> clone() const override;
51
52 double getX1Centroid() const override;
53 double getX1Minimum() const override;
54 double getX1Maximum() const override;
55 double getX2Centroid() const override;
56 double getX2Minimum() const override;
57 double getX2Maximum() const override;
58 double getX3Centroid() const override;
59 double getX3Minimum() const override;
60 double getX3Maximum() const override;
61
62 bool isPointInObject(const double& x1, const double& x2, const double& x3, const double& minOffset, const double& maxOffset) override;
63
64
65 void changeSizeByDelta(double delta) override;
66
67 int getIntersection(const Vertex &P, const Vertex &direction, Vertex &pointOnObject, real &qVal) override;
68
69
70protected:
71 double centerX;
72 double centerY;
73 double centerZ;
74
75 double radius;
76};
77
78}
79
80#endif
81
double getX3Centroid() const override
Definition Sphere.cpp:90
double getX1Maximum() const override
Definition Sphere.cpp:70
int getIntersection(const Vertex &P, const Vertex &direction, Vertex &pointOnObject, real &qVal) override
Definition Sphere.cpp:126
static SPtr< Sphere > makeShared(double centerX, double centerY, double centerZ, double radius)
Definition Sphere.cpp:50
double getX3Minimum() const override
Definition Sphere.cpp:95
double getX1Minimum() const override
Definition Sphere.cpp:65
double getX2Minimum() const override
Definition Sphere.cpp:80
double centerZ
Definition Sphere.h:73
double radius
Definition Sphere.h:75
double getX2Centroid() const override
Definition Sphere.cpp:75
void changeSizeByDelta(double delta) override
Definition Sphere.cpp:121
double getX3Maximum() const override
Definition Sphere.cpp:100
double centerY
Definition Sphere.h:72
double getX2Maximum() const override
Definition Sphere.cpp:85
double centerX
Definition Sphere.h:71
SPtr< Object > clone() const override
Definition Sphere.cpp:55
double getX1Centroid() const override
Definition Sphere.cpp:60
bool isPointInObject(const double &x1, const double &x2, const double &x3, const double &minOffset, const double &maxOffset) override
Definition Sphere.cpp:105
std::shared_ptr< T > SPtr
float real
Definition DataTypes.h:42