CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

volVectorField of only integers or longs

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 16, 2018, 10:35
Default volVectorField of only integers or longs
  #1
New Member
 
vinguva's Avatar
 
Join Date: Feb 2015
Posts: 9
Rep Power: 11
vinguva is on a distinguished road
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
vinguva is offline   Reply With Quote

Old   October 24, 2018, 07:33
Default
  #2
New Member
 
vinguva's Avatar
 
Join Date: Feb 2015
Posts: 9
Rep Power: 11
vinguva is on a distinguished road
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
vinguva is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 11:55.