Skip to content

Commit

Permalink
Updates for compat with petsc >= v3.21.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dmay23 committed Sep 26, 2024
1 parent a07c251 commit 0658ac5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/form/SeasQDDiscreteGreenOperator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ PetscInt SeasQDDiscreteGreenOperator::create_discrete_greens_function() {
CHKERRTHROW(MatCreateDense(comm, m, n, PETSC_DECIDE, PETSC_DECIDE, nullptr, &G_));
CHKERRTHROW(MatSetBlockSizes(G_, m_bs, n_bs));
CHKERRTHROW(MatGetSize(G_, &M, &N));
CHKERRTHROW(PetscPrintf(comm, "Green's function operator size: %D x %D\n", M, N));
CHKERRTHROW(PetscPrintf(comm, "Green's function operator size: %" PetscInt_FMT " x %" PetscInt_FMT "\n", M, N));

S_ = std::make_unique<PetscVector>(slip_block_size, num_local_elements, comm);
t_boundary_ = std::make_unique<PetscVector>(m_bs, num_local_elements, comm);
Expand Down Expand Up @@ -281,7 +281,7 @@ void SeasQDDiscreteGreenOperator::write_discrete_greens_operator(
"write_discrete_greens_operator():matrix %1.2e (sec)\n",
(double)(t1 - t0)));
CHKERRTHROW(PetscPrintf(PetscObjectComm((PetscObject)G_),
" status: computed %D / pending %D\n", current_gf, n_gf - current_gf));
" status: computed %" PetscInt_FMT " / pending %" PetscInt_FMT "\n", current_gf, n_gf - current_gf));

write_facet_labels_IS(mesh);
}
Expand Down Expand Up @@ -514,7 +514,7 @@ PetscInt SeasQDDiscreteGreenOperator::load_discrete_greens_operator(
CHKERRTHROW(PetscTime(&t1));
CHKERRTHROW(PetscPrintf(PetscObjectComm((PetscObject)G_),
"load_discrete_greens_operator() %1.2e (sec)\n", (double)(t1 - t0)));
CHKERRTHROW(PetscPrintf(PetscObjectComm((PetscObject)G_), " status: loaded %D / pending %D\n",
CHKERRTHROW(PetscPrintf(PetscObjectComm((PetscObject)G_), " status: loaded %" PetscInt_FMT " / pending %" PetscInt_FMT "\n",
current_gf, n_gf - current_gf));

if (repartition_gfs_) {
Expand Down Expand Up @@ -565,12 +565,12 @@ void SeasQDDiscreteGreenOperator::partial_assemble_discrete_greens_function(
auto ghost = scatter.template recv_prototype<double>(slip_block_size, ALIGNMENT);

CHKERRTHROW(PetscPrintf(PetscObjectComm((PetscObject)G_),
"partial_assemble_discrete_greens_function() [%D , %D)\n", start, N));
"partial_assemble_discrete_greens_function() [%" PetscInt_FMT " , %" PetscInt_FMT ")\n", start, N));
solve_time = 0.0;
for (PetscInt i = start; i < N; ++i) {

CHKERRTHROW(PetscPrintf(PetscObjectComm((PetscObject)G_),
"Computing Green's function %D / %D\n", i, N));
"Computing Green's function %" PetscInt_FMT " / %" PetscInt_FMT "\n", i, N));
sw.start();
CHKERRTHROW(VecZeroEntries(S_->vec()));
if (i >= nb_offset && i < nb_offset + m) {
Expand Down

0 comments on commit 0658ac5

Please sign in to comment.