22
22
23
23
import numpy as np
24
24
25
- from arraycontext import PyOpenCLArrayContext , thaw , freeze , flatten , unflatten
25
+ from arraycontext import PyOpenCLArrayContext , flatten , unflatten
26
26
from meshmode .dof_array import DOFArray
27
27
28
28
from pytools import memoize_method , memoize_in , single_valued
@@ -661,7 +661,7 @@ def exec_compute_potential_insn_fmm(self, actx: PyOpenCLArrayContext,
661
661
662
662
from meshmode .discretization import Discretization
663
663
if isinstance (target_discr , Discretization ):
664
- template_ary = thaw (target_discr .nodes ()[0 ], actx )
664
+ template_ary = actx . thaw (target_discr .nodes ()[0 ])
665
665
result = unflatten (template_ary , result , actx , strict = False )
666
666
667
667
results .append ((o .name , result ))
@@ -758,7 +758,7 @@ def exec_compute_potential_insn_direct(self, actx, insn, bound_expr, evaluate,
758
758
def _flat_nodes (dofdesc ):
759
759
discr = bound_expr .places .get_discretization (
760
760
dofdesc .geometry , dofdesc .discr_stage )
761
- return freeze (flatten (discr .nodes (), actx , leaf_class = DOFArray ), actx )
761
+ return actx . freeze (flatten (discr .nodes (), actx , leaf_class = DOFArray ))
762
762
763
763
@memoize_in (bound_expr .places ,
764
764
(QBXLayerPotentialSource , "flat_expansion_radii" ))
@@ -767,7 +767,7 @@ def _flat_expansion_radii(dofdesc):
767
767
bound_expr .places ,
768
768
sym .expansion_radii (self .ambient_dim , dofdesc = dofdesc ),
769
769
)(actx )
770
- return freeze (flatten (radii , actx ), actx )
770
+ return actx . freeze (flatten (radii , actx ))
771
771
772
772
@memoize_in (bound_expr .places ,
773
773
(QBXLayerPotentialSource , "flat_centers" ))
@@ -776,7 +776,7 @@ def _flat_centers(dofdesc, qbx_forced_limit):
776
776
sym .expansion_centers (
777
777
self .ambient_dim , qbx_forced_limit , dofdesc = dofdesc ),
778
778
)(actx )
779
- return freeze (flatten (centers , actx , leaf_class = DOFArray ), actx )
779
+ return actx . freeze (flatten (centers , actx , leaf_class = DOFArray ))
780
780
781
781
from pytential .source import evaluate_kernel_arguments
782
782
flat_kernel_args = evaluate_kernel_arguments (
@@ -846,7 +846,7 @@ def _flat_centers(dofdesc, qbx_forced_limit):
846
846
for i , o in outputs :
847
847
result = output_for_each_kernel [o .target_kernel_index ]
848
848
if isinstance (target_discr , Discretization ):
849
- template_ary = thaw (target_discr .nodes ()[0 ], actx )
849
+ template_ary = actx . thaw (target_discr .nodes ()[0 ])
850
850
result = unflatten (template_ary , result , actx , strict = False )
851
851
852
852
results [i ] = (o .name , result )
@@ -922,7 +922,7 @@ def _flat_centers(dofdesc, qbx_forced_limit):
922
922
for i , o in outputs :
923
923
result = output_for_each_kernel [o .target_kernel_index ]
924
924
if isinstance (target_discr , Discretization ):
925
- template_ary = thaw (target_discr .nodes ()[0 ], actx )
925
+ template_ary = actx . thaw (target_discr .nodes ()[0 ])
926
926
result = unflatten (template_ary , result , actx , strict = False )
927
927
928
928
results [i ] = (o .name , result )
0 commit comments