Skip to content

Condition for a grid node in rigid_transfer.cpp for 2D and 3D case. #56

@yuichiro-student

Description

@yuichiro-student

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.
image

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
image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions