|
[Sponsors] |
How to extract face label point label relations |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 28, 2011, 06:09 |
How to extract face label point label relations
|
#1 |
New Member
Stefan Sicklinger
Join Date: Mar 2011
Posts: 7
Rep Power: 15 |
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! |
|
October 28, 2011, 17:37 |
|
#2 |
New Member
Stefan Sicklinger
Join Date: Mar 2011
Posts: 7
Rep Power: 15 |
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? |
|
October 28, 2011, 20:15 |
|
#3 |
Member
Ivor Clifford
Join Date: Mar 2009
Location: Switzerland
Posts: 94
Rep Power: 17 |
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. |
|
November 2, 2011, 12:11 |
|
#4 |
New Member
Stefan Sicklinger
Join Date: Mar 2011
Posts: 7
Rep Power: 15 |
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 |
|
|
|
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 |