Reading input matrix in a solver
Hi! I would like to get input from a case file (we could call this file someProperties located in constant dir). The information to be read should be scalars in a 10x19 matrix. How could this be performed in OF (1.6-ext and simpleFoam, if it matters).
Should the matrix be declared as: int myMatrix[10][19]; and if so, how do I read the someProperties file to get the values into "myMatrix"? Best regards, tsimon. |
Hi,
you can define matrices this way: Matrix<scalar,scalar> matrix(19,10); With matrix[i][j] you can grab the elements. Now you have to find a nice way to read your elements from files. This depends on your data. regards treima |
All times are GMT -4. The time now is 05:03. |