|
[Sponsors] |
October 16, 2018, 10:35 |
volVectorField of only integers or longs
|
#1 |
New Member
Join Date: Feb 2015
Posts: 9
Rep Power: 11 |
Hello Foamers,
May I ask if there is a data structure in OpenFOAM 4.x or higher that allows me to define a volVectorField or volScalarField that is only compromised of integers or longs that I can define in my createFields.H? I'd like to track an interface with interFoam by determining the neighbor cells that have the interface of an owner cell that also has the interFace. This means I'd define NeighborField[iCell].x() = CellID_Neighbor_1, NeighborField[iCell].y() = CellID_Neighbor_2, NeighborField[iCell].z() = -1. P.s. I am using isoAdvector to make my life easier and currently working in 2D. Also, if anyone has any ideas how to do this in 3D where I can access a owner cell based on owner ID and get its interface Neighbors IDs (predetermined using some code), that'd be great. I don't think a volVectorField would work in 3D. Kind Regards vinguva |
|
October 24, 2018, 07:33 |
|
#2 |
New Member
Join Date: Feb 2015
Posts: 9
Rep Power: 11 |
Hi Foamers,
I thought I'd reply to my own question for future reference for others who may ask this question also. The data structure to use is: labelListList for the neighbor cells List< List<vector> > for the edges of the neighbors. Regards vinguva |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Interpolation of a volVectorField onto processor patches | Mithrandirrr | OpenFOAM Programming & Development | 2 | April 5, 2023 17:36 |
the format of adding volVectorField term into equation | linyanx | OpenFOAM Programming & Development | 1 | March 16, 2017 09:27 |
making a volVectorField | sina_mech | OpenFOAM Programming & Development | 7 | July 7, 2016 14:49 |
Multiplication of two volVectorField | ChGr | OpenFOAM Programming & Development | 1 | May 30, 2016 11:08 |
Initialize a uniform 0 volVectorField | Schag | OpenFOAM | 3 | August 26, 2009 10:08 |