Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A function logfreq3(), for logarithmic spacing #1476

Merged
merged 3 commits into from Jun 17, 2019

Conversation

Projects
None yet
3 participants
@uihsnv
Copy link
Collaborator

commented May 26, 2019

Summary

A common need, is to sample at logarithmically spaced time intervals. There currently exist two functions: logfreq() and logfreq2() that seem to be aimed at this requirement. The latter is just linear spacing with the bounds being logarithmic, so it does not really serve that purpose. The former is capable of generating such a series, but only with an integer base. One often requires the spacing to be much finer, and that is the case where this function will be helpful.

Related Issues

Resolves #1471

Author(s)

Vishnu V. Krishnan - vishnugb gmail.com
Tata Institute of Fundamental Research, Hyderabad, India

Licensing

By submitting this pull request, I agree, that my contribution will be included in LAMMPS and redistributed under either the GNU General Public License version 2 (GPL v2) or the GNU Lesser General Public License version 2.1 (LGPL v2.1).

Backward Compatibility

No breaking of backward compatibility has occurred. This is just an addition of a function.

Implementation Notes

I used the logfreq2 function as a template, and modified it as required. Attaching an input file that uses this function, and prints to screen/log-file.

Post Submission Checklist

  • The feature or features in this pull request is complete
  • Licensing information is complete
  • Corresponding author information is complete
  • The source code follows the LAMMPS formatting guidelines
  • Suitable new documentation files and/or updates to the existing docs are included
  • The added/updated documentation is integrated and tested with the documentation build system
  • The feature has been verified to work with the conventional build system
  • The feature has been verified to work with the CMake based build system
  • One or more example input decks are included

Further Information, Files, and Links

in_logfreq3.txt

A function logfreq3(), for logarithmical spacing
Unlike logfreq(), this also allows for fractional ratios
Resolves #1471

@uihsnv uihsnv requested a review from sjplimp as a code owner May 26, 2019

uihsnv added some commits Jun 1, 2019

Merging to stay up-to-date
Merge remote-tracking branch 'lammps_upstream/master' into log_spacing
@sjplimp
Copy link
Contributor

left a comment

ok

@sjplimp

This comment has been minimized.

Copy link
Contributor

commented Jun 17, 2019

@uihsnv seems like a useful feature - thanks for submitting

@sjplimp

This comment has been minimized.

Copy link
Contributor

commented Jun 17, 2019

thanks - ready to release then

@akohlmey akohlmey merged commit 6536399 into lammps:master Jun 17, 2019

6 checks passed

lammps/pull-requests/build-docs-pr head run ended
Details
lammps/pull-requests/cmake/cmake-serial-pr head run ended
Details
lammps/pull-requests/kokkos-omp-pr head run ended
Details
lammps/pull-requests/openmpi-pr head run ended
Details
lammps/pull-requests/serial-pr head run ended
Details
lammps/pull-requests/shlib-pr head run ended
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.