pystencils merge requestshttps://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests2022-04-28T09:46:38+02:00https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/291Fix test_alignment_of_different_layouts on architectures with 128-bit vectors2022-04-28T09:46:38+02:00Michael Kuronmkuron@icp.uni-stuttgart.deFix test_alignment_of_different_layouts on architectures with 128-bit vectorsThis test previously failed on ARM Neon (and probably also on SSE) because the test checks for 256-bit alignment, but only requests `alignment=True`, which is the maximum required by the hardware (i.e. to `align=32` on AVX, but only `ali...This test previously failed on ARM Neon (and probably also on SSE) because the test checks for 256-bit alignment, but only requests `alignment=True`, which is the maximum required by the hardware (i.e. to `align=32` on AVX, but only `align=16` on SSE/Neon).Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/363Fix type equality checks2024-01-09T10:18:05+01:00Frederik HennigFix type equality checksUse `is`/`is not` instead of `==` when checking for equality of types. Fixes linter errors that recently appeared in the `flake8` checker.Use `is`/`is not` instead of `==` when checking for equality of types. Fixes linter errors that recently appeared in the `flake8` checker.Frederik HennigFrederik Hennighttps://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/44Fix typo in "pre-push"2019-09-02T13:41:09+02:00Stephan SeitzFix typo in "pre-push"https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/361Fix typo in CustomCodeNode.__eq__2023-12-04T10:47:42+01:00Daniel BauerFix typo in CustomCodeNode.__eq__https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/125Fix {PyCuda,PyOpenCl}ArrayHandler.{zeros,ones,randn}2020-01-15T20:42:01+01:00Stephan SeitzFix {PyCuda,PyOpenCl}ArrayHandler.{zeros,ones,randn}https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/301Fix: `recursive_collect` now fails silently2022-07-28T15:52:03+02:00Frederik HennigFix: `recursive_collect` now fails silently`recursive_collect` used to throw an exception when an expression could not be written as a polynomial in the given symbols.
Now, it just fails quietly and returns the input expression unsimplified.`recursive_collect` used to throw an exception when an expression could not be written as a polynomial in the given symbols.
Now, it just fails quietly and returns the input expression unsimplified.https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/288Fix: AssignmentCollection's `new_filtered` now also finds dependencies in mai...2022-03-25T09:14:17+01:00Frederik HennigFix: AssignmentCollection's `new_filtered` now also finds dependencies in main assignmentsFixes a bug where `AssignmentCollection.new_filtered` would not catch symbol dependencies on LHS symbols of main assignments.Fixes a bug where `AssignmentCollection.new_filtered` would not catch symbol dependencies on LHS symbols of main assignments.https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/169Fix: Replaced accidental `continue` by `break` in boundaries/createindexlist.py2020-10-07T10:54:06+02:00Frederik HennigFix: Replaced accidental `continue` by `break` in boundaries/createindexlist.pyThere was a `continue` instead of a `break` statement in the python code for index list creation, causing the `single_link` flag to be ignored. The test cases for this are updated in pycodegen/lbmpy!41.There was a `continue` instead of a `break` statement in the python code for index list creation, causing the `single_link` flag to be ignored. The test cases for this are updated in pycodegen/lbmpy!41.https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/287Fix: sharedmethodcache didn't preserve docstrings2022-03-25T09:11:34+01:00Frederik HennigFix: sharedmethodcache didn't preserve docstringsAdded the `@wraps` decorator to the recently introduced `sharedmethodcache` to have it preserve docstrings.Added the `@wraps` decorator to the recently introduced `sharedmethodcache` to have it preserve docstrings.https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/177Fix: shift_slice to accept single slices as argument, and return tuples2020-10-07T11:30:33+02:00Frederik HennigFix: shift_slice to accept single slices as argument, and return tuplesTwo fixes to `pystencils.slicing.shift_slice`:
- Previously, `shift_slice` assumed its argument `slices` to be iterable. Thus, it did not accept single slices as arguments. There are use cases, though, where it is necessary to shift a p...Two fixes to `pystencils.slicing.shift_slice`:
- Previously, `shift_slice` assumed its argument `slices` to be iterable. Thus, it did not accept single slices as arguments. There are use cases, though, where it is necessary to shift a plain `slice` object, or even `int` or `float` objects which can also be seen as slices. An additional `isinstance` check takes care of this.
- Previously, `shift_slice` returned `list`s of slices. By default, Python wraps multidimensional slices as `tuple`s. Code for manipulating multidimensional slices thus expects them to be given as tuples. Also, although it is currently possible to access numpy arrays with lists of slices instead of tuples, this action produces a deprecation warning. Thus, `shift_slice` is changed to return tuples.
An additional test case evaluating array accesses with shifted slices is also added.https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/298Fix: Version string test case2022-07-01T11:08:13+02:00Markus HolzerFix: Version string test caseMarkus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/159Fix: Wrong fString in Cuda Backend2020-06-22T15:52:09+02:00Markus HolzerFix: Wrong fString in Cuda BackendDue to changing the string formating in pystencils, an error occurred in the CUDA backend, which is fixed by changing back to the classical string formating.
Furthermore, I added a compile instruction to `test_fast_approximation` to cat...Due to changing the string formating in pystencils, an error occurred in the CUDA backend, which is fixed by changing back to the classical string formating.
Furthermore, I added a compile instruction to `test_fast_approximation` to catch the error in the test cases, which was thrown at compile time in the `pygrandchem` module.Jan HönigJan Hönighttps://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/201Fixed build doc2020-12-21T11:37:55+01:00Markus HolzerFixed build docDue to an update of `sphinxcontrib-bibtex` a .bib file must be specified for the documentation to work.Due to an update of `sphinxcontrib-bibtex` a .bib file must be specified for the documentation to work.Michael Kuronmkuron@icp.uni-stuttgart.deMichael Kuronmkuron@icp.uni-stuttgart.dehttps://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/262fixed create_kernel parameter data_type="float" to procucde single precision2021-09-14T18:35:29+02:00Christoph Altfixed create_kernel parameter data_type="float" to procucde single precisionCurrently if create_kernel(assignments, data_type="float") is used then the untyped symbols are typed with float64, since the np.dtype("float") creates this during the construction of a new TypedSymbol.
Since data_type or as it is calle...Currently if create_kernel(assignments, data_type="float") is used then the untyped symbols are typed with float64, since the np.dtype("float") creates this during the construction of a new TypedSymbol.
Since data_type or as it is called in cpu.create_kernel type_info can be an string of an C type, At least following the [documentation of cpu.create_kernel](https://i10git.cs.fau.de/pycodegen/pystencils/-/blob/master/pystencils/cpu/kernelcreation.py#L31) this behavior is a bit confusing, since typical the C type specifier "float" is meant to be single precision.
So I added a small function that just replaces "float" with "single" in the symbol_to_type dict, so the untyped symbols get the single precision type.Christoph AltChristoph Althttps://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/193Fixed duplicated kwargs in boundaryhandling2020-12-07T16:30:17+01:00Markus HolzerFixed duplicated kwargs in boundaryhandlingMichael Kuronmkuron@icp.uni-stuttgart.deMichael Kuronmkuron@icp.uni-stuttgart.dehttps://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/274Fixed integer square root2021-11-17T15:50:41+01:00Markus HolzerFixed integer square rootInteger square roots must be detected as float32 if the simulation is setup for SP.Integer square roots must be detected as float32 if the simulation is setup for SP.Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/280Fixed test for sliced iteration with buffer to use dynamic field sizes2021-11-28T16:19:50+01:00Frederik HennigFixed test for sliced iteration with buffer to use dynamic field sizesOtherwise the test did not fail as it should when float-division is used in indexing.Otherwise the test did not fail as it should when float-division is used in indexing.https://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/141Fixed Volume of Fluid discretization and added Advection-Diffusion testcase2020-02-03T18:51:16+01:00Alexander ReinauerFixed Volume of Fluid discretization and added Advection-Diffusion testcaseFixed VoF discretization and added advection-diffusion testcase for finitevolumes and VoF discretization on behalf of @kuronFixed VoF discretization and added advection-diffusion testcase for finitevolumes and VoF discretization on behalf of @kuronMartin BauerMartin Bauerhttps://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/263Fixed wrong type hints. Updated setup.py2021-09-16T22:47:01+02:00Jan HönigFixed wrong type hints. Updated setup.pyAdded authors and changed the package's email to a more general solution.Added authors and changed the package's email to a more general solution.Jan HönigJan Hönighttps://i10git.cs.fau.de/pycodegen/pystencils/-/merge_requests/252Fixes for buffers in loops with step size > 12021-06-08T08:54:17+02:00Frederik HennigFixes for buffers in loops with step size > 1This MR introduces some additions and fixes for generating CPU loops with step sizes > 1:
- The CPU `create_kernel` function now exposes a flag to disable the double field write check
- Rewrote `get_base_buffer_index` to use pure integ...This MR introduces some additions and fixes for generating CPU loops with step sizes > 1:
- The CPU `create_kernel` function now exposes a flag to disable the double field write check
- Rewrote `get_base_buffer_index` to use pure integer arithmetic, and corrected the computation of the buffer base index
to correctly incorporate loop step sizes. Added test case to check correctness.
- Added rudimentary `evalf` functionality to integer division sympy function `int_div` (its absence lead to an infinite recursion during code generation).
- Added correct printing of integer-typed expressions in `CustomSympyPrinter._typed_number`.