Lines Matching refs:da

16         self.da = PETSc.DMDA().create(
27 self.da = None
31 dim = self.da.getDim()
32 dof = self.da.getDof()
33 sizes = self.da.getSizes()
34 boundary = self.da.getBoundaryType()
35 stencil_type = self.da.getStencilType()
36 stencil_width = self.da.getStencilWidth()
45 dim = self.da.getDim()
46 ranges = self.da.getRanges()
47 starts, lsizes = self.da.getCorners()
57 dim = self.da.getDim()
58 ranges = self.da.getGhostRanges()
59 starts, lsizes = self.da.getGhostCorners()
69 ownership_ranges = self.da.getOwnershipRanges()
70 procsizes = self.da.getProcSizes()
76 for i in range(self.da.getDof()):
77 self.da.setFieldName(i, 'field%d' % i)
78 for i in range(self.da.getDof()):
79 name = self.da.getFieldName(i)
83 self.da.setUniformCoordinates(0, 1, 0, 1, 0, 1)
85 c = self.da.getCoordinates()
86 self.da.setCoordinates(c)
88 cda = self.da.getCoordinateDM()
91 c = self.da.getCoordinates()
92 self.da.setCoordinates(c)
94 gc = self.da.getCoordinatesLocal()
98 vn = self.da.createNaturalVec()
99 vg = self.da.createGlobalVec()
100 vl = self.da.createLocalVec()
101 mat = self.da.createMat()
104 self.da.naturalToGlobal(vn, vg)
107 self.da.globalToLocal(vg, vl)
111 self.da.globalToNatural(vg, vn)
114 vl2 = self.da.createLocalVec()
115 self.da.localToLocal(vl, vl2)
119 btype = self.da.boundary_type
120 psize = self.da.proc_sizes
124 vg2 = self.da.createGlobalVec()
125 self.da.localToGlobal(vl2, vg2)
128 vg = self.da.getGlobalVec()
129 vl = self.da.getLocalVec()
134 self.da.globalToLocal(vg, vl)
139 btype = self.da.boundary_type
140 psize = self.da.proc_sizes
144 self.da.localToGlobal(vl, vg)
148 self.da.restoreGlobalVec(vg)
149 self.da.restoreLocalVec(vl)
155 vg = self.da.getGlobalVec(name)
157 self.da.restoreGlobalVec(vg, name)
159 vg = self.da.getGlobalVec()
161 self.da.restoreGlobalVec(vg)
162 vg = self.da.getGlobalVec(name)
165 self.da.restoreGlobalVec(vg, name)
167 vl = self.da.getLocalVec(name)
169 self.da.restoreLocalVec(vl, name)
171 vl = self.da.getLocalVec()
173 self.da.restoreLocalVec(vl)
174 vl = self.da.getLocalVec(name)
177 self.da.restoreLocalVec(vl, name)
181 vg = self.da.getGlobalVec()
182 vl = self.da.getLocalVec()
184 ag = self.da.getVecArray(vg, readonly=r)
185 al = self.da.getVecArray(vl, readonly=r)
188 ranges = self.da.getRanges()
219 self.da.restoreGlobalVec(vg)
220 self.da.restoreLocalVec(vl)
223 _ = self.da.getAO()
224 _ = self.da.getLGMap()
225 _, _ = self.da.getScatter()
228 da = self.da
229 rda = da.refine()
230 self.assertEqual(da.getDim(), rda.getDim())
231 self.assertEqual(da.getDof(), rda.getDof())
232 if da.dim != 1:
233 self.assertEqual(da.getStencilType(), rda.getStencilType())
234 self.assertEqual(da.getStencilWidth(), rda.getStencilWidth())
238 for n1, n2 in zip(self.da.getSizes(), cda.getSizes()):
244 da = self.da
245 cda = self.da.coarsen()
246 self.assertEqual(da.getDim(), cda.getDim())
247 self.assertEqual(da.getDof(), cda.getDof())
248 if da.dim != 1:
249 self.assertEqual(da.getStencilType(), cda.getStencilType())
250 self.assertEqual(da.getStencilWidth(), cda.getStencilWidth())
252 for n1, n2 in zip(self.da.getSizes(), rda.getSizes()):
256 levels = self.da.refineHierarchy(2)
265 levels = self.da.coarsenHierarchy(2)
272 da = self.da
273 if da.dim == 1:
275 rda = da.refine()
276 _, _ = da.createInterpolation(rda)
281 da = self.da
282 if da.dim == 1:
284 rda = da.refine()
285 _ = da.createInjection(rda)
288 da = self.da
289 A = da.createMatrix()
290 x = da.createGlobalVector()
297 istart, iend, jstart, jend = da.getRanges()
498 da = PETSc.DMDA().create(**kargs)
499 da.destroy()
534 da = PETSc.DMDA().create([8 * SCALE] * dim)
535 newda = da.duplicate(**kargs)
536 self.assertEqual(newda.dim, da.dim)
537 self.assertEqual(newda.sizes, da.sizes)
538 self.assertEqual(newda.proc_sizes, da.proc_sizes)
539 self.assertEqual(newda.ranges, da.ranges)
540 self.assertEqual(newda.corners, da.corners)
542 newda.boundary_type == da.boundary_type
543 and newda.stencil_width == da.stencil_width
545 self.assertEqual(newda.ghost_ranges, da.ghost_ranges)
546 self.assertEqual(newda.ghost_corners, da.ghost_corners)
548 dof = da.dof
550 boundary = da.boundary_type
564 stencil = da.stencil[0]
566 width = da.stencil_width
572 da.destroy()