OpenLB
1.7
Loading...
Searching...
No Matches
src
particles
subgrid3DLegacyFramework
forces
transferExternalForce3D.hh
Go to the documentation of this file.
1
/* This file is part of the OpenLB library
2
*
3
* Copyright (C) 2017 Marie-Luise Maier
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
#ifndef TRANSFEREXTERNALFORCE3D_HH
25
#define TRANSFEREXTERNALFORCE3D_HH
26
27
#include<cmath>
28
#include "
transferExternalForce3D.h
"
29
30
namespace
olb
{
31
32
template
<
typename
T,
template
<
typename
U>
class
PARTICLETYPE>
33
class
ParticleSystem3D;
34
35
template
<
typename
T,
template
<
typename
U>
class
PARTICLETYPE>
36
TransferExternalForce3D<T, PARTICLETYPE>::TransferExternalForce3D
()
37
:
Force3D
<T, PARTICLETYPE>()
38
{
39
}
40
41
template
<
typename
T,
template
<
typename
U>
class
PARTICLETYPE>
42
void
TransferExternalForce3D<T, PARTICLETYPE>::applyForce
(
43
typename
std::deque<PARTICLETYPE<T> >::iterator p,
int
pInt,
44
ParticleSystem3D<T, PARTICLETYPE>
& psSys)
45
{
46
p->getForce()[0] += p->getStoreForce()[0];
47
p->getForce()[1] += p->getStoreForce()[1];
48
p->getForce()[2] += p->getStoreForce()[2];
49
50
p->resetStoreForce();
51
}
52
53
}
54
#endif
/* TRANSFEREXTERNALFORCE3D_HH */
olb::Force3D
Prototype for all particle forces.
Definition
force3D.h:43
olb::ParticleSystem3D
Definition
particleSystem3D.h:73
olb::TransferExternalForce3D::TransferExternalForce3D
TransferExternalForce3D()
Definition
transferExternalForce3D.hh:36
olb::TransferExternalForce3D::applyForce
void applyForce(typename std::deque< PARTICLETYPE< T > >::iterator p, int pInt, ParticleSystem3D< T, PARTICLETYPE > &psSys) override
Definition
transferExternalForce3D.hh:42
olb
Top level namespace for all of OpenLB.
Definition
boundaryPostProcessors2D.h:34
transferExternalForce3D.h
Generated on Tue Mar 5 2024 09:57:52 for OpenLB by
1.10.0