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

How to extract face label point label relations

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 28, 2011, 06:09
Default How to extract face label point label relations
  #1
New Member
 
Stefan Sicklinger
Join Date: Mar 2011
Posts: 7
Rep Power: 15
clean-energy is on a distinguished road
Hello,

I would like to get a connectivity list between face labels and cell vertices (global) this should work also for parallel runs.

Could someone please point me to some methods from which I can get the information from.


ThX!
clean-energy is offline   Reply With Quote

Old   October 28, 2011, 17:37
Exclamation
  #2
New Member
 
Stefan Sicklinger
Join Date: Mar 2011
Posts: 7
Rep Power: 15
clean-energy is on a distinguished road
Some more details:

In the OF Users Guide it says:

5.1.1.1 Points

A point is a location in 3-D space, defined by a vector in units of metres (). The points are compiled into a list and each point is referred to by a label, which represents its position in the list, starting from zero. The point list cannot contain two different points at an exactly identical position nor any point that is not part at least one face.


My question is if anyone could please tell me, with routine allows it to query for these point label (global) in a boundary patch.


I figured out that the following code gives the point coords:

pointField patchPoints = mesh.boundaryMesh()[coupledPatchIDs[patchI]].localPoints();

patchPoints[0].x()


Could anyone maybe help me to get the point labels in a similar way?
clean-energy is offline   Reply With Quote

Old   October 28, 2011, 20:15
Default
  #3
Member
 
Ivor Clifford
Join Date: Mar 2009
Location: Switzerland
Posts: 94
Rep Power: 17
cliffoi is on a distinguished road
Forgetting about parallel runs for now, you can use mesh.pointFaces() to give you the list of faces sharing each point.
For parallel runs this is more difficult since OpenFOAM does not keep a list of all faces on each processor and doesn't use ghost cells either, i.e. the face information on neighbouring processors is not readily available.
A quick look at the doxygen brings up two possible classes which could help you with the parallel issue; mapDistributePolyMesh and globalMeshData. I couldn't tell you how to achieve this though.
cliffoi is offline   Reply With Quote

Old   November 2, 2011, 12:11
Default
  #4
New Member
 
Stefan Sicklinger
Join Date: Mar 2011
Posts: 7
Rep Power: 15
clean-energy is on a distinguished road
Thank you very much Ivor for your hints!

This code now returns the local labels of the points:

labelList meshPoints = mesh.boundaryMesh()[coupledPatchIDs[patchI]-coupledPatchIDs[patchI]].meshPoints();

List<labelList> allmeshPoints(Pstream::nProcs());

allmeshPoints[Pstream::myProcNo()] = meshPoints;
Pstream::gatherList( allmeshPoints);
if (Pstream::master())
{
meshPoints =
ListListOps::combine<labelList >
(
allmeshPoints,
accessOp<labelList >()
);
}

The problem is now that I get the nodes at the processor boundaries twice. Does anybody know how to avoid that?

Thank you very much!

Stefan
clean-energy 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
[blockMesh] Internal walls of zero thickness anger OpenFOAM Meshing & Mesh Conversion 23 February 6, 2020 19:25
[blockMesh] BlockMeshmergePatchPairs hjasak OpenFOAM Meshing & Mesh Conversion 11 August 15, 2008 08:36
extract point data susan Siemens 4 November 27, 2007 15:04
[Commercial meshers] Converting meshes that includes interfaces ham OpenFOAM Meshing & Mesh Conversion 29 January 8, 2007 09:58
CFX4.3 -build analysis form Chie Min CFX 5 July 13, 2001 00:19


All times are GMT -4. The time now is 04:39.