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

How to extract face label point label relations

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   October 28, 2011, 05:09
Default How to extract face label point label relations
  #1
New Member
 
Stefan Sicklinger
Join Date: Mar 2011
Posts: 7
Rep Power: 6
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, 16:37
Exclamation
  #2
New Member
 
Stefan Sicklinger
Join Date: Mar 2011
Posts: 7
Rep Power: 6
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, 19:15
Default
  #3
Member
 
Ivor Clifford
Join Date: Mar 2009
Location: Switzerland
Posts: 91
Rep Power: 8
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: 6
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

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Internal walls of zero thickness anger OpenFOAM Native Meshers: blockMesh 21 March 19, 2015 10:21
BlockMeshmergePatchPairs hjasak OpenFOAM Native Meshers: blockMesh 11 August 15, 2008 07:36
extract point data susan CD-adapco 4 November 27, 2007 15:04
Converting meshes that includes interfaces ham OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 29 January 8, 2007 09:58
CFX4.3 -build analysis form Chie Min CFX 5 July 12, 2001 23:19


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