OpenLB 1.7
Loading...
Searching...
No Matches
blockLatticeInteraction.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2006-2008 Jonas Latt
4 * 2008-2020 Mathias Krause
5 * 2020 Adrian Kummerlaender
6 * 2021 Nicolas Hafen
7 * E-mail contact: info@openlb.net
8 * The most recent release of OpenLB can be downloaded at
9 * <http://www.openlb.net/>
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public
22 * License along with this program; if not, write to the Free
23 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 * Boston, MA 02110-1301, USA.
25*/
26
27#ifndef BLOCK_LATTICE_INTERACTION_H
28#define BLOCK_LATTICE_INTERACTION_H
29
30#include "core/core.h"
33#include "particles/particles.h"
34
35namespace olb {
36
37namespace particles {
38
39//Forward declaration
40template <typename T, typename PARTICLETYPE>
41class ParticleSystem;
42template <typename T, typename PARTICLETYPE>
43class Particle;
44
45//Get block particle intersection
46template <typename T, unsigned D>
48 T invDeltaX, LatticeR<D>& start,
49 LatticeR<D>& end, Vector<T, D> position,
50 T circumRadius);
51
52//Check whether smoothIndicator is out of geometry
53template <typename T, unsigned D>
55 bool& outOfGeometry, Vector<T, D>& ghostPos, const PhysR<T, D>& cellMin,
56 const PhysR<T, D>& cellMax, const Vector<T, D>& position, T circumRadius,
57 const Vector<bool, D>& periodic);
58
59//Iterate over spacial locations in block particle intersection with lambda expression f
60template <typename T, typename DESCRIPTOR, typename F>
62 const BlockGeometry<T, DESCRIPTOR::d>& blockGeometry,
63 BlockLattice<T, DESCRIPTOR>& blockLattice,
64 Vector<T, DESCRIPTOR::d> position, T circumRadius, F f);
65
66//Set block particle field
67template <typename T, typename DESCRIPTOR, typename PARTICLETYPE>
69 BlockLattice<T, DESCRIPTOR>& blockLattice,
70 UnitConverter<T,DESCRIPTOR> const& converter,
72
73//Set block particle field with contact
74template <typename T, typename DESCRIPTOR, typename PARTICLETYPE,
75 typename PARTICLECONTACTTYPE, typename WALLCONTACTTYPE,
76 typename F = decltype(defaults::periodicity<PARTICLETYPE::d>)>
78 const BlockGeometry<T, DESCRIPTOR::d>& blockGeometry,
79 BlockLattice<T, DESCRIPTOR>& blockLattice,
80 UnitConverter<T,DESCRIPTOR> const& converter,
81 ParticleSystem<T, PARTICLETYPE>& particleSystem,
83 particleContacts,
84 size_t iP, Particle<T, PARTICLETYPE>& particle,
85 std::vector<SolidBoundary<T, DESCRIPTOR::d>>& solidBoundaries,
86 const PhysR<T, DESCRIPTOR::d>& cellMin =
87 PhysR<T, DESCRIPTOR::d>(std::numeric_limits<T>::quiet_NaN()),
88 const PhysR<T, DESCRIPTOR::d>& cellMax =
89 PhysR<T, DESCRIPTOR::d>(std::numeric_limits<T>::quiet_NaN()),
90 F getSetupPeriodicity = defaults::periodicity<PARTICLETYPE::d>);
91
92//Reset block particle field
93template <typename T, typename DESCRIPTOR>
95 BlockLattice<T, DESCRIPTOR>& blockLattice);
96
97//TODO: HOTFIX ONLY
98template <typename T, typename DESCRIPTOR>
100 BlockLattice<T, DESCRIPTOR>& blockLattice);
101
102} //namespace particles
103
104} //namespace olb
105
106#endif
Representation of the 2D block geometry view – header file.
Representation of a block geometry.
Platform-abstracted block lattice for external access and inter-block interaction.
Conversion between physical and lattice units, as well as discretization.
Plain old scalar vector.
Definition vector.h:47
void resetBlockParticleField(const BlockGeometry< T, DESCRIPTOR::d > &blockGeometry, BlockLattice< T, DESCRIPTOR > &blockLattice)
bool getBlockParticleIntersection(const BlockGeometry< T, D > &blockGeometry, T invDeltaX, LatticeR< D > &start, LatticeR< D > &end, Vector< T, D > position, T circumRadius)
void setBlockParticleField(const BlockGeometry< T, DESCRIPTOR::d > &blockGeometry, BlockLattice< T, DESCRIPTOR > &blockLattice, UnitConverter< T, DESCRIPTOR > const &converter, Particle< T, PARTICLETYPE > &particle)
void resetBlockContactField(const BlockGeometry< T, DESCRIPTOR::d > &blockGeometry, BlockLattice< T, DESCRIPTOR > &blockLattice)
void checkSmoothIndicatorOutOfGeometry(bool &outOfGeometry, Vector< T, D > &ghostPos, const PhysR< T, D > &cellMin, const PhysR< T, D > &cellMax, const Vector< T, D > &position, T circumRadius, const Vector< bool, D > &periodic)
void forSpatialLocationsInBlockParticleIntersection(const BlockGeometry< T, DESCRIPTOR::d > &blockGeometry, BlockLattice< T, DESCRIPTOR > &blockLattice, Vector< T, DESCRIPTOR::d > position, T circumRadius, F f)
Top level namespace for all of OpenLB.