| svZeroDSolver
    | 
#include <ResistiveJunction.h>
| Public Member Functions | |
| ResistiveJunction (int id, Model *model) | |
| Construct a new ResistiveJunction object. | |
| void | setup_dofs (DOFHandler &dofhandler) | 
| Set up the degrees of freedom (DOF) of the block. | |
| void | update_constant (SparseSystem &system, std::vector< double > ¶meters) | 
| Update the constant contributions of the element in a sparse system. | |
|  Public Member Functions inherited from Block | |
| Block (int id, Model *model, BlockType block_type, BlockClass block_class, std::vector< std::pair< std::string, InputParameter > > input_params) | |
| Construct a new Block object. | |
| ~Block () | |
| Destroy the Block object. | |
| Block (const Block &)=delete | |
| Copy the Block object. | |
| std::string | get_name () | 
| Get the name of the block. | |
| void | update_vessel_type (VesselType type) | 
| Update vessel type of the block. | |
| void | setup_params_ (const std::vector< int > ¶m_ids) | 
| Setup parameter IDs for the block. | |
| void | setup_dofs_ (DOFHandler &dofhandler, int num_equations, const std::list< std::string > &internal_var_names) | 
| Set up the degrees of freedom (DOF) of the block. | |
| virtual void | setup_model_dependent_params () | 
| Setup parameters that depend on the model. | |
| virtual void | setup_initial_state_dependent_params (State initial_state, std::vector< double > ¶meters) | 
| Setup parameters that depend on the initial state. | |
| virtual void | update_time (SparseSystem &system, std::vector< double > ¶meters) | 
| Update the time-dependent contributions of the element in a sparse system. | |
| virtual void | update_solution (SparseSystem &system, std::vector< double > ¶meters, const Eigen::Matrix< double, Eigen::Dynamic, 1 > &y, const Eigen::Matrix< double, Eigen::Dynamic, 1 > &dy) | 
| Update the solution-dependent contributions of the element in a sparse system. | |
| virtual void | post_solve (Eigen::Matrix< double, Eigen::Dynamic, 1 > &y) | 
| Modify the solution after solving it. | |
| virtual void | update_gradient (Eigen::SparseMatrix< double > &jacobian, Eigen::Matrix< double, Eigen::Dynamic, 1 > &residual, Eigen::Matrix< double, Eigen::Dynamic, 1 > &alpha, std::vector< double > &y, std::vector< double > &dy) | 
| Set the gradient of the block contributions with respect to the parameters. | |
| virtual TripletsContributions | get_num_triplets () | 
| Get number of triplets of element. | |
| Public Attributes | |
| TripletsContributions | num_triplets {0, 0, 0} | 
| Number of triplets of element. | |
|  Public Attributes inherited from Block | |
| const int | id | 
| Global ID of the block. | |
| const Model * | model | 
| The model to which the block belongs. | |
| const BlockType | block_type | 
| Type of this block. | |
| const BlockClass | block_class | 
| Class of this block. | |
| VesselType | vessel_type = VesselType::neither | 
| Vessel type of this block. | |
| const std::vector< std::pair< std::string, InputParameter > > | input_params | 
| Map from name to input parameter. | |
| std::vector< Node * > | inlet_nodes | 
| Inlet nodes. | |
| std::vector< Node * > | outlet_nodes | 
| Outlet nodes. | |
| bool | steady = false | 
| Toggle steady behavior. | |
| bool | input_params_list = false | 
| Are input parameters given as a list? | |
| std::vector< int > | global_param_ids | 
| Global IDs for the block parameters. | |
| std::vector< int > | global_var_ids | 
| Global variable indices of the local element contributions. | |
| std::vector< int > | global_eqn_ids | 
| Global equation indices of the local element contributions. | |
| TripletsContributions | num_triplets | 
| Number of triplets of element. | |
Models a junction with arbitrary resistive inlets and outlets. Across all inlets and outlets of the junction, mass is conserved.
![\[  \begin{circuitikz}
  \draw [-latex] (0.25,1.4) node[left] {$Q_{in,1}$} -- (0.85,1.1);
  \draw [-latex] (0.25,-1.4) node[left] {$Q_{in,1}$} -- (0.85,-1.1);
  \draw (1,1.0) node[anchor=south]{$P_{in,1}$} to [R, , l=$R_{in,1}$, *-*]
  (3.0,0) node[anchor=north] {$P_{C}$}; \draw (1,-1.0)
  node[anchor=north]{$P_{in, 2}$} to [R, , l=$R_{in,2}$, *-*] (3.0,0); \draw
  (3,0) node[anchor=south]{} to [R, l=$R_{out,1}$, -*] (5,1.0); \draw
(4.3,1.1)
  node[anchor=south] {$P_{out,1}$}; \draw (3,0) node[anchor=south]{} to [R,
  l=$R_{out,2}$, -*] (5,-1.0); \draw (4.3,-1.1) node[anchor=north]
  {$P_{out,2}$}; \draw [-latex] (5.15,1.1) -- (5.75,1.4) node[right]
  {$Q_{out,1}$}; \draw [-latex] (5.15,-1.1) -- (5.75,-1.4) node[right]
  {$Q_{out,2}$}; \end{circuitikz}
\]](form_113.png)
![\[  \sum_{i}^{n_{inlets}} Q_{in, i}=\sum_{j}^{n_{outlets}} Q_{out, j}
\]](form_114.png)
![\[  P_{in,i}-P_{C}=R_{in,i} \cdot Q_{in,i}\quad \forall i\in n_{inlets}
\]](form_115.png)
![\[  P_{C}-P_{out,j}=R_{out,j} \cdot Q_{out,j}\quad \forall j\in n_{outlets}
\]](form_116.png)
![\[  \mathbf{y}^{e}=\left[\begin{array}{lllllllllll}P_{in, 1}^{e} & Q_{in, 1}^{e}
  & \dots & P_{in, i}^{e} & Q_{in, i}^{e} & P_{out, 1}^{e} & Q_{out, 1}^{e} &
  \dots & P_{out, i}^{e} & Q_{out, i}^{e} & P_{C}\end{array}\right] \]](form_117.png)
Mass conservation
![\[  \mathbf{F}^{e}_1 = \left[\begin{array}{lllllllllll}0 & 1 & 0 & 1 & \dots & 0
  & -1 & 0 & -1 & \dots & 0\end{array}\right] \]](form_118.png)
![\[ \mathbf{F}^{e}_{2,...,n} = \left[\begin{array}{lllll}\dots &
  \underbrace{1}_{P_{in,i}} & \underbrace{-R_{in,i}}_{Q_{in,i}} & \dots &
  \underbrace{-1}_{P_{C}}\end{array}\right] \quad \mathrm{with} \quad \forall
  i\in n_{inlets}  \]](form_119.png)
![\[ \mathbf{F}^{e}_{2,...,n} = \left[\begin{array}{lllll}\dots &
  \underbrace{-1}_{P_{out,j}} & \underbrace{-R_{out,j}}_{Q_{out,j}} & \dots &
  \underbrace{1}_{P_{C}}\end{array}\right] \quad \mathrm{with} \quad \forall
  j\in n_{oulets}  \]](form_120.png)
Parameter sequence for constructing this block
i Poiseuille resistance for inner blood vessel iNames of internal variables in this block's output:
pressure_c: Pressure at the center of the junction | 
 | inline | 
Construct a new ResistiveJunction object.
| id | Global ID of the block | 
| model | The model to which the block belongs | 
| 
 | virtual | 
Set up the degrees of freedom (DOF) of the block.
Set global_var_ids and global_eqn_ids of the element based on the number of equations and the number of internal variables of the element.
| dofhandler | Degree-of-freedom handler to register variables and equations at | 
Reimplemented from Block.
| 
 | virtual | 
Update the constant contributions of the element in a sparse system.
| system | System to update contributions at | 
| parameters | Parameters of the model | 
Reimplemented from Block.
| TripletsContributions ResistiveJunction::num_triplets {0, 0, 0} | 
Number of triplets of element.
Number of triplets that the element contributes to the global system (relevant for sparse memory reservation)