The application pyFoamChangeBoundaryType.py
produces a wrong constant/polyMesh/boundary
file, if the number of patches is greater than 20. For this cases the number of the list is written as floating point and not as integer to the file.
The floating point number is produced at this code line
theLen=len(lst)/2
So, changing line https://sourceforge.net/p/openfoam-extend/PyFoam/ci/default/tree/src/PyFoam/Basics/FoamFileGenerator.py#l203 from
s+=(" "*indent)+str(theLen)+"\n"
to
s+=(" "*indent)+str(int(theLen))+"\n"
solves the problem.
Yes. The problem is there.
And how about fixing it there like following?
Thanks for the report
The reason why it was a plain / is that this part was developed in Python2 and with Python3 it changed its semantics: before it was (if only integers were involved) an integer result. In Python3 the result became a float
As far as I can tell // behaves the same in 2 and 3 and I will replace that (as long as there are clusters with RHEL7-derivatives - which has python2.7 as a default- around I will keep the Python2-support)