Hi, I am trying to understand the code, having a problem in understanding rigid_transfer.cpp.
Specifically, the condition for determining whether an grid node is valid for a rigid body element.
If I am understanding correctly, in 3D case described in line 47 to line 51, coord[0] and coord[1] are position of a grid node projected on a triangular mesh and thus it seems to be reasonable to have the condition;
0 <= coord[0] && 0 <= coord[1] && coord[0] + coord[1] <= 1.
In 2D case described in line 42 to line 46, however, although the code is applying similar condition to the projected grid point on a elemental bar, the condition seems to be relaxed by 2%.
-0.02 <= coord[0] && coord[0] <= 1.02
Could anyone tell me why the difference between 2D and 3D are necessary and where do the numbers -0.02 and 1.02 come from?
Thank you so much.
Hi, I am trying to understand the code, having a problem in understanding rigid_transfer.cpp. Specifically, the condition for determining whether an grid node is valid for a rigid body element.
If I am understanding correctly, in 3D case described in line 47 to line 51, coord[0] and coord[1] are position of a grid node projected on a triangular mesh and thus it seems to be reasonable to have the condition; 0 <= coord[0] && 0 <= coord[1] && coord[0] + coord[1] <= 1.
In 2D case described in line 42 to line 46, however, although the code is applying similar condition to the projected grid point on a elemental bar, the condition seems to be relaxed by 2%. -0.02 <= coord[0] && coord[0] <= 1.02
Could anyone tell me why the difference between 2D and 3D are necessary and where do the numbers -0.02 and 1.02 come from? Thank you so much.