| 183 | //! returns name of a scalar at position scalat, i.e. it can be in the middle of vector name, in that case it adds "_%d" to it |
| 184 | std::string scalarname ( int scalat ) const { |
| 185 | bdm_assert_debug(scalat<dsize,"Wrong input index"); |
| 186 | int id=0; |
| 187 | int scalid=0; |
| 188 | while (scalid+SIZES(ids(id))<=scalat) { scalid+=SIZES(ids(id)); id++;}; |
| 189 | //now id is the id of variable of interest |
| 190 | if (size(id)==1) |
| 191 | return NAMES ( ids ( id ) ); |
| 192 | else |
| 193 | return NAMES ( ids ( id ) )+ "_" + num2str(scalat-scalid); |
| 194 | |
| 195 | } |