Skip to content

Commit

Permalink
fix gather/scatter type verification (#57)
Browse files Browse the repository at this point in the history
* fix gather/scatter type verification

* add comment
  • Loading branch information
Joroks authored Jul 9, 2024
1 parent c8beaa5 commit ae5ada0
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/LAMMPS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -616,10 +616,6 @@ Compute entities have the prefix `c_`, fix entities use the prefix `f_`, and per
The returned Array is decoupled from the internal state of the LAMMPS instance.
!!! warning "Type Verification"
Due to how the underlying C-API works, it's not possible to verify the element data-type of fix or compute style data.
Supplying the wrong data-type will not throw an error but will result in nonsensical output
!!! warning "ids"
The optional parameter `ids` only works, if there is a map defined. For example by doing:
`command(lmp, "atom_modify map yes")`
Expand Down Expand Up @@ -659,10 +655,6 @@ The optional parameter `ids` determines to which subset of atoms the data will b
Compute entities have the prefix `c_`, fix entities use the prefix `f_`, and per-atom entites have no prefix.
!!! warning "Type Verification"
Due to how the underlying C-API works, it's not possible to verify the element data-type of fix or compute style data.
Supplying the wrong data-type will not throw an error but will result in nonsensical date being supplied to the LAMMPS instance.
!!! warning "ids"
The optional parameter `ids` only works, if there is a map defined. For example by doing:
`command(lmp, "atom_modify map yes")`
Expand Down Expand Up @@ -732,7 +724,7 @@ end

function _get_T(lmp::LMP, name::String)
if startswith(name, r"[f,c]_")
return missing # As far as I know, it's not possible to determine the datatype of computes or fixes at runtime
return Float64 # computes and fixes are allways doubles
end

type = API.lammps_extract_atom_datatype(lmp, name)
Expand Down

0 comments on commit ae5ada0

Please sign in to comment.