|
[Sponsors] |
January 15, 2015, 02:07 |
tensorField assigning values
|
#1 |
New Member
Join Date: Mar 2012
Posts: 29
Rep Power: 14 |
Hello foamers,
I have a variable of the type of tensorField, which I would like to do some operation with: Code:
tensorField T; scalarField s(size, 1); T.component(tensor::XX)() = s; Code:
forAll(T.component(tensor::XX)(), i) { T.component(tensor::XX)()[i] = s[i]; } Thanks, yanxiang |
|
January 15, 2015, 16:06 |
|
#2 |
New Member
Join Date: Mar 2012
Posts: 29
Rep Power: 14 |
OK. I got this figured out.
Code:
forAll(T, i) { T[i] = tensor ( s[i], 0, 0, 0, 0, 0, 0, 0, 0 ); } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
TimeVaryingMappedFixedValue | irishdave | OpenFOAM Running, Solving & CFD | 32 | June 16, 2021 07:55 |
Loading Cell Values in Tecplot | P1361 | OpenFOAM Post-Processing | 3 | September 16, 2014 05:02 |
Assigning values to a cartesian grid from a binary image (or stl) | Cyp | OpenFOAM Pre-Processing | 1 | August 5, 2014 19:02 |
cell values vs node values | reversemermaid | FLUENT | 0 | March 13, 2014 19:06 |
Plotting raw data values | Wilesco | Siemens | 0 | January 5, 2006 06:34 |