VirtualFluids 0.2.0
Parallel CFD LBM Solver
Loading...
Searching...
No Matches
Conglomerate.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 CONGLOMERATE_H
35#define CONGLOMERATE_H
36
37#include <array>
38
39#include "global.h"
40
41#include "geometries/Object.h"
43
44#define MAX_NUMBER_OF_OBJECTS 20
45
46namespace vf::gpu {
47
48class Conglomerate : public Object
49{
50public:
52
53 void add(SPtr<Object> object);
55
56
57 SPtr<Object> clone() const override;
58
59 double getX1Centroid() const override;
60 double getX1Minimum() const override;
61 double getX1Maximum() const override;
62 double getX2Centroid() const override;
63 double getX2Minimum() const override;
64 double getX2Maximum() const override;
65 double getX3Centroid() const override;
66 double getX3Minimum() const override;
67 double getX3Maximum() const override;
68
69 void changeSizeByDelta(double delta) override;
70
71 bool isPointInObject(const double& x1, const double& x2, const double& x3, const double& minOffset, const double& maxOffset) override;
72
73 void findInnerNodes(SPtr<GridImp> grid) override;
74
75protected:
76 static double getMinimum(double val1, double val2);
77 static double getMaximum(double val1, double val2);
78
79
80 std::array<SPtr<Object>, MAX_NUMBER_OF_OBJECTS> addObjects;
81 std::array<SPtr<Object>, MAX_NUMBER_OF_OBJECTS> subtractObjects;
84};
85
86}
87
88#endif
89
void changeSizeByDelta(double delta) override
double getX1Maximum() const override
SPtr< Object > clone() const override
double getX1Centroid() const override
double getX3Maximum() const override
static double getMinimum(double val1, double val2)
void subtract(SPtr< Object > objectStub)
static double getMaximum(double val1, double val2)
std::array< SPtr< Object >, MAX_NUMBER_OF_OBJECTS > addObjects
double getX2Centroid() const override
double getX2Minimum() const override
static SPtr< Conglomerate > makeShared()
void add(SPtr< Object > object)
double getX2Maximum() const override
double getX1Minimum() const override
std::array< SPtr< Object >, MAX_NUMBER_OF_OBJECTS > subtractObjects
void findInnerNodes(SPtr< GridImp > grid) override
bool isPointInObject(const double &x1, const double &x2, const double &x3, const double &minOffset, const double &maxOffset) override
double getX3Centroid() const override
double getX3Minimum() const override
std::shared_ptr< T > SPtr
unsigned int uint
Definition DataTypes.h:47
#define MAX_NUMBER_OF_OBJECTS