Giter VIP home page Giter VIP logo

ofpp's People

Contributors

apollolv avatar timothy-edward-kendon avatar xu-xianghua avatar yuyangl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ofpp's Issues

Binary data reader exits on `}` character.

When reading binary data, I found that sometimes the reader exited early for boundary data. I think this is due to the fact that the } character is sometimes in binary OF data. In the function split_boundary_content this causes a wrong content range.

At line 172 of field_parser.py. I added an ugly fix which checks if the following line is long enough to still contain binary data:

        if in_boundary_field:
            #USER FIX
            if (lc.rstrip() == b'}' and len(content[n+1])<30):
                break
            if in_patch_field:
                if (lc.strip() == b'}' and len(content[n+1])<30):

Parsing internal filed with windows

Hi,
Parsing internal non uniform field with linux works fine, but with windows we get this error:

could not convert string to float: b'-3.85361e-19)'

It seems that the character ')' is read inside the string.
Regards
Robert

Wrong num_cell giving by the package

Hi,
First of all, thank for sharing this package, it's really useful to have this kind of tool to quickly load and manipulate OpenFOAM cases. I noticed a error about the total number of cells. The num_cell attribute return X cells, while there are X +1 cells (as it is written in the note of the constant/owner file)
Best regards,
Jérôme.

Postprocessing

Great job !
Many thanks for the modules :)

Do you plan to extend this module to post-processing utilities like extraction of data into an arbitrary plane, plot over line, etc ?
@greole https://github.com/greole/owls has also made an excellent package in this direction but it looks like his repository is not maintained anymore.

Anyway, congratulations for this awesome job and many thanks for sharing it.
Long life to ofpp :)

Regards,
François

parse_faces_content() fails for faces with more than 10 vertices

Hi,

Firstly, thanks for the library. I discovered it yesterday and it's already been very handy to debug my setup.

In return, I just wanted to point out that the subroutine parse_faces_content() fails for faces with more than 10 points as the line data = [[int(s) for s in ln[2:-2].split()] for ln in content[n + 2:n + 2 + num]] reasonably assumes that faces have less than 10 vertices. Ominously it appears I have just produced a mesh containing a face with 10 vertices. As OpenFOAM supports any shape of cell, perhaps consider changing the line to data = [[int(s) for s in re.findall(b"\d+", ln)[1:]] for ln in content[n + 2:n + 2 + num]]. Of course this requires an import of the re library.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.