24#ifndef WEIGHTFORCE_3D_HH
25#define WEIGHTFORCE_3D_HH
32template<
typename T,
template<
typename U>
class PARTICLETYPE>
36 for (
int i=0; i<3; ++i) {
37 _direction[i]/=directionNorm;
41template<
typename T,
template<
typename U>
class PARTICLETYPE>
44 for (
int j=0; j<3; ++j) {
45 p->getForce()[j] += p->getMass() * _g * _direction[j];
Prototype for all particle forces.
void applyForce(typename std::deque< PARTICLETYPE< T > >::iterator p, int pInt, ParticleSystem3D< T, PARTICLETYPE > &psSys) override
WeightForce3D(std::vector< T > direction, T g=9.81)
cpu::simd::Pack< T > sqrt(cpu::simd::Pack< T > value)
cpu::simd::Pack< T > pow(cpu::simd::Pack< T > base, cpu::simd::Pack< T > exp)
Top level namespace for all of OpenLB.