From: Martin Kronbichler Date: Tue, 28 Dec 2021 20:52:24 +0000 (+0100) Subject: Fix compilation with 64-bit integers X-Git-Tag: v9.4.0-rc1~692^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13146%2Fhead;p=dealii.git Fix compilation with 64-bit integers --- diff --git a/examples/step-22/step-22.cc b/examples/step-22/step-22.cc index c24fa9e096..cde92544a9 100644 --- a/examples/step-22/step-22.cc +++ b/examples/step-22/step-22.cc @@ -502,8 +502,8 @@ namespace Step22 // velocity and pressure block via block_component. const std::vector dofs_per_block = DoFTools::count_dofs_per_fe_block(dof_handler, block_component); - const unsigned int n_u = dofs_per_block[0]; - const unsigned int n_p = dofs_per_block[1]; + const types::global_dof_index n_u = dofs_per_block[0]; + const types::global_dof_index n_p = dofs_per_block[1]; std::cout << " Number of active cells: " << triangulation.n_active_cells() << std::endl diff --git a/examples/step-31/step-31.cc b/examples/step-31/step-31.cc index 380e918519..27474bfa4e 100644 --- a/examples/step-31/step-31.cc +++ b/examples/step-31/step-31.cc @@ -867,10 +867,9 @@ namespace Step31 const std::vector stokes_dofs_per_block = DoFTools::count_dofs_per_fe_block(stokes_dof_handler, stokes_sub_blocks); - const unsigned int n_u = stokes_dofs_per_block[0], - n_p = stokes_dofs_per_block[1], - n_T = temperature_dof_handler.n_dofs(); - const std::vector stokes_block_sizes = {n_u, n_p}; + const types::global_dof_index n_u = stokes_dofs_per_block[0], + n_p = stokes_dofs_per_block[1], + n_T = temperature_dof_handler.n_dofs(); std::cout << "Number of active cells: " << triangulation.n_active_cells() << " (on " << triangulation.n_levels() << " levels)" << std::endl @@ -920,7 +919,8 @@ namespace Step31 { stokes_matrix.clear(); - BlockDynamicSparsityPattern dsp(stokes_block_sizes, stokes_block_sizes); + BlockDynamicSparsityPattern dsp(stokes_dofs_per_block, + stokes_dofs_per_block); Table<2, DoFTools::Coupling> coupling(dim + 1, dim + 1); @@ -942,7 +942,8 @@ namespace Step31 Mp_preconditioner.reset(); stokes_preconditioner_matrix.clear(); - BlockDynamicSparsityPattern dsp(stokes_block_sizes, stokes_block_sizes); + BlockDynamicSparsityPattern dsp(stokes_dofs_per_block, + stokes_dofs_per_block); Table<2, DoFTools::Coupling> coupling(dim + 1, dim + 1); for (unsigned int c = 0; c < dim + 1; ++c) diff --git a/examples/step-32/step-32.cc b/examples/step-32/step-32.cc index 9fd86ff02d..496ffe4ffd 100644 --- a/examples/step-32/step-32.cc +++ b/examples/step-32/step-32.cc @@ -1836,9 +1836,9 @@ namespace Step32 const std::vector stokes_dofs_per_block = DoFTools::count_dofs_per_fe_block(stokes_dof_handler, stokes_sub_blocks); - const unsigned int n_u = stokes_dofs_per_block[0], - n_p = stokes_dofs_per_block[1], - n_T = temperature_dof_handler.n_dofs(); + const types::global_dof_index n_u = stokes_dofs_per_block[0], + n_p = stokes_dofs_per_block[1], + n_T = temperature_dof_handler.n_dofs(); std::locale s = pcout.get_stream().getloc(); pcout.get_stream().imbue(std::locale("")); diff --git a/examples/step-43/step-43.cc b/examples/step-43/step-43.cc index e29f03443c..32115156ee 100644 --- a/examples/step-43/step-43.cc +++ b/examples/step-43/step-43.cc @@ -692,10 +692,9 @@ namespace Step43 const std::vector darcy_dofs_per_block = DoFTools::count_dofs_per_fe_block(darcy_dof_handler, darcy_block_component); - const unsigned int n_u = darcy_dofs_per_block[0], - n_p = darcy_dofs_per_block[1], - n_s = saturation_dof_handler.n_dofs(); - const std::vector darcy_block_sizes = {n_u, n_p}; + const types::global_dof_index n_u = darcy_dofs_per_block[0], + n_p = darcy_dofs_per_block[1], + n_s = saturation_dof_handler.n_dofs(); std::cout << "Number of active cells: " << triangulation.n_active_cells() << " (on " << triangulation.n_levels() << " levels)" << std::endl @@ -706,7 +705,8 @@ namespace Step43 { darcy_matrix.clear(); - BlockDynamicSparsityPattern dsp(darcy_block_sizes, darcy_block_sizes); + BlockDynamicSparsityPattern dsp(darcy_dofs_per_block, + darcy_dofs_per_block); Table<2, DoFTools::Coupling> coupling(dim + 1, dim + 1); for (unsigned int c = 0; c < dim + 1; ++c) @@ -728,7 +728,8 @@ namespace Step43 Mp_preconditioner.reset(); darcy_preconditioner_matrix.clear(); - BlockDynamicSparsityPattern dsp(darcy_block_sizes, darcy_block_sizes); + BlockDynamicSparsityPattern dsp(darcy_dofs_per_block, + darcy_dofs_per_block); Table<2, DoFTools::Coupling> coupling(dim + 1, dim + 1); for (unsigned int c = 0; c < dim + 1; ++c)