Lines Matching refs:pc
11 def setup(self, pc): argument
14 def reset(self, pc): argument
17 def apply(self, pc, x, y): argument
20 def applyT(self, pc, x, y): argument
21 self.apply(pc, x, y)
23 def applyS(self, pc, x, y): argument
24 self.apply(pc, x, y)
26 def applySL(self, pc, x, y): argument
27 self.applyS(pc, x, y)
29 def applySR(self, pc, x, y): argument
30 self.applyS(pc, x, y)
32 def applyRich(self, pc, x, y, w, tols): argument
33 self.apply(pc, x, y)
35 def applyM(self, pc, x, y): argument
40 def apply(self, pc, x, y): argument
43 def applyM(self, pc, x, y): argument
48 def setup(self, pc): argument
49 A, P = pc.getOperators()
53 def reset(self, pc): argument
57 def apply(self, pc, x, y): argument
60 def applyS(self, pc, x, y): argument
65 def applyM(self, pc, x, y): argument
79 def create(self, pc): argument
80 self._log('create', pc)
82 def destroy(self, pc): argument
86 def reset(self, pc): argument
87 self._log('reset', pc)
89 def view(self, pc, vw): argument
90 self._log('view', pc, vw)
92 def setFromOptions(self, pc): argument
93 self._log('setFromOptions', pc)
94 OptDB = PETSc.Options(pc)
99 def setUp(self, pc): argument
100 self._log('setUp', pc)
101 self.impl.setup(pc)
103 def preSolve(self, pc, ksp, b, x): argument
104 self._log('preSolve', pc, ksp, b, x)
106 def postSolve(self, pc, ksp, b, x): argument
107 self._log('postSolve', pc, ksp, b, x)
109 def apply(self, pc, x, y): argument
110 self._log('apply', pc, x, y)
111 self.impl.apply(pc, x, y)
113 def applySymmetricLeft(self, pc, x, y): argument
114 self._log('applySymmetricLeft', pc, x, y)
115 self.impl.applySL(pc, x, y)
117 def applySymmetricRight(self, pc, x, y): argument
118 self._log('applySymmetricRight', pc, x, y)
119 self.impl.applySR(pc, x, y)
121 def applyTranspose(self, pc, x, y): argument
122 self._log('applyTranspose', pc, x, y)
123 self.impl.applyT(pc, x, y)
125 def matApply(self, pc, x, y): argument
126 self._log('matApply', pc, x, y)
127 self.impl.applyM(pc, x, y)
129 def applyRichardson(self, pc, x, y, w, tols): argument
130 self._log('applyRichardson', pc, x, y, w, tols)
131 self.impl.applyRich(pc, x, y, w, tols)
139 pc = self.pc = PETSc.PC()
140 pc.create(PETSc.COMM_SELF)
141 pc.setType(self.PC_TYPE)
144 self.pc.prefix = self.PC_PREFIX
145 OptDB = PETSc.Options(self.pc)
146 self.assertTrue(OptDB.prefix == self.pc.prefix)
148 self.pc.setFromOptions()
155 ctx = self.pc.getPythonContext()
157 self.assertTrue(self.pc.getPythonType() == pytype)
161 self.pc.destroy() # XXX
162 self.pc = None
173 self.pc.setOperators(A, A)
178 self.assertTrue((A, A) == self.pc.getOperators())
182 return self.pc.getPythonContext()
187 getattr(self.pc, meth)(X, Y)
190 getattr(self.pc, meth)(x, y)
238 self.pc.reset()
240 self.pc.reset()
242 self.pc.reset()
246 ksp = PETSc.KSP().create(self.pc.comm)
248 self.assertTrue(self.pc.getRefCount() == 1)
249 ksp.setPC(self.pc)
250 self.assertTrue(self.pc.getRefCount() == 2)
271 self.assertEqual(self.pc.getRefCount(), 1)
274 self.pc.setPythonContext(self._getCtx())
275 self.assertEqual(getrefcount(self.pc.getPythonContext()), 2)
290 pc = self.pc = PETSc.PC()
292 pc.createPython(ctx, comm=PETSc.COMM_SELF)
293 self.pc.prefix = self.PC_PREFIX
294 self.pc.setFromOptions()