Skip to content

Conversation

@ebchin
Copy link
Member

@ebchin ebchin commented Jan 20, 2026

No description provided.

@ebchin ebchin self-assigned this Jan 20, 2026
@ebchin ebchin changed the title add a missing virtual to destructor Fix some memory leaks Jan 21, 2026

tribol::finalize();

// delete the jacobian matrix
Copy link
Collaborator

Choose a reason for hiding this comment

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

was jac not being used?

Copy link
Collaborator

@srwopschall srwopschall left a comment

Choose a reason for hiding this comment

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

@ebchin - Thanks for throwing this together. Everything looks good, just had some clarification comments so I follow.

auto dfdx = cs->getMfemJacobianData()->GetMfemDfDxFullJacobian( *cs->getMethodData() );
auto dfdn = cs->getMfemJacobianData()->GetMfemDfDnJacobian( *cs->getDfDnMethodData() );
auto dndx = cs->getMfemJacobianData()->GetMfemDnDxJacobian( *cs->getDnDxMethodData() );
auto dfdx_nconst = std::unique_ptr<mfem::HypreParMatrix>(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just to confirm looks like you had a mult embedded in an add and here you just separate them?

* \brief Destructor
*/
~MethodData() {};
virtual ~MethodData() {};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why this change?

ones.GetMemory().SetHostPtrOwner( false );
inactive_sm.SetDataOwner( false );
inactive_hpm->SetOwnerFlags( 3, 3, 1 );
inactive_hpm->SetOwnerFlags( 3, inactive_hpm->OwnsOffd(), inactive_hpm->OwnsColMap() );
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not familiar with this, but we can chat about it.

@ebchin ebchin merged commit ca35283 into develop Jan 23, 2026
9 checks passed
@ebchin ebchin deleted the bugfix/chin23/method-data-virtual branch January 23, 2026 18:17
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.

3 participants