7#ifndef SVZERODSOLVER_MODEL_JUNCTION_HPP_
8#define SVZERODSOLVER_MODEL_JUNCTION_HPP_
91 static const std::vector<InputParameter>
112 void setup_dofs(DOFHandler& dofhandler)
override;
121 std::vector<double>& parameters)
override;
134 Eigen::Matrix<double, Eigen::Dynamic, 1>& residual,
135 Eigen::Matrix<double, Eigen::Dynamic, 1>& alpha,
136 std::vector<double>& y,
137 std::vector<double>& dy)
override;
BlockType
The types of blocks supported by the solver.
Definition BlockType.h:15
BlockClass
The classes/categories of blocks supported. Some classes require special handling (e....
Definition BlockType.h:44
SparseSystem source file.
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.
Definition Block.h:101
const int id
Global ID of the block.
Definition Block.h:78
const Model * model
The model to which the block belongs.
Definition Block.h:79
void update_constant(SparseSystem &system, std::vector< double > ¶meters) override
Update the constant contributions of the element in a sparse system.
Definition Junction.cpp:15
static const BlockClass block_class
Class of this block.
Definition Junction.h:90
static const std::vector< InputParameter > input_params
List of input parameter names.
Definition Junction.h:92
int num_inlets
Number of inlets to the block.
Definition Junction.h:151
TripletsContributions num_triplets
Number of triplets of element.
Definition Junction.h:145
void setup_dofs(DOFHandler &dofhandler) override
Set up the degrees of freedom (DOF) of the block.
Definition Junction.cpp:5
static const BlockType block_type
Type of this block.
Definition Junction.h:89
Junction(int id, Model *model)
Construct a new Junction object.
Definition Junction.h:100
int num_outlets
Number of outlets from the block.
Definition Junction.h:156
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) override
Set the gradient of the block contributions with respect to the parameters.
Definition Junction.cpp:35
Model of 0D elements.
Definition Model.h:55
The number of triplets that the element contributes to the global system.
Definition Block.h:27