Skip to content
Snippets Groups Projects
Commit 9f02da0b authored by Shivam Gupta's avatar Shivam Gupta
Browse files

refiner sort of working

parent 212abfdb
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ from __future__ import division ...@@ -2,7 +2,7 @@ from __future__ import division
import numpy as np # noqa import numpy as np # noqa
import pyopencl as cl import pyopencl as cl
import random
import os import os
order = 4 order = 4
...@@ -54,11 +54,14 @@ def main2(): ...@@ -54,11 +54,14 @@ def main2():
mesh = generate_torus(3, 1, order=order) mesh = generate_torus(3, 1, order=order)
from meshmode.mesh.refinement import Refiner from meshmode.mesh.refinement import Refiner
r = Refiner(mesh) r = Refiner(mesh)
flags = np.zeros(len(mesh.groups[0].vertex_indices))
for i in range(0, len(flags)): times = random.randint(1, 1)
if i % 2 == 0: for time in xrange(times):
flags[i] = 1 flags = np.zeros(len(mesh.groups[0].vertex_indices))
mesh = r.refine(flags) for i in xrange(0, len(flags)):
flags[i] = random.randint(0, 1)
mesh = r.refine(flags)
from meshmode.discretization import Discretization from meshmode.discretization import Discretization
from meshmode.discretization.poly_element import \ from meshmode.discretization.poly_element import \
PolynomialWarpAndBlendGroupFactory PolynomialWarpAndBlendGroupFactory
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment