|
[Sponsors] |
July 11, 2019, 05:09 |
Need an array with cell height values
|
#1 |
New Member
Join Date: Aug 2017
Posts: 4
Rep Power: 8 |
What is it mean?
4:16: error: request for member 'component' in '((const Foam::dimensioned<double>*)this)->Foam::dimensioned<double>::value_', which is of non-class type 'const double' value_.component(d) ~~~~~~~^~~~~~~~~ Here is the problem code: forAll ( mesh.C(), celli) { const cell & cc = mesh.cells()[celli]; labelList pLabels(cc.labels(ff)); pointField pLocal(pLabels.size(), vector::zero); forAll (pLabels, pointi) pLocal[pointi] = pp[pLabels[pointi]]; scalar y1Dim = Foam::max(pLocal & vector(0,1,0)) - Foam::min(pLocal & vector(0,1,0)); yDim[celli]= y1Dim; } This code from the thread Cell size (x,y,z). Thanks for Niels. I need an array with cell height values. yDim is the dimentioned scalar. Any help will be greatly appreciated. Thanks, |
|
July 16, 2019, 05:32 |
|
#2 | |
Senior Member
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,684
Rep Power: 40 |
Quote:
Without the dimensions, you could simply try with the following: Code:
scalarList yDims(mesh.nCells()); boundBox cellBb; for (const celli < mesh.nCells(); ++celli) { cellBb.clear(); cellBb.add(mesh.points(), mesh.cellPoints(celli)); yDim[celli] = cellBb.span().y(); } Code:
for (const celli < mesh.nCells(); ++celli) { boundBox cellBb(mesh.points(), mesh.cellPoints(celli), false); yDim[celli] = cellBb.span().y(); } Code:
scalarList yDims(mesh.nCells()); for (const celli < mesh.nCells(); ++celli) { yDim[celli] = boundBox(mesh.points(), mesh.cellPoints(celli), false).span().y(); } |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] refineWallLayer Error | Yuby | OpenFOAM Meshing & Mesh Conversion | 2 | November 11, 2021 11:04 |
Set cell volume integrated field values to preserve integral | Diro7 | OpenFOAM Pre-Processing | 2 | June 3, 2018 10:44 |
Neighboring cells in tetrahedral mesh | vishwesh | OpenFOAM Programming & Development | 9 | November 10, 2017 07:06 |
Ensight - node values -cell values | leo | FLUENT | 1 | May 12, 2010 08:47 |
node values or cell values? | aPpA | FLUENT | 0 | November 10, 2006 08:56 |