Lines Matching refs:plex

23         self.plex = PETSc.DMPlex().createFromCellList(
28 self.plex.destroy()
29 self.plex = None
34 dim = self.plex.getDimension()
35 pStart, pEnd = self.plex.getChart()
36 cStart, cEnd = self.plex.getHeightStratum(0)
37 vStart, vEnd = self.plex.getDepthStratum(0)
38 numDepths = self.plex.getLabelSize('depth')
39 coords_raw = self.plex.getCoordinates().getArray()
50 pStart, pEnd = self.plex.getChart()
52 closure = self.plex.getTransitiveClosure(p)[0]
54 cone = self.plex.getCone(c)
55 self.assertEqual(self.plex.getConeSize(c), len(cone))
58 star = self.plex.getTransitiveClosure(p, useCone=False)[0]
60 support = self.plex.getSupport(s)
61 self.assertEqual(self.plex.getSupportSize(s), len(support))
66 PETSc.DMPlex.setAdjacencyUseAnchors(self.plex, False)
67 flag = PETSc.DMPlex.getAdjacencyUseAnchors(self.plex)
69 PETSc.DMPlex.setAdjacencyUseAnchors(self.plex, True)
70 flag = PETSc.DMPlex.getAdjacencyUseAnchors(self.plex)
72 PETSc.DMPlex.setBasicAdjacency(self.plex, False, False)
73 flagA, flagB = PETSc.DMPlex.getBasicAdjacency(self.plex)
76 PETSc.DMPlex.setBasicAdjacency(self.plex, True, True)
77 flagA, flagB = PETSc.DMPlex.getBasicAdjacency(self.plex)
80 pStart, pEnd = self.plex.getChart()
82 adjacency = self.plex.getAdjacency(p)
87 self.plex.setNumFields(1)
88 section = self.plex.createSection([self.COMP], [self.DOFS])
91 self.plex.getStratumSize('depth', d) * self.DOFS[d]
97 section = self.plex.createSection([self.COMP], [self.DOFS])
98 self.plex.setSection(section)
99 vec = self.plex.createLocalVec()
100 pStart, pEnd = self.plex.getChart()
107 point_closure = self.plex.getTransitiveClosure(p)[0]
108 dof_closure = self.plex.vecGetClosure(section, vec, p)
113 pStart, pEnd = self.plex.getChart()
117 self.assertFalse(self.plex.hasLabel('boundary'))
118 self.plex.markBoundaryFaces('boundary')
119 self.assertTrue(self.plex.hasLabel('boundary'))
121 faces = self.plex.getStratumIS('boundary', 1)
123 points, orient = self.plex.getTransitiveClosure(f, useCone=True)
125 self.plex.setLabelValue('boundary', p, 1)
128 if self.plex.getLabelValue('boundary', p) != 1:
129 self.plex.setLabelValue('boundary', p, 2)
131 numBoundary = self.plex.getStratumSize('boundary', 1)
132 numInterior = self.plex.getStratumSize('boundary', 2)
139 plex = self.plex.refine()
140 sf = plex.distribute(overlap=ovl)
143 gis = plex.getCellNumbering()
146 locplex, _ = plex.filter(comm=PETSc.COMM_SELF, ignoreHalo=ignore)
157 plex.destroy()
162 self.plex.distribute()
163 if self.CELLS is None and not self.plex.isSimplex():
165 self.plex.orient()
174 self.plex.metricSetUniform(False)
175 self.plex.metricSetIsotropic(False)
176 self.plex.metricSetRestrictAnisotropyFirst(False)
177 self.plex.metricSetNoInsertion(False)
178 self.plex.metricSetNoSwapping(False)
179 self.plex.metricSetNoMovement(False)
180 self.plex.metricSetNoSurf(False)
181 self.plex.metricSetVerbosity(-1)
182 self.plex.metricSetNumIterations(3)
183 self.plex.metricSetMinimumMagnitude(h_min)
184 self.plex.metricSetMaximumMagnitude(h_max)
185 self.plex.metricSetMaximumAnisotropy(a_max)
186 self.plex.metricSetTargetComplexity(target)
187 self.plex.metricSetNormalizationOrder(p)
188 self.plex.metricSetGradationFactor(beta)
189 self.plex.metricSetHausdorffNumber(hausd)
191 self.assertFalse(self.plex.metricIsUniform())
192 self.assertFalse(self.plex.metricIsIsotropic())
193 self.assertFalse(self.plex.metricRestrictAnisotropyFirst())
194 self.assertFalse(self.plex.metricNoInsertion())
195 self.assertFalse(self.plex.metricNoSwapping())
196 self.assertFalse(self.plex.metricNoMovement())
197 self.assertFalse(self.plex.metricNoSurf())
198 self.assertTrue(self.plex.metricGetVerbosity() == -1)
199 self.assertTrue(self.plex.metricGetNumIterations() == 3)
200 self.assertTrue(np.isclose(self.plex.metricGetMinimumMagnitude(), h_min))
201 self.assertTrue(np.isclose(self.plex.metricGetMaximumMagnitude(), h_max))
202 self.assertTrue(np.isclose(self.plex.metricGetMaximumAnisotropy(), a_max))
203 self.assertTrue(np.isclose(self.plex.metricGetTargetComplexity(), target))
204 self.assertTrue(np.isclose(self.plex.metricGetNormalizationOrder(), p))
205 self.assertTrue(np.isclose(self.plex.metricGetGradationFactor(), beta))
206 self.assertTrue(np.isclose(self.plex.metricGetHausdorffNumber(), hausd))
208 metric1 = self.plex.metricCreateUniform(0.5)
209 metric2 = self.plex.metricCreateUniform(1.0)
210 metric = self.plex.metricCreate()
211 det = self.plex.metricDeterminantCreate()
212 self.plex.metricAverage2(metric1, metric2, metric)
215 self.plex.metricIntersection2(metric1, metric2, metric)
217 self.plex.metricEnforceSPD(metric, metric1, det[0])
224 self.plex.metricNormalize(
241 self.plex.orient()
242 plex = self.plex.refine()
243 plex.distribute()
244 if self.CELLS is None and not plex.isSimplex():
248 metric = plex.metricCreateUniform(9.0)
250 newplex = plex.adaptMetric(metric, '')
251 plex.destroy()
254 plex.destroy()
259 dim = self.plex.getDimension()
260 ct = self.plex.getCellType(0)
262 self.plex.setField(0, fe)
263 self.plex.createDS()
264 self.plex.setUseNatural(True)
265 self.plex.distribute()
266 self.plex.view()
267 gv = self.plex.createGlobalVec()
268 nv = self.plex.createNaturalVec()
269 self.plex.globalToNaturalBegin(gv, nv)
270 self.plex.globalToNaturalEnd(gv, nv)
271 self.plex.naturalToGlobalBegin(nv, gv)
272 self.plex.naturalToGlobalEnd(nv, gv)
335 plex = self.plex
336 cstart, cend = plex.getHeightStratum(0)
339 tr.setDM(plex)
341 newplex = tr.apply(plex)
369 self.plex = PETSc.DMPlex().createBoxMesh([3, 3], simplex=False)
377 self.plex = PETSc.DMPlex().createBoxMesh([3, 3, 3], simplex=False)
393 self.plex = PETSc.DMPlex().createBoxMesh([1, 1], simplex=True)
403 self.plex = PETSc.DMPlex().generate(boundary)
410 self.plex = PETSc.DMPlex().createBoxMesh([1, 1, 1], simplex=True)
420 self.plex = PETSc.DMPlex().generate(boundary)
513 def outputPlex(self, plex): argument
515 self.tmp_output_file(), mode='a', comm=plex.comm
517 plex.view(viewer=txtvwr)
542 plex = PETSc.DMPlex()
545 plex.create(comm=comm)
546 plex.setName('DMPlex Object')
550 plex.load(viewer=vwr)
551 plex.setOptionsPrefix('loaded_')
552 plex.distributeSetDefault(False)
553 plex.setFromOptions()
556 self.outputPlex(plex)
558 flg = plex.isDistributed()
563 plex.interpolate()
564 plex.setOptionsPrefix('interpolated_')
565 plex.setFromOptions()
566 self.outputPlex(plex)
568 part = plex.getPartitioner()
570 sf = plex.distribute(overlap=0)
574 plex.setName('DMPlex Object')
575 plex.setOptionsPrefix('redistributed_')
576 plex.setFromOptions()
577 self.outputPlex(plex)
581 plex.setName('DMPlex Object')
582 plex.view(viewer=vwr)
586 plex.destroy()