Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update hypre_ParVectorPrintIJ #1033

Merged
merged 6 commits into from
Jan 3, 2024
Merged

Update hypre_ParVectorPrintIJ #1033

merged 6 commits into from
Jan 3, 2024

Conversation

victorapm
Copy link
Contributor

Add multi-component vector support to hypre_ParVectorPrintIJ

This feature is important for GEOS

for (j = 0; j < local_size; j++)
{
hypre_fprintf(file, "%b %.14e\n",
(HYPRE_BigInt) j + base_j,
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need to be BigInt? I thought local sizes were always int?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are global indices, so need to be BigInt

Copy link
Contributor

Choose a reason for hiding this comment

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

@victorapm is base_j supposed to be BigInt then? Index j only goes from 0 to local_size, so it seems not a BigInt to me. base_j is passed as argument as HYPRE_Int.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, let me update this, thanks for catching!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 200bbf9

Copy link
Contributor

@oseikuffuor1 oseikuffuor1 left a comment

Choose a reason for hiding this comment

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

@victorapm I left you a few comments for your review.

Copy link
Contributor

@oseikuffuor1 oseikuffuor1 left a comment

Choose a reason for hiding this comment

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

Thanks Victor!!

Copy link
Contributor

@ulrikeyang ulrikeyang left a comment

Choose a reason for hiding this comment

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

This looks fine.
Should we extend the ReadIJ function to be able to read vectors that have been printed with this extended function?

@victorapm
Copy link
Contributor Author

Yes, I have a separate PR for that :)

@victorapm victorapm merged commit e3a5550 into master Jan 3, 2024
@victorapm victorapm deleted the update-printij branch January 3, 2024 17:56
geraldc-unm pushed a commit that referenced this pull request Mar 27, 2024
* Add multi-component vector support to hypre_ParVectorPrintIJ
* Make hypre_ParVectorPrintIJ conforming with HYPRE_IJVectorPrint
* Make hypre_ParVectorReadIJ conforming with HYPRE_IJVectorRead
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