MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
lbbndcnd.h
Go to the documentation of this file.
1// Copyright (C) 2024 The m-AIA AUTHORS
2//
3// This file is part of m-AIA (https://git.rwth-aachen.de/aia/m-AIA/m-AIA)
4//
5// SPDX-License-Identifier: LGPL-3.0-only
6
7#ifndef LBBNDCND_H
8#define LBBNDCND_H
9
10#include <fstream>
11#include <unordered_map>
12#include <vector>
15#include "IO/parallelio.h"
16#include "globals.h"
17#include "lbgridboundarycell.h"
18#include "lbmbcellcollector.h"
19
20template <MInt nDim>
21class LbSolver;
22template <class T>
23class Collector;
24template <MInt nDim>
25class CartesianGrid;
26
31 ParallelIo::size_type globalOffset = 0;
32 MFloat* data = nullptr;
33};
34
35namespace maia::lb {
37 MBool isRoot = false;
39 MString fileName = "force.log";
40 MPI_Comm comm;
41};
42} // namespace maia::lb
43
44template <MInt nDim>
45class LbBndCnd {
46 public:
47 template <MInt nDim_>
48 friend class LbSolver;
49 template <MInt nDim_, MInt nDist_, class SysEqn_>
50 friend class CouplingLB;
51
52 // Types
53 using Cell = GridCell;
54
55 protected:
58
61 typedef void (LbBndCnd::*BndCndHandler)(MInt set);
62 std::vector<BndCndHandler> bndCndHandlerVariables;
63 std::vector<BndCndHandler> bndCndHandlerRHS;
64 std::vector<BndCndHandler> bndCndInitiator;
65 typedef void (LbBndCnd::*BndCndHandler_Mb)(MInt set);
66 std::vector<BndCndHandler> bndCndHandlerVariables_MB;
67 std::vector<BndCndHandler_Mb> bndCndHandlerRHS_MB;
70
71 std::map<MInt, MInt> m_boundaryCellMappingMb;
72
73 template <typename K, typename V>
74 V GetWithDef(const std::map<K, V>& m, const K& key, const V& defval) {
75 typename std::map<K, V>::const_iterator it = m.find(key);
76 if(it == m.end()) {
77 return defval;
78 } else {
79 return it->second;
80 }
81 }
82
83 MInt a_boundaryCellMb(const MInt cellId) { return GetWithDef(m_boundaryCellMappingMb, cellId, -1); }
84
85 // Members needed for segment velocity and normal vector calculation
90 MFloat** m_bndNormals = nullptr;
102
103 // external forcing terms
106 // MInt m_currentNoG0Cells;
108
109 // Read from property file
116
117 // Data for coordinate transformation
118 MFloat* m_phi = nullptr;
119 MFloat* m_theta = nullptr;
120 // MFloat m_cosTheta, m_sinTheta, m_cosPhi, m_sinPhi;
121 // MFloat m_cosThetaSq, m_sec2Theta, m_sec2Phi, m_cos2Theta, m_sinThetaSq, m_tan2Theta, m_cotTheta;
122
123 // Data for extrapolation in arbitrary directions
124 // MInt** m_axesDirs;
125 MInt** m_exDirs = nullptr;
126 MFloat** m_exWeights = nullptr;
127
130 std::vector<LbGridBoundaryCell<nDim>> m_bndCells;
131
133
135 // Defines the discretization Model
138
148
149 MFloat m_rho1{}; // value of rho at inflow boundary
150 MFloat m_rho2{}; // value of rho at outflow boundary
151
152 /* MInt m_tanhInit; */
153 /* MFloat m_initRe; */
154 /* MInt m_initTime; */
155 /* MInt m_initStartTime; */
156
158 std::vector<MInt> m_bndCndIds; // Holds the different BC ids
159 std::vector<MInt> m_bndCndOffsets; // stores the starting positions
160 std::vector<MInt> m_bndCndSegIds; // Holds the different segment ids
161 std::vector<MInt> m_mapSegIdsInOutCnd; // maps segments to in/out segments
162 std::vector<MInt> m_mapBndCndSegId2Index; // maps global segmentId to local index (-1 if not available)
163 std::vector<MInt> m_mapIndex2BndCndSegId; // maps local index to global segmentId (-1 if not available)
164 std::vector<MInt> m_noBndCellsPerSegment; // number of cells that carry a certain boundary condition
165
168
169 // pulsatile
171
172 // latentHeat
175
176 // BC data
177 std::unordered_map<MInt, LbBndCndData> m_bndCndData{};
178 std::vector<MInt> m_segIdUseBcData{};
179
180 public:
182
183 virtual ~LbBndCnd();
184 virtual void setBndCndHandler();
185 virtual void updateVariables();
186 virtual void updateRHS();
187 void initializeBcData();
188 virtual void createMBComm();
189 virtual void postCouple();
190 virtual void initializeBndMovingBoundaries();
191
192 // void calculateBodyForces(MInt bodyId, MFloat* bodyForces);
193
194 private:
195 virtual void createBoundaryCells();
196 // ANDI
197 virtual void initMembers();
198 virtual void calculateVectors();
202 void calculateBndNormals();
203 virtual void calculateAveragedNormalAndCenter(MInt segmentId, MFloat* const normal, MFloat* const center);
204 virtual void fastParallelGeomNormals3D(std::vector<std::pair<MInt, MInt>> own_segments);
205 virtual void normalParallelGeomNormals3D(std::vector<std::pair<MInt, MInt>> own_segments);
206 virtual void updateBndNormals(MInt segId, MBool inside, MFloat* avg_normal);
207 virtual void checkBndNormalDirection(){};
208 virtual void printBndVelInfo();
209 virtual void processAngles();
210
211 void bcDataAllocate(MInt index, MInt noVars);
212 void bcDataWriteRestartHeader(ParallelIo& parallelio);
213 void bcDataWriteRestartData(ParallelIo& parallelIo);
214 void bcDataReadRestartData(ParallelIo& parallelIo);
217
218 // TIMERS
220
225 MPI_Request* mpi_request = nullptr;
226
227 protected:
228 // ANDI
229 virtual MInt findBndCnd(MInt index);
230
231 virtual void solveBlasiusZ(MInt index);
232
233 void sortBoundaryCells();
234
235 virtual void calculateForces(MInt /*BndCndId*/){};
236 virtual void calculateWallDistances(){};
237 virtual void addWallDistanceFieldToOutputFile(ParallelIo& parallelio, const MBool writeHeader,
238 const MBool writeData) = 0;
239 virtual void createChannelBoundaries(){};
240
241 virtual void bc0(MInt /*index*/){};
242
243 virtual void bc10000(MInt /*index*/){};
244 virtual void bc10001(MInt /*index*/){};
245 virtual void bc10002(MInt /*index*/){};
246 virtual void bc10004(MInt /*index*/){};
247 virtual void bc10022(MInt /*index*/){};
248 virtual void bc10010(MInt /*index*/){};
249 virtual void bc10020(MInt /*index*/){};
250 virtual void bc10040(MInt /*index*/){};
251 virtual void bc10041(MInt /*index*/){};
252 virtual void bc10042(MInt /*index*/){};
253 virtual void bc10043(MInt /*index*/){};
254 virtual void bc10044(MInt /*index*/){};
255 virtual void bc10045(MInt /*index*/){};
256 virtual void bc10046(MInt /*index*/){};
257
258 virtual void bc10050(MInt /*index*/){};
259 virtual void bc10060(MInt /*index*/){};
260 virtual void bc10061(MInt /*index*/){};
261
262 virtual void bc10090(MInt /*index*/){};
263
264 virtual void bc10070(MInt /*index*/){};
265
266 virtual void bc10080(MInt /*index*/){};
267
268 virtual void bc20000(MInt /*index*/){};
269 virtual void bc20001(MInt /*index*/){};
270 virtual void bc20002(MInt /*index*/){};
271 virtual void bc20003(MInt /*index*/){};
272 virtual void bc20004(MInt /*index*/){};
273 virtual void bc20005(MInt /*index*/){};
274 virtual void bc20006(MInt /*index*/){};
275 virtual void bc20010(MInt /*index*/){};
276 virtual void bc20020(MInt /*index*/){};
277 virtual void bc20220(MInt /*index*/){};
278
279 virtual void bc20226(MInt /*index*/){};
280 virtual void bc20227(MInt /*index*/){};
281 virtual void bc20228(MInt /*index*/){};
282 virtual void bc20501(MInt /*index*/){};
283 virtual void bc20501_init(MInt /*index*/){};
284
285 virtual void bcIBBNeumannInit(MInt /*index*/){};
286
287 virtual void bc20022(MInt /*index*/){};
288 virtual void bc20023(MInt /*index*/){};
289 virtual void bc20024(MInt /*index*/){};
290 virtual void bc20025(MInt /*index*/){};
291 virtual void bc20026(MInt /*index*/){};
292 virtual void bc20027(MInt /*index*/){};
293 virtual void bc20030(MInt /*index*/){};
294 virtual void bc20230(MInt /*index*/){};
295
296 virtual void bc20050(MInt /*index*/){};
297 virtual void bc20051(MInt /*index*/){};
298 virtual void bc20052(MInt /*index*/){};
299 virtual void bc20053(MInt /*index*/){};
300 virtual void bc20054(MInt /*index*/){};
301 virtual void bc20055(MInt /*index*/){};
302
303 virtual void bc30000(MInt /*index*/){};
304
305 virtual void bc30010(MInt /*index*/){};
306 virtual void bc30011(MInt /*index*/){};
307 virtual void bc30012(MInt /*index*/){};
308 virtual void bc30013(MInt /*index*/){};
309 virtual void bc30014(MInt /*index*/){};
310 virtual void bc30015(MInt /*index*/){};
311
312 virtual void bc30020(MInt /*index*/){};
313 virtual void bc30021(MInt /*index*/){};
314 virtual void bc30022(MInt /*index*/){};
315 virtual void bc30023(MInt /*index*/){};
316 virtual void bc30024(MInt /*index*/){};
317 virtual void bc30025(MInt /*index*/){};
318
319 virtual void bc30030(MInt /*index*/){};
320 virtual void bc30031(MInt /*index*/){};
321 virtual void bc30032(MInt /*index*/){};
322 virtual void bc30033(MInt /*index*/){};
323 virtual void bc30034(MInt /*index*/){};
324 virtual void bc30035(MInt /*index*/){};
325
326 virtual void bc30040(MInt /*index*/){};
327 virtual void bc30041(MInt /*index*/){};
328 virtual void bc30042(MInt /*index*/){};
329 virtual void bc30043(MInt /*index*/){};
330 virtual void bc30044(MInt /*index*/){};
331 virtual void bc30045(MInt /*index*/){};
332
333 virtual void bc30050(MInt /*index*/){};
334
335 virtual void bc40000(MInt /*index*/){};
336 virtual void bc40001(MInt /*index*/){};
337 virtual void bc40010(MInt /*index*/){};
338 virtual void bc40020(MInt /*index*/){};
339 virtual void bc40030(MInt /*index*/){};
340
341 virtual void bc40040(MInt /*index*/){};
342 virtual void bc40041(MInt /*index*/){};
343 virtual void bc40042(MInt /*index*/){};
344 virtual void bc40043(MInt /*index*/){};
345 virtual void bc40044(MInt /*index*/){};
346 virtual void bc40045(MInt /*index*/){};
347 virtual void bc40046(MInt /*index*/){};
348
349 virtual void bc40060(MInt /*index*/){};
350
351 virtual void bc40070(MInt /*index*/){};
352 virtual void bc40071(MInt /*index*/){};
353 virtual void bc40072(MInt /*index*/){};
354 virtual void bc40073(MInt /*index*/){};
355 virtual void bc40080(MInt /*index*/){};
356 virtual void bc40081(MInt /*index*/){};
357 virtual void bc40082(MInt /*index*/){};
358
359 virtual void bc40072_40082_init(MInt /*index*/){};
360
361 virtual void bc40100(MInt /*index*/){};
362 virtual void bc40110(MInt /*index*/){};
363
364 virtual void bc40120(MInt /*index*/){};
365
366 virtual void bc40130(MInt /*index*/){};
367
368 virtual void bc10111(MInt /*index*/){};
369
370 virtual void bc66666(MInt /*set*/){};
371 virtual void bc66667(MInt /*set*/){};
372 virtual void bc66668(MInt /*set*/){};
373
374 // for neighbor communicators
375 virtual MInt checkForCommBC();
376 virtual MBool checkForCommForce();
377 virtual void setBCNeighborCommunicator();
378 virtual void prepareBC(MInt index, MInt BCCounter, MInt segId);
379 virtual void prepareBC4073(MInt BCCounter, MInt segId);
380 virtual void setBCWallNeighborCommunicator();
381 virtual void prepareBC2000();
382
389
390 MPI_Group* tmp_group{};
391 MPI_Group* BCGroup{};
392 MPI_Comm* m_BCComm{};
395
402 std::vector<std::vector<MInt>> m_BCneighbors;
404 std::ofstream* m_BCResidualStream{};
414
415 std::unordered_map<MInt, maia::lb::CalcWallForceContainer> m_mapWallForceContainer;
417 std::vector<MInt> m_BCWallMBNeighbors;
418 std::vector<MInt> m_localReCutCells;
426};
427
428#endif
GridCell
Grid cell Property Labels.
MInt m_totalNoDomainsReCut
Definition: lbbndcnd.h:420
virtual void bc20051(MInt)
Definition: lbbndcnd.h:297
virtual void initializeBndMovingBoundaries()
This function initializes the LbBndCnd for coupled simulations.
Definition: lbbndcnd.cpp:3498
void calculateBndNormals()
Definition: lbbndcnd.cpp:1279
virtual void updateVariables()
Dereferences bndCndHandlerVariables.
Definition: lbbndcnd.cpp:3174
virtual void setBCWallNeighborCommunicator()
Sets up a neighbor-communicator for certain BCs.
Definition: lbbndcnd.cpp:2437
MFloat m_ReLast
Definition: lbbndcnd.h:384
virtual void calculateForces(MInt)
Definition: lbbndcnd.h:235
MPI_Comm m_BCWallMBComm
Definition: lbbndcnd.h:412
MBool calculateNormalFromTriangle(GeometryElement< nDim > ge, MFloat *normal)
Calculate the normal based on a triangle.
Definition: lbbndcnd.cpp:803
MInt m_noReactivatedCells
Definition: lbbndcnd.h:425
virtual void bc30042(MInt)
Definition: lbbndcnd.h:328
virtual void bc20227(MInt)
Definition: lbbndcnd.h:280
MFloat ** m_blasius
Definition: lbbndcnd.h:166
MInt m_t_BCAll
Definition: lbbndcnd.h:219
virtual void createMBComm()
This function creates the communicator for calculating the wall forces of the level-set boundaries.
Definition: lbbndcnd.cpp:3416
MBool m_calcWallForces
Definition: lbbndcnd.h:97
MInt * m_inOutSegmentsIds
Definition: lbbndcnd.h:91
std::vector< MInt > m_localReCutCells
Definition: lbbndcnd.h:418
MInt m_numberOfCommBCs
Definition: lbbndcnd.h:400
MInt m_firstBCinComm
Definition: lbbndcnd.h:424
virtual void bc10041(MInt)
Definition: lbbndcnd.h:251
MString m_bndNormalMethod
Definition: lbbndcnd.h:111
MInt m_noPeriodicSegments
Definition: lbbndcnd.h:87
MPI_Group * BCGroup
Definition: lbbndcnd.h:391
virtual void bc10002(MInt)
Definition: lbbndcnd.h:245
MFloat * sendBuffersMB
Definition: lbbndcnd.h:221
virtual MInt checkForCommBC()
Checks if a BC exists that requires communication.
Definition: lbbndcnd.cpp:2569
virtual void bc40043(MInt)
Definition: lbbndcnd.h:344
MInt * m_allDomainsCalcForceMB
Definition: lbbndcnd.h:410
std::unordered_map< MInt, maia::lb::CalcWallForceContainer > m_mapWallForceContainer
Definition: lbbndcnd.h:415
virtual void bc30013(MInt)
Definition: lbbndcnd.h:308
MPrimitiveVariables< nDim > * PV
Definition: lbbndcnd.h:134
MInt * m_allBoundaryIds
Definition: lbbndcnd.h:397
MInt m_currentTimeStep
Definition: lbbndcnd.h:388
virtual void bc10010(MInt)
Definition: lbbndcnd.h:248
virtual void bc66668(MInt)
Definition: lbbndcnd.h:372
virtual void bcIBBNeumannInit(MInt)
Definition: lbbndcnd.h:285
std::vector< MInt > m_BCWallMBNeighbors
Definition: lbbndcnd.h:417
std::vector< LbGridBoundaryCell< nDim > > m_bndCells
Definition: lbbndcnd.h:130
virtual void prepareBC2000()
Prepares the BC 4072.
Definition: lbbndcnd.cpp:2486
virtual void bc40073(MInt)
Definition: lbbndcnd.h:354
MFloat m_blasius_delta
Definition: lbbndcnd.h:167
MBool(LbBndCnd::* retrieveNormal)(GeometryElement< nDim > ge, MFloat *normal)
Definition: lbbndcnd.h:199
MInt m_noDistributions
Definition: lbbndcnd.h:136
MFloat m_maxDeltaRho
Definition: lbbndcnd.h:387
MInt * m_mapBndCndIdSegId
Definition: lbbndcnd.h:393
virtual void addWallDistanceFieldToOutputFile(ParallelIo &parallelio, const MBool writeHeader, const MBool writeData)=0
MString * m_BCOutputFileName
Definition: lbbndcnd.h:396
virtual void normalParallelGeomNormals3D(std::vector< std::pair< MInt, MInt > > own_segments)
Definition: lbbndcnd.cpp:1097
std::vector< MInt > m_bndCndIds
Definition: lbbndcnd.h:158
MFloat * receiveBuffersMB
Definition: lbbndcnd.h:222
std::vector< BndCndHandler > bndCndHandlerVariables
Definition: lbbndcnd.h:62
MInt m_lbNoMovingWalls
Definition: lbbndcnd.h:94
virtual void prepareBC4073(MInt BCCounter, MInt segId)
Definition: lbbndcnd.cpp:2728
MFloat * m_phi
Definition: lbbndcnd.h:118
virtual void bc30023(MInt)
Definition: lbbndcnd.h:315
virtual void bc40046(MInt)
Definition: lbbndcnd.h:347
virtual void bc20228(MInt)
Definition: lbbndcnd.h:281
MInt m_localReCutInterval
Definition: lbbndcnd.h:421
virtual void calculateWallDistances()
Definition: lbbndcnd.h:236
virtual void bc30012(MInt)
Definition: lbbndcnd.h:307
virtual void bc10022(MInt)
Definition: lbbndcnd.h:247
MInt m_noInternalCells
Definition: lbbndcnd.h:68
virtual void bc30024(MInt)
Definition: lbbndcnd.h:316
virtual void bc20002(MInt)
Definition: lbbndcnd.h:270
MFloat * m_lbWallVelocity
Definition: lbbndcnd.h:96
MPI_Group * tmp_group
Definition: lbbndcnd.h:390
virtual ~LbBndCnd()
The destructor.
Definition: lbbndcnd.cpp:347
virtual void bc40072_40082_init(MInt)
Definition: lbbndcnd.h:359
MInt m_initialNoCells[3]
Definition: lbbndcnd.h:69
virtual void bc20005(MInt)
Definition: lbbndcnd.h:273
MFloat ** m_initialVelocityVecs
Definition: lbbndcnd.h:89
virtual void bc10040(MInt)
Definition: lbbndcnd.h:250
std::vector< std::vector< MInt > > m_BCneighbors
Definition: lbbndcnd.h:402
MInt * m_noBCNeighbors
Definition: lbbndcnd.h:401
virtual void bc20022(MInt)
Definition: lbbndcnd.h:287
MFloat m_rhoLast
Definition: lbbndcnd.h:385
MFloat m_Ma
Definition: lbbndcnd.h:141
virtual void bc20001(MInt)
Definition: lbbndcnd.h:269
MFloat * m_localReCutPoint
Definition: lbbndcnd.h:405
MFloat * m_Fext
Definition: lbbndcnd.h:104
virtual void bc20006(MInt)
Definition: lbbndcnd.h:274
virtual void setBCNeighborCommunicator()
Sets up a neighbor-communicator for certain BCs.
Definition: lbbndcnd.cpp:3020
MInt ** m_exDirs
Definition: lbbndcnd.h:125
virtual void bc40040(MInt)
Definition: lbbndcnd.h:341
std::vector< MInt > m_mapIndex2BndCndSegId
Definition: lbbndcnd.h:163
MInt m_lbControlInflow
Definition: lbbndcnd.h:157
virtual void bc40042(MInt)
Definition: lbbndcnd.h:343
MString m_gridCutTest
Definition: lbbndcnd.h:132
virtual void bc30014(MInt)
Definition: lbbndcnd.h:309
virtual void bc20226(MInt)
Definition: lbbndcnd.h:279
MPI_Request * mpi_request
Definition: lbbndcnd.h:225
MInt m_noInOutSegments
Definition: lbbndcnd.h:86
virtual void calculateAveragedNormalAndCenter(MInt segmentId, MFloat *const normal, MFloat *const center)
Definition: lbbndcnd.cpp:882
MInt m_fastParallelGeomNormals
Definition: lbbndcnd.h:112
virtual void bc20501_init(MInt)
Definition: lbbndcnd.h:283
virtual void bc0(MInt)
Definition: lbbndcnd.h:241
virtual void calculateVectors()
virtual void createChannelBoundaries()
Definition: lbbndcnd.h:239
virtual void bc10000(MInt)
Definition: lbbndcnd.h:243
virtual void processAngles()
Definition: lbbndcnd.cpp:382
MString m_forceFile
Definition: lbbndcnd.h:416
MInt m_noAllBoundaryIds
Definition: lbbndcnd.h:398
virtual void bc30030(MInt)
Definition: lbbndcnd.h:319
virtual void setBndCndHandler()
Sets the BndCndHandler objects at solver setup.
Definition: lbbndcnd.cpp:1786
std::vector< MInt > m_bndCndSegIds
Definition: lbbndcnd.h:160
virtual void checkBndNormalDirection()
Definition: lbbndcnd.h:207
virtual void bc10044(MInt)
Definition: lbbndcnd.h:254
virtual void bc30022(MInt)
Definition: lbbndcnd.h:314
MInt m_maxNoDistributionsInDim
Definition: lbbndcnd.h:107
MFloat m_deltaRho
Definition: lbbndcnd.h:383
virtual void bc20010(MInt)
Definition: lbbndcnd.h:275
virtual void bc66666(MInt)
Definition: lbbndcnd.h:370
virtual void bc30043(MInt)
Definition: lbbndcnd.h:329
MInt * m_segIdHeatedWalls
Definition: lbbndcnd.h:100
MbCellCollector m_boundaryCellsMb
Definition: lbbndcnd.h:57
MInt a_boundaryCellMb(const MInt cellId)
Definition: lbbndcnd.h:83
virtual void bc20220(MInt)
Definition: lbbndcnd.h:277
virtual void bc30000(MInt)
Definition: lbbndcnd.h:303
MFloat m_localReCutRe
Definition: lbbndcnd.h:408
MFloat m_rho1
Definition: lbbndcnd.h:149
virtual void bc20000(MInt)
Definition: lbbndcnd.h:268
void bcDataReadRestartData(ParallelIo &parallelIo)
Read bndCndData data in given ParallelIo file.
Definition: lbbndcnd.cpp:1511
void(LbBndCnd::* BndCndHandler)(MInt set)
Definition: lbbndcnd.h:61
virtual void updateRHS()
Dereferences bndCndHandlerRHS.
Definition: lbbndcnd.cpp:3185
virtual void bc30040(MInt)
Definition: lbbndcnd.h:326
MString m_multiBCTreatment
Definition: lbbndcnd.h:115
MFloat ** m_bndNormals
Definition: lbbndcnd.h:90
virtual void bc10111(MInt)
Definition: lbbndcnd.h:368
MFloat m_localReCutDiameter
Definition: lbbndcnd.h:409
MFloat m_referenceLength
Definition: lbbndcnd.h:145
MInt m_calcWallForcesInterval
Definition: lbbndcnd.h:98
virtual void bc40071(MInt)
Definition: lbbndcnd.h:352
virtual void bc10090(MInt)
Definition: lbbndcnd.h:262
MBool m_outputWallDistanceField
Definition: lbbndcnd.h:114
virtual void createBoundaryCells()
Creates boundary cells according to the geometry information.
Definition: lbbndcnd.cpp:3207
virtual void bc10060(MInt)
Definition: lbbndcnd.h:259
virtual void bc40072(MInt)
Definition: lbbndcnd.h:353
virtual void bc40030(MInt)
Definition: lbbndcnd.h:339
MFloat m_omega
physical non-dimensional reference length
Definition: lbbndcnd.h:140
void bcDataAllocate(MInt index, MInt noVars)
Allocate data for given boundary index.
Definition: lbbndcnd.cpp:1404
MFloat m_domainLength
Definition: lbbndcnd.h:146
virtual void bc20024(MInt)
Definition: lbbndcnd.h:289
std::vector< BndCndHandler > bndCndInitiator
Definition: lbbndcnd.h:64
virtual void prepareBC(MInt index, MInt BCCounter, MInt segId)
Prepares the BC 4070, 4071, 4072, 4080, 4081, and 4082.
Definition: lbbndcnd.cpp:2669
std::vector< MInt > m_mapSegIdsInOutCnd
Definition: lbbndcnd.h:161
virtual void bc40120(MInt)
Definition: lbbndcnd.h:364
virtual void bc40110(MInt)
Definition: lbbndcnd.h:362
std::vector< MInt > m_mapBndCndSegId2Index
Definition: lbbndcnd.h:162
MInt m_densityFluctuations
Definition: lbbndcnd.h:147
MInt m_methodId
Definition: lbbndcnd.h:137
virtual void bc40070(MInt)
Definition: lbbndcnd.h:351
virtual void bc10004(MInt)
Definition: lbbndcnd.h:246
virtual MBool checkForCommForce()
Checks if a BC exists that requires communication.
Definition: lbbndcnd.cpp:2407
virtual void bc40080(MInt)
Definition: lbbndcnd.h:355
virtual void bc20050(MInt)
Definition: lbbndcnd.h:296
MInt * haloInformation
Definition: lbbndcnd.h:223
virtual void bc40081(MInt)
Definition: lbbndcnd.h:356
MFloat m_nu
Definition: lbbndcnd.h:143
MFloat m_localReCutAdpPerc
Definition: lbbndcnd.h:422
void initializeBcData()
Initialize BC data variables.
Definition: lbbndcnd.cpp:3390
MInt * m_totalNoBcCells
Definition: lbbndcnd.h:394
virtual void printBndVelInfo()
This function prints the gathered information on the boundary vectors and the initial velocity vector...
Definition: lbbndcnd.cpp:551
MInt m_lbNoHeatedWalls
Definition: lbbndcnd.h:99
void applyDirectionChangeInflow(MInt index)
This function checks if for an inflow boundary the normal points into the according direction and cha...
Definition: lbbndcnd.cpp:1564
virtual void bc10001(MInt)
Definition: lbbndcnd.h:244
MInt * m_segIdMovingWalls
Definition: lbbndcnd.h:95
void sortBoundaryCells()
This function sorts the boundary cells according to the BC id.
Definition: lbbndcnd.cpp:1702
virtual void bc30034(MInt)
Definition: lbbndcnd.h:323
MFloat m_lRho
Definition: lbbndcnd.h:386
std::unordered_map< MInt, LbBndCndData > m_bndCndData
Stores BC specific data mapped by boundary index.
Definition: lbbndcnd.h:177
virtual void fastParallelGeomNormals3D(std::vector< std::pair< MInt, MInt > > own_segments)
Definition: lbbndcnd.cpp:963
virtual void bc30041(MInt)
Definition: lbbndcnd.h:327
MPI_Comm * m_BCComm
Definition: lbbndcnd.h:392
virtual void bc20023(MInt)
Definition: lbbndcnd.h:288
std::ofstream * m_BCResidualStream
Definition: lbbndcnd.h:404
virtual void bc30050(MInt)
Definition: lbbndcnd.h:333
MBool m_calcSublayerDist
Definition: lbbndcnd.h:174
MFloat * m_localReCutNormal
Definition: lbbndcnd.h:406
std::vector< MInt > m_noBndCellsPerSegment
Definition: lbbndcnd.h:164
virtual void bc40020(MInt)
Definition: lbbndcnd.h:338
virtual void bc20025(MInt)
Definition: lbbndcnd.h:290
virtual void bc40044(MInt)
Definition: lbbndcnd.h:345
virtual void bc30031(MInt)
Definition: lbbndcnd.h:320
MInt m_noSegments
Definition: lbbndcnd.h:88
MBool m_latentHeat
Definition: lbbndcnd.h:173
virtual void bc20055(MInt)
Definition: lbbndcnd.h:301
MBool m_hasLocalReCut
Definition: lbbndcnd.h:419
virtual void bc40010(MInt)
Definition: lbbndcnd.h:337
virtual void initMembers()
virtual void updateBndNormals(MInt segId, MBool inside, MFloat *avg_normal)
Updates the normals of an inlet/outlet based on inside / outside detection.
Definition: lbbndcnd.cpp:1364
virtual void bc30010(MInt)
Definition: lbbndcnd.h:305
MBool m_calcBcResidual
Definition: lbbndcnd.h:403
virtual void bc20052(MInt)
Definition: lbbndcnd.h:298
std::vector< MInt > m_bndCndOffsets
Definition: lbbndcnd.h:159
virtual void bc30015(MInt)
Definition: lbbndcnd.h:310
virtual void bc30033(MInt)
Definition: lbbndcnd.h:322
LbSolver< nDim > * m_solver
pointer to a member function data type
Definition: lbbndcnd.h:60
virtual void bc20501(MInt)
Definition: lbbndcnd.h:282
MInt m_solverId
index of the array where the boundary conditions are stored in
Definition: lbbndcnd.h:129
virtual void bc40041(MInt)
Definition: lbbndcnd.h:342
MFloat m_gradient
Definition: lbbndcnd.h:144
MFloat m_localReCutDistance
Definition: lbbndcnd.h:407
MFloat ** m_exWeights
Definition: lbbndcnd.h:126
virtual void bc20053(MInt)
Definition: lbbndcnd.h:299
virtual void bc40060(MInt)
Definition: lbbndcnd.h:349
MBool getNormalFromSTL(GeometryElement< nDim > ge, MFloat *normal)
Get the normal from the STL.
Definition: lbbndcnd.cpp:851
MFloat * m_theta
Definition: lbbndcnd.h:119
std::vector< BndCndHandler_Mb > bndCndHandlerRHS_MB
Definition: lbbndcnd.h:67
MInt ** m_allDomainsHaveBC
Definition: lbbndcnd.h:399
virtual void bc30025(MInt)
Definition: lbbndcnd.h:317
virtual void bc10020(MInt)
Definition: lbbndcnd.h:249
virtual void bc10050(MInt)
Definition: lbbndcnd.h:258
MFloat m_pulsatileFrequency
Definition: lbbndcnd.h:170
void bcDataWriteRestartHeader(ParallelIo &parallelio)
Write bndCndData info in given ParallelIo file's header.
Definition: lbbndcnd.cpp:1428
void applyDirectionChangeOutflow(MInt index)
This function checks if for an outflow boundary the normal points into the according direction and ch...
Definition: lbbndcnd.cpp:1588
MFloat m_rho2
Definition: lbbndcnd.h:150
LbBndCnd(LbSolver< nDim > *solver)
MString m_initVelocityMethod
Definition: lbbndcnd.h:110
virtual void bc30044(MInt)
Definition: lbbndcnd.h:330
MFloat m_Re
Definition: lbbndcnd.h:142
virtual void bc40100(MInt)
Definition: lbbndcnd.h:361
virtual void bc30035(MInt)
Definition: lbbndcnd.h:324
virtual void bc10043(MInt)
Definition: lbbndcnd.h:253
std::vector< BndCndHandler > bndCndHandlerRHS
Definition: lbbndcnd.h:63
MFloat * m_lbWallTemperature
Definition: lbbndcnd.h:101
virtual void bc30011(MInt)
Definition: lbbndcnd.h:306
virtual void bc40000(MInt)
Definition: lbbndcnd.h:335
virtual void bc20027(MInt)
Definition: lbbndcnd.h:292
virtual void bc10061(MInt)
Definition: lbbndcnd.h:260
MInt m_maxNoG0CellsLb
Definition: lbbndcnd.h:105
virtual void bc20030(MInt)
Definition: lbbndcnd.h:293
virtual void bc30045(MInt)
Definition: lbbndcnd.h:331
virtual void bc40001(MInt)
Definition: lbbndcnd.h:336
virtual void bc20026(MInt)
Definition: lbbndcnd.h:291
virtual MInt findBndCnd(MInt index)
This function returns the index in the array of the boundary conditions that are inflow/outflow condi...
Definition: lbbndcnd.cpp:1388
virtual void bc10042(MInt)
Definition: lbbndcnd.h:252
virtual void postCouple()
This function does the sub coupling step called from the coupling class.
Definition: lbbndcnd.cpp:3538
virtual void bc66667(MInt)
Definition: lbbndcnd.h:371
MInt * m_periodicSegmentsIds
Definition: lbbndcnd.h:92
virtual void bc10045(MInt)
Definition: lbbndcnd.h:255
virtual void bc20003(MInt)
Definition: lbbndcnd.h:271
void(LbBndCnd::* BndCndHandler_Mb)(MInt set)
Definition: lbbndcnd.h:65
void bcDataWriteRestartData(ParallelIo &parallelIo)
Write bndCndData data in given ParallelIo file.
Definition: lbbndcnd.cpp:1470
MInt m_noBCWallMBNeighbors
Definition: lbbndcnd.h:413
virtual void bc10046(MInt)
Definition: lbbndcnd.h:256
virtual void bc40082(MInt)
Definition: lbbndcnd.h:357
virtual void bc40130(MInt)
Definition: lbbndcnd.h:366
virtual void bc20054(MInt)
Definition: lbbndcnd.h:300
virtual void solveBlasiusZ(MInt index)
Solves the Blasius equation for f,f',f".
Definition: lbbndcnd.cpp:1614
virtual void bc30032(MInt)
Definition: lbbndcnd.h:321
virtual void bc10070(MInt)
Definition: lbbndcnd.h:264
virtual void bc30021(MInt)
Definition: lbbndcnd.h:313
std::map< MInt, MInt > m_boundaryCellMappingMb
Definition: lbbndcnd.h:71
virtual void bc30020(MInt)
Definition: lbbndcnd.h:312
MString m_interpolationDistMethod
Definition: lbbndcnd.h:113
MInt m_localReCutReportInterval
Definition: lbbndcnd.h:423
virtual void bc20020(MInt)
Definition: lbbndcnd.h:276
std::vector< BndCndHandler > bndCndHandlerVariables_MB
Definition: lbbndcnd.h:66
V GetWithDef(const std::map< K, V > &m, const K &key, const V &defval)
Definition: lbbndcnd.h:74
MBool m_hasCommForce
Definition: lbbndcnd.h:411
MInt * m_bndNormalDirection
Definition: lbbndcnd.h:93
virtual void bc20230(MInt)
Definition: lbbndcnd.h:294
virtual void bc10080(MInt)
Definition: lbbndcnd.h:266
std::vector< MInt > m_segIdUseBcData
hold number of domains using BC data for this segment
Definition: lbbndcnd.h:178
virtual void bc20004(MInt)
Definition: lbbndcnd.h:272
virtual void bc40045(MInt)
Definition: lbbndcnd.h:346
Storage of the Position of the Primitive Variables (u, v, w, T, p) in the value vectors of the solver...
Definition: variables.h:110
Class that represents LB cell collector.
int32_t MInt
Definition: maiatypes.h:62
std::basic_string< char > MString
Definition: maiatypes.h:55
double MFloat
Definition: maiatypes.h:52
bool MBool
Definition: maiatypes.h:58
PARALLELIO_DEFAULT_BACKEND ParallelIo
Definition: parallelio.h:292
MInt noBndCellsWithHalos
number of boundary cells represented in data
Definition: lbbndcnd.h:29
MInt noVars
number of variables that are stored for BC
Definition: lbbndcnd.h:30
MInt noBndCells
this is number of non-halo (!) boundary cells -> stored for restart
Definition: lbbndcnd.h:28
ParallelIo::size_type globalOffset
global offset for writing restart file
Definition: lbbndcnd.h:31
MFloat * data
pointer the relevant data
Definition: lbbndcnd.h:32