|
[Sponsors] |
January 14, 2013, 10:12 |
How to transpose a list of scalar list?
|
#1 |
Member
|
Dear Foamers,
I am developing a new code for a reacting flow and using OF2.1.x. I should read a list of list (which contains scalars) and then transpose it. I did the first step but I can not do the other. The part of the code contains these step is in the following: Code:
List<List<scalar> > Y_(dict.lookup("Tin")); . . . wordList speciesNames ( dict.lookup("species") ); RectangularMatrix<doubleScalar> Ys(ns, Y_.size()); forAll(speciesNames, s) { List<List<scalar> > Ys[s][Y_.size()]; forAll(Y_,i) { Ys(s,i) = Y_[i][s]; } } Tin ( ( 1 2 3 ... ) ( 4 5 6 ... ) . . . ) ) After compiling, I encounter the following errors: error: ‘RectangularMatrix’ was not declared in this scope error: expected primary-expression before ‘>’ token error: ‘Ys’ was not declared in this scope Mohammad |
|
January 14, 2013, 16:43 |
|
#2 | |
Member
yijin Mao
Join Date: May 2010
Location: Columbia, MO
Posts: 62
Rep Power: 15 |
Quote:
|
||
January 14, 2013, 17:56 |
|
#3 |
Senior Member
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 740
Rep Power: 28 |
Edward's answer is correct. To further clarify, the compiler doesn't know how to build template objects RectangularMatrix of the type doubleScalar without information that is contained in the header file for that template class.
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swak4Foam] swak4foam building problem | GGerber | OpenFOAM Community Contributions | 54 | April 24, 2015 17:02 |
dieselFoam problem!! trying to introduce a new heat transfer model | vivek070176 | OpenFOAM Programming & Development | 10 | December 24, 2014 00:48 |
compressible flow in turbocharger | riesotto | OpenFOAM | 50 | May 26, 2014 02:47 |
CFX-Pre problem, pls help!!! | cth_yao | CFX | 0 | February 17, 2012 01:52 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |