compute rigid is missing compute_array() method

richti83's picture
Submitted by richti83 on Wed, 11/01/2017 - 10:19

I found when using compute rigid and variable c_ID[body][dim] and than printing the variable to file the data is not updated. As variable.cpp calls compute->compute_array() there should be a method in compute_rigid.cpp which calls update_pointers().
Best,
Christian.

AttachmentSize
Plain text icon in.txt2.73 KB
richti83's picture

richti83 | Tue, 11/14/2017 - 08:06

Hi Andreas,
I attached a simple script in my first post, pls see comments line 62 and 66.
it's simple to fix:
just add

void ComputeRigid::compute_array()
{
invoked_array = update->ntimestep;
update_pointers();
}

to compute_rigid.cpp as variable.cpp calls this method for array-style variables.
Best,
Christian.

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

aaigner's picture

aaigner | Tue, 11/14/2017 - 13:11

Hi Christian,

how did that ever work? If I test your script with LIGGGHTS-PUBLIC (without any changes) it fails. In particular, this should not work since compute rigid calculates an array_local (per-processor), which is not designed for access via the input-script.
It would be possible to change the code to a 'global array'-based version (including some inter-processor communication = overhead).

Did you use a modified version?

Regards,
Andreas

aaigner's picture

aaigner | Tue, 11/14/2017 - 16:40

Thanks anyway.
Better one extra bug-report than one unrecognised bug.