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

pointVectorField index from known volVectorField index

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 14, 2020, 13:46
Default pointVectorField index from known volVectorField index
  #1
Member
 
Join Date: Aug 2017
Posts: 32
Rep Power: 8
siefer92 is on a distinguished road
Howdy Yall:

I am trying to make a change on a point shared by two patches.

Looping over the volVectorField mesh parameters, (patches, faces and points), I can find which points are shared by two patches.

Now that I have a patchID, faceID and pointID I want to get the corresponding index from a pointVectorField.



Code:
        forAll(cPatchBI, faceBI)                                             // faceI: the face whose neighbour faces we want
        {
                forAll(cPatch, faceJ)                                         // faceJ: possible neighbour face
                {
                        forAll(cPatchBI[faceBI], pointBI)                       // check all points of which faceI consists
                        {

                                forAll(cPatch[faceJ], pointJ)                   // and compare them with the ones of faceJ
                                {
                                        if (cPatchBI[faceBI][pointBI] == cPatch[faceJ][pointJ])
                                        {
                                      
//                                      pointVectorField[INDEX THAT I NEED].component(x,y,z) = volVectorField.boundaryFieldRef()[patchID][faceJ].component(x,y,z) [I am assigning the value on this face to the point of interest]

                                        }
                                }
                        }
                }
        }
Long story short I am looking to take a known volVectorField ([patch][face][point]) reference and get the corresponding reference to a pointVectorField[point]

Last edited by siefer92; December 14, 2020 at 13:48. Reason: incomplete
siefer92 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
How to get the global index of a cell in UDF chuyi Fluent UDF and Scheme Programming 6 October 23, 2017 12:28
[General] 2 datas on one plot Akuji ParaView 46 December 1, 2013 14:06
[OpenFOAM] Paraview 3.98 - errors when saving geometry file pajot ParaView 1 September 28, 2013 10:45
Doxygen documentation Tanay OpenFOAM Installation 9 September 23, 2011 11:40
OpenFOAM install on Ubuntu Natty 11.04 bkubicek OpenFOAM 13 May 26, 2011 05:48


All times are GMT -4. The time now is 23:10.