~reducedmodelling/fluidity/ROM_Non-intrusive-ann

« back to all changes in this revision

Viewing changes to femtools/Sparse_Tools_Petsc.F90

  • Committer: skramer
  • Date: 2010-04-27 12:33:13 UTC
  • Revision ID: svn-v4:5bf5533e-7014-46e3-b1bb-cce4b9d03719:trunk:1081
Fluidity builds with petsc 3.1. Complete rewrite of petsc configuration script.

Fluidity's configurations script for examining the installed PETSc library now uses the recommended way of retreiving linker and include flags from the PETSc makefile system. The existing tests have been replaced by tests that actually test the use of PETSc in Fortran 90 as we do in fluidity. The new configuration has been tested (with petsc 3.0) on hector, cx1, cx2, Debian and Ubuntu. Please report any further problems with configuration.

Fluidity now builds and succesfully runs "make test" with petsc 3.1. PETSc 3.1 only requires "use petsc" or(and) "#include petsc(def).h", no petscmat, petscvec etc. . Same for -lpetsc when linking but that's now automatically picked up by configure. Some interface changes in petsc calls.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
  !!< This module is an extension to the sparse_tools module that 
30
30
  !!< implements a csr matrix type 'petsc_csr_matrix' that directly
31
31
  !!< stores the matrix in petsc format.
32
 
#ifdef HAVE_PETSC
 
32
#include "petscversion.h"
33
33
  use FLDebug
34
34
  use Sparse_Tools
35
35
  use Reference_Counting
41
41
  use petsc_tools
42
42
#ifdef HAVE_PETSC_MODULES
43
43
  use petsc
 
44
#if PETSC_VERSION_MINOR==0
44
45
  use petscvec
45
46
  use petscmat
46
47
  use petscksp
49
50
  use petscmg
50
51
#endif
51
52
  implicit none
52
 
#include "petscversion.h"
53
53
#ifdef HAVE_PETSC_MODULES
 
54
#if PETSC_VERSION_MINOR==0
54
55
#include "finclude/petscvecdef.h"
55
56
#include "finclude/petscmatdef.h"
56
57
#include "finclude/petsckspdef.h"
58
59
#include "finclude/petscviewerdef.h"
59
60
#include "finclude/petscisdef.h"
60
61
#else
 
62
#include "finclude/petscdef.h"
 
63
#endif
 
64
#else
61
65
#include "finclude/petsc.h"
 
66
#if PETSC_VERSION_MINOR==0
62
67
#include "finclude/petscvec.h"
63
68
#include "finclude/petscmat.h"
64
69
#include "finclude/petscksp.h"
66
71
#include "finclude/petscviewer.h"
67
72
#include "finclude/petscis.h"
68
73
#endif
 
74
#endif
69
75
 
70
76
  private
71
77
  
1095
1101
    end subroutine dump_matrix
1096
1102
  
1097
1103
#include "Reference_count_petsc_csr_matrix.F90"
1098
 
#endif
1099
1104
end module sparse_tools_petsc