Get force information from previous model

Guozhen Li
Guozhen Li Altair Community Member
edited December 2023 in Community Q&A

Hi,

I noticed that for a contact force calculation in GPU CUDA, I could have access to and change the force calculated from previous models, in the following way attached. However, where could I find the same function for a CPU api? 

Regards,

Qi

image

Tagged:

Best Answer

  • Richard Wood_20774
    Richard Wood_20774
    Altair Employee
    edited December 2023 Answer ✓

    Hi,

    imageOn CPU, the forces are accessible within contactResults, which as you can see is not const. You can simply use:

    contactResults.normalForce = CSimple3DVector{ 1,2,3 };

    Cheers,

    Richard

Answers

  • Richard Wood_20774
    Richard Wood_20774
    Altair Employee
    edited December 2023 Answer ✓

    Hi,

    imageOn CPU, the forces are accessible within contactResults, which as you can see is not const. You can simply use:

    contactResults.normalForce = CSimple3DVector{ 1,2,3 };

    Cheers,

    Richard