New answers tagged c++
3
votes
Accepted
Computing LJ force from LJ potential, or not?
Which one is computationally more accutate [sic] and why?
The first one is more accurate. It uses the exact derivative of the LJ potential.
By contrast, the second one not only uses a numerical ...
3
votes
How can I write a unit test for this routine?
Divide and conquer
refactor your code, so that you have smaller methods with well defined purposes. Give these methods short descriptive names of what they are doing. You make the code more testable ...
4
votes
Understanding leapfrog integration algorithm
The first code is wrong if you have multiple particles that interact. Due to the structure of the loop, the interaction forces with particles at the start of the list are computed with the updated ...
5
votes
Accepted
Understanding leapfrog integration algorithm
In the second code the full time stepping is given by three lines in main()
...
Top 50 recent answers are included
Related Tags
c++ × 329linear-algebra × 36
c × 34
libraries × 32
eigen × 32
matrix × 30
python × 19
numerics × 19
parallel-computing × 17
mpi × 17
optimization × 16
reference-request × 16
algorithms × 15
ode × 15
finite-element × 14
matlab × 12
hpc × 12
computational-physics × 11
eigenvalues × 11
simulation × 11
fortran × 11
lapack × 11
software × 10
performance × 10
runge-kutta × 10