OpenLB 1.7
Loading...
Searching...
No Matches
particleParallelCreatorFunctions3D.h
Go to the documentation of this file.
1/* This file is part of the OpenLB library
2 *
3 * Copyright (C) 2022 Nicolas Hafen, Jan E. Marquardt, Mathias J. Krause
4 * E-mail contact: info@openlb.net
5 * The most recent release of OpenLB can be downloaded at
6 * <http://www.openlb.net/>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public
19 * License along with this program; if not, write to the Free
20 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA.
22*/
23
24
25#ifndef PARTICLE_PARALLEL_CREATOR_FUNCTIONS_3D_H
26#define PARTICLE_PARALLEL_CREATOR_FUNCTIONS_3D_H
27
28#include <algorithm>
29
32
33namespace olb {
34
35namespace particles {
36
37namespace creators {
38
39
40
41
42
44
45template<typename T, typename PARTICLETYPE>
46std::unordered_set<int> prepareParallelResolvedParticle(
48 Vector<T,PARTICLETYPE::d> position, T circumRadius,
49 const T epsilon, int& globiCcentre, const T physDeltaX,
50 const Vector<bool, PARTICLETYPE::d>& periodicity )
51{
52 //Retrieving cuboid geometry
53 auto& cuboidGeometry = sParticleSystem.getSuperStructure().getCuboidGeometry();
54 //Find globiC of particle centre
55 const bool inDomain = particles::communication::getCuboid(
56 cuboidGeometry, periodicity, position, globiCcentre);
57 //TODO: add error handling, when !inDomain
58 if (!inDomain){
59 std::cerr << "ERROR: Particle added outside domain!" << std::endl;
60 }
61 if constexpr (access::providesContactMaterial<PARTICLETYPE>()) {
62 // without particle enlargement for contact, since it is 0 at the time of creation
63 const T detectionDistance = T{0.5} * util::sqrt(PARTICLETYPE::d) * physDeltaX;
64 const T halfEpsilon = T{0.5} * epsilon;
65 circumRadius = circumRadius - halfEpsilon + util::max(halfEpsilon, detectionDistance);
66 }
67 sParticleSystem.updateOffsetFromCircumRadius(circumRadius);
68 //Find globiCs touching the surface hull
69 std::unordered_set<int> setOfICs = communication::getSurfaceTouchingICs( sParticleSystem,
70 position, circumRadius, periodicity, globiCcentre );
71 //Add globiCcentre to list
72 setOfICs.insert(globiCcentre);
73 //Return list of iCs
74 return setOfICs;
75}
76
77//Assign particle to calling cuboid and return particle object
78template<typename T, typename PARTICLETYPE>
80 ParticleSystem<T,PARTICLETYPE>& particleSystem,
81 std::size_t idxSurface, std::size_t globID, int globiCcentre,
82 const Vector<T,PARTICLETYPE::d>& position, T density=0.,
86{
87 using namespace descriptors;
88 //Add resolved object
89 auto particle = creators::addResolvedObject( particleSystem, idxSurface,
90 position, density, angleInDegree, velocity );
91 //Add additional data due to parallization
92 particle.template setField<PARALLELIZATION,ID>( globID );
93 particle.template setField<PARALLELIZATION,IC>( globiCcentre );
94 particle.template setField<SURFACE,SURFACE_ID>( idxSurface );
95 //Return particle object
96 return particle;
97}
98
99//Assigne particle to cuboid, if globiC listed in setOfICs and return, if assigned
100//- effectively resulting in assigning to all cuboids touching
101template<typename T, typename PARTICLETYPE>
103 ParticleSystem<T,PARTICLETYPE>& particleSystem,
104 std::unordered_set<int>& setOfICs, int globiC,
105 std::size_t idxSurface, std::size_t globID, std::size_t& localID, int globiCcentre,
106 const Vector<T,PARTICLETYPE::d>& position, T density=0.,
110{
111 //Check whether asignment needed for globiC
112 bool assigned=false;
113 if( setOfICs.find(globiC) != setOfICs.end() ) {
114 //Attach particle to cuboid with globiC (and retrieve new particle object)
115 auto particle = assignParallelResolvedParticleToiC( particleSystem, idxSurface,
116 globID, globiCcentre, position, density, angleInDegree, velocity );
117 //Declare assignement found
118 assigned=true;
119 //Retrieve localID
120 localID = particle.getId();
121 } //if( std::find() )
122 //Return whether assigned
123 return assigned;
124}
125
126
127//Add particle on residing iC with surface on all iCs (and return ParallelParticleLocator containing globiC, globID, localID)
128template<typename T, typename PARTICLETYPE>
131 std::size_t idxSurface,
132 const Vector<T,PARTICLETYPE::d>& position, T density=0.,
137{
138 //Retrieve circumRadius from smoothIndicator
139 constexpr unsigned D = PARTICLETYPE::d;
140 typedef SmoothIndicatorF<T,T,D,true> SIndicatorBaseType;
141 auto bParticleSystems = sParticleSystem.getBlockParticleSystems();
142 auto& particleSystem = *bParticleSystems[0]; //Use first randomly
143 auto& vectorOfIndicators = particleSystem.template getAssociatedData<
144 std::vector<std::unique_ptr<SIndicatorBaseType>>>();
145 T circumRadius = vectorOfIndicators[idxSurface]->getCircumRadius();
146 //Get new global particle id
147 std::size_t globID = sParticleSystem.getGlobID();
148 //Prepare particle and get list of touching iCs
149 int globiCcentre;
150 std::unordered_set<int> setOfICs = prepareParallelResolvedParticle(sParticleSystem,
151 position, circumRadius, vectorOfIndicators[idxSurface].get()->getEpsilon(), globiCcentre,
152 sParticleSystem.getSuperStructure().getCuboidGeometry().getMotherCuboid().getDeltaR(),
153 periodicity);
154
155 //Iterate over particle systems
156 std::size_t localIDcentre=0; //Return localID of particle inside particleSystem holding centre
158 [&](ParticleSystem<T,PARTICLETYPE>& particleSystem, int iC, int globiC){
159 //Assigne resolved particle to iCs specified in setOfICs
160 std::size_t localID=0;
161 assignParallelResolvedParticle( particleSystem, setOfICs, globiC,
162 idxSurface, globID, localID, globiCcentre,
163 position, density, angleInDegree, velocity );
164 //Set localID if centre
165 if (globiC==globiCcentre){ localIDcentre=localID; }
166 });
167
168 //Return globiC, globID, localiD
169 return ParallelParticleLocator(globiCcentre, globID, localIDcentre);
170}
171
173template<typename T, typename PARTICLETYPE, typename F>
175 F createUniqueIndicatorPtr )
176{
177 typedef SmoothIndicatorF<T, T, PARTICLETYPE::d, true> SIndicatorBaseType;
178 std::size_t idxSurface = 0;
179
180 std::vector<olb::particles::ParticleSystem<T, PARTICLETYPE>*>&
181 blockParticleSystems = sParticleSystem.getBlockParticleSystems();
182 // Iteration over each element independent from cuboids to ensure that surfaces are added everywhere
183 // as some blocks may not have a corresponding cuboid
184 for (unsigned i = 0; i < blockParticleSystems.size(); ++i) {
185 auto& particleSystem = *blockParticleSystems[i];
186 auto& vectorOfIndicators = particleSystem.template getAssociatedData<
187 std::vector<std::unique_ptr<SIndicatorBaseType>>>();
188 if(i > 0 && idxSurface != vectorOfIndicators.size()) {
189 std::cerr << "ERROR: Number of particle surfaces don't match." << std::endl;
190 assert(false);
191 }
192 idxSurface = vectorOfIndicators.size();
193 vectorOfIndicators.push_back( createUniqueIndicatorPtr() );
194 }
195
196 return idxSurface;
197}
198
199//Add particle on residing iC with surface on all iCs
200template<typename T, typename PARTICLETYPE>
203 const Vector<T,3>& position, T radius, T epsilon, T density=0.,
204 const Vector<T,3>& velocity = Vector<T,3> (0.),
205 const Vector<bool, 3>& periodicity = Vector<bool,3>(false))
206{
207 //Get circumRadius and set angleInDegree
208 T circumRadius = SmoothIndicatorSphere3D<T,T,true>(
209 Vector<T,3> (0.), radius, epsilon).getCircumRadius();
211 angleInDegree(0.);
212
213 //Get new global particle id
214 std::size_t globID = sParticleSystem.getGlobID();
215
216 //Prepare particle and get list of touching iCs
217 int globiCcentre;
218 std::unordered_set<int> setOfICs = prepareParallelResolvedParticle(sParticleSystem,
219 position, circumRadius, epsilon, globiCcentre,
220 sParticleSystem.getSuperStructure().getCuboidGeometry().getMotherCuboid().getDeltaR(),
221 periodicity);
222
223 std::size_t idxSurface = addSurface(sParticleSystem,
224 [&](){
225 return std::make_unique<SmoothIndicatorSphere3D<T, T, true>>(Vector<T,3> (0.), radius, epsilon );
226 });
227
228 //Iterate over particle systems
229 std::size_t localIDcentre=0; //Return localID of particle inside particleSystem holding centre
231 [&](ParticleSystem<T,PARTICLETYPE>& particleSystem, int iC, int globiC){
232 //Do for all iCs
233
234 //Assigne resolved particle to iCs specified in setOfICs
235 std::size_t localID=0;
236 assignParallelResolvedParticle( particleSystem, setOfICs, globiC,
237 idxSurface, globID, localID, globiCcentre,
238 position, density, angleInDegree, velocity );
239 //Set localID if centre
240 if (globiC==globiCcentre){ localIDcentre=localID; }
241 });
242
243 //Return globiC, globID, localiD
244 return ParallelParticleLocator(globiCcentre, globID, localIDcentre);
245}
246
247//Add particle on residing iC with surface on all iCs
248template<typename T, typename PARTICLETYPE>
251 const Vector<T,3>& position, const Vector<T,3>& extend,
252 T epsilon, T density=0.,
253 const Vector<T,3>& angleInDegree = Vector<T,3> (0.),
254 const Vector<T,3>& velocity = Vector<T,3> (0.),
255 const Vector<bool, 3>& periodicity = Vector<bool,3>(false))
256{
257 //Get circumRadius
258 T circumRadius = SmoothIndicatorCuboid3D<T,T,true>(
259 extend[0], extend[1], extend[2], Vector<T,3>(0.), epsilon ).getCircumRadius();
260
261 //Get new global particle id
262 std::size_t globID = sParticleSystem.getGlobID();
263
264 //Prepare particle and get list of touching iCs
265 int globiCcentre;
266 std::unordered_set<int> setOfICs = prepareParallelResolvedParticle(sParticleSystem,
267 position, circumRadius, epsilon, globiCcentre,
268 sParticleSystem.getSuperStructure().getCuboidGeometry().getMotherCuboid().getDeltaR(),
269 periodicity);
270
271 std::size_t idxSurface = addSurface(sParticleSystem,
272 [&](){
273 return std::make_unique<SmoothIndicatorCuboid3D<T, T, true>>(
274 extend[0], extend[1], extend[2], Vector<T,3>(0.), epsilon );
275 });
276
277 //Iterate over particle systems
278 std::size_t localIDcentre=0; //Return localID of particle inside particleSystem holding centre
280 [&](ParticleSystem<T,PARTICLETYPE>& particleSystem, int iC, int globiC){
281 //Do for all iCs
282
283 //Assigne resolved particle to iCs specified in setOfICs
284 std::size_t localID=0;
285 assignParallelResolvedParticle( particleSystem, setOfICs, globiC,
286 idxSurface, globID, localID, globiCcentre,
287 position, density, angleInDegree, velocity );
288 //Set localID if centre
289 if (globiC==globiCcentre){ localIDcentre=localID; }
290 });
291
292 //Return globiC, globID, localiD
293 return ParallelParticleLocator(globiCcentre, globID, localIDcentre);
294}
295
296//Add particle on residing iC with surface on all iCs
297template<typename T, typename PARTICLETYPE>
300 const Vector<T,3>& position, const Vector<T,3>& normal,
301 T height, T radius, T epsilon, T density=0.,
302 const Vector<T,3>& angleInDegree = Vector<T,3> (0.),
303 const Vector<T,3>& velocity = Vector<T,3> (0.),
304 const Vector<bool, 3>& periodicity = Vector<bool,3>(false))
305{
306 //Get circumRadius and set angleInDegree
307 T circumRadius = SmoothIndicatorCylinder3D<T,T,true>(Vector<T,3>(0.), normal, radius, height, epsilon ).getCircumRadius();
308
309 //Get new global particle id
310 std::size_t globID = sParticleSystem.getGlobID();
311
312 //Prepare particle and get list of touching iCs
313 int globiCcentre;
314 std::unordered_set<int> setOfICs = prepareParallelResolvedParticle(sParticleSystem,
315 position, circumRadius, epsilon, globiCcentre,
316 sParticleSystem.getSuperStructure().getCuboidGeometry().getMotherCuboid().getDeltaR(),
317 periodicity);
318
319 std::size_t idxSurface = addSurface(sParticleSystem,
320 [&](){
321 return std::make_unique<SmoothIndicatorCylinder3D<T, T, true>>(
322 Vector<T,3>(0.), normal, radius, height, epsilon );
323 });
324
325 //Iterate over particle systems
326 std::size_t localIDcentre=0; //Return localID of particle inside particleSystem holding centre
328 [&](ParticleSystem<T,PARTICLETYPE>& particleSystem, int iC, int globiC){
329 //Do for all iCs
330
331 //Assigne resolved particle to iCs specified in setOfICs
332 std::size_t localID=0;
333 assignParallelResolvedParticle( particleSystem, setOfICs, globiC,
334 idxSurface, globID, localID, globiCcentre,
335 position, density, angleInDegree, velocity );
336 //Set localID if centre
337 if (globiC==globiCcentre){ localIDcentre=localID; }
338 });
339
340 return ParallelParticleLocator(globiCcentre, globID, localIDcentre);
341}
342
343//Add particle on residing iC with surface on all iCs
344template<typename T, typename PARTICLETYPE>
347 const Vector<T,3>& position, T latticeSpacing,
348 std::shared_ptr<IndicatorF3D<T>> indPtr,
349 T epsilon, T density=0.,
350 const Vector<T,3>& angleInDegree = Vector<T,3> (0.),
351 const Vector<T,3>& velocity = Vector<T,3> (0.),
352 const Vector<bool, 3>& periodicity = Vector<bool,3>(false))
353{
354 //Get circumRadius and set angleInDegree
355 T circumRadius = SmoothIndicatorCustom3D<T,T,true>(
356 latticeSpacing, indPtr, PhysR<T, 3>(T {}), epsilon, angleInDegree).getCircumRadius();
357
358 //Get new global particle id
359 std::size_t globID = sParticleSystem.getGlobID();
360
361 //Prepare particle and get list of touching iCs
362 int globiCcentre;
363 std::unordered_set<int> setOfICs = prepareParallelResolvedParticle(sParticleSystem,
364 position, circumRadius, epsilon, globiCcentre,
365 sParticleSystem.getSuperStructure().getCuboidGeometry().getMotherCuboid().getDeltaR(),
366 periodicity);
367
368 std::size_t idxSurface = addSurface(sParticleSystem,
369 [&](){
370 return std::make_unique<SmoothIndicatorCustom3D<T, T, true>>(
371 latticeSpacing, indPtr, PhysR<T, 3>(T {}), epsilon, angleInDegree);
372 });
373
374 //Iterate over particle systems
375 std::size_t localIDcentre=0; //Return localID of particle inside particleSystem holding centre
377 [&](ParticleSystem<T,PARTICLETYPE>& particleSystem, int iC, int globiC){
378 //Do for all iCs
379
380 //Assigne resolved particle to iCs specified in setOfICs
381 std::size_t localID=0;
382 assignParallelResolvedParticle( particleSystem, setOfICs, globiC,
383 idxSurface, globID, localID, globiCcentre,
384 position, density, angleInDegree, velocity );
385 //Set localID if centre
386 if (globiC==globiCcentre){ localIDcentre=localID; }
387 });
388
389 return ParallelParticleLocator(globiCcentre, globID, localIDcentre);
390}
391
392//Add particle on residing iC with surface on all iCs
393template<typename T, typename PARTICLETYPE>
396 const Vector<T,2>& position, T radius, T epsilon, T density=0.,
397 const Vector<T,2>& velocity = Vector<T,2> (0.),
398 const Vector<bool, 2>& periodicity = Vector<bool,2>(false))
399{
400 //Get circumRadius and set angleInDegree
401 T circumRadius = SmoothIndicatorCircle2D<T,T,true>(
402 Vector<T,2> (0.), radius, epsilon).getCircumRadius();
404 angleInDegree(0.);
405
406 //Get new global particle id
407 std::size_t globID = sParticleSystem.getGlobID();
408
409 //Prepare particle and get list of touching iCs
410 int globiCcentre;
411 std::unordered_set<int> setOfICs = prepareParallelResolvedParticle(sParticleSystem,
412 position, circumRadius, epsilon, globiCcentre,
413 sParticleSystem.getSuperStructure().getCuboidGeometry().getMotherCuboid().getDeltaR(),
414 periodicity);
415
416 std::size_t idxSurface = addSurface(sParticleSystem,
417 [&](){
418 return std::make_unique<SmoothIndicatorCircle2D<T, T, true>>(Vector<T,2> (0.), radius, epsilon );
419 });
420
421 //Iterate over particle systems
422 std::size_t localIDcentre=0; //Return localID of particle inside particleSystem holding centre
424 [&](ParticleSystem<T,PARTICLETYPE>& particleSystem, int iC, int globiC){
425 //Do for all iCs
426
427 //Assigne resolved particle to iCs specified in setOfICs
428 std::size_t localID=0;
429 assignParallelResolvedParticle( particleSystem, setOfICs, globiC,
430 idxSurface, globID, localID, globiCcentre,
431 position, density, angleInDegree, velocity );
432 //Set localID if centre
433 if (globiC==globiCcentre){ localIDcentre=localID; }
434 });
435
436 return ParallelParticleLocator(globiCcentre, globID, localIDcentre);
437}
438
440
441//Add particle on residing iC with surface on all iCs
442template<typename T, typename PARTICLETYPE>
445 const Vector<T,3>& position, T radius, T density=0.,
446 const Vector<T,3>& velocity = Vector<T,3> (0.) )
447{
448 using namespace descriptors;
449 //Retrieving cuboid geometry
450 auto& cuboidGeometry = sParticleSystem.getSuperStructure().getCuboidGeometry();
451 //Get global particle id
452 std::size_t globID = sParticleSystem.getGlobID();
453 //Find globiC the particle belongs to
454 int globiCcentre;
455 bool inDomain = cuboidGeometry.getC( position, globiCcentre );
456 if (!inDomain){ std::cerr << "ERROR: Particle added outside domain!" << std::endl; }
457
458 //Iterate over particle systems
459 std::size_t localID=0; //Return localID of particle inside particleSystem holding centre
461 [&](ParticleSystem<T,PARTICLETYPE>& particleSystem, int iC, int globiC){
462
463 //Do only on residence iC
464 if (globiC == globiCcentre){
465 //Run creator on particleSystem
466 addSubgridObject( particleSystem,
467 position, radius, density, velocity );
468 //Add additional data due to parallization
469 auto particle = particleSystem.get(particleSystem.size()-1);
470 particle.template setField<PARALLELIZATION,ID>( globID );
471 //Set localID
472 localID=particle.getId();
473 }
474 });
475
476 //Return globiC, globID, localiD
477 return ParallelParticleLocator(globiCcentre, globID, localID);
478}
479
480//Add particle on residing iC with surface on all iCs
481template<typename T, typename PARTICLETYPE>
484 const Vector<T,3>& position, T radius, T density=0.,
485 const Vector<T,3>& velocity = Vector<T,3> (0.),
486 const int species=0 )
487{
488 using namespace descriptors;
489 //Retrieving cuboid geometry
490 auto& cuboidGeometry = sParticleSystem.getSuperStructure().getCuboidGeometry();
491 //Get global particle id
492 std::size_t globID = sParticleSystem.getGlobID();
493 //Find globiC the particle belongs to
494 int globiCcentre;
495 bool inDomain = cuboidGeometry.getC( position, globiCcentre );
496 if (!inDomain){ std::cerr << "ERROR: Particle added outside domain!" << std::endl; }
497
498 //Iterate over particle systems
499 std::size_t localID=0; //Return localID of particle inside particleSystem holding centre
501 [&](ParticleSystem<T,PARTICLETYPE>& particleSystem, int iC, int globiC){
502
503 //Do only on residence iC
504 if (globiC == globiCcentre){
505 //Run creator on particleSystem
506 addSubgridObject( particleSystem,
507 position, radius, density, velocity );
508 //Add additional data due to parallization
509 auto particle = particleSystem.get(particleSystem.size()-1);
510 particle.template setField<PARALLELIZATION,ID>( globID );
511 //Add species type to particle
512 if constexpr( access::providesSpecies<PARTICLETYPE>() ){
513 particle.template setField<PHYSPROPERTIES,SPECIES>( species );
514 }
515 //Set localID
516 localID=particle.getId();
517 }
518 });
519
520 //Return globiC, globID, localiD
521 return ParallelParticleLocator(globiCcentre, globID, localID);
522}
523
524
525
526
527
528
529} //namespace creators
530
531} //namespace particles
532
533} //namespace olb
534
535#endif
IndicatorF3D is an application from .
implements a smooth circle in 2D with an _epsilon sector
implements a smooth particle cuboid in 3D with an _epsilon sector.
implements a smooth particle cylinder in 3D with an _epsilon sector.
implements a smooth sphere in 3D with an _epsilon sector
CuboidGeometry< T, D > & getCuboidGeometry()
Read and write access to cuboid geometry.
Plain old scalar vector.
Definition vector.h:47
auto & get()
Expose container.
constexpr std::size_t size()
Size of ParticleSystem.
SuperStructure< T, PARTICLETYPE::d > & getSuperStructure()
std::vector< ParticleSystem< T, PARTICLETYPE > * > & getBlockParticleSystems()
void forSystemsInSuperParticleSystem(SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, F f)
std::unordered_set< int > getSurfaceTouchingICs(CuboidGeometry< T, D > &cuboidGeometry, Vector< T, D > position, T circumRadius, const Vector< bool, D > &periodicity, int globiC, F f=[](int){})
Get a set of surface touching iCs (that are not globiC) Allows to run an optional function per unique...
bool getCuboid(const CuboidGeometry< T, D > &cuboidGeometry, const Vector< bool, D > &periodicity, const PhysR< T, D > &position, int &iC)
Function returns true if cuboid was found and gives iC.
Definition utilities.h:320
ParallelParticleLocator addResolvedObject(SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, std::size_t idxSurface, const Vector< T, PARTICLETYPE::d > &position, T density=0., const Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation > &angleInDegree=Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation >(0.), const Vector< T, PARTICLETYPE::d > &velocity=Vector< T, PARTICLETYPE::d >(0.), const Vector< bool, PARTICLETYPE::d > &periodicity=Vector< T, PARTICLETYPE::d >(false))
ParallelParticleLocator addResolvedCylinder3D(SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, const Vector< T, 3 > &position, const Vector< T, 3 > &normal, T height, T radius, T epsilon, T density=0., const Vector< T, 3 > &angleInDegree=Vector< T, 3 >(0.), const Vector< T, 3 > &velocity=Vector< T, 3 >(0.), const Vector< bool, 3 > &periodicity=Vector< bool, 3 >(false))
ParallelParticleLocator addResolvedCuboid3D(SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, const Vector< T, 3 > &position, const Vector< T, 3 > &extend, T epsilon, T density=0., const Vector< T, 3 > &angleInDegree=Vector< T, 3 >(0.), const Vector< T, 3 > &velocity=Vector< T, 3 >(0.), const Vector< bool, 3 > &periodicity=Vector< bool, 3 >(false))
ParallelParticleLocator addResolvedCircle2D(SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, const Vector< T, 2 > &position, T radius, T epsilon, T density=0., const Vector< T, 2 > &velocity=Vector< T, 2 >(0.), const Vector< bool, 2 > &periodicity=Vector< bool, 2 >(false))
ParallelParticleLocator addResolvedSphere3D(SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, const Vector< T, 3 > &position, T radius, T epsilon, T density=0., const Vector< T, 3 > &velocity=Vector< T, 3 >(0.), const Vector< bool, 3 > &periodicity=Vector< bool, 3 >(false))
std::unordered_set< int > prepareParallelResolvedParticle(SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, Vector< T, PARTICLETYPE::d > position, T circumRadius, const T epsilon, int &globiCcentre, const T physDeltaX, const Vector< bool, PARTICLETYPE::d > &periodicity)
ParallelParticleLocator addSubgridSphere3D(SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, const Vector< T, 3 > &position, T radius, T density=0., const Vector< T, 3 > &velocity=Vector< T, 3 >(0.))
std::size_t addSurface(SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, F createUniqueIndicatorPtr)
Adds surface (SmoothIndicator) to all block particle systems.
Particle< T, PARTICLETYPE > assignParallelResolvedParticleToiC(ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxSurface, std::size_t globID, int globiCcentre, const Vector< T, PARTICLETYPE::d > &position, T density=0., const Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation > &angleInDegree=Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation >(0.), const Vector< T, PARTICLETYPE::d > &velocity=Vector< T, PARTICLETYPE::d >(0.))
ParallelParticleLocator addResolvedArbitraryShape3D(SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, const Vector< T, 3 > &position, T latticeSpacing, std::shared_ptr< IndicatorF3D< T > > indPtr, T epsilon, T density=0., const Vector< T, 3 > &angleInDegree=Vector< T, 3 >(0.), const Vector< T, 3 > &velocity=Vector< T, 3 >(0.), const Vector< bool, 3 > &periodicity=Vector< bool, 3 >(false))
Particle< T, PARTICLETYPE > addSubgridObject(ParticleSystem< T, PARTICLETYPE > &particleSystem, const Vector< T, PARTICLETYPE::d > &position, T radius, T density=0., const Vector< T, PARTICLETYPE::d > &velocity=Vector< T, PARTICLETYPE::d >(0.))
Add subgrid object as new particle (and return particle object)
bool assignParallelResolvedParticle(ParticleSystem< T, PARTICLETYPE > &particleSystem, std::unordered_set< int > &setOfICs, int globiC, std::size_t idxSurface, std::size_t globID, std::size_t &localID, int globiCcentre, const Vector< T, PARTICLETYPE::d > &position, T density=0., const Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation > &angleInDegree=Vector< T, utilities::dimensions::convert< PARTICLETYPE::d >::rotation >(0.), const Vector< T, PARTICLETYPE::d > &velocity=Vector< T, PARTICLETYPE::d >(0.))
ParallelParticleLocator addSubgridSphereWithSpecies3D(SuperParticleSystem< T, PARTICLETYPE > &sParticleSystem, const Vector< T, 3 > &position, T radius, T density=0., const Vector< T, 3 > &velocity=Vector< T, 3 >(0.), const int species=0)
cpu::simd::Pack< T > sqrt(cpu::simd::Pack< T > value)
Definition pack.h:100
cpu::simd::Pack< T > max(cpu::simd::Pack< T > rhs, cpu::simd::Pack< T > lhs)
Definition pack.h:130
Top level namespace for all of OpenLB.
std::conditional_t< D==2, SmoothIndicatorF2D< T, T, PARTICLE >, SmoothIndicatorF3D< T, T, PARTICLE > > SmoothIndicatorF
Definition aliases.h:278
Converts dimensions by deriving from given cartesian dimension D.