You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The connections in cmf are written in C++ to use the full potential of speed. However, when new connections are developed, the write, compile, link, install, debug cycle is clumsy. Using Python flux connections would speed up development and can be translated into C++ when the math is working. This would also be a way to include Python developers more easily in the extension of cmf.
Due to the protected status of calc_q, this is not possible for flux_connection. However with a new class BaseConnection which exposes calc_q it works.
namespacecmf {
namespacewater {
classBaseConnection: publicflux_connection{
public:BaseConnection(cmf::water::WaterStorage::ptr left,
cmf::water::flux_node::ptr right,
std::string type)
: flux_connection(left, right, type)
{}
real calc_q(cmf::math::Time t) override
{
throwstd::runtime_error("BaseConnection.calc_q needs to be overriden by child class");
}
};
}
}
The connections in cmf are written in C++ to use the full potential of speed. However, when new connections are developed, the write, compile, link, install, debug cycle is clumsy. Using Python flux connections would speed up development and can be translated into C++ when the math is working. This would also be a way to include Python developers more easily in the extension of cmf.
Proposed usage:
The text was updated successfully, but these errors were encountered: