VirtualFluids 0.2.0
Parallel CFD LBM Solver
Loading...
Searching...
No Matches
D3Q27TriFaceMeshInteractor.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//
36//=======================================================================================
37
38#ifndef D3Q19AMRTRIFACEMESHINTERACTOR_H
39#define D3Q19AMRTRIFACEMESHINTERACTOR_H
40
41#include <PointerDefinitions.h>
42#include <map>
43#include <string>
44#include <vector>
45
46#include "CbArray3D.h"
47#include "D3Q27Interactor.h"
48
49class GbObject3D;
50class Grid3D;
51class BC;
52class GbTriFaceMesh3D;
53class Block3D;
54
56{
57public:
59 D3Q27TriFaceMeshInteractor(SPtr<Grid3D> grid, std::string name = "D3Q27TriFaceMeshInteractor");
63
65
66 void initInteractor(const real &timeStep = 0) override;
67 void updateInteractor(const real &timestep = 0) override;
68 void updateMovedGeometry(const real &timeStep = 0);
69 void setQs(const real &timeStep);
70 void refineBlockGridToLevel(int level, real startDistance, real stopDistance);
71
72 bool setDifferencesToGbObject3D(const SPtr<Block3D> block) override;
73
75
76 ObObject *clone() { throw UbException(UB_EXARGS, "not implemented"); }
77
79
80 virtual std::string toString();
81
82protected:
83 bool useHalfSpace{ true };
84 bool regardPIOTest{ true };
85
86 void reinitWithStoredQs(const real &timeStep);
87 // bool reinitWithStoredQsFlag;
88 std::map<SPtr<Block3D>, std::map<UbTupleInt3, std::vector<float>>> bcNodeIndicesAndQsMap;
90 // a BC was set to an rpos, but the same node in
91 // changed to another type (e.g. Solid) in another
92 // became --> there is no longer any BC in the place!
94
96 void recursiveGridFill(CbArray3D<FLAGS> &flagfield, const short &xs, const short &ys, const short &zs,
97 const FLAGS &type);
98 void iterativeGridFill(CbArray3D<FLAGS> &flagfield, const short &xs, const short &ys, const short &zs,
99 const FLAGS &type);
100};
101
102#endif
103
Abstract class of baundary conditions adapter.
Definition BC.h:48
A class implements a block structure.
Definition Block3D.h:49
A specialized class for grid generation.
D3Q27TriFaceMeshInteractor(SPtr< GbObject3D > geoObject3D, SPtr< Grid3D > grid, int type)
std::map< SPtr< Block3D >, std::map< UbTupleInt3, std::vector< float > > > bcNodeIndicesAndQsMap
SolidCheckMethod
!! it may be that in this interactor
This Interface provides basic 3D geometry objects methods.
Definition GbObject3D.h:64
A class implements block grid.
Definition Grid3D.h:60
WPtr< Grid3D > grid
SPtr< GbObject3D > geoObject3D
std::shared_ptr< T > SPtr
float real
Definition DataTypes.h:42
void initInteractor(const real &timeStep=0) override
bool setDifferencesToGbObject3D(const SPtr< Block3D > block) override
void iterativeGridFill(CbArray3D< FLAGS > &flagfield, const short &xs, const short &ys, const short &zs, const FLAGS &type)
void refineBlockGridToLevel(int level, real startDistance, real stopDistance)
void reinitWithStoredQs(const real &timeStep)
void updateInteractor(const real &timestep=0) override
void recursiveGridFill(CbArray3D< FLAGS > &flagfield, const short &xs, const short &ys, const short &zs, const FLAGS &type)
~D3Q27TriFaceMeshInteractor() override
void updateMovedGeometry(const real &timeStep=0)
#define UB_EXARGS
Definition UbException.h:73