|
[Sponsors] |
April 3, 2018, 14:06 |
Initialize a matrix in openfoam
|
#1 |
New Member
Feiyu Yang
Join Date: Apr 2018
Posts: 2
Rep Power: 0 |
Hello foamers,
I am trying to define and initialize a 7x9 matrix in openfoam like this: Code:
Matrix<scalarField,scalar> W(7, 9) = { 3.20030, -1.80864, -1.39585, -1.59775, 0.70547, 1.88260, 0.91327, 0.67476, -0.14852, 2.95923, 2.65510, 0.54050, 2.59016, -0.14764, 3.06157, -0.01218, -0.17603, -5.14361, 3.54086, 3.04317, 2.39666, 3.80438, 8.35982, 12.46509, 9.40431, 8.10863, 3.11098, -0.53659, -0.55549, -0.25948, -0.50306, 0.09539, -0.91943, 0.12488, 0.05250, 0.86163, 3.50970, 3.01127, 2.37292, 3.76875, 8.28193, 12.34136, 9.32231, 8.03971, 3.07125, 0.64357, 0.52161, -0.01761, 0.71298, 0.10775, 2.08066, 0.14965, 0.15239, 0.20443, 6.68116, -2.62965, -1.95010, -2.11107, 2.85994, 5.33921, 3.35350, 2.73422, 0.74262, }; Code:
createFields.H: In function int main(int, char**): createFields.H:278:36: error: expected , or ; before = token regards |
|
Tags |
matrix operations |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Suggestion for a new sub-forum at OpenFOAM's Forum | wyldckat | Site Help, Feedback & Discussions | 20 | October 28, 2014 10:04 |
Force can not converge | colopolo | CFX | 13 | October 4, 2011 23:03 |
64bitrhel5 OF installation instructions | mirko | OpenFOAM Installation | 2 | August 12, 2008 19:07 |
OpenFOAM Debian packaging current status problems and TODOs | oseen | OpenFOAM Installation | 9 | August 26, 2007 14:50 |
OpenFOAM Training and Workshop Zagreb 2628Jan2006 | hjasak | OpenFOAM | 1 | February 2, 2006 22:07 |