plasticity icon indicating copy to clipboard operation
plasticity copied to clipboard

Using type std::vector<unsigned int> for local_dof_indices

Open david-montiel-t opened this issue 5 months ago • 0 comments

Declaring local_dof_indices as std::vector<unsigned int> is incompatible with deal.II built using 64-bit DoF indices (see deal.II-v9.x.x/include/deal.II/base/types.h in the deal.II installation directory).

The type std::vector<unsigned int> should be replaced with std::vector<types::global_dof_index>

We should not hard code unsigned int or unsigned long, because it breaks portability across deal.II builds (especially across 32-bit vs 64-bit indexing).

This created a problem when compiling PRISMS-Plasticity in the PRISMS-VM.

Specifically, we should modify the following files:

src/materialModels/continuumPlasticity/getElementalValues.cc: std::vector<unsigned int> local_dof_indices(dofs_per_cell); src/materialModels/continuumPlasticity/updateAfterIncrement.cc: std::vector<unsigned int> local_dof_indices(dofs_per_cell); src/materialModels/continuumPlasticity/updateAfterIteration.cc: std::vector<unsigned int> local_dof_indices(this->FE.dofs_per_cell);

david-montiel-t avatar Jul 26 '25 20:07 david-montiel-t