Hi Lammps users,
Sort of a dumb question, but I'm struggling with adding two arrays to
pair_tersoff. I need to add a 1d-integer array of length [inum] and a
2d-integer array of [inum][12]. I called these nc and nn.
I tried to use the create_2d_int_array() function and also tried to make
my own create_1d_int_array() but I get errors when trying to recompile. I
think I must be missing something very obvious in the variable
declaration. My background is in fortran so figuring out the memory
management has been a bit of a challenge.
Do I need to add these variables to tersoff.h?
pair_tersoff.cpp: In destructor �virtual
LAMMPS_NS::PairTersoff::~PairTersoff()�:
pair_tersoff.cpp:71: error: �nc� was not declared in this scope
pair_tersoff.cpp:72: error: �nn� was not declared in this scope
pair_tersoff.cpp: In member function �virtual void
LAMMPS_NS::PairTersoff::compute(int, int)�:
pair_tersoff.cpp:134: error: invalid types �int*[double]� for array subscript
Any advice would be greatly appreciated!
Best,
John