Skip to content

Initialize meshPoints_ to null pointers#394

Merged
MakisH merged 4 commits into
developfrom
mesh-refactor-bugfix
Feb 25, 2026
Merged

Initialize meshPoints_ to null pointers#394
MakisH merged 4 commits into
developfrom
mesh-refactor-bugfix

Conversation

@vidulejs
Copy link
Copy Markdown
Collaborator

@vidulejs vidulejs commented Feb 24, 2026

Fixed bug where storeMeshPoints() would not store points because meshPoints_ pointer had garbage non-zero value.

// Adapter.C
void preciceAdapter::Adapter::storeMeshPoints()
{
    if (!meshPoints_)
    {
        DEBUG(adapterInfo("Storing mesh points..."));
        // Add points and oldPoints
        meshPoints_ = new Foam::pointField(mesh_.points());
        meshOldPoints_ = new Foam::pointField(mesh_.oldPoints());
    }
    //... 

The fix was to initialize with null pointers:

// Adapter.H
    //- Checkpointed mesh points, oldPoints
    Foam::pointField* meshPoints_ = NULL;
    Foam::pointField* meshOldPoints_ = NULL;

TODO list:

  • I updated the documentation in docs/
  • I added a changelog entry in changelog-entries/ (create directory if missing)

Comment thread Adapter.H Outdated
Co-authored-by: Gerasimos Chourdakis <gerasimos.chourdakis@ipvs.uni-stuttgart.de>
Comment thread changelog-entries/394.md Outdated
Copy link
Copy Markdown
Member

@MakisH MakisH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging to get the system tests working again. I can update the rest of the pointers in another PR.

@MakisH MakisH merged commit f81cb20 into develop Feb 25, 2026
7 checks passed
@MakisH MakisH deleted the mesh-refactor-bugfix branch February 25, 2026 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants