Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • S sdv-lammps
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 100
    • Issues 100
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • djurado
  • sdv-lammps
  • Wiki
  • Overview of Algorithm and Data structures

Overview of Algorithm and Data structures · Changes

Page history
Update Overview of Algorithm and Data structures authored Jan 17, 2023 by djurado's avatar djurado
Hide whitespace changes
Inline Side-by-side
Overview-of-Algorithm-and-Data-structures.md
View page @ cf805bf6
......@@ -31,13 +31,12 @@ These values always follow:
- `cut_bothsq = MIN(cut_ljsq, cut_coulsq)`
In the code, `rsq` represents the distance between atoms `i,j`. It is saved in squared form to avoid computing an expensive `sqrt`.
- If `rsq` is larger than `cut_bothsq`, then, no computation is required because there is no short-range interaction between the two atoms. In that case, the inner loop iteration stops here (*do nothing*).
- If `rsq` is smaller than `tabinnersq`, then `forcecoul` is computed using a *fast* table method. If not, it is computed using a *slow* method with calls to `sqrt` and `exp` functions.
- If `rsq` is bigger than `cut_lj_innersq`, then `forcelj` needs a few additional computations.
- If `rsq` is larger than `cut_bothsq`, then, no computation is required because there is no short-range interaction between the two atoms. In that case, the inner loop iteration stops here (**do nothing**).
- If `rsq` is smaller than `tabinnersq`, then `forcecoul` is computed using a **fast** table method. If not, it is computed using a **slow** method with calls to `sqrt` and `exp` functions.
- If `rsq` is bigger than `cut_lj_innersq`, then `forcelj` needs a few additional computations. This is not significant enough to be considered a code path.
The following flowchart shows the different cases based on `rsq`.
The condition on `forcelj`is not shown in order to focus on the `tabinnersq` condition.
The following flowchart shows in yellow the different cases based on `rsq` (distance).
![flowchart](uploads/2c10a18b3cda9496b9eaed9e54e001db/flowchart.png)
![simple_flowchart](uploads/40d425ead4886511af9559b29aec9a6b/simple_flowchart.png)
At the end of the function, the computed `forcelj` and `forcecoul` values are used to update the `f` (force) values for both atoms `i` and `j`.
\ No newline at end of file
At the end of the function, the computed `forcelj` and `forcecoul` are used to update the `f` (force) values for both atoms `i` and `j`.
\ No newline at end of file
Clone repository

Home

  1. Introduction
  2. Overview
  3. Implementation
    • Implementation
  4. Implementation

Sidebar