multigrid.c (ab1ff315f74846d3fb318e101473fbae03c37843) multigrid.c (0a8fc04aa76b8d5898a4cfd37f025c6b01429032)
1// Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors.
2// All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
3//
4// SPDX-License-Identifier: BSD-2-Clause
5//
6// This file is part of CEED: http://github.com/ceed
7
8// libCEED + PETSc Example: CEED BPs 3-6 with Multigrid

--- 580 unchanged lines hidden (view full) ---

589 }
590 {
591 // Set up error operator context
592 ierr = SetupErrorOperatorCtx(comm, dm[fine_level], ceed,
593 ceed_data[fine_level], X_loc[fine_level],
594 op_error, op_error_ctx); CHKERRQ(ierr);
595 PetscScalar l2_error;
596 ierr = ComputeL2Error(X[fine_level], &l2_error, op_error_ctx); CHKERRQ(ierr);
1// Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors.
2// All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
3//
4// SPDX-License-Identifier: BSD-2-Clause
5//
6// This file is part of CEED: http://github.com/ceed
7
8// libCEED + PETSc Example: CEED BPs 3-6 with Multigrid

--- 580 unchanged lines hidden (view full) ---

589 }
590 {
591 // Set up error operator context
592 ierr = SetupErrorOperatorCtx(comm, dm[fine_level], ceed,
593 ceed_data[fine_level], X_loc[fine_level],
594 op_error, op_error_ctx); CHKERRQ(ierr);
595 PetscScalar l2_error;
596 ierr = ComputeL2Error(X[fine_level], &l2_error, op_error_ctx); CHKERRQ(ierr);
597 PetscReal tol = 5e-1;
597 PetscReal tol = 5e-2;
598 if (!test_mode || l2_error > tol) {
599 ierr = MPI_Allreduce(&my_rt, &rt_min, 1, MPI_DOUBLE, MPI_MIN, comm);
600 CHKERRQ(ierr);
601 ierr = MPI_Allreduce(&my_rt, &rt_max, 1, MPI_DOUBLE, MPI_MAX, comm);
602 CHKERRQ(ierr);
603 ierr = PetscPrintf(comm,
604 " L2 Error : %e\n"
605 " CG Solve Time : %g (%g) sec\n",

--- 63 unchanged lines hidden ---
598 if (!test_mode || l2_error > tol) {
599 ierr = MPI_Allreduce(&my_rt, &rt_min, 1, MPI_DOUBLE, MPI_MIN, comm);
600 CHKERRQ(ierr);
601 ierr = MPI_Allreduce(&my_rt, &rt_max, 1, MPI_DOUBLE, MPI_MAX, comm);
602 CHKERRQ(ierr);
603 ierr = PetscPrintf(comm,
604 " L2 Error : %e\n"
605 " CG Solve Time : %g (%g) sec\n",

--- 63 unchanged lines hidden ---