int main(int argc, char **argv) { DM dm; AppCtx user; PetscErrorCode ierr; ierr = PetscInitialize(&argc, &argv, NULL, help);CHKERRQ(ierr); ierr = ProcessOptions(&user);CHKERRQ(ierr); ierr = PetscLogBegin();CHKERRQ(ierr); ierr = CreateMesh(PETSC_COMM_SELF, &user, &dm);CHKERRQ(ierr); ierr = TestCone(dm, &user);CHKERRQ(ierr); ierr = TestTransitiveClosure(dm, &user);CHKERRQ(ierr); ierr = TestVecClosure(dm, &user);CHKERRQ(ierr); ierr = DMDestroy(&dm);CHKERRQ(ierr); ierr = CleanupContext(&user);CHKERRQ(ierr); ierr = PetscFinalize(); return 0; }
int main(int argc, char **argv) { DM dm; AppCtx user; PetscErrorCode ierr; ierr = PetscInitialize(&argc, &argv, NULL,help);if (ierr) return ierr; ierr = ProcessOptions(&user);CHKERRQ(ierr); ierr = PetscLogDefaultBegin();CHKERRQ(ierr); ierr = CreateMesh(PETSC_COMM_SELF, &user, &dm);CHKERRQ(ierr); ierr = TestCone(dm, &user);CHKERRQ(ierr); ierr = TestTransitiveClosure(dm, &user);CHKERRQ(ierr); ierr = TestVecClosure(dm, PETSC_FALSE, PETSC_FALSE, &user);CHKERRQ(ierr); ierr = TestVecClosure(dm, PETSC_TRUE, PETSC_FALSE, &user);CHKERRQ(ierr); if (!user.cellSimplex && user.spectral) { ierr = TestVecClosure(dm, PETSC_FALSE, PETSC_TRUE, &user);CHKERRQ(ierr); ierr = TestVecClosure(dm, PETSC_TRUE, PETSC_TRUE, &user);CHKERRQ(ierr); } ierr = DMDestroy(&dm);CHKERRQ(ierr); ierr = CleanupContext(&user);CHKERRQ(ierr); ierr = PetscFinalize(); return ierr; }