Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOF tagging #76

Open
wants to merge 198 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
198 commits
Select commit Hold shift + click to select a range
3e046af
elementary tagging
nchristensen Oct 25, 2020
cd80428
use tag rather than string
nchristensen Nov 10, 2020
a7581e3
add blank lines
nchristensen Nov 10, 2020
0815303
remove typo
nchristensen Nov 10, 2020
c04f46c
Merge branch 'master' into dof_tagging
nchristensen Nov 16, 2020
4dd15cd
setup.py
nchristensen Nov 16, 2020
fbc329d
Merge branch 'dof_tagging' of github.com:nchristensen/meshmode into d…
nchristensen Nov 16, 2020
ac2cd1b
add documentation
nchristensen Nov 16, 2020
6f0a97a
update required Loopy version
nchristensen Nov 16, 2020
3f727b5
remove spaces
nchristensen Nov 16, 2020
ee54dea
only import auto and GlobalArg
nchristensen Nov 16, 2020
7828ec1
remove redundant import
nchristensen Nov 16, 2020
759d34d
blank line
nchristensen Nov 16, 2020
7048d2a
remove white space
nchristensen Nov 16, 2020
1942d6f
Merge branch 'master' into dof_tagging
nchristensen Nov 24, 2020
4feed77
requirements.txt
nchristensen Dec 1, 2020
bafd4e7
update required version
nchristensen Dec 1, 2020
5e43f1e
Merge branch 'dof_tagging' of github.com:nchristensen/meshmode into d…
nchristensen Dec 1, 2020
ddbdf71
redundant import
nchristensen Dec 1, 2020
8d2d563
remove redundant import
nchristensen Dec 1, 2020
cf1ac13
requirements.txt
nchristensen Dec 1, 2020
0861aef
Merge remote-tracking branch 'upstream/master' into dof_tagging
nchristensen Dec 1, 2020
33ec3a7
update version number
nchristensen Dec 1, 2020
0f67d1a
requirements.txt pytential version
nchristensen Dec 1, 2020
7cb9124
not the problem
nchristensen Dec 1, 2020
847eb1e
missing egg?
nchristensen Dec 1, 2020
a895671
point firedrake to fork
nchristensen Dec 1, 2020
d1700e9
Trigger CI
nchristensen Dec 1, 2020
5d8a14c
back down pytools and loopy versions for firedrake
nchristensen Dec 1, 2020
09c8fe1
fix setup.py
nchristensen Dec 1, 2020
1d50cf5
Update meshmode/dof_array.py
nchristensen Dec 7, 2020
866b52b
DOFTag -> IsDOFArray
nchristensen Dec 7, 2020
068f71e
Use IsDOFArray
nchristensen Dec 7, 2020
cc3eb65
use tag in transform code
nchristensen Dec 7, 2020
c106e24
flake8
nchristensen Dec 7, 2020
b7b1662
more flake8
nchristensen Dec 7, 2020
610bc1f
Add exception handling to transform function
nchristensen Dec 11, 2020
82bd6c3
bump required pytools version
nchristensen Dec 15, 2020
3cd9323
Merge remote-tracking branch 'upstream/master' into dof_tagging
nchristensen Dec 15, 2020
1cf6d72
trigger GitHub actions
nchristensen Dec 15, 2020
d72a388
add tag to oversample_mat kernel
nchristensen Dec 15, 2020
fb57d6d
tag IsDOFArray in unflatten
nchristensen Dec 15, 2020
d182c82
add IsDOFTag
nchristensen Dec 15, 2020
a0f3982
fix import
nchristensen Dec 15, 2020
dd6a8bc
specify array shape
nchristensen Dec 15, 2020
1849c35
handle math operations first
nchristensen Jan 1, 2021
7cad457
parameterize test generation by array context
nchristensen Jan 8, 2021
834bec0
Merge branch 'master' into dof_tagging
nchristensen Jan 11, 2021
bc87918
flake8 fix
nchristensen Jan 11, 2021
3f6bc98
update requirements
nchristensen Jan 11, 2021
a00bf08
add coord_dtype parameter to generate_regular_rect_mesh
nchristensen Jan 23, 2021
0ba40f8
add documentation for coord_dtype
nchristensen Feb 16, 2021
34c75ec
Allow for specifying shape in scalar loopy function generator
nchristensen Feb 16, 2021
5e28e74
Merge branch 'master' into dof_tagging
nchristensen Feb 16, 2021
c4ff43f
pass coord_dtype to box generator
nchristensen Feb 16, 2021
9028a79
Index into tuple returned from call_loopy
nchristensen Feb 16, 2021
192998c
Index into return tuple
nchristensen Feb 16, 2021
5c2a52a
Specify not the shape in elwise kernel for now
nchristensen Feb 16, 2021
a5fac08
Trigger CI
nchristensen Feb 16, 2021
2c9161e
update requirements.txt
nchristensen Feb 16, 2021
1d0f360
Add missing underscore to _array_context
nchristensen Mar 22, 2021
0a5cbd4
remove shape argument from special function generator
nchristensen Mar 24, 2021
c193ece
move ParameterValue to meshmode
nchristensen Apr 6, 2021
c21de15
add ParameterValues to nodes
nchristensen May 3, 2021
022b67e
fix parameters with tag values
nchristensen May 4, 2021
07690d7
Merge branch 'dof_tagging' of github.com:nchristensen/meshmode into d…
nchristensen May 4, 2021
8e5c5d2
taggable numpy array, undo shape specification for nodes
nchristensen May 4, 2021
d487fa7
push memory usage
nchristensen May 22, 2021
8273bd4
Merge up to 6bab0e7
nchristensen May 22, 2021
8143728
remove coord_dtype, add return statement
nchristensen May 24, 2021
16fd54c
fix return indexing
nchristensen May 24, 2021
9b3d265
More support for coord_dtype
nchristensen May 24, 2021
423df31
Add IsOpArry tag
nchristensen Jun 1, 2021
55e913d
pass shape and dtype into special function generator
nchristensen Jun 9, 2021
5e4332a
Pass sizes to nodes function
nchristensen Jun 10, 2021
09e0122
Fix special function datatype specification
nchristensen Jun 11, 2021
dbef82f
add missing imports
nchristensen Jun 11, 2021
58f3791
merge changes from main branch
nchristensen Jun 21, 2021
66174b1
enable resample_by_mat autotuning
nchristensen Jul 16, 2021
b8a97a0
Indirection permutation code
nchristensen Aug 23, 2021
82b68e2
merge upstream changes
nchristensen Aug 23, 2021
63dbbea
wrap tags in list
nchristensen Aug 25, 2021
075493e
Merge commit '956f7ddaa7805db89b752494203adc11b77481c8' into dof_tagg…
nchristensen Sep 20, 2021
fba968c
wrap tags in list
nchristensen Sep 20, 2021
08cabf2
Kernel tags, variable name updates
nchristensen Sep 20, 2021
249b673
remove commented code
nchristensen Oct 5, 2021
4cdff69
Event now in returned dictionary
nchristensen Oct 11, 2021
151bbf5
merge upstream changes
nchristensen Nov 13, 2021
d221782
Add kernel data tags
nchristensen Nov 13, 2021
54f9966
Define resample_mat object
nchristensen Nov 13, 2021
c379d42
Specify parameters to vandermonde applicator
nchristensen Nov 16, 2021
4b192c2
Disable sqrt for now, raises error
nchristensen Dec 1, 2021
06bac74
Merge remote-tracking branch 'upstream/main' into dof_tagging_updated
nchristensen Dec 1, 2021
689b826
merge upstream changes
nchristensen Jan 10, 2022
bbb3f6d
Reorganize tags
nchristensen Jan 11, 2022
855842c
Merge branch 'dof_tagging_updated' of github.com:nchristensen/meshmod…
nchristensen Jan 11, 2022
8b0c6b4
add egg=pytools
nchristensen Jan 11, 2022
6209f7d
remove whitespace
nchristensen Jan 11, 2022
7f30a60
remove unneeded file
nchristensen Jan 11, 2022
3d53647
Remove more redundant files
nchristensen Jan 11, 2022
1a7bdc2
Remove unneeded IsDOFArray import
nchristensen Jan 11, 2022
ee83e3c
Remove more unused imports
nchristensen Jan 11, 2022
755f06a
remove redundant import
nchristensen Jan 11, 2022
ed3db7c
flake8 fixes
nchristensen Jan 11, 2022
08da82f
Merge remote-tracking branch 'upstream/main' into dof_tagging_updated
nchristensen Jan 16, 2022
e173643
Move more tags from arraycontext
nchristensen Jan 16, 2022
0f3e482
remove white space
nchristensen Jan 18, 2022
b6853f1
flake8 errors in transform_metadata.py
nchristensen Jan 18, 2022
d7ad0af
Simplify projection.py imports
nchristensen Jan 18, 2022
0ceff61
simplify modal.py imports
nchristensen Jan 18, 2022
40b6f4d
dof_array.py flake8 fixes
nchristensen Jan 18, 2022
5024a47
Remove indexing into returned value
nchristensen Jan 18, 2022
195c2ba
Uncomment sqrt call
nchristensen Jan 18, 2022
ad5479e
Remove allocation tracking code
nchristensen Jan 18, 2022
50ed17f
Simplify imports
nchristensen Jan 18, 2022
b4b4968
Simpify discretization __init__.py imports
nchristensen Jan 18, 2022
bad1322
Remove now unnecessary indexing
nchristensen Jan 18, 2022
12415b3
flake8 fixes
nchristensen Jan 18, 2022
940c8b8
Simplify direct.py imports
nchristensen Jan 18, 2022
7a78af9
Delete commented code
nchristensen Jan 24, 2022
8ed6673
Remove unused permutation code
nchristensen Jan 24, 2022
572f639
Remove more commented code
nchristensen Jan 24, 2022
3e7419f
Remove more unused code
nchristensen Jan 25, 2022
04735e5
Remove unused pick_knl_rhs
nchristensen Jan 25, 2022
8838308
remove untested changes to _apply_without_inplace_updates
nchristensen Jan 25, 2022
24e7065
Remove comment
nchristensen Jan 25, 2022
1e134b0
flake8 fixes
nchristensen Jan 25, 2022
7882870
Use upstream arraycontext.py
nchristensen Jan 25, 2022
f207d96
flake8 fixes
nchristensen Jan 25, 2022
e2c4390
specify ValueArg datatypes
nchristensen Jan 25, 2022
fe04d4d
Fixes to pass tests
nchristensen Jan 25, 2022
567c99e
Delete unneeded print statement
nchristensen Jan 25, 2022
243aeb9
Delete redundant return
nchristensen Jan 25, 2022
28b8c55
Pass data types of all arrays into kernel
nchristensen Jan 25, 2022
d49b2dd
Merge branch 'main' into dof_tagging
nchristensen Jan 25, 2022
22acdb5
Remove comment
nchristensen Jan 30, 2022
25a6670
Only pass tags to einsum
nchristensen Jan 31, 2022
6a613b9
Use iterator instead of appending to list
nchristensen Jan 31, 2022
86a4590
Merge branch 'main' into dof_tagging
nchristensen Jan 31, 2022
f150cf0
remove redundant tuple conversion
nchristensen Jan 31, 2022
ef8c10d
Remove redundant list declaration
nchristensen Jan 31, 2022
aa2d762
Improve documentation, remove unused argument
nchristensen Jan 31, 2022
4fa3658
use type hint instead of assertion in transform_metadata
nchristensen Jan 31, 2022
bdebcdb
add autoclass comments
nchristensen Jan 31, 2022
5a2eb9f
Use immutables.Map instead of frozendict
nchristensen Feb 7, 2022
368ed94
Fix doc error
nchristensen Feb 7, 2022
9c02e7a
Delete unneeded file
nchristensen Feb 7, 2022
8e85fef
Update documentation
nchristensen Feb 7, 2022
fe5d865
Merge branch 'dof_tagging' of github.com:nchristensen/meshmode into d…
nchristensen Feb 7, 2022
4a29b8a
Merge branch 'main' into dof_tagging
nchristensen Feb 9, 2022
da69c01
Do type conversion inside constructor
nchristensen Feb 9, 2022
3ec5afa
Merge branch 'main' into dof_tagging
nchristensen Feb 13, 2022
a1be7d0
Flake8 fix
nchristensen Feb 14, 2022
fa3e20a
Make tags classes dataclasses
nchristensen Feb 15, 2022
42f2117
Merge remote-tracking branch 'upstream/main' into dof_tagging
nchristensen Feb 15, 2022
049061b
Merge branch 'main' into dof_tagging
nchristensen Feb 25, 2022
d733584
fix merge conflicts
nchristensen Mar 8, 2022
322cd4a
kernel_data for kernels
nchristensen Mar 14, 2022
0c80f6a
resolve merge conflicts
nchristensen Mar 14, 2022
f3ee308
extraneous bracket
nchristensen Mar 14, 2022
ea4d73f
Merge branch 'main' into dof_tagging
nchristensen Mar 20, 2022
404f709
test_element_orientation_via_single_elements (from @lukeolson)
inducer Mar 25, 2022
0fd56b2
Merge remote-tracking branch 'upstream/orientation-check' into dof_ta…
nchristensen Mar 28, 2022
a2d1cfb
Revert "add types and some docs to meshmode.mesh.visualization"
nchristensen Mar 30, 2022
4871b2f
Support for new picking kernels
nchristensen Apr 7, 2022
710dadb
Merge branch 'main' into dof_tagging_updated
nchristensen Apr 24, 2022
1d64425
remove binary file
nchristensen Apr 24, 2022
bc83cd8
Remove test code
nchristensen Apr 24, 2022
13cfd7a
visualization.py from main
nchristensen Apr 24, 2022
b1d9bad
opposite_face.py from main
nchristensen Apr 24, 2022
975ce41
Merge branch 'main' into dof_tagging
nchristensen Apr 24, 2022
ba3f5a9
flake8 fixes
nchristensen Apr 24, 2022
cee96cd
Merge branch 'dof_tagging' of github.com:nchristensen/meshmode into d…
nchristensen Apr 24, 2022
aac4556
remove comments and print statements
nchristensen Apr 24, 2022
bf86224
remove debugging print statement
nchristensen Apr 24, 2022
9caa675
Point requirements.txt toward specific loopy branch
nchristensen Apr 24, 2022
dcbc29f
fix requirements.txt
nchristensen Apr 24, 2022
156d529
Merge branch 'main' into dof_tagging
nchristensen Apr 25, 2022
0341f39
Merge remote-tracking branch 'upstream/main' into dof_tagging
nchristensen May 2, 2022
fddbc34
Merge branch 'dof_tagging' of github.com:nchristensen/meshmode into d…
nchristensen May 2, 2022
71f701a
update requirements.txt
nchristensen May 22, 2022
3d35bc8
Merge remote-tracking branch 'upstream/main' into dof_tagging
nchristensen Jun 1, 2022
14583bb
Merge branch 'dof_tagging' of github.com:nchristensen/meshmode into d…
nchristensen Jun 1, 2022
3d29155
Merge upstream changes
nchristensen Jun 14, 2022
0ba5fd5
CHERRY-PICK: SingleGridPytatoArrayContext
kaushikcfd Mar 12, 2022
a7036d7
Adds more pytato utils: Axes types unification
kaushikcfd Mar 12, 2022
9ebdf05
Implements FusionContractorArrayContext
kaushikcfd Mar 12, 2022
5d98d87
adds feinsum, kanren to deps
kaushikcfd Mar 12, 2022
1306122
add mpi_distribute
majosm Mar 16, 2022
dc3051f
add type hints to mpi_distribute
majosm Jun 29, 2022
23c305b
Merge branch 'mpi-distribute' into production
majosm Jul 5, 2022
8612826
Add single indirection resampling code
nchristensen Jul 8, 2022
6881694
Delete numpy version of single indirection code
nchristensen Jul 8, 2022
4f62ee2
update requirements.txt
nchristensen Jul 8, 2022
4f9c8dd
Merge upstream
nchristensen Jul 8, 2022
a9db0c7
Fix incorrect variable names
nchristensen Jul 12, 2022
d46d9d4
Merge remote-tracking branch 'matt/production' into dof_tagging
nchristensen Jul 12, 2022
a3b2cc1
Merge branch 'dof_tagging' of github.com:nchristensen/meshmode into d…
nchristensen Jul 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 13 additions & 17 deletions examples/simple-dg.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from meshmode.mesh import BTAG_ALL, BTAG_NONE # noqa
from meshmode.dof_array import DOFArray, flat_norm
from meshmode.array_context import (PyOpenCLArrayContext,
PytatoPyOpenCLArrayContext)
SingleGridWorkBalancingPytatoArrayContext as PytatoPyOpenCLArrayContext)
from arraycontext import (
ArrayContainer,
map_array_container,
Expand Down Expand Up @@ -455,11 +455,10 @@ def main(lazy=False):

cl_ctx = cl.create_some_context()
queue = cl.CommandQueue(cl_ctx)
actx_outer = PyOpenCLArrayContext(queue, force_device_scalars=True)
if lazy:
actx_rhs = PytatoPyOpenCLArrayContext(queue)
actx = PytatoPyOpenCLArrayContext(queue)
else:
actx_rhs = actx_outer
actx = PyOpenCLArrayContext(queue, force_device_scalars=True)

nel_1d = 16
from meshmode.mesh.generation import generate_regular_rect_mesh
Expand All @@ -475,45 +474,42 @@ def main(lazy=False):

logger.info("%d elements", mesh.nelements)

discr = DGDiscretization(actx_outer, mesh, order=order)
discr = DGDiscretization(actx, mesh, order=order)

fields = WaveState(
u=bump(actx_outer, discr),
v=make_obj_array([discr.zeros(actx_outer) for i in range(discr.dim)]),
u=bump(actx, discr),
v=make_obj_array([discr.zeros(actx) for i in range(discr.dim)]),
)

from meshmode.discretization.visualization import make_visualizer
vis = make_visualizer(actx_outer, discr.volume_discr)
vis = make_visualizer(actx, discr.volume_discr)

def rhs(t, q):
return wave_operator(actx_rhs, discr, c=1, q=q)
return wave_operator(actx, discr, c=1, q=q)

compiled_rhs = actx_rhs.compile(rhs)

def rhs_wrapper(t, q):
r = compiled_rhs(t, actx_rhs.thaw(actx_outer.freeze(q)))
return actx_outer.thaw(actx_rhs.freeze(r))
compiled_rhs = actx.compile(rhs)

t = np.float64(0)
t_final = 3
istep = 0
while t < t_final:
fields = rk4_step(fields, t, dt, rhs_wrapper)
fields = actx.thaw(actx.freeze(fields,))
fields = rk4_step(fields, t, dt, compiled_rhs)

if istep % 10 == 0:
# FIXME: Maybe an integral function to go with the
# DOFArray would be nice?
assert len(fields.u) == 1
logger.info("[%05d] t %.5e / %.5e norm %.5e",
istep, t, t_final, actx_outer.to_numpy(flat_norm(fields.u, 2)))
istep, t, t_final, actx.to_numpy(flat_norm(fields.u, 2)))
vis.write_vtk_file("fld-wave-min-%04d.vtu" % istep, [
("q", fields),
])

t += dt
istep += 1

assert flat_norm(fields.u, 2) < 100
assert actx.to_numpy(flat_norm(fields.u, 2)) < 100


if __name__ == "__main__":
Expand Down
Loading