Actual source code: ex40f90.F90
1: program main
2: #include <petsc/finclude/petscis.h>
3: use petscis
4: implicit none
6: type(tPetscSection) section
7: PetscInt pStart, pEnd, p,three
8: PetscErrorCode ierr
10: three = 3
11: PetscCallA(PetscInitialize(ierr))
13: PetscCallA(PetscSectionCreate(PETSC_COMM_WORLD, section, ierr))
14: pStart = 0
15: pEnd = 5
16: PetscCallA(PetscSectionSetChart(section, pStart, pEnd, ierr))
17: do p=pStart,pEnd-1
18: PetscCallA(PetscSectionSetDof(section, p, three, ierr))
19: end do
20: PetscCallA(PetscSectionSetUp(section, ierr))
21: PetscCallA(PetscSectionView(section, PETSC_VIEWER_STDOUT_WORLD, ierr))
22: PetscCallA(PetscSectionDestroy(section, ierr))
23: PetscCallA(PetscFinalize(ierr))
24: end
26: !/*TEST
27: !
28: ! test:
29: !
30: !TEST*/