VirtualFluids 0.2.0
Parallel CFD LBM Solver
Loading...
Searching...
No Matches
BCStrategy.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
35#ifndef BCStrategy_H
36#define BCStrategy_H
37
38#include <PointerDefinitions.h>
39
40#include "D3Q27System.h"
41
43class BCArray3D;
45class Block3D;
46
50{
51public:
52 BCStrategy() = default;
53 virtual ~BCStrategy() = default;
54
57 void setNodeIndex(int x1, int x2, int x3);
59 void setCompressible(bool c);
60 void setCollFactor(real cf);
61
62 bool isPreCollision();
63 virtual SPtr<BCStrategy> clone() = 0;
66 virtual void applyBC() = 0;
67
68protected:
69 bool compressible { false };
71
76
78 int x1, x2, x3;
79
81
82 using CalcMacrosFct = void (*)(const real *const &, real &, real &, real &, real &);
83 using CalcFeqForDirFct = real (*)(const int &, const real &, const real &, const real &,
84 const real &);
85 using CalcFeqFct = void (*)(real *const &, const real &, const real &, const real &, const real &);
86
90};
91
92#endif
93
A class implements array to store boundary conditions flags.
Definition BCArray3D.h:47
Abstract class of baundary conditions strategy.
Definition BCStrategy.h:50
void(*)(real *const &, const real &, const real &, const real &, const real &) CalcFeqFct
Definition BCStrategy.h:85
CalcFeqForDirFct calcFeqsForDirFct
Definition BCStrategy.h:87
virtual SPtr< BCStrategy > clone()=0
virtual ~BCStrategy()=default
bool preCollision
Definition BCStrategy.h:70
SPtr< BCArray3D > bcArray
Definition BCStrategy.h:74
real(*)(const int &, const real &, const real &, const real &, const real &) CalcFeqForDirFct
Definition BCStrategy.h:84
CalcFeqFct calcFeqFct
Definition BCStrategy.h:89
virtual void addDistributions(SPtr< DistributionArray3D > distributions)=0
real compressibleFactor
Definition BCStrategy.h:80
BCStrategy()=default
CalcMacrosFct calcMacrosFct
Definition BCStrategy.h:88
virtual void applyBC()=0
SPtr< Block3D > block
Definition BCStrategy.h:75
SPtr< DistributionArray3D > distributions
Definition BCStrategy.h:73
SPtr< BoundaryConditions > bcPtr
Definition BCStrategy.h:72
bool compressible
Definition BCStrategy.h:69
real collFactor
Definition BCStrategy.h:77
void(*)(const real *const &, real &, real &, real &, real &) CalcMacrosFct
Definition BCStrategy.h:82
A class implements a block structure.
Definition Block3D.h:49
Definition of boundary conditions in grid generation.
Abstract class of data structure for LBM.
std::shared_ptr< T > SPtr
float real
Definition DataTypes.h:42
void setBcPointer(SPtr< BoundaryConditions > bcPtr)
bool isPreCollision()
void setBlock(SPtr< Block3D > block)
SPtr< BCArray3D > getBcArray()
void setCollFactor(real cf)
void setNodeIndex(int x1, int x2, int x3)
void setBcArray(SPtr< BCArray3D > bcarray)
void setCompressible(bool c)