Skip to content

Commit aa2ec73

Browse files
Allow error output when calibration is attempted on blocks without update_gradient (SimVascular#193)
1 parent 4a95a89 commit aa2ec73

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/optimize/calibrate.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ nlohmann::json calibrate(const nlohmann::json& config) {
4444
std::vector<int> param_ids;
4545
for (size_t k = 0; k < num_params; k++)
4646
param_ids.push_back(param_counter++);
47-
model.add_block("BloodVessel", param_ids, vessel_name);
47+
std::string block_type =
48+
vessel_config["zero_d_element_type"].get<std::string>();
49+
model.add_block(block_type, param_ids, vessel_name);
4850
vessel_id_map.insert({vessel_config["vessel_id"], vessel_name});
4951
DEBUG_MSG("Created vessel " << vessel_name);
5052

0 commit comments

Comments
 (0)