Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
meshmode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ellis Hoag
meshmode
Commits
9f02da0b
Commit
9f02da0b
authored
10 years ago
by
Shivam Gupta
Browse files
Options
Downloads
Patches
Plain Diff
refiner sort of working
parent
212abfdb
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/plot-connectivity.py
+9
-6
9 additions, 6 deletions
examples/plot-connectivity.py
meshmode/mesh/refinement.py
+233
-18
233 additions, 18 deletions
meshmode/mesh/refinement.py
with
242 additions
and
24 deletions
examples/plot-connectivity.py
+
9
−
6
View file @
9f02da0b
...
@@ -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.
Click to expand it.
meshmode/mesh/refinement.py
+
233
−
18
View file @
9f02da0b
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment