|
MPS-Basic
|
Provides a weight function. More...
#include <weight.hpp>
Public Member Functions | |
| Weight ()=default | |
| Weight (WeightType weightType) | |
| double | weightFn (double dis, double re) |
| Weight function for MPS method. | |
Private Attributes | |
| WeightType | weightType |
Provides a weight function.
The class supports different types of weight calculations, as specified by the WeightType enumeration.
Definition at line 15 of file weight.hpp.
|
default |
| Weight::Weight | ( | WeightType | weightType | ) |
Definition at line 6 of file weight.cpp.
| double Weight::weightFn | ( | double | dis, |
| double | re ) |
Weight function for MPS method.
The weight function is defined as:
\[w(r) = \frac{r_e}{r} - 1\]
for semi-implicit method\[w(r) = \frac{r_e}{r} - \frac{r}{r_e}\]
for the gradient calculations in explicit method\[w(r) = \frac{r_e}{r} + \frac{r}{r_e} - 2\]
for the other calculations in explicit methodWeight function for semi-implicit method is presented by Koshizuka and Oka, 1996 Weight functions for explicit method is presented by Yamada, et al., 2011
| dis | distance of each particle \(r\). It must be positive. |
| re | effective radius \(r_e\) |
Definition at line 10 of file weight.cpp.

|
private |
Definition at line 17 of file weight.hpp.