35#ifndef PARTICLE_CREATOR_FUNCTIONS_3D_H
36#define PARTICLE_CREATOR_FUNCTIONS_3D_H
52template<
typename T,
typename PARTICLETYPE,
bool IGNORE_WARNINGS=false>
55 std::size_t idxParticle,
56 const Vector<T,3>& position, T radius, T epsilon, T density=0.,
59 using namespace descriptors;
63 std::unique_ptr<SIndicatorBaseType> sIndicatorPtr(
67 auto& vectorOfIndicators = particleSystem.template getAssociatedData<
68 std::vector<std::unique_ptr<SIndicatorBaseType>>>();
69 std::size_t idxSurface = vectorOfIndicators.
size();
70 vectorOfIndicators.push_back( std::move(sIndicatorPtr) );
73 if constexpr ( PARTICLETYPE::template providesNested<SURFACE,ROT_MATRIX>()
74 && !IGNORE_WARNINGS ) {
76 clout <<
"WARNING: A rotation matrix is provided but is not necessary for a sphere." << std::endl;
80 setResolvedObject<T,PARTICLETYPE,true>(particleSystem, idxParticle, idxSurface,
85template<
typename T,
typename PARTICLETYPE,
bool IGNORE_WARNINGS=false>
87 const Vector<T,3>& position, T radius, T epsilon, T density=0.,
91 std::size_t idxParticle = particleSystem.
size();
97 setResolvedSphere3D<T,PARTICLETYPE,IGNORE_WARNINGS>(
98 particleSystem, idxParticle, position, radius, epsilon, density, velocity );
105template<
typename T,
typename PARTICLETYPE>
108 std::size_t idxParticle,
110 T height, T radius, T epsilon, T density=0.,
114 using namespace descriptors;
118 std::unique_ptr<SIndicatorBaseType> sIndicatorPtr(
122 auto& vectorOfIndicators = particleSystem.template getAssociatedData<
123 std::vector<std::unique_ptr<SIndicatorBaseType>>>();
124 std::size_t idxSurface = vectorOfIndicators.
size();
125 vectorOfIndicators.push_back( std::move(sIndicatorPtr) );
129 position, density, angleInDegree, velocity);
133template<
typename T,
typename PARTICLETYPE>
136 T height, T radius, T epsilon, T density=0.,
141 std::size_t idxParticle = particleSystem.
size();
148 normal, height, radius, epsilon, density, angleInDegree, velocity );
155template<
typename T,
typename PARTICLETYPE>
157 std::size_t idxParticle,
162 using namespace descriptors;
166 std::unique_ptr<SIndicatorBaseType> sIndicatorPtr(
170 auto& vectorOfIndicators = particleSystem.template getAssociatedData<
171 std::vector<std::unique_ptr<SIndicatorBaseType>>>();
172 std::size_t idxSurface = vectorOfIndicators.
size();
173 vectorOfIndicators.push_back( std::move(sIndicatorPtr) );
177 position, density, angleInDegree, velocity);
182template<
typename T,
typename PARTICLETYPE>
189 std::size_t idxParticle = particleSystem.
size();
196 extend, epsilon, density, angleInDegree, velocity );
203template<
typename T,
typename PARTICLETYPE>
205 std::size_t idxParticle,
207 T radius1, T radius2, T epsilon, T density=0,
211 using namespace descriptors;
215 std::unique_ptr<SIndicatorBaseType> sIndicatorPtr(
219 auto& vectorOfIndicators = particleSystem.template getAssociatedData<
220 std::vector<std::unique_ptr<SIndicatorBaseType>>>();
221 std::size_t idxSurface = vectorOfIndicators.
size();
222 const Vector<T,3> position = sIndicatorPtr->calcCenterOfMass();
223 vectorOfIndicators.push_back( std::move(sIndicatorPtr) );
227 position, density, angleInDegree, velocity);
232template<
typename T,
typename PARTICLETYPE>
235 T radius1, T radius2, T epsilon, T density=0,
240 std::size_t idxParticle = particleSystem.
size();
247 position1, position2, radius1, radius2, epsilon, density, angleInDegree, velocity );
254template<
typename T,
typename PARTICLETYPE>
256 std::size_t idxParticle,
259 T epsilon, T density=0.,
263 using namespace descriptors;
267 std::unique_ptr<SIndicatorBaseType> sIndicatorPtr(
271 auto& vectorOfIndicators = particleSystem.template getAssociatedData<
272 std::vector<std::unique_ptr<SIndicatorBaseType>>>();
273 std::size_t idxSurface = vectorOfIndicators.
size();
274 vectorOfIndicators.push_back( std::move(sIndicatorPtr) );
278 position, density, angleInDegree, velocity);
283template<
typename T,
typename PARTICLETYPE>
287 T epsilon, T density=0.,
292 std::size_t idxParticle = particleSystem.
size();
299 radius, epsilon, density, angleInDegree, velocity );
306template<
typename T,
typename PARTICLETYPE>
308 std::size_t idxParticle,
312 T epsilon, T density=0.,
316 using namespace descriptors;
320 std::unique_ptr<SIndicatorBaseType> sIndicatorPtr(
324 auto& vectorOfIndicators = particleSystem.template getAssociatedData<
325 std::vector<std::unique_ptr<SIndicatorBaseType>>>();
326 std::size_t idxSurface = vectorOfIndicators.
size();
327 vectorOfIndicators.push_back( std::move(sIndicatorPtr) );
331 position, density, angleInDegree, velocity);
335template<
typename T,
typename PARTICLETYPE>
340 T epsilon, T density=0.,
345 std::size_t idxParticle = particleSystem.
size();
352 latticeSpacing, indPtr, epsilon, density, angleInDegree, velocity );
359template<
typename T,
typename PARTICLETYPE>
362 const Vector<T,3>& position, T radius, T density=0.,
366 position, radius, density, velocity );
IndicatorF3D is an application from .
class for marking output with some text
implements a smooth particle cone in 3D 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 particle ellipsoid in 3D with an _epsilon sector.
implements a smooth sphere in 3D with an _epsilon sector
constexpr std::size_t size()
Size of ParticleSystem.
void extend()
Extend particle system by one particle.
void addResolvedCone3D(ParticleSystem< T, PARTICLETYPE > &particleSystem, const Vector< T, 3 > &position1, const Vector< T, 3 > &position2, T radius1, T radius2, T epsilon, T density=0, const Vector< T, 3 > &angleInDegree=Vector< T, 3 >(0.), const Vector< T, 3 > &velocity=Vector< T, 3 >(0.))
Add resolved cone as new particle with new surface.
void setResolvedSphere3D(ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, const Vector< T, 3 > &position, T radius, T epsilon, T density=0., const Vector< T, 3 > &velocity=Vector< T, 3 >(0.))
Set resolved sphere for existing particle but new surface.
void setResolvedCuboid3D(ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, 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.))
Set resolved cuboid for existing particle but new surface.
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))
void addResolvedEllipsoid3D(ParticleSystem< T, PARTICLETYPE > &particleSystem, const Vector< T, 3 > &position, const Vector< T, 3 > &radius, T epsilon, T density=0., const Vector< T, 3 > &angleInDegree=Vector< T, 3 >(0.), const Vector< T, 3 > &velocity=Vector< T, 3 >(0.))
Add resolved ellipsoid as new particle with new surface.
void setResolvedArbitraryShape3D(ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, Vector< T, 3 > position, T latticeSpacing, std::shared_ptr< IndicatorF3D< T > > indPtr, T epsilon, T density=0., Vector< T, 3 > angleInDegree=Vector< T, 3 >(0.), Vector< T, 3 > velocity=Vector< T, 3 >(0.))
Set resolved cuboid for existing particle but new surface.
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))
void setResolvedCylinder3D(ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, 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.))
Set resolved cylinder for existing particle but new surface.
void setResolvedCone3D(ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, const Vector< T, 3 > &position1, const Vector< T, 3 > &position2, T radius1, T radius2, T epsilon, T density=0, const Vector< T, 3 > &angleInDegree=Vector< T, 3 >(0.), const Vector< T, 3 > &velocity=Vector< T, 3 >(0.))
Set resolved cone for existing particle but new surface.
void setResolvedEllipsoid3D(ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, const Vector< T, 3 > &position, const Vector< T, 3 > &radius, T epsilon, T density=0., const Vector< T, 3 > &angleInDegree=Vector< T, 3 >(0.), const Vector< T, 3 > &velocity=Vector< T, 3 >(0.))
Set resolved ellipsoid for existing particle but new surface.
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.))
void setResolvedObject(ParticleSystem< T, PARTICLETYPE > &particleSystem, std::size_t idxParticle, std::size_t idxSurface, const Vector< T, 2 > &position, T density, T angle, const Vector< T, 2 > &velocity)
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)
Top level namespace for all of OpenLB.