Skip to content

OBJ reader uses j as both triangle counter and vertex index #1199

@sbryngelson

Description

@sbryngelson

Bug

In `src/common/m_model.fpp`, the OBJ file reader uses variable `j` as both the triangle counter and the third vertex index when parsing face lines. After `j` is incremented as a triangle counter, it is also used to index the third vertex, producing an off-by-one vertex reference.

File: `src/common/m_model.fpp`, lines 278-282

Impact: Triangulated OBJ meshes silently reference wrong vertex data for the third vertex of each triangle, corrupting immersed boundary geometry.

Severity: Critical — produces silently wrong geometry for OBJ-based immersed boundaries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working or doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions