Hi,<div><br></div><div>I have a question about petscdmda.h. </div><div><br></div><div>I have a program using PETSc, which is running well. Now I just add a new line #include <petscdmda.h> in my code and get the following error. I don't understand what's going on here. Any help?<br>
<div><br></div><div>-------------------------------------------------------------------------------------------------------------</div><div><div>In file included from /home/sci/hao/software/PETSc/include/petscdmda.h:4:0,</div>
<div> from /home/sci/hao/programming/C++/ITK/SolveAlpha/SolveAlpha.h:18,</div><div> from /home/sci/hao/programming/C++/ITK/SolveAlpha/SolveAlpha.cxx:9:</div><div>/home/sci/hao/software/PETSc/include/petscdm.h:27:8: error: ‘PetscClassId’ does not name a type</div>
<div>/home/sci/hao/software/PETSc/include/petscdm.h:48:8: error: ‘PetscBool’ does not name a type</div><div>/home/sci/hao/software/PETSc/include/petscdm.h:120:55: error: ‘PetscBool’ has not been declared</div><div>/home/sci/hao/software/PETSc/include/petscdm.h:144:46: error: ‘PetscBool’ has not been declared</div>
<div>/home/sci/hao/software/PETSc/include/petscdm.h:145:42: error: ‘PetscBool’ has not been declared</div><div>/home/sci/hao/software/PETSc/include/petscdm.h:146:42: error: ‘PetscBool’ has not been declared</div><div>In file included from /home/sci/hao/software/PETSc/include/petscdm.h:157:0,</div>
<div> from /home/sci/hao/software/PETSc/include/petscdmda.h:4,</div><div> from /home/sci/hao/programming/C++/ITK/SolveAlpha/SolveAlpha.h:18,</div><div> from /home/sci/hao/programming/C++/ITK/SolveAlpha/SolveAlpha.cxx:9:</div>
<div>/home/sci/hao/software/PETSc/include/petscbag.h:44:60: error: ‘PetscBool’ has not been declared</div><div>In file included from /home/sci/hao/software/PETSc/include/petscdmda.h:5:0,</div><div> from /home/sci/hao/programming/C++/ITK/SolveAlpha/SolveAlpha.h:18,</div>
<div> from /home/sci/hao/programming/C++/ITK/SolveAlpha/SolveAlpha.cxx:9:</div><div>/home/sci/hao/software/PETSc/include/petscpf.h:41:8: error: ‘PetscClassId’ does not name a type</div><div>In file included from /home/sci/hao/software/PETSc/include/petscdmda.h:5:0,</div>
<div> from /home/sci/hao/programming/C++/ITK/SolveAlpha/SolveAlpha.h:18,</div><div> from /home/sci/hao/programming/C++/ITK/SolveAlpha/SolveAlpha.cxx:9:</div><div>/home/sci/hao/software/PETSc/include/petscpf.h:52:8: error: ‘PetscBool’ does not name a type</div>
</div><div>-------------------------------------------------------------------------------------------------------------------</div></div><div><br></div><div><br></div><div>The head file of my program begin with the following. The read line is the one I just added.</div>
<div><br></div><div><div>#include <fstream></div><div>#include <iostream></div><div>#include <itkImage.h></div><div>#include <itkImageFileReader.h></div><div>#include <itkImageFileWriter.h></div>
<div>#include <itkVectorImage.h></div><div>#include <itkRecursiveGaussianImageFilter.h></div><div>#include <petscksp.h></div><div><font class="Apple-style-span" color="#ff0000">#include <petscdmda.h></font></div>
<div>#include <itkMedianImageFilter.h></div></div><div><br></div>