pystencils issueshttps://i10git.cs.fau.de/pycodegen/pystencils/-/issues2022-06-29T09:47:56+02:00https://i10git.cs.fau.de/pycodegen/pystencils/-/issues/52Add possiblity to create ".pvd"-files in vtk-writer2022-06-29T09:47:56+02:00Christoph SchwarzmeierAdd possiblity to create ".pvd"-files in vtk-writerCurrently, the files that are written in pystencil's vtk-writer are stored as _vtkImageData_ (`.vti`) only. It would be great if the vtk-writer was able to create a file in _ParaView Data format_ (`.pvd`) which contains the path to each ...Currently, the files that are written in pystencil's vtk-writer are stored as _vtkImageData_ (`.vti`) only. It would be great if the vtk-writer was able to create a file in _ParaView Data format_ (`.pvd`) which contains the path to each `.vti`-file and the (LBM) time step at which the file was written.
In ParaView, "time" would then actually represent the (LBM) time step instead of being equal to the index, i.e., number of the loaded ".vti"-file.Release 1.1Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/pystencils/-/issues/29Aligned GPU Array2020-12-10T10:40:02+01:00Markus HolzerAligned GPU ArrayAt the moment only aligned CPU arrays exist. For GPU arrays it should also be possible to pass the alignment and create an array of which.
Possible implementation:
```
base_array = gpuarray.GPUArray((array.size + 8), dtype=array.dtype)...At the moment only aligned CPU arrays exist. For GPU arrays it should also be possible to pass the alignment and create an array of which.
Possible implementation:
```
base_array = gpuarray.GPUArray((array.size + 8), dtype=array.dtype)
gpu_array = gpuarray.GPUArray(
shape=tuple(array.shape),
dtype=array.dtype,
base=base_array,
gpudata=int(base_array.gpudata) + 24,
strides=tuple(gpuarray._compact_strides(array)),)
```https://i10git.cs.fau.de/pycodegen/pystencils/-/issues/51FAQ2021-12-10T13:37:01+01:00Markus HolzerFAQA FAQ in the repo would be good to have to list pitfalls etc which get reported. A first point to list for example could concern the installation of pystencils:
From time to time problems arise when installing `pystencils`. The latest ...A FAQ in the repo would be good to have to list pitfalls etc which get reported. A first point to list for example could concern the installation of pystencils:
From time to time problems arise when installing `pystencils`. The latest problem for example was that `pip` was not installed in a new `conda` environment and then for compiling the boundary C-File was linked with the wrong python version. Problems like these should be collected in an FAQ file or something similar.
Just by comparing with `NumPy` there is quite a long install prerequisite file although the installation of `NumPy` is really straightforward. Something like this I already imagine for `pystencils`:
https://numpy.org/install/Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/pystencils/-/issues/42Logging2022-05-25T10:19:32+02:00Markus HolzerLoggingPython provides very good logging functionality which should be used in pystencils. For example problems in the type-system could be logged on a debug level. Oftentimes it is necessary to add print statements in a debug session to see wh...Python provides very good logging functionality which should be used in pystencils. For example problems in the type-system could be logged on a debug level. Oftentimes it is necessary to add print statements in a debug session to see which expressions are cast to which type etc. This could always be logged on a debug level so we can just always see what happens in the back.
https://docs.python.org/3/howto/logging.htmlMarkus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/pystencils/-/issues/33Optimisation of numerical conditioning2022-07-19T14:01:51+02:00Markus HolzerOptimisation of numerical conditioningNumerical conditioning is very important, especially when using single precision. There are several cases that have been shown in the literature where this plays an important role. First storing only the deviation from the equilibrium of...Numerical conditioning is very important, especially when using single precision. There are several cases that have been shown in the literature where this plays an important role. First storing only the deviation from the equilibrium of the particle distributions of a lattice Boltzmann simulation instead of storing the equilibrium. Second in the advanced lattice Boltzmann methods like the cumulant LBM where it was shown that numerical conditioning is an extremely important task to get a stable simulation.
This task is very tedious and complicated. However, a starting point could be to look at [pyinterval](https://pypi.org/project/pyinterval/) and investigate the error which comes from certain operations. This could lead to knowledge on minimizing errors arising from numerical methods.https://i10git.cs.fau.de/pycodegen/pystencils/-/issues/53Show Assembly Instructions2022-06-29T09:47:44+02:00Markus HolzerShow Assembly InstructionsLike `ps.show_code` but to get the assembly instructions. Like #28 but without KernCraft.Like `ps.show_code` but to get the assembly instructions. Like #28 but without KernCraft.Release 1.1Markus HolzerMarkus Holzerhttps://i10git.cs.fau.de/pycodegen/pystencils/-/issues/55Support Reductions2024-03-15T14:29:57+01:00Markus HolzerSupport Reductionspystencils supports sympy Sum like this:
`sum = sp.Sum(sp.abc.k, (sp.abc.k, 1, 100))` will be printed as:
```c++
{
for (int64_t ctr_0 = 0; ctr_0 < _size_x_0; ctr_0 += 1)
{
_data_x[_stride_x_0*ctr_0] = [&]() {
doubl...pystencils supports sympy Sum like this:
`sum = sp.Sum(sp.abc.k, (sp.abc.k, 1, 100))` will be printed as:
```c++
{
for (int64_t ctr_0 = 0; ctr_0 < _size_x_0; ctr_0 += 1)
{
_data_x[_stride_x_0*ctr_0] = [&]() {
double sum = (double) 0;
for ( int k = 1.0; k <= 100.0; k += 1 ) {
sum += k;
}
return sum;
}();
}
}
```
This is C++ code and additionally, at the moment, it bypasses the type system a bit. Thus this should be reimplemented.Release 1.1