Hi,
I'm trying to initialize a history value as 1.0 and doing so in the surfacesClose function. But it doesn't work, the value is always initialized as 0. The value is added at the beginning as
hsetup->add_history_value("myvalue", "0");
and it should be a value of 1 and switch inbetween into -1. The initialization is done the following way:
void surfacesClose(SurfacesCloseData & scdata, ForceData&, ForceData&)
{
if(scdata.contact_flags) *scdata.contact_flags &= ~CONTACT_ROLLING_MODEL;
double * const c_history = &scdata.contact_history[history_offset];
c_history[0] = 0.0; // dangle
c_history[1] = 0.0; // dangle
c_history[2] = 0.0; // dangle
c_history[3] = 0.0; //staticangle
c_history[4] = 0.0; //staticangle
c_history[5] = 0.0; //staticangle
c_history[6] = 1.0; //
}
Why is this value always 0?
Thanks
Joshua
ckloss | Sun, 04/23/2017 - 11:48
Hi Joshuah,
Hi Joshuah,
is the index [6] correct? Otherwise, hard to tell! The way you outline above should work if the registration is done correctly
Best wishes
Christoph