Skip to content
Snippets Groups Projects
Verified Commit 8cb3437d authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Minor simplification in static block decomposition driver output

parent 4aa1ff1f
No related branches found
No related tags found
No related merge requests found
Pipeline #7865 passed
...@@ -830,20 +830,19 @@ StaticModel::writeBlockDriverOutput(ostream &output) const ...@@ -830,20 +830,19 @@ StaticModel::writeBlockDriverOutput(ostream &output) const
{ {
for (int blk = 0; blk < static_cast<int>(blocks.size()); blk++) for (int blk = 0; blk < static_cast<int>(blocks.size()); blk++)
{ {
output << "block_structure_stat.block(" << blk+1 << ").Simulation_Type = " << static_cast<int>(blocks[blk].simulation_type) << ";" << endl output << "M_.block_structure_stat.block(" << blk+1 << ").Simulation_Type = " << static_cast<int>(blocks[blk].simulation_type) << ";" << endl
<< "block_structure_stat.block(" << blk+1 << ").endo_nbr = " << blocks[blk].size << ";" << endl << "M_.block_structure_stat.block(" << blk+1 << ").endo_nbr = " << blocks[blk].size << ";" << endl
<< "block_structure_stat.block(" << blk+1 << ").mfs = " << blocks[blk].mfs_size << ";" << endl << "M_.block_structure_stat.block(" << blk+1 << ").mfs = " << blocks[blk].mfs_size << ";" << endl
<< "block_structure_stat.block(" << blk+1 << ").equation = ["; << "M_.block_structure_stat.block(" << blk+1 << ").equation = [";
for (int eq = 0; eq < blocks[blk].size; eq++) for (int eq = 0; eq < blocks[blk].size; eq++)
output << " " << getBlockEquationID(blk, eq)+1; output << " " << getBlockEquationID(blk, eq)+1;
output << "];" << endl output << "];" << endl
<< "block_structure_stat.block(" << blk+1 << ").variable = ["; << "M_.block_structure_stat.block(" << blk+1 << ").variable = [";
for (int var = 0; var < blocks[blk].size; var++) for (int var = 0; var < blocks[blk].size; var++)
output << " " << getBlockVariableID(blk, var)+1; output << " " << getBlockVariableID(blk, var)+1;
output << "];" << endl; output << "];" << endl;
} }
output << "M_.block_structure_stat.block = block_structure_stat.block;" << endl output << "M_.block_structure_stat.variable_reordered = [";
<< "M_.block_structure_stat.variable_reordered = [";
for (int i = 0; i < symbol_table.endo_nbr(); i++) for (int i = 0; i < symbol_table.endo_nbr(); i++)
output << " " << endo_idx_block2orig[i]+1; output << " " << endo_idx_block2orig[i]+1;
output << "];" << endl output << "];" << endl
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment