GithubHelp home page GithubHelp logo

Comments (2)

afalaize avatar afalaize commented on May 29, 2024

Hello @ntonnaett! Thank you for contibuting!

Yes, we are in a big mess here. The error occurs at c++ code generation, more preciely at generation of the array associated with the parameters contained in method.subs inherited from core.subs in
File "/home/nils/Development/pyphs/pyphs/numerics/cpp/method2cpp.py", line 331, in _append_subs

The problem is that the parameter with symbol Pickupf is an expression, not a numerical value:

>>> core.subs[core.symbols('Pickupf')]
1/(2*Pickup_Rb**2*Pickup_Rp*dtq_PickupOBS*((-Pickup_Lh**2 + (Pickup_Lv - Pickup_Rp + q_PickupOBS)**2)/(Pickup_Lh**2 + (Pickup_Lv - Pickup_Rp + q_PickupOBS)**2)**2 - (-Pickup_Lh**2 + (Pickup_Lv + Pickup_Rp + q_PickupOBS)**2)/(Pickup_Lh**2 + (Pickup_Lv + Pickup_Rp + q_PickupOBS)**2)**2))

At this point, it should have been substituted everywhere in method before entering the cpp code generation module, with a call to the core method substitute(selfexprs=True) (from the core or the method). At least, this was the case in pyphs 0.3 (current master which is broken due to dependencies).

I'll have a look as soon as possible

from pyphs.

afalaize avatar afalaize commented on May 29, 2024

solved by PR #130

from pyphs.

Related Issues (20)

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.