Conversation
|
On a side note: When running a simulation with multiple potentials applied (such as LennardJones and DSF), the current implementation loops over the views contained in the So, rather than: One could do: |
yes. |
|
Can we separate the LJ change from the example, aka two PRs? |
|
I do not know if it is clear what the predicate takes as Arguments. What about using TwoPositionsPredicate = std::predicate<
const real_t, //< pos 1 x
const real_t, //< pos 1 y
const real_t, //< pos 1 z
const real_t, //< pos 2 x
const real_t, //< pos 2 y
const real_t //< pos 2 z
>;? |
| data::Subdomain({0_r, 0_r, 0_r}, {config.Lx, config.Lx, config.Lx}, config.neighborCutoff); | ||
|
|
||
| // calculate volume of the simulation domain | ||
| const auto volume = subdomain.diameter[0] * subdomain.diameter[1] * subdomain.diameter[2]; |
There was a problem hiding this comment.
We can make this a member of the Subdomain, aka subdomain.getVolume();
|
I like the simulation script. I think it is very readable and understandable. |
|
However, it is not doing multi res, so perhaps we should remove it from the name. |
Good point. What about "02_tracerArgon_localCap"? |
Yes, I did that in #80. |
Hmm, I see the point. We can change it. |
I think I solved this in 2fbbabb on PR #80. I had to generalize the predicates to concepts and I did it in datatypes.hpp. |
Solves #72.
I introduced a
BinaryPredin analogy to theUnaryPredthat was introduced in ThermodynamicForce.hpp:89.The
BinaryPredis not immediately necessary. It would also be possible to realize a local capping with aUnaryPredthat would be checked once for the outer loop ofLennardJones.apply_ifover the atoms and once for the inner loop over the neighbor list. However, this way, the partition into AT + near Delta (= no capping), far Delta (= capping) and TR (= no interaction) is straight forward as well, since the user can have AND and OR conditions on the positions of the two particles.At least during testing on my desktop computer, the changes did not impair the observed performance.