diff --git a/psydac/api/settings.py b/psydac/api/settings.py index 6d0988451..74a48c645 100644 --- a/psydac/api/settings.py +++ b/psydac/api/settings.py @@ -67,4 +67,4 @@ 'pyccel-intel' : PSYDAC_BACKEND_IPYCCEL, 'pyccel-pgi' : PSYDAC_BACKEND_PGPYCCEL, 'pyccel-nvidia': PSYDAC_BACKEND_NVPYCCEL, -} \ No newline at end of file +} diff --git a/psydac/api/tests/test_2d_complex.py b/psydac/api/tests/test_2d_complex.py index d0ac7ce37..5aa0c432f 100644 --- a/psydac/api/tests/test_2d_complex.py +++ b/psydac/api/tests/test_2d_complex.py @@ -422,12 +422,12 @@ def test_complex_helmholtz_2d(plot_sol=False): print(f'errors: l2 = {l2_error}, h1 = {h1_error}') print('expected errors: l2 = {}, h1 = {}'.format(expected_l2_error, expected_h1_error)) - + if plot_sol: from psydac.feec.multipatch.plotting_utilities import get_plotting_grid, get_grid_vals from psydac.feec.multipatch.plotting_utilities import get_patch_knots_gridlines, my_small_plot from psydac.feec.pull_push import pull_2d_h1 - + Id_mapping = IdentityMapping('M', 2) # print(f'domain.interior = {domain.interior}') # domain_interior = [domain] @@ -446,7 +446,7 @@ def test_complex_helmholtz_2d(plot_sol=False): u_vals = grid_vals_h1(u_log) u_err = [(u1 - u2) for u1, u2 in zip(u_vals, uh_vals)] - + my_small_plot( title=r'approximation of solution $u$', vals=[u_vals, uh_vals, u_err], @@ -538,7 +538,7 @@ def teardown_function(): from psydac.feec.multipatch.plotting_utilities import get_patch_knots_gridlines, my_small_plot from psydac.api.tests.build_domain import build_pretzel from psydac.feec.pull_push import pull_2d_hcurl - + domain = build_pretzel() x,y = domain.coordinates diff --git a/psydac/api/tests/test_2d_mapping_poisson.py b/psydac/api/tests/test_2d_mapping_poisson.py index 5a4c0ccbd..d1c269b6b 100644 --- a/psydac/api/tests/test_2d_mapping_poisson.py +++ b/psydac/api/tests/test_2d_mapping_poisson.py @@ -137,7 +137,7 @@ def run_poisson_2d(filename, solution, f, dir_zero_boundary, # Compute error norms l2_error = l2norm_h.assemble(u=uh) h1_error = h1norm_h.assemble(u=uh) - + return l2_error, h1_error ############################################################################### diff --git a/psydac/api/tests/test_2d_multipatch_mapping_maxwell.py b/psydac/api/tests/test_2d_multipatch_mapping_maxwell.py index 6df8e32fb..9b8cab516 100644 --- a/psydac/api/tests/test_2d_multipatch_mapping_maxwell.py +++ b/psydac/api/tests/test_2d_multipatch_mapping_maxwell.py @@ -14,7 +14,7 @@ from sympde.topology import Square, Domain from sympde.topology import PolarMapping, LogicalExpr from sympde.expr.evaluation import TerminalExpr -from sympde.expr.expr import LinearForm, BilinearForm +from sympde.expr.expr import LinearForm, BilinearForm from sympde.expr.expr import integral from sympde.expr.expr import Norm from sympde.expr.equation import find, EssentialBC @@ -94,7 +94,7 @@ def run_maxwell_2d(uex, f, alpha, domain, *, ncells=None, degree=None, filename= equation_h = discretize(equation, domain_h, [Vh, Vh], backend=PSYDAC_BACKEND_GPYCCEL ) l2norm_h = discretize(l2norm, domain_h, Vh, backend=PSYDAC_BACKEND_GPYCCEL) - + # Explicitly assemble the linear system equation_h.assemble() @@ -171,7 +171,7 @@ def test_maxwell_2d_2_patch_dirichlet_2(): domain = Domain.from_file(filename) x,y = domain.coordinates - omega = 1.5 + omega = 1.5 alpha = -omega**2 Eex = Tuple(sin(pi*y), sin(pi*x)*cos(pi*y)) f = Tuple(alpha*sin(pi*y) - pi**2*sin(pi*y)*cos(pi*x) + pi**2*sin(pi*y), diff --git a/psydac/api/tests/test_api_2d_fields.py b/psydac/api/tests/test_api_2d_fields.py index 098b73103..fc17a66c3 100644 --- a/psydac/api/tests/test_api_2d_fields.py +++ b/psydac/api/tests/test_api_2d_fields.py @@ -263,7 +263,7 @@ def run_non_linear_poisson(filename, comm=None): @pytest.mark.parametrize('axis', [0, 1]) @pytest.mark.parametrize('ext', [-1, 1]) def test_boundary_field_identity(n1, axis, ext): - + domain = Square('domain', bounds1=(0., 0.5), bounds2=(0., 1.)) boundary = domain.get_boundary(axis=axis, ext=ext) @@ -276,7 +276,7 @@ def test_boundary_field_identity(n1, axis, ext): assert rel_error_BilinearForm_grad < TOL assert rel_error_LinearForm < TOL assert rel_error_LinearForm_grad < TOL - + print('PASSED') def test_field_identity_1(): @@ -361,4 +361,4 @@ def teardown_function(): if __name__ == '__main__': print('Running a test...') - test_boundary_field_identity(10, 0, -1) \ No newline at end of file + test_boundary_field_identity(10, 0, -1) diff --git a/psydac/api/tests/test_api_feec_2d.py b/psydac/api/tests/test_api_feec_2d.py index 1575e9ab3..aaee2cf80 100644 --- a/psydac/api/tests/test_api_feec_2d.py +++ b/psydac/api/tests/test_api_feec_2d.py @@ -170,33 +170,33 @@ def plot_field_and_error(name, x, y, field_h, field_ex, *gridlines): def update_plot(fig, t, x, y, field_h, field_ex): ax0, ax1, cax0, cax1 = fig.axes - + # Remove collections from ax0 while ax0.collections: ax0.collections[0].remove() - + # Remove collections from ax1 while ax1.collections: ax1.collections[0].remove() - + # Clear colorbars while cax0.collections: cax0.collections[0].remove() - + while cax1.collections: cax1.collections[0].remove() - + # Create new contour plots im0 = ax0.contourf(x, y, field_h) im1 = ax1.contourf(x, y, field_ex - field_h) - + # Create new colorbars fig.colorbar(im0, cax=cax0) fig.colorbar(im1, cax=cax1) - + # Update the title fig.suptitle('Time t = {:10.3e}'.format(t)) - + # Draw the updated plot fig.canvas.draw() @@ -217,9 +217,9 @@ def run_maxwell_2d_TE(*, use_spline_mapping, from sympde.topology import Domain from sympde.topology import Square - + from sympde.topology import CollelaMapping2D, BaseAnalyticMapping - + from sympde.topology import Derham from sympde.topology import elements_of from sympde.topology import NormalVector @@ -227,7 +227,7 @@ def run_maxwell_2d_TE(*, use_spline_mapping, from sympde.expr import integral from sympde.expr import BilinearForm - from psydac.api.discretization import discretize + from psydac.api.discretization import discretize from psydac.api.settings import PSYDAC_BACKENDS from psydac.feec.pull_push import push_2d_hcurl, push_2d_l2 from psydac.linalg.solvers import inverse @@ -305,17 +305,17 @@ def run_maxwell_2d_TE(*, use_spline_mapping, if use_spline_mapping: domain_h = discretize(domain, filename=filename, comm=MPI.COMM_WORLD) derham_h = discretize(derham, domain_h, multiplicity = [mult, mult]) - + # TO FIX : the way domain.from_file and discretize_domain runs make that only domain_h.domain.interior has an actual SplineMapping. The rest are BaseMapping. # The trick is to now when to set exactly the BaseMapping to the SplineMapping. We could try in discretize_derham, but see if it doesn't generate any issues for other tests. mappings=list(domain_h.mappings.values()) - + if(len(mappings)>1): raise TypeError("we are not doing multipatch here") - + mapping = mappings[0] # mapping is SplineMapping now derham_h.mapping=mapping - + periodic_list = mapping.space.periodic degree_list = mapping.space.degree @@ -490,13 +490,11 @@ def discrete_energies(self, e, b): # Electric field, x component fig2 = plot_field_and_error(r'E^x', x, y, Ex_values, Ex_ex(0, x, y), *gridlines) - fig2.show() - - # Electric field, y component + fig2.show() + # Electric field, y component fig3 = plot_field_and_error(r'E^y', x, y, Ey_values, Ey_ex(0, x, y), *gridlines) - fig3.show() - - # Magnetic field, z component + fig3.show() + # Magnetic field, z component fig4 = plot_field_and_error(r'B^z', x, y, Bz_values, Bz_ex(0, x, y), *gridlines) fig4.show() # ... @@ -751,7 +749,7 @@ def test_maxwell_2d_multiplicity(): verbose = False, mult = 2 ) - + TOL = 1e-5 ref = dict(error_l2_Ex = 4.350041934920621e-04, error_l2_Ey = 4.350041934920621e-04, @@ -760,7 +758,7 @@ def test_maxwell_2d_multiplicity(): assert abs(namespace['error_l2_Ex'] - ref['error_l2_Ex']) / ref['error_l2_Ex'] <= TOL assert abs(namespace['error_l2_Ey'] - ref['error_l2_Ey']) / ref['error_l2_Ey'] <= TOL assert abs(namespace['error_l2_Bz'] - ref['error_l2_Bz']) / ref['error_l2_Bz'] <= TOL - + def test_maxwell_2d_periodic_multiplicity(): namespace = run_maxwell_2d_TE( @@ -779,7 +777,7 @@ def test_maxwell_2d_periodic_multiplicity(): verbose = False, mult =2 ) - + TOL = 1e-6 ref = dict(error_l2_Ex = 1.78557685e-04, error_l2_Ey = 1.78557685e-04, @@ -788,8 +786,8 @@ def test_maxwell_2d_periodic_multiplicity(): assert abs(namespace['error_l2_Ex'] - ref['error_l2_Ex']) / ref['error_l2_Ex'] <= TOL assert abs(namespace['error_l2_Ey'] - ref['error_l2_Ey']) / ref['error_l2_Ey'] <= TOL assert abs(namespace['error_l2_Bz'] - ref['error_l2_Bz']) / ref['error_l2_Bz'] <= TOL - - + + def test_maxwell_2d_periodic_multiplicity_equal_deg(): namespace = run_maxwell_2d_TE( @@ -808,12 +806,12 @@ def test_maxwell_2d_periodic_multiplicity_equal_deg(): verbose = False, mult =2 ) - + TOL = 1e-6 ref = dict(error_l2_Ex = 2.50585008e-02, error_l2_Ey = 2.50585008e-02, error_l2_Bz = 1.58438290e-02) - + assert abs(namespace['error_l2_Ex'] - ref['error_l2_Ex']) / ref['error_l2_Ex'] <= TOL assert abs(namespace['error_l2_Ey'] - ref['error_l2_Ey']) / ref['error_l2_Ey'] <= TOL assert abs(namespace['error_l2_Bz'] - ref['error_l2_Bz']) / ref['error_l2_Bz'] <= TOL @@ -1045,7 +1043,7 @@ def test_maxwell_2d_dirichlet_par(): # Run simulation namespace = run_maxwell_2d_TE(**vars(args)) - + # Keep matplotlib windows open import matplotlib.pyplot as plt - plt.show() \ No newline at end of file + plt.show() diff --git a/psydac/api/tests/test_export_fields_parallel.h5 b/psydac/api/tests/test_export_fields_parallel.h5 deleted file mode 100644 index 06296f00c..000000000 Binary files a/psydac/api/tests/test_export_fields_parallel.h5 and /dev/null differ diff --git a/psydac/api/tests/test_export_fields_parallel.yml b/psydac/api/tests/test_export_fields_parallel.yml deleted file mode 100644 index 1081dabc2..000000000 --- a/psydac/api/tests/test_export_fields_parallel.yml +++ /dev/null @@ -1,20 +0,0 @@ -ndim: 2 -fields: test_export_fields_parallel.h5 -patches: -- name: D - breakpoints: - - [0.0, 0.2, 0.4, 0.6000000000000001, 0.8, 1.0] - - [0.0, 0.2, 0.4, 0.6000000000000001, 0.8, 1.0] - scalar_spaces: - - name: Ah - ldim: 2 - kind: h1 - dtype: - rational: false - periodic: [false, false] - degree: [3, 3] - multiplicity: [1, 1] - basis: [B, B] - knots: - - [0.0, 0.0, 0.0, 0.0, 0.2, 0.4, 0.6000000000000001, 0.8, 1.0, 1.0, 1.0, 1.0] - - [0.0, 0.0, 0.0, 0.0, 0.2, 0.4, 0.6000000000000001, 0.8, 1.0, 1.0, 1.0, 1.0] diff --git a/psydac/cad/cad.py b/psydac/cad/cad.py index 5628ba708..2d7305220 100644 --- a/psydac/cad/cad.py +++ b/psydac/cad/cad.py @@ -47,8 +47,6 @@ def elevate(mapping, axis, times): degree algorithm in psydac """ - raise NotImplementedError('Igakit dependencies commented to support python 3.12. `elevate` must be re-implemented') - try: from igakit.nurbs import NURBS except: @@ -123,8 +121,6 @@ def refine(mapping, axis, values): insertion algorithm in psydac """ - raise NotImplementedError('Igakit dependencies commented to support python 3.12. `refine` must be re-implemented') - try: from igakit.nurbs import NURBS except: diff --git a/psydac/cad/geometry.py b/psydac/cad/geometry.py index 30f677f4f..49218e722 100644 --- a/psydac/cad/geometry.py +++ b/psydac/cad/geometry.py @@ -56,11 +56,11 @@ class Geometry( object ): comm: MPI.Comm MPI intra-communicator. - + mpi_dims_mask: list of bool True if the dimension is to be used in the domain decomposition (=default for each dimension). If mpi_dims_mask[i]=False, the i-th dimension will not be decomposed. - + """ _ldim = None _pdim = None @@ -78,7 +78,7 @@ def __init__(self, domain=None, ncells=None, periodic=None, mappings=None, self.read(filename, comm=comm) elif domain is not None: - assert isinstance(domain, Domain) + assert isinstance(domain, Domain) assert isinstance(ncells, dict) assert isinstance(mappings, dict) if periodic is not None: @@ -132,18 +132,18 @@ def from_discrete_mapping(cls, mapping, comm=None, name=None): comm : MPI.Comm MPI intra-communicator. - + name : string - Optional name for the Mapping that will be created. + Optional name for the Mapping that will be created. Needed to avoid conflicts in case several mappings are created """ mapping_name = name if name else 'mapping' - dim = mapping.ldim + dim = mapping.ldim domain = mapping(NCube(name = 'Omega', dim = dim, min_coords = [0.] * dim, - max_coords = [1.] * dim)) + max_coords = [1.] * dim)) mappings = {domain.name: mapping} ncells = {domain.name: mapping.space.domain_decomposition.ncells} periodic = {domain.name: mapping.space.domain_decomposition.periods} @@ -361,14 +361,10 @@ def read( self, filename, comm=None ): if isinstance(mapping, NurbsMapping): mapping.weights_field.coeffs.update_ghost_regions() - # ... close the h5 file h5.close() # ... - - - # ... self._ldim = ldim self._pdim = pdim @@ -510,8 +506,6 @@ def export_nurbs_to_hdf5(filename, nurbs, periodic=None, comm=None ): mpi communicator """ - raise NotImplementedError('Igakit dependencies commented to support python 3.12. `export_nurbs_to_hdf5` must be re-implemented') - import os.path import igakit assert isinstance(nurbs, igakit.nurbs.NURBS) @@ -570,7 +564,7 @@ def export_nurbs_to_hdf5(filename, nurbs, periodic=None, comm=None ): bounds2 = (float(nurbs.breaks(1)[0]), float(nurbs.breaks(1)[-1])) bounds3 = (float(nurbs.breaks(2)[0]), float(nurbs.breaks(2)[-1])) domain = Cube(patch_name, bounds1=bounds1, bounds2=bounds2, bounds3=bounds3) - + degrees = nurbs.degree points=nurbs.points[...,:nurbs.dim] knots=[] @@ -588,7 +582,6 @@ def export_nurbs_to_hdf5(filename, nurbs, periodic=None, comm=None ): mapping = NurbsMapping.from_control_points_weights(space, points, weights) else: mapping=SplineMapping.from_control_points(space, points) - print("domain=mapping(domain)") domain = mapping(domain) topo_yml = domain.todict() @@ -644,8 +637,6 @@ def refine_nurbs(nrb, ncells=None, degree=None, multiplicity=None, tol=1e-9): """ - raise NotImplementedError('Igakit dependencies commented to support python 3.12. `refine_nurbs` must be re-implemented') - if multiplicity is None: multiplicity = [1]*nrb.dim @@ -718,8 +709,6 @@ def refine_knots(knots, ncells, degree, multiplicity=None, tol=1e-9): the refined knot sequences in each direction """ - raise NotImplementedError('Igakit dependencies commented to support python 3.12. `refine_knots` must be re-implemented') - from igakit.nurbs import NURBS dim = len(ncells) @@ -845,8 +834,6 @@ def _read_line(line): def _read_patch(lines, i_patch, n_lines_per_patch, list_begin_line): - raise NotImplementedError('Igakit dependencies commented to support python 3.12. `_read_patch` must be re-implemented') - from igakit.nurbs import NURBS i_begin_line = list_begin_line[i_patch-1] diff --git a/psydac/cad/multipatch.py b/psydac/cad/multipatch.py index 5d89825d4..8e60ce928 100644 --- a/psydac/cad/multipatch.py +++ b/psydac/cad/multipatch.py @@ -30,11 +30,9 @@ def export_multipatch_nurbs_to_hdf5(filename:str, nurbs:list, connectivity:dict, Mpi communicator """ - raise NotImplementedError('Igakit dependencies commented to support python 3.12. `export_multipatch_nurbs_to_hdf5` must be re-implemented') - import os.path import igakit - assert all(isinstance(n, igakit.nurbs.NURBS) for n in nurbs) + assert all(isinstance(n, igakit.nurbs.NURBS) for n in nurbs) extension = os.path.splitext(filename)[-1] if not extension == '.h5': diff --git a/psydac/cad/tests/pipe.h5 b/psydac/cad/tests/pipe.h5 deleted file mode 100644 index 16e5401e4..000000000 Binary files a/psydac/cad/tests/pipe.h5 and /dev/null differ diff --git a/psydac/mapping/discrete.py b/psydac/mapping/discrete.py index 7eb0e9d66..2b0d7405c 100644 --- a/psydac/mapping/discrete.py +++ b/psydac/mapping/discrete.py @@ -148,10 +148,10 @@ def from_control_points(cls, tensor_space, control_points): def _evaluate_domain( self, domain ): assert(isinstance(domain, BasicDomain)) return MappedDomain(self, domain) - + def _evaluate_point( self, *eta ): return [map_Xd(*eta) for map_Xd in self._fields] - + def _evaluate_1d_arrays(self, *arrays): assert len(arrays) == self.ldim if len(arrays) == 0: @@ -159,7 +159,7 @@ def _evaluate_1d_arrays(self, *arrays): shape = arrays[0].shape if not all(array.shape == shape for array in arrays): raise ValueError("Shape mismatch between input arrays") - + result_arrays = [np.zeros_like(array, dtype=np.float64) for array in arrays] for i in range(shape[0]): evaluated_points = self._evaluate_point(*(array[i] for array in arrays)) @@ -167,8 +167,8 @@ def _evaluate_1d_arrays(self, *arrays): result_arrays[j][i] = value return tuple(result_arrays) - - + + def _evaluate_meshgrid(self, *Xs): reverted_arrays = [] assert len(Xs)==self.ldim @@ -178,12 +178,12 @@ def _evaluate_meshgrid(self, *Xs): reverted_arrays.append(np.unique(X)) return self.build_mesh(reverted_arrays) - - + + def __call__( self, *args ): if len(args) == 1 and isinstance(args[0], BasicDomain): return self._evaluate_domain(args[0]) - + elif all(isinstance(arg, (int, float, Symbol)) for arg in args): return self._evaluate_point(*args) @@ -191,10 +191,10 @@ def __call__( self, *args ): if ( len(args[0].shape) == 1 ): return self._evaluate_1d_arrays(*args) elif (( len(args[0].shape) == 2 ) or (len(args[0].shape) == 3)): - return self._evaluate_meshgrid(*args) + return self._evaluate_meshgrid(*args) else: raise TypeError(" Invalid dimensions for called object ") - + # ... def jacobian_eval(self, *eta): return np.array([map_Xd.gradient(*eta) for map_Xd in self._fields]) @@ -227,7 +227,7 @@ def build_mesh(self, grid, npts_per_cell=None, overlap=0): npts_per_cell: int, tuple of int or None, optional Number of evaluation points in each cell. If an integer is given, then assume that it is the same in every direction. - + overlap : int How much to overlap. Only used in the distributed context. @@ -373,7 +373,7 @@ def jac_mat_irregular_tensor_grid(self, grid, overlap=0): ---------- grid : List of ndarray List of 1D arrays representing each direction of the grid. - + overlap : int How much to overlap. Only used in the distributed context. @@ -691,14 +691,14 @@ def jac_det_regular_tensor_grid(self, grid, overlap=0): global_arr_y = self._fields[1].coeffs._data global_arr_z = self._fields[2].coeffs._data - eval_jac_det_3d(*ncells, *degree, *n_eval_points, *global_basis, + eval_jac_det_3d(*ncells, *degree, *n_eval_points, *global_basis, *global_spans, global_arr_x, global_arr_y, global_arr_z, jac_dets) elif self.ldim == 2: global_arr_x = self._fields[0].coeffs._data global_arr_y = self._fields[1].coeffs._data - eval_jac_det_2d(*ncells, *degree, *n_eval_points, *global_basis, + eval_jac_det_2d(*ncells, *degree, *n_eval_points, *global_basis, *global_spans, global_arr_x, global_arr_y, jac_dets) else: @@ -714,7 +714,7 @@ def jac_det_irregular_tensor_grid(self, grid, overlap=0): ---------- grid : List of ndarray List of 1D arrays representing each direction of the grid. - + overlap : int How much to overlap. Only used in the distributed context. @@ -740,14 +740,14 @@ def jac_det_irregular_tensor_grid(self, grid, overlap=0): global_arr_y = self._fields[1].coeffs._data global_arr_z = self._fields[2].coeffs._data - eval_jac_det_irregular_3d(*npts, *degree, *cell_indexes, *global_basis, + eval_jac_det_irregular_3d(*npts, *degree, *cell_indexes, *global_basis, *global_spans, global_arr_x, global_arr_y, global_arr_z, jac_dets) elif self.ldim == 2: global_arr_x = self._fields[0].coeffs._data global_arr_y = self._fields[1].coeffs._data - eval_jac_det_irregular_2d(*npts, *degree, *cell_indexes, *global_basis, + eval_jac_det_irregular_2d(*npts, *degree, *cell_indexes, *global_basis, *global_spans, global_arr_x, global_arr_y, jac_dets) else: @@ -930,10 +930,10 @@ def _evaluate_point( self, *eta ): w = map_W(*eta) Xd = [map_Xd(*eta , weights=map_W.coeffs) for map_Xd in self._fields] return np.asarray(Xd) / w - + def _evaluate_domain(self, domain): return super()._evaluate_domain(domain) - + def __call__(self, *args): if len(args) == 1 and isinstance(args[0], BasicDomain): @@ -952,10 +952,10 @@ def jacobian_eval(self, *eta): def jacobian_inv_eval(self, *eta): return super().jacobian_inv_eval(*eta) - + def metric_eval(self, *eta): return super().metric_eval(*eta) - + def metric_det_eval(self, *eta): return super().metric_det_eval(*eta) #-------------------------------------------------------------------------- @@ -1080,16 +1080,16 @@ def jac_mat_irregular_tensor_grid(self, grid, overlap=0): global_arr_y = self._fields[1].coeffs._data global_arr_z = self._fields[2].coeffs._data - eval_jacobians_irregular_3d_weights(*npts, *degree, *cell_indexes, *global_basis, - *global_spans, global_arr_x, global_arr_y, global_arr_z, + eval_jacobians_irregular_3d_weights(*npts, *degree, *cell_indexes, *global_basis, + *global_spans, global_arr_x, global_arr_y, global_arr_z, global_arr_weights, jac_mats) elif self.ldim == 2: global_arr_x = self._fields[0].coeffs._data global_arr_y = self._fields[1].coeffs._data - eval_jacobians_irregular_2d_weights(*npts, *degree, *cell_indexes, *global_basis, - *global_spans, global_arr_x, global_arr_y, + eval_jacobians_irregular_2d_weights(*npts, *degree, *cell_indexes, *global_basis, + *global_spans, global_arr_x, global_arr_y, global_arr_weights, jac_mats) else: @@ -1190,16 +1190,16 @@ def inv_jac_mat_irregular_tensor_grid(self, grid, overlap=0): global_arr_y = self._fields[1].coeffs._data global_arr_z = self._fields[2].coeffs._data - eval_jacobians_inv_irregular_3d_weights(*npts, *degree, *cell_indexes, *global_basis, - *global_spans, global_arr_x, global_arr_y, global_arr_z, + eval_jacobians_inv_irregular_3d_weights(*npts, *degree, *cell_indexes, *global_basis, + *global_spans, global_arr_x, global_arr_y, global_arr_z, global_arr_weights, inv_jac_mats) elif self.ldim == 2: global_arr_x = self._fields[0].coeffs._data global_arr_y = self._fields[1].coeffs._data - eval_jacobians_inv_irregular_2d_weights(*npts, *degree, *cell_indexes, *global_basis, - *global_spans, global_arr_x, global_arr_y, + eval_jacobians_inv_irregular_2d_weights(*npts, *degree, *cell_indexes, *global_basis, + *global_spans, global_arr_x, global_arr_y, global_arr_weights, inv_jac_mats) else: @@ -1230,7 +1230,7 @@ def jac_det_regular_tensor_grid(self, grid, overlap=0): at the location corresponding to ``(x_1, ..., x_ldim)``. """ from psydac.core.field_evaluation_kernels import eval_jac_det_3d_weights, eval_jac_det_2d_weights - + degree, global_basis, global_spans, local_shape = self.space.preprocess_regular_tensor_grid(grid, der=1, overlap=overlap) ncells = [local_shape[i][0] for i in range(self.ldim)] @@ -1305,16 +1305,16 @@ def jac_det_irregular_tensor_grid(self, grid, overlap=0): global_arr_y = self._fields[1].coeffs._data global_arr_z = self._fields[2].coeffs._data - eval_jac_det_irregular_3d_weights(*npts, *degree, *cell_indexes, *global_basis, - *global_spans, global_arr_x, global_arr_y, global_arr_z, + eval_jac_det_irregular_3d_weights(*npts, *degree, *cell_indexes, *global_basis, + *global_spans, global_arr_x, global_arr_y, global_arr_z, global_arr_weights, jac_dets) elif self.ldim == 2: global_arr_x = self._fields[0].coeffs._data global_arr_y = self._fields[1].coeffs._data - eval_jac_det_irregular_2d_weights(*npts, *degree, *cell_indexes, *global_basis, - *global_spans, global_arr_x, global_arr_y, + eval_jac_det_irregular_2d_weights(*npts, *degree, *cell_indexes, *global_basis, + *global_spans, global_arr_x, global_arr_y, global_arr_weights, jac_dets) else: