VirtualFluids
0.2.0
Parallel CFD LBM Solver
Loading...
Searching...
No Matches
Cell.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 CELL_H
35
#define CELL_H
36
37
#include "
gpu/GridGenerator/global.h
"
38
39
namespace
vf::gpu
{
40
41
struct
Point
42
{
43
Point
() :
x
(0.0),
y
(0.0),
z
(0.0) {}
44
Point
(
real
x
,
real
y
,
real
z
) :
x
(
x
),
y
(
y
),
z
(
z
) {}
45
real
x
,
y
,
z
;
46
};
47
48
class
Cell
49
{
50
public
:
51
typedef
Point
*
iterator
;
52
typedef
const
Point
*
const_iterator
;
53
54
Cell
(
real
startX
,
real
startY
,
real
startZ
,
real
delta)
55
{
56
points =
new
Point
[size];
57
points[0] =
Point
(
startX
,
startY
,
startZ
);
// 0,0,0
58
points[1] =
Point
(
startX
+ delta,
startY
,
startZ
);
// 1,0,0
59
points[2] =
Point
(
startX
,
startY
+ delta,
startZ
);
// 0,1,0
60
points[3] =
Point
(
startX
+ delta,
startY
+ delta,
startZ
);
// 1,1,0
61
62
points[4] =
Point
(
startX
,
startY
,
startZ
+ delta);
// 0,0,1
63
points[5] =
Point
(
startX
+ delta,
startY
,
startZ
+ delta);
// 1,0,1
64
points[6] =
Point
(
startX
,
startY
+ delta,
startZ
+ delta);
// 0,1,1
65
points[7] =
Point
(
startX
+ delta,
startY
+ delta,
startZ
+ delta);
// 1,1,1
66
}
67
68
~Cell
()
69
{
70
delete
[] points;
71
}
72
73
iterator
begin
() {
return
&points[0]; }
74
const_iterator
begin
()
const
{
return
&points[0]; }
75
iterator
end
() {
return
&points[size]; }
76
const_iterator
end
()
const
{
return
&points[size]; }
77
78
private
:
79
Point
* points;
80
uint
size = 8;
81
82
};
83
84
}
85
86
#endif
87
vf::gpu::Cell
Definition
Cell.h:49
vf::gpu::Cell::begin
iterator begin()
Definition
Cell.h:73
vf::gpu::Cell::end
iterator end()
Definition
Cell.h:75
vf::gpu::Cell::~Cell
~Cell()
Definition
Cell.h:68
vf::gpu::Cell::end
const_iterator end() const
Definition
Cell.h:76
vf::gpu::Cell::const_iterator
const Point * const_iterator
Definition
Cell.h:52
vf::gpu::Cell::iterator
Point * iterator
Definition
Cell.h:51
vf::gpu::Cell::Cell
Cell(real startX, real startY, real startZ, real delta)
Definition
Cell.h:54
vf::gpu::Cell::begin
const_iterator begin() const
Definition
Cell.h:74
global.h
real
float real
Definition
DataTypes.h:42
uint
unsigned int uint
Definition
DataTypes.h:47
startY
const real startY
Definition
TransientBCSetterTest.cpp:64
startZ
const real startZ
Definition
TransientBCSetterTest.cpp:65
startX
const real startX
Definition
TransientBCSetterTest.cpp:63
vf::gpu
Definition
AdvectionDiffusion.h:40
vf::gpu::Point
Definition
Cell.h:42
vf::gpu::Point::z
real z
Definition
Cell.h:45
vf::gpu::Point::Point
Point(real x, real y, real z)
Definition
Cell.h:44
vf::gpu::Point::y
real y
Definition
Cell.h:45
vf::gpu::Point::x
real x
Definition
Cell.h:45
vf::gpu::Point::Point
Point()
Definition
Cell.h:43
src
gpu
GridGenerator
grid
Cell.h
Generated on Sun Nov 8 2026 00:03:31 for VirtualFluids by
1.9.8