make names of custom data functions consistent
This commit is contained in:
@ -2,11 +2,18 @@
|
||||
%include "carrays.i"
|
||||
%include "cdata.i"
|
||||
|
||||
%array_functions(char, charp);
|
||||
%pointer_functions(int, intp);
|
||||
%pointer_functions(double, doublep);
|
||||
%pointer_cast(void *, int *, void_to_int);
|
||||
%pointer_cast(void *, double *, void_to_double);
|
||||
%array_functions(char, char_p);
|
||||
|
||||
%pointer_functions(int, int_p);
|
||||
%pointer_functions(int, int64_p);
|
||||
%pointer_functions(double, double_p);
|
||||
|
||||
%pointer_cast(void *, int *, void_p_to_int_p);
|
||||
%pointer_cast(void *, int **, void_p_to_int2d_p);
|
||||
%pointer_cast(void *, int *, void_p_to_int64_p);
|
||||
%pointer_cast(void *, int **, void_p_to_int64_2d_p);
|
||||
%pointer_cast(void *, double *, void_p_to_double_p);
|
||||
%pointer_cast(void *, double **, void_p_to_double_2d_p);
|
||||
|
||||
%{
|
||||
enum _LMP_DATATYPE_CONST {
|
||||
|
||||
@ -14,7 +14,7 @@ lualammps.lammps_command(lmp, "create_atoms 1 box")
|
||||
|
||||
print("LAMMPS version ", ver)
|
||||
print("Number of created atoms: ", lualammps.lammps_get_natoms(lmp))
|
||||
print("Current size of timestep: ", lualammps.doublep_value(lualammps.void_to_double(lualammps.lammps_extract_global(lmp,"dt"))))
|
||||
print("Current size of timestep: ", lualammps.double_p_value(lualammps.void_p_to_double_p(lualammps.lammps_extract_global(lmp,"dt"))))
|
||||
lualammps.lammps_close(lmp)
|
||||
EOF
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ pllammps::lammps_command(\$lmp, "create_atoms 1 box");
|
||||
|
||||
print("LAMMPS version ",\$ver,"\n");
|
||||
print("Number of created atoms: ", pllammps::lammps_get_natoms(\$lmp), "\n");
|
||||
print("Current size of timestep: ", pllammps::doublep_value(pllammps::void_to_double(pllammps::lammps_extract_global(\$lmp,"dt"))), "\n");
|
||||
print("Current size of timestep: ", pllammps::double_p_value(pllammps::void_p_to_double_p(pllammps::lammps_extract_global(\$lmp,"dt"))), "\n");
|
||||
pllammps::lammps_close(\$lmp)
|
||||
EOF
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ lammps_command(lmp, "create_atoms 1 box")
|
||||
|
||||
print("LAMMPS version ",ver)
|
||||
print("Number of created atoms: %g" % lammps_get_natoms(lmp))
|
||||
print("Current size of timestep: %g" % doublep_value(void_to_double(lammps_extract_global(lmp,'dt'))))
|
||||
print("Current size of timestep: %g" % double_p_value(void_p_to_double_p(lammps_extract_global(lmp,'dt'))))
|
||||
lammps_close(lmp)
|
||||
EOF
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@ Rubylammps.lammps_command(lmp, "create_atoms 1 box")
|
||||
|
||||
print("LAMMPS version ", ver, "\n")
|
||||
print("Number of created atoms: ", Rubylammps.lammps_get_natoms(lmp), "\n")
|
||||
print("Current size of timestep: ", Rubylammps.double_p_value(Rubylammps.void_p_to_double_p(Rubylammps.lammps_extract_global(lmp,"dt"))), "\n")
|
||||
Rubylammps.lammps_close(lmp)
|
||||
EOF
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ lammps_command \$lmp "region box block -5 5 -5 5 -5 5"
|
||||
lammps_command \$lmp "create_box 1 box"
|
||||
lammps_command \$lmp "create_atoms 1 box"
|
||||
|
||||
set dt [doublep_value [void_to_double [lammps_extract_global \$lmp dt]]]
|
||||
set dt [double_p_value [void_p_to_double_p [lammps_extract_global \$lmp dt]]]
|
||||
puts "LAMMPS version \$ver"
|
||||
puts [format "Number of created atoms: %g" [lammps_get_natoms \$lmp]]
|
||||
puts "Current size of timestep: \$dt"
|
||||
|
||||
Reference in New Issue
Block a user