Skip to content

Number of DOF is std::uint64_t#951

Open
andrsd wants to merge 8 commits intoOpen-Sn:mainfrom
andrsd:issue/90-num-dofs
Open

Number of DOF is std::uint64_t#951
andrsd wants to merge 8 commits intoOpen-Sn:mainfrom
andrsd:issue/90-num-dofs

Conversation

@andrsd
Copy link
Copy Markdown
Collaborator

@andrsd andrsd commented Feb 24, 2026

No description provided.

@andrsd andrsd requested review from ragusa and wdhawkins February 24, 2026 21:18
@andrsd andrsd self-assigned this Feb 24, 2026
@andrsd andrsd added the maintenance Code maintenance task label Feb 24, 2026
}

size_t GetNumGhostDOFs(const UnknownManager& unknown_manager) const override;
std::uint64_t GetNumGhostDOFs(const UnknownManager& unknown_manager) const override;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What will happen if a user, for whatever reason, does not compile with Petsc64? This line hardcodes that PetscInt is expected to be a uint64, right?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

cmake will fail to configure the project if PETSc isn't compiled with 64-bit integers. We specifically check for that and throw an error.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes. Currently, we stop if trying to build against PETSc with 32-bit indexing, see code.

If 32-bit indexing is desired, then we have much larger problems to fix... Things like sparsity patterns, parallel STL vector, etc...

Also, size_t is 64-bit integer on 64-bit architectures, so this particular change just unifies the used type...

@andrsd andrsd force-pushed the issue/90-num-dofs branch 2 times, most recently from 2f0ea29 to 4e0ec62 Compare March 4, 2026 15:01
@andrsd andrsd force-pushed the issue/90-num-dofs branch from 4e0ec62 to 803b800 Compare March 12, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Code maintenance task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants