Adds the index of equations (M_.blocksEQU) for a block decomposed model without bytecode option and use this index in resid.m to retrieve the residuals

issue#70
Ferhat Mihoubi 2012-03-08 15:28:17 +01:00
parent ffb5119807
commit 715df0c634
1 changed files with 9 additions and 0 deletions

View File

@ -1502,6 +1502,15 @@ StaticModel::writeOutput(ostream &output, bool block) const
output << "];" << endl;
}
output << "M_.blocksEQU = cell(" << nb_blocks << ", 1);" << endl;
for (int b = 0; b < (int) nb_blocks; b++)
{
unsigned int block_size = getBlockSize(b);
output << "M_.blocksEQU{" << b+1 << "} = [ ";
for (int i = 0; i < (int) block_size; i++)
output << getBlockEquationID(b, i)+1 << "; ";
output << "];" << endl;
}
}
SymbolType