VirtualFluids 0.2.0
Parallel CFD LBM Solver
Loading...
Searching...
No Matches
IntegrateValuesHelper.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 INTEGRATEVALUESHELPER_H
35#define INTEGRATEVALUESHELPER_H
36
37#include <PointerDefinitions.h>
38
39#include "Block3D.h"
40#include "CbArray2D.h"
42#include "D3Q27System.h"
43#include "GbCuboid3D.h"
44#include "Grid3D.h"
45
46// struct CalcNodes
47//{
48// SPtr<Block3D> block;
49// std::vector<UbTupleInt3> nodes;
50//};
51//
52// struct Nodes
53//{
54// SPtr<Block3D> block;
55// UbTupleInt3 nodes;
56//};
57
59{
60public:
61 struct CalcNodes {
63 std::vector<UbTupleInt3> nodes;
64 };
65
70
71public:
72 IntegrateValuesHelper(SPtr<Grid3D> grid, std::shared_ptr<vf::parallel::Communicator> comm, real minX1, real minX2, real minX3,
73 real maxX1, real maxX2, real maxX3);
74 IntegrateValuesHelper(SPtr<Grid3D> grid, std::shared_ptr<vf::parallel::Communicator> comm, real minX1, real minX2, real minX3,
75 real maxX1, real maxX2, real maxX3, int level);
77
78 void calculateMQ();
79 void calculateAV();
80 void clearData();
81
82 real getRho() { return sRho; }
83 real getVx1() { return sVx1; }
84 real getVx2() { return sVx2; }
85 real getVx3() { return sVx3; }
86 real getCellsVolume() { return sCellVolume; }
87 // real getVm() { return sVm; }
88 // real getPress() {return sPress;}
89 real getAvVx1() { return sAvVx1; }
90 real getAvVx2() { return sAvVx2; }
91 real getAvVx3() { return sAvVx3; }
92 real getTSx1() { return sTSx1; }
93 real getTSx2() { return sTSx2; }
94 real getTSx3() { return sTSx3; }
95 real getTSx1x3() { return sTSx1x3; }
96
100 std::vector<CalcNodes> getCNodes();
101
102protected:
103private:
104 void init(int level);
105
106 bool root;
107 SPtr<Grid3D> grid;
108 real sVx1, sVx2, sVx3, sRho, sCellVolume; // sPress, sVm;
109 real numberOfFluidsNodes, numberOfSolidNodes;
110 real sAvVx1, sAvVx2, sAvVx3, sTSx1, sTSx2, sTSx3, sTSx1x3;
111 std::vector<CalcNodes> cnodes;
112 GbCuboid3DPtr boundingBox;
113 std::shared_ptr<vf::parallel::Communicator> comm;
114 CbArray2D<Node> cnodes2DMatrix;
115 enum Values { AvVx = 0, AvVy = 1, AvVz = 2, AvVxx = 3, AvVyy = 4, AvVzz = 5, AvVxy = 6, AvVyz = 7, AvVxz = 8 };
116};
117
118#endif
119
std::shared_ptr< T > SPtr
float real
Definition DataTypes.h:42
virtual ~IntegrateValuesHelper()
std::vector< CalcNodes > getCNodes()
SPtr< GbCuboid3D > GbCuboid3DPtr
Definition GbCuboid3D.h:49