| misc.c (8350d2ba62a867402ab360ffc441a8ab9fcc55d8) | misc.c (050e48eb7afdbbac3415f15e2f1e6a6ecf67fde5) |
|---|---|
| 1// Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at 2// the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights 3// reserved. See files LICENSE and NOTICE for details. 4// 5// This file is part of CEED, a collection of benchmarks, miniapps, software 6// libraries and APIs for efficient high-order finite element and spectral 7// element discretizations for exascale applications. For more information and 8// source code availability see http://github.com/ceed. --- 148 unchanged lines hidden (view full) --- 157 char outputFilename[PETSC_MAX_PATH_LEN]; 158 159 PetscFunctionBeginUser; 160 161 // Build file name 162 ierr = PetscSNPrintf(outputFilename, sizeof outputFilename, 163 "solution-%03D.vtu", increment); CHKERRQ(ierr); 164 | 1// Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at 2// the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights 3// reserved. See files LICENSE and NOTICE for details. 4// 5// This file is part of CEED, a collection of benchmarks, miniapps, software 6// libraries and APIs for efficient high-order finite element and spectral 7// element discretizations for exascale applications. For more information and 8// source code availability see http://github.com/ceed. --- 148 unchanged lines hidden (view full) --- 157 char outputFilename[PETSC_MAX_PATH_LEN]; 158 159 PetscFunctionBeginUser; 160 161 // Build file name 162 ierr = PetscSNPrintf(outputFilename, sizeof outputFilename, 163 "solution-%03D.vtu", increment); CHKERRQ(ierr); 164 |
| 165 // Increment senquence | 165 // Increment sequence |
| 166 ierr = VecGetDM(U, &dm); CHKERRQ(ierr); 167 ierr = DMSetOutputSequenceNumber(dm, increment, loadIncrement); CHKERRQ(ierr); 168 169 // Output solution vector 170 ierr = PetscViewerVTKOpen(comm, outputFilename, FILE_MODE_WRITE, &viewer); 171 CHKERRQ(ierr); 172 ierr = VecView(U, viewer); CHKERRQ(ierr); 173 ierr = PetscViewerDestroy(&viewer); CHKERRQ(ierr); 174 175 PetscFunctionReturn(0); 176}; | 166 ierr = VecGetDM(U, &dm); CHKERRQ(ierr); 167 ierr = DMSetOutputSequenceNumber(dm, increment, loadIncrement); CHKERRQ(ierr); 168 169 // Output solution vector 170 ierr = PetscViewerVTKOpen(comm, outputFilename, FILE_MODE_WRITE, &viewer); 171 CHKERRQ(ierr); 172 ierr = VecView(U, viewer); CHKERRQ(ierr); 173 ierr = PetscViewerDestroy(&viewer); CHKERRQ(ierr); 174 175 PetscFunctionReturn(0); 176}; |