2.0.0b10
catchment modelling framework
|
Provides fast access to Neumann boundaries for flux update. More...
Provides fast access to Neumann boundaries for flux update.
If many Neumann boundary conditions are present in a project, a fast data exchange to update the fluxes might be needed.
With this specialized list a num_array can be passed to the boundary conditions for a fast flux update If a multiple system layout for the cmf setup is chosen, we might have a node_list Dirichlet boundary conditions (dbc), a corresponding NeumannBoundary_list (nbc) of Neumann boundaries and a node_list containing the storages connected with the NeumannBoundary_list (storages). The fast data exchange is written in Python as:
Public Member Functions | |
void | append (NeumannBoundary::ptr nbc) |
Appends a neumann boundary to this list. | |
NeumannBoundary::ptr | get (ptrdiff_t index) const |
Returns the Neumann boundary condition at position index. | |
cmf::math::num_array | get_fluxes (cmf::math::Time t=cmf::math::Time()) const |
Returns the fluxes of the items as an array. | |
real | global_water_balance (cmf::math::Time t) const |
Returns the sum of the water balances of the nodes. | |
void | set_fluxes (cmf::math::num_array values) |
Sets the fluxes of the items from an array. | |
size_t | size () const |
returns the number of stored boundary conditions | |
cmf::water::node_list | to_node_list () const |
Creates a node_list from this NeumannBoundary_list. | |
cmf::math::num_array | water_balance (cmf::math::Time t) const |
Returns the water balance of each vector as a vector. | |
NeumannBoundary::ptr get | ( | ptrdiff_t | index | ) | const |
Returns the Neumann boundary condition at position index.
From Python you can use []
cmf::math::num_array get_fluxes | ( | cmf::math::Time | t = cmf::math::Time() | ) | const |
Returns the fluxes of the items as an array.
get_fluxes and set_fluxes are wrapped with the Python property fluxes
real global_water_balance | ( | cmf::math::Time | t | ) | const |
Returns the sum of the water balances of the nodes.
\[\sigma_{global} = \sum_{i=0}^N{\sum_{j=0}^{C_i}{q_{ij}(t)}} \]
Replaces slow Python code like:
void set_fluxes | ( | cmf::math::num_array | values | ) |
Sets the fluxes of the items from an array.
get_fluxes and set_fluxes are wrapped with the Python property fluxes
cmf::math::num_array water_balance | ( | cmf::math::Time | t | ) | const |
Returns the water balance of each vector as a vector.
\[ \sigma_i = \sum_{j=0}^{C_i}{q_{ij}(t)} \]
Replaces slow Python code like: