CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Meshing & Mesh Conversion

accesing points of a cell in a mesh

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 3, 2010, 09:05
Default accesing points of a cell in a mesh
  #1
Member
 
O R
Join Date: Mar 2009
Posts: 50
Rep Power: 8
arkangel is on a distinguished road
Dear Foamer,

I hope someone can help me

I have an external solver with a structured grid, I wan to interpolate the values of this grid into a polyMesh .

1) I can create one polyMesh with the information from the structured grid

2) or I can create the polyMesh in a more standard way and just interpolate the values of each grid on each other

I want to create a Chimera Grid like library , I know how to access the Cell center but to have a complete relationship I need to know the coordinates of the cell vertices, more or less like :

forAll(mesh.C(), cellI)
{

forAll(mesh.cells()[cellI].points(), pointI){
Info << mesh.cells()[cellI].points()[pointI].x()<<endl;
}

Info<<mesh.C()[cellI].x()<<endl;
}


How can I write the inner forAll to get the x,y,z coordinates of all points /vertices in one cell ?

Thanks
arkangel is offline   Reply With Quote

Old   June 28, 2012, 15:43
Default
  #2
New Member
 
Junpeng
Join Date: Jun 2012
Posts: 3
Rep Power: 5
rolandde is on a distinguished road
Did you figure it out? I have the same problem...
rolandde is offline   Reply With Quote

Old   October 16, 2012, 09:18
Default
  #3
Member
 
Adam
Join Date: Jun 2011
Posts: 32
Rep Power: 6
Smed is on a distinguished road
Can anyone answer this?
How do you access all of the vertices of a cell?

Code:
mesh.points()[cellI]
only returns the coordinates of a single vertex associated with that cell.
Smed is offline   Reply With Quote

Old   October 16, 2012, 12:11
Default
  #4
Member
 
Adam
Join Date: Jun 2011
Posts: 32
Rep Power: 6
Smed is on a distinguished road
This question is answered here:
http://www.cfd-online.com/Forums/ope...ize-x-y-z.html
Smed 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
[ICEM] Hexa mesh, curve mesh setup, bunching law Anorky ANSYS Meshing & Geometry 4 November 12, 2014 01:27
2D foam mesh and internal points virginie_e OpenFOAM Meshing Format & General Technical 3 February 28, 2014 01:05
Dynamic Mesh.. Layering.. cell addition kedarj14 OpenFOAM Programming & Development 0 January 29, 2010 02:48
external flow with snappyHexMesh chelvistero OpenFOAM 11 January 15, 2010 20:43
Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15


All times are GMT -4. The time now is 07:24.