-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathShieldedCoulombForce.h
executable file
·46 lines (36 loc) · 1.65 KB
/
ShieldedCoulombForce.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/**
* @file ShieldedCoulombForce.h
* @brief Defines the data and methods of the ShieldedCoulombForce class
*
* @license This file is distributed under the BSD Open Source License.
* See LICENSE.TXT for details.
**/
#ifndef SHIELDEDCOULOMBFORCE_H
#define SHIELDEDCOULOMBFORCE_H
#include "Force.h"
#include "VectorCompatibility.h"
class ShieldedCoulombForce : public Force {
public:
ShieldedCoulombForce(Cloud * const C, const double shieldingConstant);
~ShieldedCoulombForce();
void force1(const double currentTime); //rk substep 1
void force2(const double currentTime); //rk substep 2
void force3(const double currentTime); //rk substep 3
void force4(const double currentTime); //rk substep 4
void writeForce(fitsfile * const file, int * const error) const;
void readForce(fitsfile * const file, int * const error);
private:
double shielding; //<! Inverse of shielding distance [m^-1]
SEMAPHORES
static const double coulomb; //<! Coulomb constant: 8.987551787 [m/F]
void force(const cloud_index currentParticle,
const double charges, const doubleV displacementV);
void force(const cloud_index currentParticle, const cloud_index iParticle,
const doubleV charges, const doubleV displacementX, const doubleV displacementY);
void forcer(const cloud_index currentParticle, const cloud_index iParticle,
const doubleV charges, const doubleV displacementX, const doubleV displacementY);
static doubleV exp_pd(const int mask, const doubleV a);
static void plusEqualr_pd(double * const a, const doubleV b);
static void minusEqualr_pd(double * const a, const doubleV b);
};
#endif // SHIELDEDCOULOMBFORCE_H