File: petscmatmod_split.patch

package info (click to toggle)
petsc 3.18.5%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 523,616 kB
  • sloc: ansic: 740,865; cpp: 41,511; python: 36,523; f90: 16,706; makefile: 12,524; javascript: 11,855; sh: 1,007; xml: 619; objc: 445; java: 13; csh: 1
file content (236 lines) | stat: -rw-r--r-- 8,696 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
Index: petsc/src/mat/f90-mod/makefile
===================================================================
--- petsc.orig/src/mat/f90-mod/makefile	2022-10-30 13:54:21.218191336 +0100
+++ petsc/src/mat/f90-mod/makefile	2022-10-30 13:54:21.210191275 +0100
@@ -2,7 +2,7 @@
 #requiresdefine   'PETSC_HAVE_FORTRAN'
 
 SOURCEC	   =
-SOURCEF90  = petscmatmod.F90
+SOURCEF90  = petscmatdefmod.F90 petscmatmod.F90
 SOURCEH	   = petscmat.h petscmat.h90 petscmatfactorinfosize.h petscmatinfosize.h
 LIBBASE	   = libpetscmat
 MANSEC	   = Mat
Index: petsc/src/mat/f90-mod/petscmatdefmod.F90
===================================================================
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
+++ petsc/src/mat/f90-mod/petscmatdefmod.F90	2022-10-30 13:54:21.210191275 +0100
@@ -0,0 +1,95 @@
+
+        module petscmatdefdummy
+        use petscvecdef
+#include <../src/mat/f90-mod/petscmat.h>
+        end module
+
+        module petscmatdef
+        use petscmatdefdummy
+        interface operator(.ne.)
+          function matnotequal(A,B)
+            use petscmatdefdummy
+            logical matnotequal
+            type(tMat), intent(in) :: A,B
+          end function
+          function matfdcoloringnotequal(A,B)
+            use petscmatdefdummy
+            logical matfdcoloringnotequal
+            type(tMatFDColoring), intent(in) :: A,B
+          end function
+          function matnullspacenotequal(A,B)
+            use petscmatdefdummy
+            logical matnullspacenotequal
+            type(tMatNullSpace), intent(in) :: A,B
+            end function
+      end interface operator (.ne.)
+        interface operator(.eq.)
+          function matequals(A,B)
+            use petscmatdefdummy
+            logical matequals
+            type(tMat), intent(in) :: A,B
+          end function
+          function matfdcoloringequals(A,B)
+            use petscmatdefdummy
+            logical matfdcoloringequals
+            type(tMatFDColoring), intent(in) :: A,B
+          end function
+           function matnullspaceequals(A,B)
+            use petscmatdefdummy
+            logical matnullspaceequals
+            type(tMatNullSpace), intent(in) :: A,B
+            end function
+          end interface operator (.eq.)
+        end module
+
+
+        function matnotequal(A,B)
+          use petscmatdefdummy
+          logical matnotequal
+          type(tMat), intent(in) :: A,B
+          matnotequal = (A%v .ne. B%v)
+        end function
+
+       function matequals(A,B)
+          use petscmatdefdummy
+          logical matequals
+          type(tMat), intent(in) :: A,B
+          matequals = (A%v .eq. B%v)
+        end function
+
+        function matfdcoloringnotequal(A,B)
+          use petscmatdefdummy
+          logical matfdcoloringnotequal
+          type(tMatFDColoring), intent(in) :: A,B
+          matfdcoloringnotequal = (A%v .ne. B%v)
+        end function
+
+        function matfdcoloringequals(A,B)
+          use petscmatdefdummy
+          logical matfdcoloringequals
+          type(tMatFDColoring), intent(in) :: A,B
+          matfdcoloringequals = (A%v .eq. B%v)
+        end function
+
+        function matnullspacenotequal(A,B)
+          use petscmatdefdummy
+          logical matnullspacenotequal
+          type(tMatNullSpace), intent(in) :: A,B
+          matnullspacenotequal = (A%v .ne. B%v)
+        end function
+
+        function matnullspaceequals(A,B)
+          use petscmatdefdummy
+          logical matnullspaceequals
+          type(tMatNullSpace), intent(in) :: A,B
+          matnullspaceequals = (A%v .eq. B%v)
+        end function
+
+#if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
+!DEC$ ATTRIBUTES DLLEXPORT::matnotequal
+!DEC$ ATTRIBUTES DLLEXPORT::matequals
+!DEC$ ATTRIBUTES DLLEXPORT::matfdcoloringnotequal
+!DEC$ ATTRIBUTES DLLEXPORT::matfdcoloringequals
+!DEC$ ATTRIBUTES DLLEXPORT::matnullspacenotequal
+!DEC$ ATTRIBUTES DLLEXPORT::matnullspaceequals
+#endif
Index: petsc/src/mat/f90-mod/petscmatmod.F90
===================================================================
--- petsc.orig/src/mat/f90-mod/petscmatmod.F90	2022-10-30 13:54:21.218191336 +0100
+++ petsc/src/mat/f90-mod/petscmatmod.F90	2022-10-30 13:54:21.210191275 +0100
@@ -1,103 +1,5 @@
+#include <petsc/finclude/petscmat.h>
 
-        module petscmatdefdummy
-        use petscvecdef
-#include <../src/mat/f90-mod/petscmat.h>
-        end module petscmatdefdummy
-
-        module petscmatdef
-        use petscmatdefdummy
-        interface operator(.ne.)
-          function matnotequal(A,B)
-            import tMat
-            logical matnotequal
-            type(tMat), intent(in) :: A,B
-          end function
-          function matfdcoloringnotequal(A,B)
-            import tMatFDColoring
-            logical matfdcoloringnotequal
-            type(tMatFDColoring), intent(in) :: A,B
-          end function
-          function matnullspacenotequal(A,B)
-            import tMatNullSpace
-            logical matnullspacenotequal
-            type(tMatNullSpace), intent(in) :: A,B
-            end function
-      end interface operator (.ne.)
-        interface operator(.eq.)
-          function matequals(A,B)
-            import tMat
-            logical matequals
-            type(tMat), intent(in) :: A,B
-          end function
-          function matfdcoloringequals(A,B)
-            import tMatFDColoring
-            logical matfdcoloringequals
-            type(tMatFDColoring), intent(in) :: A,B
-          end function
-           function matnullspaceequals(A,B)
-            import tMatNullSpace
-            logical matnullspaceequals
-            type(tMatNullSpace), intent(in) :: A,B
-            end function
-          end interface operator (.eq.)
-        end module
-
-        function matnotequal(A,B)
-          use petscmatdefdummy, only: tMat
-          implicit none
-          logical matnotequal
-          type(tMat), intent(in) :: A,B
-          matnotequal = (A%v .ne. B%v)
-        end function
-
-       function matequals(A,B)
-          use petscmatdefdummy, only: tMat
-          implicit none
-          logical matequals
-          type(tMat), intent(in) :: A,B
-          matequals = (A%v .eq. B%v)
-        end function
-
-        function matfdcoloringnotequal(A,B)
-          use petscmatdefdummy, only: tMatFDColoring
-          implicit none
-          logical matfdcoloringnotequal
-          type(tMatFDColoring), intent(in) :: A,B
-          matfdcoloringnotequal = (A%v .ne. B%v)
-        end function
-
-        function matfdcoloringequals(A,B)
-          use petscmatdefdummy, only: tMatFDColoring
-          implicit none
-          logical matfdcoloringequals
-          type(tMatFDColoring), intent(in) :: A,B
-          matfdcoloringequals = (A%v .eq. B%v)
-        end function
-
-        function matnullspacenotequal(A,B)
-          use petscmatdefdummy, only: tMatNullSpace
-          implicit none
-          logical matnullspacenotequal
-          type(tMatNullSpace), intent(in) :: A,B
-          matnullspacenotequal = (A%v .ne. B%v)
-        end function
-
-        function matnullspaceequals(A,B)
-          use petscmatdefdummy, only: tMatNullSpace
-          implicit none
-          logical matnullspaceequals
-          type(tMatNullSpace), intent(in) :: A,B
-          matnullspaceequals = (A%v .eq. B%v)
-        end function
-
-#if defined(_WIN32) && defined(PETSC_USE_SHARED_LIBRARIES)
-!DEC$ ATTRIBUTES DLLEXPORT::matnotequal
-!DEC$ ATTRIBUTES DLLEXPORT::matequals
-!DEC$ ATTRIBUTES DLLEXPORT::matfdcoloringnotequal
-!DEC$ ATTRIBUTES DLLEXPORT::matfdcoloringequals
-!DEC$ ATTRIBUTES DLLEXPORT::matnullspacenotequal
-!DEC$ ATTRIBUTES DLLEXPORT::matnullspaceequals
-#endif
         module petscmat
         use petscmatdef
         use petscvec
Index: petsc/gmakefile
===================================================================
--- petsc.orig/gmakefile	2022-10-30 13:54:21.218191336 +0100
+++ petsc/gmakefile	2022-10-30 13:54:21.210191275 +0100
@@ -231,7 +231,8 @@
 endif
 $(OBJDIR)/sys/f90-mod/petscsysmod.o   : $(if $(MPIUNI_MOD),$(OBJDIR)/sys/mpiuni/f90-mod/mpiunimod.o)
 $(OBJDIR)/vec/f90-mod/petscvecmod.o   : $(OBJDIR)/sys/f90-mod/petscsysmod.o
-$(OBJDIR)/mat/f90-mod/petscmatmod.o   : $(OBJDIR)/vec/f90-mod/petscvecmod.o
+$(OBJDIR)/mat/f90-mod/petscmatdefmod.o   : $(OBJDIR)/vec/f90-mod/petscvecmod.o
+$(OBJDIR)/mat/f90-mod/petscmatmod.o   : $(OBJDIR)/mat/f90-mod/petscmatdefmod.o
 $(OBJDIR)/dm/f90-mod/petscdmmod.o     : $(OBJDIR)/mat/f90-mod/petscmatmod.o
 $(OBJDIR)/dm/f90-mod/petscdmdamod.o   : $(OBJDIR)/dm/f90-mod/petscdmmod.o
 $(OBJDIR)/dm/f90-mod/petscdmplexmod.o : $(OBJDIR)/dm/f90-mod/petscdmmod.o