🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Custom property problem in bonded model

User: "Raheem Sterling_22160"
Altair Community Member
Updated by Raheem Sterling_22160

Hi,

I meet some problems when I introduced a new bonded model based on code in BondedParticle_CM_v3_1_0.

1. I have added some parameters in "BOND_PREFS", so I modified the "bool CBonded::getDetailsForProperty", I added the number of value from 7 to 10; as below, but there is something wrong in the pointer. When the value from m_BondPrefsDelta[n] added to m_BondPrefs[n], the value of m_BondPrefsDelta[6] and m_BondPrefsDelta[7] changed as figure shows, both of it added a value 0f 7 I don't know where is from.

if (5 == propertyIndex &&         eContact == category)     {         strncpy(name, BOND_PREFS.c_str(), NApi::CUSTOM_PROP_MAX_NAME_LENGTH);         dataType         = eDouble;         numberOfElements = 10;         unitType         = eNone;          // Initialization of the property values in this case 0.0 for all components - ten in total         std::ostringstream oss;         oss << 0.0 << NApi::delim() << 0.0 << NApi::delim() << 0.0 << NApi::delim() << 0.0 << NApi::delim() << 0.0             << NApi::delim() << 0.0 << NApi::delim() << 0.0 << NApi::delim() << 0.0 << NApi::delim() << 0.0 << NApi::delim() << 0.0;         strncpy(initValBuff, oss.str().c_str(), NApi::BUFF_SIZE);         return true;     }

2.I am not sure if I have made mistakes or missed somthing in the "propertyIndex", because when debug the code, I found in "getDetailsForProperty", some values of property cannot respond to the iBondPrefs, for example: my total number of custom properties is 9, but the value of "iBOND_TANGENTIAL_TORQUE_B" is 12, how to know the value "iBondPrefs" when I change the code in "getDetailsForProperty"?

Regard!

Raheem

Find more posts tagged with